From b573e53e9cc95d1944f83e5a8ef626150895a138 Mon Sep 17 00:00:00 2001 From: bholmesdev Date: Tue, 28 Feb 2023 10:24:21 -0500 Subject: [PATCH] refactor: ASTRO_CI_PERFORMANCE_RUN -> ASTRO_PERFORMANCE_BENCHMARK --- packages/astro/performance/content-benchmark.mjs | 4 ++-- packages/integrations/mdx/src/plugins.ts | 2 +- packages/markdown/remark/src/index.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/astro/performance/content-benchmark.mjs b/packages/astro/performance/content-benchmark.mjs index 2b6d73b8a..a0b5ae6b2 100644 --- a/packages/astro/performance/content-benchmark.mjs +++ b/packages/astro/performance/content-benchmark.mjs @@ -6,7 +6,7 @@ import { cyan, bold, dim } from 'kleur/colors'; // Skip nonessential remark / rehype plugins for a fair comparison. // This includes heading ID generation, syntax highlighting, GFM, and Smartypants. -process.env.ASTRO_CI_PERFORMANCE_RUN = true; +process.env.ASTRO_PERFORMANCE_BENCHMARK = true; const extByFixture = { md: '.md', @@ -70,7 +70,7 @@ async function benchmark({ fixtures, templates }) { }); } } finally { - process.env.ASTRO_CI_PERFORMANCE_RUN = false; + process.env.ASTRO_PERFORMANCE_BENCHMARK = false; } })(); diff --git a/packages/integrations/mdx/src/plugins.ts b/packages/integrations/mdx/src/plugins.ts index e31de1207..a7d24d3f2 100644 --- a/packages/integrations/mdx/src/plugins.ts +++ b/packages/integrations/mdx/src/plugins.ts @@ -25,7 +25,7 @@ import remarkShiki from './remark-shiki.js'; import { isRelativePath, jsToTreeNode } from './utils.js'; // Skip nonessential plugins during performance benchmark runs -const isPerformanceBenchmark = Boolean(process.env.ASTRO_CI_PERFORMANCE_RUN); +const isPerformanceBenchmark = Boolean(process.env.ASTRO_PERFORMANCE_BENCHMARK); export function recmaInjectImportMetaEnvPlugin({ importMetaEnv, diff --git a/packages/markdown/remark/src/index.ts b/packages/markdown/remark/src/index.ts index ebf3dbf79..2366497e7 100644 --- a/packages/markdown/remark/src/index.ts +++ b/packages/markdown/remark/src/index.ts @@ -40,7 +40,7 @@ export const markdownConfigDefaults: Omit, 'draft }; // Skip nonessential plugins during performance benchmark runs -const isPerformanceBenchmark = Boolean(process.env.ASTRO_CI_PERFORMANCE_RUN); +const isPerformanceBenchmark = Boolean(process.env.ASTRO_PERFORMANCE_BENCHMARK); /** Shared utility for rendering markdown */ export async function renderMarkdown(