Skip to content

Commit f091325

Browse files
committed
Exclude dependency instructions from Windows builds
Signed-off-by: Joseph Yaksich <gitcommit90@users.noreply.github.com>
1 parent d7c04a9 commit f091325

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

scripts/package-windows.cjs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ const IGNORE_NON_RUNTIME_ROOTS = /^\/(?!package\.json$|LICENSE$|NOTICE$|desktop(
2121
// well adds deeply nested Radix paths that legacy Squirrel/NuGet cannot
2222
// releasify under Windows' 260-character path limit.
2323
const IGNORE_CLIENT_BUILD_MODULES = /^\/node_modules\/@excalidraw(?:$|\/)/;
24+
// Some production dependencies publish maintainer instruction files. They are
25+
// useful in source checkouts but are not runtime assets and must not enter an
26+
// installed app or release package.
27+
const IGNORE_INSTRUCTION_FILES = /\/AGENTS\.md$/;
2428

2529
if (process.platform !== "win32" || process.arch !== "x64") throw new Error("Windows packaging must run on Windows x64.");
2630
if (!/^\d+\.\d+\.\d+$/.test(VERSION)) throw new Error("package.json must contain a release version.");
@@ -83,7 +87,7 @@ async function main() {
8387
dir: ROOT, name: PRODUCT, executableName: PRODUCT, appCopyright: "Copyright (c) 2026 Joseph Yaksich",
8488
win32metadata: { CompanyName: "Joseph Yaksich", FileDescription: PRODUCT, OriginalFilename: "1Helm.exe", ProductName: PRODUCT, InternalName: PRODUCT },
8589
platform: "win32", arch: "x64", out: windowsScratch, overwrite: true, prune: true, asar: false, icon: ico,
86-
ignore: [IGNORE_NON_RUNTIME_ROOTS, IGNORE_CLIENT_BUILD_MODULES, /\.DS_Store$/, /\.log$/],
90+
ignore: [IGNORE_NON_RUNTIME_ROOTS, IGNORE_CLIENT_BUILD_MODULES, IGNORE_INSTRUCTION_FILES, /\.DS_Store$/, /\.log$/],
8791
});
8892
const appExe = path.join(appDir, "1Helm.exe");
8993
if (!fs.existsSync(appExe)) throw new Error("Packaged Windows application is missing 1Helm.exe.");

test/desktop.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,8 @@ test("desktop entrypoint keeps the renderer sandboxed and data on the Mac", asyn
155155
assert.match(windowsPackager, /path\.join\(DIST, path\.basename\(nupkg\)\)/, "the uploaded package keeps the exact basename referenced by RELEASES");
156156
assert.match(windowsPackager, /signPackagedExecutables\(appDir\)/, "release signing covers nested Windows executables before packaging");
157157
assert.match(windowsPackager, /IGNORE_CLIENT_BUILD_MODULES/, "Windows packaging omits client source already compiled into the browser bundle");
158+
assert.match(windowsPackager, /IGNORE_INSTRUCTION_FILES/, "Windows packaging omits dependency maintainer instructions");
159+
assert.match(windowsPackager, /\/AGENTS\\\.md\$/, "Windows packages never include dependency AGENTS.md files");
158160
assert.match(windowsPackager, /fs\.mkdtempSync\(path\.join\(path\.parse\(ROOT\)\.root, "1hw-"\)\)/, "the packaged app and Squirrel staging tree share a drive-root scratch path compatible with legacy Windows path handling");
159161
for (const [source, requiredPaths] of [
160162
[windowsPackager, ["/scripts", "/scripts/1helm-oci-runtime", "/scripts/mnemosyne-bridge.py", "/scripts/install-wsl-runtime.ps1", "/scripts/windows-removal.cjs", "/deploy/1helm-oci-runtime-v1.conf", "/container/Containerfile.oci"]],

0 commit comments

Comments
 (0)