Skip to content

Commit

Permalink
ci: replace npm with pnpm and bump package json
Browse files Browse the repository at this point in the history
* Bump node version from 10 to 14 required bump of responsive json webpack
* Bump husky version from 6 to 7 requires husky install and config changes
* Bump jest-mock-props to v1.9.0 allows removal of module declaration
* Replace babel polyfill with core js and regenerator runtime
  • Loading branch information
iamogbz committed Jul 1, 2021
1 parent 8d92228 commit 1d14846
Show file tree
Hide file tree
Showing 12 changed files with 8,197 additions and 21,759 deletions.
21 changes: 13 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,36 @@ jobs:
- name: Setup
uses: actions/setup-node@v1
with:
node-version: 10
node-version: 14.x
- uses: pnpm/action-setup@v2.0.1
with:
version: 6.0.2
run_install: |
args: [--frozen-lockfile]
- name: Install
run: |
npm install
pnpm install
- name: Lint
run: |
npm run lint
pnpm run lint
- name: Typecheck
run: |
npm run typecheck
pnpm run typecheck
- name: Test
env:
CI: true
run: |
npm test -- --ci --coverage
pnpm test -- --ci --coverage
- name: Report
if: github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]'
env:
COVERALLS_GIT_BRANCH: ${{ github.ref }}
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: |
npm run coveralls
pnpm run coveralls
- name: Build
run: |
npm run build
pnpm run build
- name: Deploy
if: github.ref == 'refs/heads/master' && github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]'
env:
Expand All @@ -45,4 +50,4 @@ jobs:
GOOGLE_CLIENT_SECRET: ${{ secrets.GOOGLE_CLIENT_SECRET }}
GOOGLE_REFRESH_TOKEN: ${{ secrets.GOOGLE_REFRESH_TOKEN }}
run: |
npm run release
pnpm run release
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v10.15.3
v14.17.1
4 changes: 4 additions & 0 deletions commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

pnpm commitlint --edit "$1"
21,728 changes: 0 additions & 21,728 deletions package-lock.json

This file was deleted.

24 changes: 9 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
"lint-staged": {
"*.{js,ts}": [
"eslint",
"bash -c 'npm run typecheck'",
"bash -c 'pnpm run typecheck'",
"jest --bail --findRelatedTests"
]
},
Expand All @@ -102,19 +102,14 @@
"path": "cz-conventional-changelog"
}
},
"husky": {
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
"pre-commit": "lint-staged"
}
},
"devDependencies": {
"@babel/cli": "^7.14.5",
"@babel/core": "^7.14.6",
"@babel/preset-typescript": "^7.14.5",
"@commitlint/cli": "^12.1.4",
"@commitlint/config-conventional": "^12.1.4",
"@commitlint/travis-cli": "^12.1.4",
"@rundik/responsive-json-webpack-plugin": "^1.5.3",
"@semantic-release/changelog": "^5.0.1",
"@types/chrome": "^0.0.145",
"@types/copy-webpack-plugin": "^8.0.0",
Expand All @@ -124,8 +119,7 @@
"@typescript-eslint/eslint-plugin": "^4.28.1",
"@typescript-eslint/parser": "^4.28.1",
"acorn": "^8.4.1",
"ajv": "^6.12.6",
"babel-eslint": "^10.1.0",
"ajv": "^8.6.0",
"babel-loader": "^8.2.2",
"babel-runtime": "^6.26.0",
"commitizen": "^4.2.4",
Expand All @@ -135,26 +129,26 @@
"eslint": "^7.29.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^3.4.0",
"husky": "^6.0.0",
"jest": "^26.6.3",
"husky": "^7.0.0",
"jest": "^27.0.6",
"jest-mock-props": "^1.9.0",
"jest-raw-loader": "^1.0.1",
"lint-staged": "^11.0.0",
"prettier": "^2.3.2",
"prettier-eslint": "^12.0.0",
"responsive-json-webpack-plugin": "^1.5.2",
"rxjs": "^7.1.0",
"semantic-release": "^17.4.4",
"semantic-release-chrome": "^1.1.3",
"sinon-chrome": "^3.0.1",
"ts-jest": "^26.5.6",
"ts-jest": "^27.0.3",
"ts-node": "^10.0.0",
"typescript": "^4.3.5",
"webpack": "^5.41.1",
"webpack-cli": "^4.7.2"
},
"dependencies": {
"@babel/polyfill": "^7.12.1",
"crx-livereload": "^0.2.1"
"core-js": "^3.15.2",
"crx-livereload": "^0.2.1",
"regenerator-runtime": "^0.13.7"
}
}
Loading

0 comments on commit 1d14846

Please sign in to comment.