Skip to content

Commit 05a469c

Browse files
committed
Switch to pnpm
1 parent ccb9bd8 commit 05a469c

File tree

9 files changed

+2750
-2234
lines changed

9 files changed

+2750
-2234
lines changed

.github/workflows/pr-build.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,19 @@ jobs:
1010
steps:
1111
- uses: actions/checkout@v3
1212

13+
- uses: pnpm/action-setup@v4
14+
1315
- name: Setup Node
1416
uses: actions/setup-node@v3
1517
with:
16-
node-version: 20.x
17-
cache: yarn
18+
node-version-file: ".nvmrc"
19+
cache: pnpm
1820

1921
- name: Install
20-
run: yarn install --frozen-lockfile --prefer-offline
22+
run: pnpm install --frozen-lockfile --prefer-offline
2123

2224
- name: Lint
23-
run: yarn lint
25+
run: pnpm lint
2426

2527
- name: Build
26-
run: yarn start
28+
run: pnpm start

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
20

.vscode/extensions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// for the documentation about the extensions.json format
44
"recommendations": [
55
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
6-
"gamunu.vscode-yarn",
6+
"Jacano.vscode-pnpm",
77
"esbenp.prettier-vscode",
88
"dbaeumer.vscode-eslint"
99
]

.vscode/settings.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@
44
"files.trimTrailingWhitespace": true,
55
"typescript.tsdk": "node_modules/typescript/lib",
66
"editor.formatOnSave": true,
7-
"eslint.packageManager": "yarn",
87
"eslint.validate": ["javascript", "typescript"],
98
"editor.codeActionsOnSave": {
109
"source.fixAll": "explicit"
1110
},
12-
"jest.jestCommandLine": "yarn test",
11+
"jest.jestCommandLine": "pnpm test --",
1312
"[javascript]": {
1413
"editor.codeActionsOnSave": {
1514
"source.organizeImports": "never"

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ Use the GitHub [Issue tracker for JSONView](https://github.com/bhollis/jsonview/
2525

2626
Before contributing to JSONView, make sure to read the [Contributing Guidelines](CONTRIBUTING.md). I appreciate contributions people make to JSONView, but the goal of the extension is to be simple and straightforward, so I frequently reject contributions that add complexity or unnecessary features. Please consider filing an issue before doing any work, so you don't waste time on something I won't accept.
2727

28-
- Install [NodeJS](https://nodejs.org/en/) and [Yarn](https://yarnpkg.com/en/docs/install).
28+
- Install [NodeJS](https://nodejs.org/en/) and run `corepack enable`.
2929
- Check out jsonview.
30-
- Run `yarn` inside the jsonview repository.
31-
- Run `yarn start` to build the extension.
30+
- Run `pnpm i` inside the jsonview repository.
31+
- Run `pnpm start` to build the extension.
3232
- In Firefox, go to `about:debugging#addons` in the address bar, check "Enable add-on debugging", select "Load Temporary Add-on", and choose the `jsonview/build-firefox` folder.
3333
- In Chrome, go to `chrome://extensions/` in the address bar, select "Load Unpacked", and choose the `jsonview/build-chrome` folder.
3434

buildWindows.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ tsc
55
rm -r -fo ./build-chrome
66
mkdir -p build-chrome
77

8-
yarn rollup ts-out/background.js --format iife --name 'background' --file build-chrome/background.js
9-
yarn rollup ts-out/content.js --format iife --name 'background' --file build-chrome/content.js
8+
pnpm exec rollup ts-out/background.js --format iife --name 'background' --file build-chrome/background.js
9+
pnpm exec rollup ts-out/content.js --format iife --name 'background' --file build-chrome/content.js
1010
cp src/viewer.css build-chrome/viewer.css
1111
cp src/manifest.json build-chrome/manifest.json
1212
cp license.txt build-chrome/license.txt
@@ -22,8 +22,8 @@ popd
2222
rm -r -fo ./build-firefox
2323
mkdir -p build-firefox
2424

25-
yarn rollup ts-out/background.js --format iife --name 'background' --file build-firefox/background.js
26-
yarn rollup ts-out/content.js --format iife --name 'background' --file build-firefox/content.js
25+
pnpm exec rollup ts-out/background.js --format iife --name 'background' --file build-firefox/background.js
26+
pnpm exec rollup ts-out/content.js --format iife --name 'background' --file build-firefox/content.js
2727
cp src/viewer.css build-firefox/viewer.css
2828
cp src/manifest.json build-firefox/manifest.json
2929
cp license.txt build-firefox/license.txt

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,5 +130,6 @@
130130
"rollup": "^3.21.3",
131131
"typescript": "^5.0.4",
132132
"web-ext-types": "^3.2.1"
133-
}
133+
},
134+
"packageManager": "pnpm@8.15.8+sha256.691fe176eea9a8a80df20e4976f3dfb44a04841ceb885638fe2a26174f81e65e"
134135
}

0 commit comments

Comments
 (0)