Skip to content

Commit 19b6f68

Browse files
committed
fix(test): pass --ignore-engines to yarn in sandbox specs
`b4912ad7eb` removed the repo-root `.yarnrc` (`ignore-engines true`). `openfeature.spec.js` still shells out to yarn after `bun add` pulls in `@hono/node-server@2.x` (`engines.node >= 20`), so on the node-oldest matrix entry yarn errors before the build step and the integration-esbuild job hangs past 30 minutes against ~160s on master. `iast-stack-traces-with-sourcemaps` follows the same shape with deps that happen to be Node-18-clean today; pass the flag inline there too to keep the contract explicit so a future dep bump can't silently break the same matrix entry again.
1 parent 73fc7e0 commit 19b6f68

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

integration-tests/appsec/iast-stack-traces-with-sourcemaps.spec.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ describe('IAST stack traces and vulnerabilities with sourcemaps', () => {
1717

1818
appDir = path.join(cwd, 'appsec', 'iast-stack-traces-ts-with-sourcemaps')
1919

20-
childProcess.execSync('yarn || yarn', { cwd })
20+
// The root `.yarnrc` that used to carry `ignore-engines true` is gone. The current
21+
// sandbox deps happen to be clean on every supported Node version, so pass the flag
22+
// inline to keep the contract explicit and stop a future dep bump from silently
23+
// breaking the node-oldest matrix. Keep the retry pattern for transient registry blips.
24+
childProcess.execSync('yarn --ignore-engines || yarn --ignore-engines', { cwd })
2125
childProcess.execSync('npx tsc', {
2226
cwd: appDir,
2327
})

integration-tests/esbuild/openfeature.spec.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ esbuildVersions.forEach((version) => {
2323
execSync(`rm -rf ${path.join(cwd, 'bun.lock')}`, { cwd })
2424
execSync('npm install -g yarn', { cwd })
2525

26-
execSync('yarn', { cwd })
26+
// `@hono/node-server@2.x` declares `engines.node >= 20`. The matrix still exercises
27+
// node-oldest (18), and the root `.yarnrc` that used to carry `ignore-engines true`
28+
// is gone, so yarn would error out before we ever build. Pass the flag inline.
29+
execSync('yarn --ignore-engines', { cwd })
2730
})
2831

2932
beforeEach(async () => {

0 commit comments

Comments
 (0)