The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 22, 17:00 UTC
fix(release): desktop builds pass again after the vite-plus 1.4 upgrade (#24867)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Theo Browne committed
Oct 25, 2026 at 05:21 UTC
d2f6ff4581d0417b9d750d6a0bfcd6af975349ed
2 files changed
+18
-2
scripts/lib/cli-external-packages.test.ts
+15
@@ -150,6 +150,21 @@ var x = 1;
150
assert.deepStrictEqual(result.inlinedPackages, ["effect", "yaml"]);
151
assert.deepStrictEqual(result.inlined, []);
152
});
153
+
154
+ it("reads the plain `// <path>` markers newer Rolldown emits", () => {
155
+ const source = [
156
+ "// \0rolldown/runtime.js",
157
+ "var x = 1;",
158
+ "// ../../node_modules/.pnpm/node-addon-api@7.1.1/node_modules/node-addon-api/index.js",
159
+ "var y = 2; // trailing comment",
160
+ "// ../../src/server/main.ts",
161
+ "",
162
+ ].join("\n");
163
+ const result = findInlinedExternalPackages(source);
164
+
165
+ assert.strictEqual(result.regionCount, 3);
166
+ assert.deepStrictEqual(result.inlined, ["node-addon-api"]);
167
+ });
168
});
169
170
describe("findEsmImportsOfExternalPackages", () => {
scripts/lib/cli-external-packages.ts
+3
-2
@@ -61,8 +61,9 @@ export function findInlinedExternalPackages(source: string): {
61
readonly inlined: ReadonlyArray<string>;
62
readonly inlinedPackages: ReadonlyArray<string>;
63
} {
64
- // Rolldown marks each inlined module with a `//#region <path>` comment.
65
- const regionPattern = /\/\/#region\s+(\S+)/g;
64
+ // Rolldown marks each inlined module with a `//#region <path>` line; newer
65
+ // releases (vite-plus 1.4) emit a bare `// <path>` line instead.
66
+ const regionPattern = /^\/\/(?:#region)?[ \t]+(\S+)[ \t]*$/gm;
67
const packagePattern = /node_modules\/((?:@[^/\s]+\/)?[^/\s]+)\//g;
68
69
let regionCount = 0;