-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix NPM dependencies #1012
Fix NPM dependencies #1012
Conversation
@@ -62,7 +62,6 @@ | |||
"@loadable/component": "^5.15.0", | |||
"@wojtekmaj/enzyme-adapter-react-17": "^0.6.6", | |||
"enzyme": "^3.8.0", | |||
"enzyme-adapter-react-16": "1.15.2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting that we didn't clean this up before. Nice catch
Hey @adamraya, Back to the original question, which was what happens how when a dev runs |
The generated lock files using NPM 8 use lockfileVersion:2 and are backwards compatible with lockfileVersion:1 I confirmed this by removing the node_modules folders and running npm ci using NPM 6. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks for fixing @adamraya 🙏
LGTM
* develop: Allow query hook parameters to be `null`. (#1046) Implement `updateCustomerPassword` as no-op. (#1031) Update Retail React App Page Designer integration README (#1041) BUG: Changed type of the phone number field to bring up numberic keyboard on mobile devices - W-9871940 (#1016) Move the MRT reference app to the SDKs, so that we can verify eg. Node support (#966) Update `develop` with `release-v2.7.0` (#1033) Remove unused dependencies. (#1020) Make some style decisions on padding (#1023) Update CHANGELOG.md (#1021) Support product-sets in retail-react-app (#1019) Simplify hooks logic (#959) Fix NPM dependencies (#1012) # Conflicts: # lerna.json # package-lock.json # package.json # packages/commerce-sdk-react/CHANGELOG.md # packages/commerce-sdk-react/package-lock.json # packages/commerce-sdk-react/package.json # packages/internal-lib-build/package-lock.json # packages/internal-lib-build/package.json # packages/pwa-kit-create-app/package-lock.json # packages/pwa-kit-create-app/package.json # packages/pwa-kit-dev/CHANGELOG.md # packages/pwa-kit-dev/package-lock.json # packages/pwa-kit-dev/package.json # packages/pwa-kit-dev/src/configs/webpack/config.js # packages/pwa-kit-dev/src/ssr/server/build-dev-server.js # packages/pwa-kit-react-sdk/CHANGELOG.md # packages/pwa-kit-react-sdk/package-lock.json # packages/pwa-kit-react-sdk/package.json # packages/pwa-kit-runtime/CHANGELOG.md # packages/pwa-kit-runtime/package-lock.json # packages/pwa-kit-runtime/package.json # packages/template-express-minimal/package-lock.json # packages/template-express-minimal/package.json # packages/template-retail-react-app/app/hooks/use-add-to-cart-modal.js # packages/template-retail-react-app/app/partials/product-view/index.jsx # packages/template-retail-react-app/package-lock.json # packages/template-retail-react-app/package.json # packages/template-typescript-minimal/package-lock.json # packages/template-typescript-minimal/package.json # packages/test-commerce-sdk-react/package-lock.json # packages/test-commerce-sdk-react/package.json
Description
The PR uses NPM 8 to re-generate the lock files using
lockfileVersion:2
which is backwards compatible withlockfileVersion:1
solving the NPM warningnpm WARN old lockfile
.Regenerating lock files using NPM 8 uncovered a few problems with the dependencies resolution in our package.json files.
These are the changes done to successfully re-generate lock files using NPM 7 or 8:
Package
template-retail-react-app
@chakra-ui/system
v1 to prevent downloading an incompatible v2.@testing-library/dom
todevDependecies
since is used by some tests:pwa-kit/packages/template-retail-react-app/app/components/icons/index.test.js
Line 8 in d64503d
Package
pwa-kit-react-sdk
enzyme-adapter-react-16
. Since requires react@16 and we currently use react@17.Generator script
After re-generating the package-lock.json files, the generator script was stuck waiting for the local NPM Verdaccio.
A recent change made in the integration hooks branch on a PR also regenerating lock files seems to solve that problem here as well.
The PR also fixes a Warning when pushing a bundle to MRT using Node 16.
The change is backwards compatible with Node 14.
Types of Changes
How to Test-Drive This PR
Verify we can re-generate lock files using NPM 8.
fix-npm-peer-dependencies
. Remove node_modules folders and package-lock.json filesVerify we don't see a warning when pushing a bundle to MRT using Node 16.
npm run push
command to push a bundle to an MRT environment.Checklists
General
Accessibility Compliance
You must check off all items in one of the follow two lists:
or...
Localization