diff --git a/packages/astro/performance/fixtures/md/package.json b/packages/astro/performance/fixtures/md/package.json index 1a00dc341..7442acde4 100644 --- a/packages/astro/performance/fixtures/md/package.json +++ b/packages/astro/performance/fixtures/md/package.json @@ -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": "", diff --git a/packages/astro/performance/fixtures/mdoc/package.json b/packages/astro/performance/fixtures/mdoc/package.json index 968b237fe..194ec140a 100644 --- a/packages/astro/performance/fixtures/mdoc/package.json +++ b/packages/astro/performance/fixtures/mdoc/package.json @@ -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": "", diff --git a/packages/astro/performance/fixtures/mdx/package.json b/packages/astro/performance/fixtures/mdx/package.json index 8ea312ab8..4a6b23bc2 100644 --- a/packages/astro/performance/fixtures/mdx/package.json +++ b/packages/astro/performance/fixtures/mdx/package.json @@ -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" } diff --git a/packages/astro/performance/package.json b/packages/astro/performance/package.json index a5aa407da..4c9413b12 100644 --- a/packages/astro/performance/package.json +++ b/packages/astro/performance/package.json @@ -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": "", diff --git a/packages/astro/src/core/config/settings.ts b/packages/astro/src/core/config/settings.ts index d11ab4d1b..f3f9d22e7 100644 --- a/packages/astro/src/core/config/settings.ts +++ b/packages/astro/src/core/config/settings.ts @@ -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); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8f0dd91f3..ad67f3ed0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1154,11 +1154,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:../../.. @@ -4070,56 +4070,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: @@ -4142,13 +4092,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: @@ -9582,10 +9525,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