Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): stop npm 12 silently skipping node-pty builds in the pinned runtime #9380

Closednone23(GitHub profile, opens in a new tab)wants to merge 4 commits intomain fromrefs/pull/9380/headopened View on GitHub

Showing 5 changed files with 28 additions and 2 deletions (loading 2).

x
0 of 5 viewed, 5 left
2 additions and 2 deletionsapps/server/src/cli/servicePreflight.tsModified
View file
@@ -10,8 +10,8 @@
}).pipe(
Command.unlisted,
Command.withHandler(({ databasePath, launcherProtocol }) =>
- Console.log(JSON.stringify(runServicePreflight({ databasePath, launcherProtocol }))).pipe(
- Effect.asVoid,
+ Effect.promise(() => runServicePreflight({ databasePath, launcherProtocol })).pipe(
+ Effect.flatMap((result) => Console.log(JSON.stringify(result))),
),
),
);
9 additions and 0 deletionsapps/server/src/cloud/pinnedRuntime.test.tsModified
View file
@@ -136,6 +136,15 @@
validatedDirectory = staging.versionDir;
assert.isFalse(yield* fs.exists(finalPaths.versionDir));
assert.isTrue(yield* fs.exists(staging.entryPath));
+ // The manifest npm read while installing must let node-pty build.
+ const manifest = yield* fs.readFileString(
+ path.join(staging.versionDir, "package.json"),
+ );
+ // @effect-diagnostics-next-line preferSchemaOverJson:off - staged file written by the code under test.
+ assert.deepEqual((JSON.parse(manifest) as { allowScripts: unknown }).allowScripts, {
+ "node-pty": true,
+ "msgpackr-extract": true,
+ });
}).pipe(Effect.orDie),
});