Convert package manager from yarn to npm#6030
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
Ignoring alerts on:
|
Tested against the npm-converted dependency PRs (tarball build)Since the dep conversions are not published yet, I verified this gui migration against the actual npm-converted dependency code, not just the currently-published packages. I tarballed every unmerged gui-relevant MethodFor each dep PR: checked out the PR head, Dep PRs tarballed (17)edge-core-js#723, edge-currency-accountbased#1054, edge-currency-plugins#449, edge-exchange-plugins#454, edge-currency-monero#103, edge-login-ui-rn#294, edge-info-server#153, biggystring#24, disklet#45, yaob#35, react-native-airship#43, react-native-patina#10, react-native-mymonero-core#16, react-native-piratechain#21, react-native-zano#13, react-native-zcash#66, updot#2. Results
Conclusion: this gui npm migration builds and runs against the npm-converted versions of all its Edge dependencies, not only the published ones. Honest caveats
|
Add explicit return types to main, pickBuildNumber, chdir, and call, and type the top-level catch callback variable as unknown.
- Replace yarn.lock with a freshly generated package-lock.json (cold npm install on current develop). - Swap package.json resolutions for npm overrides, drop the yarn and yarn-deduplicate devDeps, bump patch-package to ^8, set packageManager to npm, and change the fix script to use npm dedupe. - Persist the prior yarn --ignore-scripts behavior via ignore-scripts=true in .npmrc, and add legacy-peer-deps=true so npm tolerates the same peer-dep conflicts yarn classic did. - Convert yarn invocations to npm in .travis.yml, Jenkinsfile, scripts/prepare.sh, webpack.config.js, and developer docs (README.md, AGENTS.md, docs/MAESTRO.md). Remove the yarn global-install step from maestro.sh and rename the bootstrap function accordingly.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 349f156. Configure here.
|
@SocketSecurity ignore npm/edge-currency-accountbased@4.83.0 Accepting this HTTP-dependency alert. edge-currency-accountbased@4.83.0 transitively pulls @zano-project/zano-utils-js from a first-party EdgeApp release tarball. This dependency is pre-existing on develop (the same tarball is pinned in develop's yarn.lock); it is only re-surfaced here because the yarn to npm conversion regenerates the lockfile as package-lock.json, which Socket scans as a new manifest. No new third-party code is introduced by this PR. |




CHANGELOG
Does this branch warrant an entry to the CHANGELOG?
changed: Migrate package manager from yarn to npm.Dependencies
noneThis PR does not depend on any other PR. See the discovery map in the Description: the gui consumes its Edge dependencies as published npm packages, so the in-flight dep-repo conversions do not block this change.
Requirements
If you have made any visual changes to the GUI. Make sure you have:
No visual GUI changes (toolchain only). Verified on an iOS simulator instead: cold
npm cifrom the new lockfile, a full iOS build through the standard path, and YOLO auto-login landing in the funded wallet list. Proof screenshots are attached in a comment below.Description
Asana task
Migrates edge-react-gui from yarn to npm. The repo was yarn-locked (yarn.lock present, package-lock.json removed upstream); this converts the lockfile and everything that assumed yarn.
What changed:
yarn.lockwith a freshly generatedpackage-lock.json(coldnpm installon current develop, not a stale copy).package.json:resolutionstooverrides, drop theyarnandyarn-deduplicatedevDeps, bumppatch-packageto^8, setpackageManagertonpm@11.15.0, and change thefixscript tonpm dedupe..npmrc: addignore-scripts=true(preserving the prior.yarnrc --ignore-scripts truebehavior) andlegacy-peer-deps=trueso npm tolerates the same peer-dep conflicts yarn classic did. Remove.yarnrc..travis.yml,Jenkinsfile,scripts/prepare.sh,webpack.config.js, and the developer docs (README.md,AGENTS.md,docs/MAESTRO.md). Remove the yarn global-install step frommaestro.sh.The shared harness tooling detects the package manager by lockfile, so replacing yarn.lock with package-lock.json flips all of it to npm automatically.
Discovery map (Matt / peachbits yarn-to-npm conversions across EdgeApp):
edge-core-js ^2.44.0,edge-currency-accountbased ^4.82.0,edge-exchange-plugins ^2.46.0, etc.), so the dep-internal package-manager conversions do not block the gui's own migration. None were found to block install, build, or run empirically.Prior art: the conversion mirrors a previous npm-migration commit, regenerated cold against current develop so the lockfile matches today's dependency tree.
Test evidence (iOS simulator, npm path, cold):
npm cifrom the committedpackage-lock.json: clean, 2586 packages.npm run prepareandnpm run prepare.ios(pod install, 177 pods) succeed under npm.node_modules.tsc, eslint, and jest pass under npm.Note
Medium Risk
Tooling and lockfile changes affect every install and CI build;
.npmrcandoverridescan shift resolved dependency versions, though scope is build/dev infrastructure rather than app logic.Overview
Migrates the repo from Yarn to npm by committing a fresh
package-lock.json(and droppingyarn.lock), pinningpackageManagertonpm@11.15.0, moving Yarnresolutionsto npmoverrides, and replacing yarn-specific dev tooling (yarn,yarn-deduplicate) with npm equivalents (npm dedupe, updatedpatch-package)..npmrcnow setsignore-scripts=true(same behavior as the old.yarnrc) andlegacy-peer-deps=trueso installs behave like Yarn classic on peer conflicts. CI and scripts (.travis.yml,Jenkinsfile,preparepaths,maestro.sh) callnpm ci,npm run …, andnpm testinstead of yarn. Contributor docs (README.md,AGENTS.md,docs/MAESTRO.md) and the unreleased CHANGELOG describe npm as the only supported package manager.The iOS
Podfile.lockdiff reflects dependency bumps pulled in when the tree was resolved under npm (Edge native modules such asedge-core-js,react-native-zcash, etc.), not a separate feature change.Reviewed by Cursor Bugbot for commit 349f156. Bugbot is set up for automated code reviews on this repo. Configure here.