Skip to content

Commit fa1b196

Browse files
authored
Merge pull request #429 from terascope/pnpm
Switch from yarn to pnpm
2 parents b497291 + e88502c commit fa1b196

8 files changed

Lines changed: 5855 additions & 9017 deletions

File tree

.github/workflows/publish.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,17 @@ jobs:
1313
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
1414
steps:
1515
- uses: actions/checkout@v4
16+
17+
- name: Install pnpm
18+
uses: pnpm/action-setup@v4
19+
1620
- uses: actions/setup-node@v4
1721
with:
1822
# NOTE: Hard Coded Node Version
1923
node-version: '22.x'
2024
registry-url: 'https://registry.npmjs.org'
21-
- run: yarn && yarn setup
22-
- name: Retrieve version
23-
run : echo "NEW_VERSION=$(jq -r '.version' package.json)" >> $GITHUB_OUTPUT
24-
id: version
25+
- run: pnpm run setup
2526
- run:
2627
echo "Check NPM Authentication"
27-
yarn npm whoami
28-
- run: yarn npm publish --access public
28+
npm whoami
29+
- run: pnpm publish --access public

.github/workflows/test.yml

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,38 +8,43 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- name: Check out code
11-
uses: actions/checkout@v4
11+
uses: actions/checkout@v6
12+
13+
- name: Install pnpm
14+
uses: pnpm/action-setup@v4
1215

1316
- name: Setup Node
14-
uses: actions/setup-node@v4
17+
uses: actions/setup-node@v6
1518
with:
1619
node-version: 22.x
17-
cache: 'yarn'
20+
cache: 'pnpm'
1821

1922
- name: Install and build packages
20-
run: yarn && yarn setup
23+
run: pnpm install --frozen-lockfile && pnpm run setup
2124

2225
- name: Lint codebase
23-
run: yarn lint
26+
run: pnpm run lint
2427

2528
run-tests:
2629
runs-on: ubuntu-latest
2730
strategy:
2831
matrix:
29-
# Node 24 pinned. See issue #399
30-
node-version: [22.x, 24.4]
32+
node-version: [22.x, 24.x]
3133
steps:
3234
- name: Check out code
33-
uses: actions/checkout@v4
35+
uses: actions/checkout@v6
36+
37+
- name: Install pnpm
38+
uses: pnpm/action-setup@v4
3439

3540
- name: Setup Node ${{ matrix.node-version }}
36-
uses: actions/setup-node@v4
41+
uses: actions/setup-node@v6
3742
with:
3843
node-version: ${{ matrix.node-version }}
39-
cache: 'yarn'
44+
cache: 'pnpm'
4045

4146
- name: Install and build packages
42-
run: yarn && yarn setup
47+
run: pnpm install --frozen-lockfile && pnpm run setup
4348

4449
- name: Test
45-
run: yarn test
50+
run: pnpm test

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,4 @@ dist
66
tmp
77
coverage
88

9-
# .yarn
10-
.yarn/install-state.gz
9+
.yarn

.yarn/releases/yarn-4.9.1.cjs

Lines changed: 0 additions & 948 deletions
This file was deleted.

.yarnrc.yml

Lines changed: 0 additions & 5 deletions
This file was deleted.

package.json

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"publishConfig": {
44
"access": "public"
55
},
6-
"version": "2.2.2",
6+
"version": "2.3.0",
77
"description": "Download a specific release from github",
88
"type": "module",
99
"files": [
@@ -14,17 +14,17 @@
1414
"typings": "dist/src/index.d.ts",
1515
"scripts": {
1616
"build": "tsc --project tsconfig.json",
17-
"build:watch": "yarn build --watch",
17+
"build:watch": "tsc --project tsconfig.json --watch",
1818
"lint": "eslint --ignore-pattern .gitignore",
19-
"lint:fix": "yarn lint --fix",
20-
"setup": "yarn && yarn build",
19+
"lint:fix": "pnpm lint --fix",
20+
"setup": "pnpm install && pnpm build",
2121
"test": "NODE_OPTIONS='--experimental-vm-modules' jest",
2222
"test:cov": "NODE_OPTIONS='--experimental-vm-modules' jest --collectCoverage",
2323
"test:watch": "NODE_OPTIONS='--experimental-vm-modules' jest --coverage=false --notify --watch --onlyChanged",
2424
"test:debug": "NODE_OPTIONS='--experimental-vm-modules' env DEBUG=\"${DEBUG:-*teraslice*}\" jest --detectOpenHandles --coverage=false --runInBand",
25-
"check": "yarn run lint && yarn run test",
25+
"check": "pnpm run lint && pnpm run test",
2626
"clean": "rimraf dist coverage",
27-
"prepublishOnly": "yarn run clean && yarn run build"
27+
"prepublishOnly": "pnpm run clean && pnpm run build"
2828
},
2929
"bin": "bin/fetch-github-release",
3030
"repository": {
@@ -49,12 +49,14 @@
4949
"yargs": "^18.0.0"
5050
},
5151
"devDependencies": {
52+
"@jest/globals": "^30.3.0",
5253
"@terascope/eslint-config": "^1.1.30",
5354
"@types/jest": "^30.0.0",
5455
"@types/multi-progress": "^2.0.6",
5556
"@types/node": "^24.12.0",
5657
"@types/stream-buffers": "^3.0.8",
5758
"@types/tmp": "^0.2.6",
59+
"@types/yargs": "^17.0.35",
5860
"eslint": "^9.39.4",
5961
"jest": "^30.3.0",
6062
"jest-extended": "^7.0.0",
@@ -67,7 +69,8 @@
6769
"typescript": "^5.9.3"
6870
},
6971
"engines": {
70-
"node": ">=22.0.0"
72+
"node": ">=22.0.0",
73+
"pnpm": ">=10.32.1"
7174
},
72-
"packageManager": "yarn@4.9.1"
75+
"packageManager": "pnpm@10.32.1"
7376
}

0 commit comments

Comments
 (0)