Skip to content

Commit

Permalink
feat: 🎸 add npm 8 support (#57)
Browse files Browse the repository at this point in the history
Co-authored-by: Jiří Fencl <[email protected]>
  • Loading branch information
crysadrak and Jiří Fencl authored Oct 19, 2021
1 parent e4c0b55 commit e671a3f
Show file tree
Hide file tree
Showing 14 changed files with 16 additions and 14 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
---
**NOTE**

npm6 users: the root postinstall npm script has been removed and have to be executed manually by `npx lerna bootstrap` after `npm install`
npm7 users may notice shorter output from `npm install`, package dependecies are optimized using npm workspaces
The root postinstall `lerna bootstrap` has been replaced for non-CI cases by `lerna run prepare`. This should cover all use-cases in both `npm <= 6` and `npm >= 7` versions.

In `npm >= 7` there is [npm workspace bug](https://github.com/npm/cli/issues/3840): the build of all monorepo packages (included in `lerna bootstrap` command) should be run by root `npm install` but it does not accept the per-package `prepare` scripts yet.
---

## Release
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"version": "1.0.0",
"scripts": {
"postinstall": "if ! $CI; then lerna run prepare; fi",
"commit": "git-cz",
"test": "jest --coverage --no-watchman --config=jest.config.js",
"lint:cmd": "eslint -c ./.eslintrc.js --ignore-path ./.gitignore",
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-hot-reload/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@
]
},
"engines": {
"npm": ">=4 <8"
"npm": ">=4 <9"
}
}
2 changes: 1 addition & 1 deletion packages/plugin-merkur/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@
"@ima/core": ">= 17.0.0"
},
"engines": {
"npm": ">=4 <8"
"npm": ">=4 <9"
}
}
2 changes: 1 addition & 1 deletion packages/plugin-merkur/src/__tests__/MerkurResourceSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ describe('MerkurResource class', () => {

it('should throw error for undefined data', async () => {
await expect(merkurResource.get()).rejects.toThrow(
"Cannot read property 'containerSelector' of undefined"
"Cannot read properties of undefined (reading 'containerSelector')"
);
});

Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-resource-loader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"license": "MIT",
"engines": {
"node": ">=6",
"npm": ">=4 <8"
"npm": ">=4 <9"
},
"browserify": {
"transform": [
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-rest-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
},
"engines": {
"node": ">=6",
"npm": ">=4 <8"
"npm": ">=4 <9"
},
"browserify": {
"transform": [
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-script-loader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
},
"engines": {
"node": ">=6",
"npm": ">=4 <8"
"npm": ">=4 <9"
},
"browserify": {
"transform": [
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-select/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
},
"engines": {
"node": ">=6",
"npm": ">=4 <8"
"npm": ">=4 <9"
},
"dependencies": {
"hoist-non-react-statics": "^3.3.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-self-xss/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@
},
"engines": {
"node": ">=6",
"npm": ">=4 <8"
"npm": ">=4 <9"
}
}
2 changes: 1 addition & 1 deletion packages/plugin-shared-cache/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
},
"engines": {
"node": ">=6",
"npm": ">=4 <8"
"npm": ">=4 <9"
},
"browserify": {
"transform": [
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-style-loader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
},
"engines": {
"node": ">=6",
"npm": ">=4 <8"
"npm": ">=4 <9"
},
"browserify": {
"transform": [
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-testing-integration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"license": "MIT",
"engines": {
"node": ">=6",
"npm": ">=4 <8"
"npm": ">=4 <9"
},
"browserify": {
"transform": [
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-websocket/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@
]
},
"engines": {
"npm": ">=4 <8"
"npm": ">=4 <9"
}
}

0 comments on commit e671a3f

Please sign in to comment.