Build: Sanitize publish-time .yarnrc.yml in after-storybook sandboxes#34851
Draft
valentinpalkovic wants to merge 1 commit into
Draft
Build: Sanitize publish-time .yarnrc.yml in after-storybook sandboxes#34851valentinpalkovic wants to merge 1 commit into
valentinpalkovic wants to merge 1 commit into
Conversation
Strip Verdaccio / host-local Yarn settings (npmRegistryServer pointing at localhost:6001, unsafeHttpWhitelist, enableImmutableInstalls, logFilters, npmMinimalAgeGate, etc.) from `*\/after-storybook\/.yarnrc.yml` before the sandbox tree is pushed to `storybookjs/sandboxes`. Also drop install artifacts (`.yarn/cache`, `node_modules`, `.pnp.cjs`, `storybook-static`) from the published copy. `before-storybook/.yarnrc.yml` is intentionally untouched — its contents are the user-facing Yarn setup we want consumers to reproduce. Includes a regression test asserting the exact STRIP_KEYS / EXCLUDE_GLOBS contracts so mutations require a deliberate review.
4 tasks
Contributor
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Strip Verdaccio / host-local Yarn settings from
*/after-storybook/.yarnrc.ymlbefore the sandbox tree is pushed tostorybookjs/sandboxes. Drop install artifacts (.yarn/cache,node_modules,.pnp.cjs,storybook-static, etc.) from the published copy.This is Phase 1 of the agreed sandbox-yarn-quarantine plan: ship the supply-chain-leak fix (consumers should not inherit
npmRegistryServer: http://localhost:6001/,npmMinimalAgeGate: 0, or other Verdaccio bootstrap settings) without requiring the larger Yarn 4 migration. Phase 0 already shipped via #34846; Phase 2 (Yarn 4 +before-storybooklockfile commit + post-bootstrapyarn up) follows in #STACKED.What's stripped from
after-storybook/.yarnrc.ymlnpmRegistryServerlocalhost:6001unsafeHttpWhitelistenableImmutableInstallsenableMirrorlogFiltersnpmMinimalAgeGatepnpFallbackModeenableGlobalCachechecksumBehaviorWhat's excluded from the published copy
.yarn/cache/**,.yarn/install-state.gz,.yarn/build-state.yml,.yarn/unplugged/**,.pnp.cjs,.pnp.loader.mjs,node_modules/**,.cache/**,storybook-static/**What's intentionally NOT touched
before-storybook/.yarnrc.yml— that's the user-facing Yarn setup we want consumers to reproduce.before-storybook/yarn.lock— Phase 2 will commit these to the sandboxes repo for reproducibility.Test plan
STRIP_KEYSintegrity, EXCLUDE_GLOBS integrity, before-storybook untouched, idempotency (7 tests passing locally)storybookjs/sandboxeslocalhost:6001in committed.yarnrc.yml→ expect zero)