chore: switch from yarn to pnpm (#413)
This commit is contained in:
parent
c067cbab29
commit
6456dbf8a4
|
@ -15,32 +15,19 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- run: corepack enable
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
cache: 'pnpm'
|
||||
- run: pnpm i --frozen-lockfile
|
||||
|
||||
# via https://github.com/actions/cache/blob/0638051/examples.md#node---yarn
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
|
||||
- uses: actions/cache@v2
|
||||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
||||
with:
|
||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
|
||||
- name: yarn install
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
- name: install chromedriver
|
||||
run: |
|
||||
yarn --immutable --ignore-scripts
|
||||
# install the chromedriver corresponding to whatever version of chrome is installed
|
||||
yarn add --ignore-scripts chromedriver@^$(google-chrome --version | awk '{print $3}' | cut -d. -f1)
|
||||
PERF=1 yarn build:rollup
|
||||
yarn benchmark:runtime:setup
|
||||
pnpm i chromedriver@^$(google-chrome --version | awk '{print $3}' | cut -d. -f1)
|
||||
PERF=1 pnpm build:rollup
|
||||
pnpm benchmark:runtime:setup
|
||||
|
||||
# first-load
|
||||
- name: Benchmark first-load
|
||||
|
|
|
@ -9,23 +9,12 @@ jobs:
|
|||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- run: corepack enable
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
|
||||
# via https://github.com/actions/cache/blob/0638051/examples.md#node---yarn
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
|
||||
- uses: actions/cache@v2
|
||||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
||||
with:
|
||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
|
||||
cache: 'pnpm'
|
||||
- run: pnpm i --frozen-lockfile
|
||||
- uses: preactjs/compressed-size-action@v2
|
||||
with:
|
||||
build-script: benchmark:bundle
|
||||
|
|
|
@ -9,13 +9,15 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- run: corepack enable
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
cache: 'yarn'
|
||||
cache: 'pnpm'
|
||||
- run: pnpm i --frozen-lockfile
|
||||
- run: sudo apt-get install fonts-noto-color-emoji
|
||||
- run: yarn --frozen-lockfile
|
||||
- run: yarn lint
|
||||
- run: yarn benchmark:bundlesize
|
||||
- run: yarn cover
|
||||
- run: yarn test:leak
|
||||
- run: pnpm lint
|
||||
- run: pnpm benchmark:bundlesize
|
||||
- run: pnpm cover
|
||||
- run: npx puppeteer browsers install chrome
|
||||
- run: pnpm test:leak
|
||||
|
|
|
@ -108,13 +108,6 @@ dist
|
|||
# Stores VSCode versions used for testing VSCode extensions
|
||||
.vscode-test
|
||||
|
||||
# yarn v2
|
||||
|
||||
.yarn/cache
|
||||
.yarn/unplugged
|
||||
.yarn/build-state.yml
|
||||
.pnp.*
|
||||
|
||||
/database.js
|
||||
/database.js.map
|
||||
/picker.js
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
nodeLinker: node-modules
|
|
@ -38,8 +38,9 @@ for (const benchmark of benchmarks) {
|
|||
repo: 'https://github.com/nolanlawson/emoji-picker-element.git',
|
||||
ref: 'master',
|
||||
setupCommands: [
|
||||
'yarn --immutable --ignore-scripts',
|
||||
'PERF=1 yarn build:rollup'
|
||||
// we're comparing against historical branches, so support yarn as well as pnpm since we switched
|
||||
'if [ -f yarn.lock ]; then yarn --frozen-lockfile; else pnpm i --frozen-lockfile; fi',
|
||||
'PERF=1 npm run build:rollup'
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -76,6 +76,7 @@
|
|||
"@rollup/plugin-node-resolve": "^15.2.3",
|
||||
"@rollup/plugin-replace": "^5.0.5",
|
||||
"@rollup/plugin-strip": "^3.0.4",
|
||||
"@rollup/plugin-terser": "^0.4.4",
|
||||
"@testing-library/dom": "^9.3.4",
|
||||
"@testing-library/jest-dom": "^6.4.2",
|
||||
"@testing-library/user-event": "^14.5.2",
|
||||
|
@ -107,11 +108,11 @@
|
|||
"npm-run-all": "^4.1.5",
|
||||
"playwright": "^1.42.1",
|
||||
"pretty-bytes": "^6.1.1",
|
||||
"postcss": "^8.4.38",
|
||||
"puppeteer": "^22.6.0",
|
||||
"recursive-readdir": "^2.2.3",
|
||||
"rollup": "^4.13.0",
|
||||
"rollup-plugin-analyzer": "^4.0.0",
|
||||
"rollup-plugin-terser": "^7.0.2",
|
||||
"sass": "^1.72.0",
|
||||
"standard": "^17.1.0",
|
||||
"stylelint": "^16.2.1",
|
||||
|
@ -185,8 +186,5 @@
|
|||
"*.js": "standard --fix",
|
||||
"*.(css|scss)": "stylelint --fix '**/*.scss'"
|
||||
},
|
||||
"volta": {
|
||||
"node": "20.11.1",
|
||||
"yarn": "1.22.22"
|
||||
}
|
||||
"packageManager": "pnpm@8.15.5+sha256.4b4efa12490e5055d59b9b9fc9438b7d581a6b7af3b5675eb5c5f447cee1a589"
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -29,7 +29,7 @@ async function doFullDatabaseScanForSingleResult (db, predicate) {
|
|||
//
|
||||
// Mini-benchmark for determining the best batch size:
|
||||
//
|
||||
// PERF=1 yarn build:rollup && yarn test:adhoc
|
||||
// PERF=1 pnpm build:rollup && pnpm test:adhoc
|
||||
//
|
||||
// (async () => {
|
||||
// performance.mark('start')
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { terser } from 'rollup-plugin-terser'
|
||||
import terser from '@rollup/plugin-terser'
|
||||
|
||||
export default {
|
||||
input: './index.js',
|
||||
|
|
Loading…
Reference in New Issue