refactor: --perf -> --internal-ci-perf

This commit is contained in:
bholmesdev 2023-02-27 13:40:03 -05:00
parent fe9f086907
commit 8e68877c4b
6 changed files with 22 additions and 70 deletions

View file

@ -5,7 +5,8 @@
"main": "index.js",
"private": true,
"scripts": {
"build": "astro build --perf"
"build:perf": "astro build --internal-ci-perf",
"build": "astro build"
},
"keywords": [],
"author": "",

View file

@ -5,7 +5,8 @@
"main": "index.js",
"private": true,
"scripts": {
"build": "astro build --perf"
"build:perf": "astro build --internal-ci-perf",
"build": "astro build"
},
"keywords": [],
"author": "",

View file

@ -5,13 +5,14 @@
"main": "index.js",
"private": true,
"scripts": {
"build": "astro build --perf"
"build:perf": "astro build --internal-ci-perf",
"build": "astro build"
},
"keywords": [],
"author": "",
"license": "unlicensed",
"dependencies": {
"@astrojs/mdx": "^0.16.2",
"@astrojs/mdx": "^0.17.2",
"@performance/utils": "^0.0.0",
"astro": "^2.0.12"
}

View file

@ -7,7 +7,15 @@
"write": "run-p write:*",
"write:md": "node scripts/write-posts.mjs fixtures/md/src/content/generated 1000 md",
"write:mdx": "node scripts/write-posts.mjs fixtures/mdx/src/content/generated 1000 mdx",
"write:mdoc": "node scripts/write-posts.mjs fixtures/mdoc/src/content/generated 1000 mdoc"
"write:mdoc": "node scripts/write-posts.mjs fixtures/mdoc/src/content/generated 1000 mdoc",
"build": "run-s build:*",
"build:perf": "run-s build:perf:*",
"build:md": "cd fixtures/md && run-s build",
"build:mdx": "cd fixtures/mdx && run-s build",
"build:mdoc": "cd fixtures/mdoc && run-s build",
"build:perf:md": "cd fixtures/md && run-s build:perf",
"build:perf:mdx": "cd fixtures/mdx && run-s build:perf",
"build:perf:mdoc": "cd fixtures/mdoc && run-s build:perf"
},
"keywords": [],
"author": "",

View file

@ -27,8 +27,10 @@ export function createBaseSettings(config: AstroConfig): AstroSettings {
}
export function createSettings(config: AstroConfig, cwd?: string): AstroSettings {
// TODO: hoisted to flags handler
const performanceRun = process.argv.some((arg) => arg === '--perf');
// Used to test with the internal performance package
// Skips non-essential Markdown and MDX remark plugins for a fair baseline
// against other formats (ex. Markdoc).
const performanceRun = process.argv.some((arg) => arg === '--internal-ci-perf');
const tsconfig = loadTSConfig(cwd);
const settings = createBaseSettings(config);

View file

@ -1158,11 +1158,11 @@ importers:
packages/astro/performance/fixtures/mdx:
specifiers:
'@astrojs/mdx': ^0.16.2
'@astrojs/mdx': ^0.17.2
'@performance/utils': ^0.0.0
astro: ^2.0.12
dependencies:
'@astrojs/mdx': 0.16.2_astro@packages+astro
'@astrojs/mdx': link:../../../../integrations/mdx
'@performance/utils': link:../utils
astro: link:../../..
@ -4079,56 +4079,6 @@ packages:
vscode-uri: 3.0.7
dev: false
/@astrojs/markdown-remark/2.0.1_astro@packages+astro:
resolution: {integrity: sha512-xQF1rXGJN18m+zZucwRRtmNehuhPMMhZhi6HWKrtpEAKnHSPk8lqf1GXgKH7/Sypglu8ivdECZ+EGs6kOYVasQ==}
peerDependencies:
astro: '*'
dependencies:
'@astrojs/prism': 2.0.0
astro: link:packages/astro
github-slugger: 1.5.0
import-meta-resolve: 2.2.1
rehype-raw: 6.1.1
rehype-stringify: 9.0.3
remark-gfm: 3.0.1
remark-parse: 10.0.1
remark-rehype: 10.1.0
remark-smartypants: 2.0.0
shiki: 0.11.1
unified: 10.1.2
unist-util-visit: 4.1.2
vfile: 5.3.7
transitivePeerDependencies:
- supports-color
dev: false
/@astrojs/mdx/0.16.2_astro@packages+astro:
resolution: {integrity: sha512-ZNOdBW7ExnWM50+wubg8iw5J1jkUVkTHAJXQt3IwH4TVIOC3mQyr5hDPfN2/pwG9Ch9RNlI+7nsDFNaHY0AeaA==}
engines: {node: '>=16.12.0'}
dependencies:
'@astrojs/markdown-remark': 2.0.1_astro@packages+astro
'@astrojs/prism': 2.0.0
'@mdx-js/mdx': 2.3.0
'@mdx-js/rollup': 2.3.0
acorn: 8.8.2
es-module-lexer: 0.10.5
estree-util-visit: 1.2.1
github-slugger: 1.5.0
gray-matter: 4.0.3
kleur: 4.1.5
rehype-raw: 6.1.1
remark-frontmatter: 4.0.1
remark-gfm: 3.0.1
remark-smartypants: 2.0.0
shiki: 0.11.1
unist-util-visit: 4.1.2
vfile: 5.3.7
transitivePeerDependencies:
- astro
- rollup
- supports-color
dev: false
/@astrojs/node/1.1.0:
resolution: {integrity: sha512-4KkCEFYtmTUSvU49UZSJD/VQfD/oKzf0ld8COjFW1pxfquBgvevLxRVpYLRanZB20L3c8/xyyQpDq7zMSMqQrg==}
dependencies:
@ -4151,13 +4101,6 @@ packages:
- supports-color
dev: false
/@astrojs/prism/2.0.0:
resolution: {integrity: sha512-YgeoeEPqsxaEpg0rwe/bUq3653LqSQnMjrLlpYwrbQQMQQqz6Y5yXN+RX3SfLJ6ppNb4+Fu2+Z49EXjk48Ihjw==}
engines: {node: '>=16.12.0'}
dependencies:
prismjs: 1.29.0
dev: false
/@astrojs/webapi/1.1.1:
resolution: {integrity: sha512-yeUvP27PoiBK/WCxyQzC4HLYZo4Hg6dzRd/dTsL50WGlAQVCwWcqzVJrIZKvzNDNaW/fIXutZTmdj6nec0PIGg==}
dependencies:
@ -9591,10 +9534,6 @@ packages:
unbox-primitive: 1.0.2
which-typed-array: 1.1.9
/es-module-lexer/0.10.5:
resolution: {integrity: sha512-+7IwY/kiGAacQfY+YBhKMvEmyAJnw5grTUgjG85Pe7vcUI/6b7pZjZG8nQ7+48YhzEAEqrEgD2dCz/JIK+AYvw==}
dev: false
/es-module-lexer/1.1.1:
resolution: {integrity: sha512-n3ruqU8Te7I5prBd6d0darM8ajFuVNhLWvgo04hN7goWSaSrxe7ENOZitac7akN0A2o+8fMomBDsNPvW/eE3CQ==}
dev: false