Repository navigation
Conversation
The committed lockfiles for bwell-typescript-react and bwell-react-native resolved 663 packages from a private npm mirror, so `npm install` failed with E401 for anyone without b.well credentials. - Rewrite those "resolved" URLs to registry.npmjs.org. Every entry was checked to have an identical integrity hash on npmjs; no versions or packages change. - Add a CI check (check_public_npm_registry.yml) that fails if a lockfile resolves from any other registry or references a local yalc build. - Gitignore .npmrc and document the lockfile rule in the root README.
wfieldx
reviewed
Nov 9, 2026
Collaborator
|
Lockfile fix checks out: all 663 rewritten entries match npmjs on integrity and tarball URL, and no versions moved. Inline comments are about tightening the guard. Separately, |
Author
Made a ticket here: https://icanbwell.atlassian.net/browse/EA-2907 |
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
Makes the TypeScript examples installable by anyone with a plain
npm install, with no b.well credentials needed, and adds a CI check so they stay that way.The committed lockfiles for
bwell-typescript-reactandbwell-react-nativeresolved 663 packages from a private npm mirror: 43 in the React app, including@icanbwell/bwell-sdk-ts, and 620 in React Native. Anyone outside b.well got:npm's message points at npmjs.com and
npm login, but the real cause was the lockfile URLs.Companion PR: icanbwell/bwell-sdk#1060 (internal) documents testing local SDK builds in these examples.
Changes
bwell-typescript-react/package-lock.json,bwell-react-native/package-lock.json): every private-mirrorresolvedURL is rewritten to itsregistry.npmjs.orgtarball. Each entry was checked before rewriting to have an identical integrity hash on npmjs. Onlyresolvedlines change; no versions move and no packages are added or removed..github/workflows/check_public_npm_registry.yml,.github/scripts/check-public-npm-registry.sh): runs on pull requests and pushes tomain. It fails if a committed lockfile resolves from any host other thanregistry.npmjs.org, or ifpackage.jsonor a lockfile references a local yalc build. Errors annotate the offending line. The script also runs locally from the repo root..gitignore: ignores.npmrc, so local registry config with credentials can't be committed.README.md: adds "Contributing: keep lockfiles on public npmjs", explaining the rule and how to run the check locally.Developers who install through a private mirror are unaffected. npm swaps the
registry.npmjs.orghost for the configured registry at install time.Testing
Clean installs (
npm ci, empty cache) in throwaway copies of each app:.npmrc.npmrcbwell-typescript-reactregistry.npmjs.orgbwell-react-nativeregistry.npmjs.orgThese runs used
--ignore-scriptsand didn't start the apps; they confirm every dependency resolves and installs.CI check, run in a scratch repo:
main's original React Native lockfilepackage.jsonwith a yalc linkNotes for reviewers
Check Public npm Registryas a required status check onmain.actions/checkout@v4by tag, matching the repo's other workflows. Happy to pin it to a commit SHA if preferred.