Skip to content

Commit 2ff96ea

Browse files
authored
test(e2e): fix sveltekit-3 test, turn on VOLTA_FEATURE_PNPM (#22647)
This updates the tsconfig error that was failing the sveltekit-3 test. Also, setting `VOLTA_FEATURE_PNPM=1` in the environment allows it to pass locally, otherwise it'd use the volta pinned node v20, which fails with `Promise.withResolvers is not a function`, because the e2e test requires node 22.
1 parent 2ccddd2 commit 2ff96ea

2 files changed

Lines changed: 13 additions & 4 deletions

File tree

dev-packages/e2e-tests/run.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,13 @@ async function run(): Promise<void> {
183183
const env = {
184184
...process.env,
185185
...envVarsToInject,
186+
// Volta applies a project's node pin only to commands it manages, and it
187+
// manages pnpm only when this is set. Without it, the `volta run pnpm`
188+
// calls below build each app on whatever node is already on PATH rather
189+
// than the version its package.json pins. CI reads that pin directly
190+
// (see `node-version-file` in .github/workflows/build.yml), so leaving
191+
// this unset makes local runs fail on apps CI passes.
192+
VOLTA_FEATURE_PNPM: '1',
186193
};
187194

188195
console.log('Syncing packed tarball symlinks...');
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
{
2-
"extends": "./.svelte-kit/tsconfig.json",
2+
// Kit 3 generates the parent config at `node_modules/$app/tsconfig`
3+
// and never writes `.svelte-kit/tsconfig.json`. `svelte-kit sync`
4+
// creates a placeholder there before it loads `src/env.ts`, so the
5+
// transform no longer races the generated file.
6+
"extends": "$app/tsconfig",
7+
"include": ["src"],
38
"compilerOptions": {
49
"allowJs": true,
510
"esModuleInterop": true,
@@ -11,7 +16,4 @@
1116
"allowImportingTsExtensions": true
1217
}
1318
// Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias
14-
//
15-
// If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes
16-
// from the referenced tsconfig.json - TypeScript does not merge them in
1719
}

0 commit comments

Comments
 (0)