fix(CodeSigningPlugin): sign assets at processAssets ANALYSE stage before REPORT#1379
Conversation
🦋 Changeset detectedLatest commit: b7f7682 The changes in this PR will be included in the next version bump. This PR includes changesets to release 6 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
@JhohellsDL is attempting to deploy a commit to the Callstack Team on Vercel. A member of the Team first needs to authorize it. |
|
Is there some simple way to test this locally? What would you recommend? @JhohellsDL |
There was a problem hiding this comment.
the PR is pretty solid 👍
I tested it locally with apps/tester-app using temporary processAssets REPORT-stage capture plugin & the results satisfied my expectations:
- capture report showed all remote chunks signed at REPORT stage (they're showed unsigned on
mainbranch tho) - remote chunk loads successfully when
verifyScriptSignature: 'strict'& public key embedded in the app
Screen.Recording.2026-04-14.at.17.17.40.mp4
can you just consider a few suggestions before merge:
|
@JhohellsDL could you please take a look and resolve the linting errors |
|
@dannyhw, thanks for the feedback! I’ve addressed the linting issues and pushed an update. Please take another look. |
|
@JhohellsDL if you can address those last comments I think we can move forward and merge this 👍 |
|
@dannyhw, Ready, I’ve addressed the comments. I’ll keep an eye out for any further feedback 👍 |
|
Thanks @JhohellsDL, appreciate your responsiveness and all your hard work 🙇♂️ |
dannyhw
left a comment
There was a problem hiding this comment.
thanks for your contribution 🙇♂️
Summary
Fixes #1377
CodeSigningPluginwas signing bundles incompiler.hooks.assetEmitted,which fires after
processAssetscompletes. When usingwithZephyr(),Zephyr captures and uploads assets at
PROCESS_ASSETS_STAGE_REPORT(5000)— before
assetEmittedfires — resulting in unsigned bundles being uploadedto the CDN, making
verifyScriptSignature: 'strict'ineffective.Changes
assetEmittedtoprocessAssetsatPROCESS_ASSETS_STAGE_ANALYSE(2000), before Zephyr'sREPORTstage (5000)compilation.updateAsset()instead of reading/writing from disk
chunkFilenamesSet andemithook — no longer needed sincesigning iterates
compilation.chunksdirectly insideprocessAssetsREPORTstage## Behaviorsection explaining the signing stageTesting
REPORTstage confirmingassets are already signed when captured
withZephyr()— bundlesuploaded to CDN now contain the signature and
verifyScriptSignature: 'strict'works correctly