From eb7d8f7ab13def1de2017b677267a5e2150ae137 Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Thu, 9 Jan 2025 17:03:05 -0500 Subject: [PATCH] ope --- .github/workflows/compat-tests.yml | 2 +- scripts/test-package-manager.mjs | 20 ++++++++++++++++++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/.github/workflows/compat-tests.yml b/.github/workflows/compat-tests.yml index 5760fbde10..14c70e830e 100644 --- a/.github/workflows/compat-tests.yml +++ b/.github/workflows/compat-tests.yml @@ -91,7 +91,7 @@ jobs: strategy: matrix: packageManager: [npm, yarn, pnpm] - kind: [alpha, beta, stable] + kind: [alpha, beta, stable, false] steps: - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4 diff --git a/scripts/test-package-manager.mjs b/scripts/test-package-manager.mjs index 7c02c6a0e8..372daac9a5 100644 --- a/scripts/test-package-manager.mjs +++ b/scripts/test-package-manager.mjs @@ -67,7 +67,21 @@ async function buildAll(tag) { const packages = await gatherPackages(strategy.config); const applied = await applyStrategy(config, strategy, packages, packages); - console.log(applied.public_pks); + /** + * The applied stategy is mostly based off release/strategy.json + * We want to change it dynamically for our test using the "tag" + * + * It's lies, as we're not changing the versions, but the release / build + * code has different behavior based on channel + */ + for (let [pkgName, config] of Object.entries(applied.public_pks)) { + applied.public_pks[pkgName] = { + ...config, + stage: tag, + types: tag, + }; + } + await generatePackageTarballs(config, packages, applied.public_pks); } @@ -233,7 +247,9 @@ async function main() { `Expected passed arg, the packageManager (${packageManager}), to be one of ${[...SUPPORTED.values()].join(', ')}` ); - assert(TAGS.has(tag), `Expected passed arg, the tag (${tag}), to be one of ${[...TAGS.values()].join(', ')}`); + if (tag) { + assert(TAGS.has(tag), `Expected passed arg, the tag (${tag}), to be one of ${[...TAGS.values()].join(', ')}`); + } await deleteTars(); await buildAll(tag);