Skip to content

Ship assets/ in the npm package - #75

Merged
ctate merged 1 commit into
mainfrom
fix/npm-package-assets
Jul 9, 2026
Merged

ctate merged 1 commit into
mainfrom
fix/npm-package-assets

Conversation

@ctate

@ctate ctate commented Jul 9, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #72

Bug

@native-sdk/cli 0.4.0 ships without assets/, so every Windows build of a generated app fails at compile with '...\@native-sdk\cli\assets\native-sdk.manifest' file_hash FileNotFound — build/app.zig embeds the Windows manifest via dep.path("assets/native-sdk.manifest"), resolved from the installed package. macOS packaging assets (icon, entitlements) were exposed to the same failure class.

Fix

  • copy-framework.js (prepack) now stages the repo-root assets/ dir into the package, and package.json lists assets in files
  • check-framework-sync.js gains a regression guard: it extracts every package-relative dep.path reference in build/app.zig and fails if any is missing from the staged mirror or not covered by files

Verification

  • Repro before / pass after on macOS via packed tarball → temp install → native init → zig build -Dtarget=x86_64-windows
  • Repro before / pass after on real Windows 11 (Zig 0.16.0, Node 24): reporter's exact flow native init + native build --yes now links the exe
  • Guard negative-tested both legs (missing staged dir, missing files entry)
  • npm run scripts:check and repo gate green

@vercel

vercel Bot commented Jul 9, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
native-sdk Ready Ready Preview, Comment Jul 9, 2026 12:24pm

- Stage the repo-root assets/ dir in copy-framework.js and list it in package.json files so generated apps can resolve assets/native-sdk.manifest (and the macOS icon/entitlements) from the installed package
- Guard against regressions: check-framework-sync.js now fails when any dep.path reference in build/app.zig is missing from the staged mirror or the files array

Fixes #72

Co-authored-by: lzitser23 <10744132+lzitser23@users.noreply.github.com>
@ctate
ctate force-pushed the fix/npm-package-assets branch from 1c93459 to c6786ca Compare July 9, 2026 12:23
@ctate
ctate merged commit 79afe58 into main Jul 9, 2026
21 checks passed

This branch was successfully deployed

1 active deployment
Preview — c6786ca1 Deployed Jul 9, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

npm package 0.4.0 ships without assets/ - all Windows builds fail on missing native-sdk.manifest

1 participant