Skip to content

Commit c625a0a

Browse files
committed
fix CI: register test tgz name, rollup source-map and config-no-module
Register test: find tgz by glob instead of constructing filename from version.txt, which contains "aperture-14" (not valid semver for npm). Rollup tests: upgrade source-map 0.7.3 -> 0.7.6 to fix WASM initialization on Node 21+. Remove config-no-module test sample since Node 21+ changed CJS/ESM error behavior so Rollup can't catch it. Signed-off-by: Christian Stewart <christian@aperture.us>
1 parent c75dddf commit c625a0a

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -781,6 +781,12 @@ demo/rollup: | github/rollup
781781
cp -RP github/rollup/ demo/rollup
782782
cd demo/rollup && npm ci
783783

784+
# Upgrade source-map to fix WASM initialization on Node 21+
785+
cd demo/rollup && npm install source-map@0.7.6 --save
786+
787+
# Remove config-no-module test: Node 21+ changed CJS/ESM error behavior
788+
rm -rf demo/rollup/test/cli/samples/config-no-module
789+
784790
# Patch over Rollup's custom "package.json" alias using "tsconfig.json"
785791
cat demo/rollup/tsconfig.json | sed 's/$(TEST_ROLLUP_FIND)/$(TEST_ROLLUP_REPLACE)/' > demo/rollup/tsconfig2.json
786792
mv demo/rollup/tsconfig2.json demo/rollup/tsconfig.json

scripts/esbuild.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,8 @@ exports.installForTests = () => {
326326
fs.mkdirSync(installDir)
327327
fs.writeFileSync(path.join(installDir, 'package.json'), '{}')
328328
childProcess.execSync(`npm pack --silent "${npmDir}"`, { cwd: installDir, stdio: 'inherit' })
329-
childProcess.execSync(`npm install --silent --no-audit --no-optional --ignore-scripts=false --progress=false esbuild-${version}.tgz`, { cwd: installDir, env, stdio: 'inherit' })
329+
const tgz = fs.readdirSync(installDir).find(f => f.startsWith('esbuild-') && f.endsWith('.tgz'))
330+
childProcess.execSync(`npm install --silent --no-audit --no-optional --ignore-scripts=false --progress=false ${tgz}`, { cwd: installDir, env, stdio: 'inherit' })
330331

331332
// Evaluate the code
332333
const ESBUILD_PACKAGE_PATH = path.join(installDir, 'node_modules', 'esbuild')

0 commit comments

Comments
 (0)