-
Notifications
You must be signed in to change notification settings - Fork 335
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade node version, switch to pnpm (#360)
* Node 20 * Switch to pnpm * Small improvements to CI workflow while updating
- Loading branch information
Showing
6 changed files
with
5,648 additions
and
4,623 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,11 +8,12 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: pnpm/action-setup@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'yarn' | ||
- run: yarn install | ||
cache: 'pnpm' | ||
- run: pnpm install | ||
- run: make | ||
- uses: actions/[email protected] | ||
with: | ||
|
@@ -21,46 +22,51 @@ jobs: | |
lib | ||
examples/**/*.js | ||
test: | ||
name: Test against React (@v${{ matrix.react_version }}) | ||
needs: build | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
react_version: | ||
- '16' | ||
- '17' | ||
- '18' | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: pnpm/action-setup@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'yarn' | ||
- run: yarn install | ||
cache: 'pnpm' | ||
- run: pnpm install | ||
- name: Install React deps (@v${{ matrix.react_version }}) | ||
run: npm install --no-save --no-package-lock react@${{ matrix.react_version }} react-dom@${{ matrix.react_version }} react-test-renderer@${{ matrix.react_version }} | ||
- run: yarn test | ||
run: pnpm add -D --no-lockfile react@${{ matrix.react_version }} react-dom@${{ matrix.react_version }} react-test-renderer@${{ matrix.react_version }} | ||
- run: pnpm test | ||
lint: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: pnpm/action-setup@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'yarn' | ||
- run: yarn install | ||
- run: yarn lint | ||
cache: 'pnpm' | ||
- run: pnpm install | ||
- run: pnpm lint | ||
typecheck: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: pnpm/action-setup@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'yarn' | ||
- run: yarn install | ||
cache: 'pnpm' | ||
- run: pnpm install | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: build-output | ||
- run: yarn typecheck | ||
- run: pnpm typecheck |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
18 | ||
20 |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,13 +18,13 @@ | |
} | ||
}, | ||
"scripts": { | ||
"build": "yarn run build:code && yarn run build:examples", | ||
"build": "pnpm run build:code && pnpm run build:examples", | ||
"build:code": "tsup src/index.tsx -d lib --format esm,cjs --dts --legacy-output --target=es2017 --platform=browser", | ||
"build:examples": "tsup examples/demo.tsx -d examples --format iife --env.NODE_ENV production --minify --target=es2017 --legacy-output", | ||
"build:examples:dev": "tsup examples/demo.tsx -d examples --format iife --env.NODE_ENV development --target=es2017 --legacy-output", | ||
"lint": "eslint .", | ||
"pretty": "prettier --write '{*,.*}.{mjs,js,json}' '**/*.{js,json}'", | ||
"prepack": "make clean && make all && yarn run typecheck", | ||
"prepack": "make clean && make all && pnpm run typecheck", | ||
"prepublish-docs": "make clean && make all", | ||
"publish-docs": "gh-pages --dist=examples --src='{index.html,iife/demo.js}'", | ||
"test": "jest", | ||
|
@@ -67,5 +67,5 @@ | |
"tsup": "^8.0.2", | ||
"typescript": "^5.0.4" | ||
}, | ||
"packageManager": "[email protected]" | ||
"packageManager": "[email protected]+sha512.8e4c3550fb500e808dbc30bb0ce4dd1eb614e30b1c55245f211591ec2cdf9c611cabd34e1364b42f564bd54b3945ed0f49d61d1bbf2ec9bd74b866fcdc723276" | ||
} |
Oops, something went wrong.