Skip to content

Commit feaa0b6

Browse files
beeequeueAndaristbluwy
authored
migrate to pnpm (#1958)
Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com> Co-authored-by: bluwy <bjornlu.dev@gmail.com>
1 parent f220fc7 commit feaa0b6

27 files changed

Lines changed: 5474 additions & 3859 deletions

File tree

.github/actions/ci-setup/action.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,22 @@ inputs:
99
runs:
1010
using: composite
1111
steps:
12-
- name: Setup Node.js ${{ inputs.node-version }}
13-
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
12+
- name: Set up pnpm
13+
uses: pnpm/action-setup@8912a9102ac27614460f54aedde9e1e7f9aec20d # v6.0.5
14+
15+
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
1416
with:
1517
node-version: ${{ inputs.node-version }}
16-
cache: yarn
18+
cache: pnpm
1719

1820
- name: Install dependencies
1921
shell: bash
20-
run: yarn install --frozen-lockfile --ignore-scripts
22+
run: pnpm install --frozen-lockfile
2123

22-
- name: Setup dev environment
24+
- name: Set up dev environment
2325
shell: bash
24-
run: yarn preconstruct dev
26+
run: pnpm preconstruct dev
2527

26-
- name: Manypkg check
28+
- name: Check with manypkg
2729
shell: bash
28-
run: yarn manypkg check
30+
run: pnpm manypkg check

.github/workflows/ci.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ jobs:
2424
node_version: [22, 24, 25]
2525
fail-fast: false
2626
steps:
27-
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # 6.0.1
27+
- name: Check out repo
28+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2829
with:
2930
persist-credentials: false
3031

@@ -40,13 +41,12 @@ jobs:
4041

4142
- name: Vitest tests
4243
if: matrix.node_version != 24
43-
# @changesets/release-utils depend on `--experimental-strip-types` so we exclude those test here for simplicity
44-
run: yarn vitest --no-file-parallelism --exclude=packages/release-utils
44+
run: node --run test
4545

4646
# Run coverage only once on node 24 to avoid duplicate codecov uploads
4747
- name: Vitest tests with coverage
4848
if: matrix.node_version == 24
49-
run: yarn vitest --no-file-parallelism --coverage
49+
run: node --run test -- --coverage
5050

5151
- name: Upload coverage
5252
uses: codecov/codecov-action@v4
@@ -59,31 +59,33 @@ jobs:
5959
runs-on: ubuntu-latest
6060
timeout-minutes: 20
6161
steps:
62-
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # 6.0.1
62+
- name: Check out repo
63+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
6364
with:
6465
persist-credentials: false
6566

6667
- uses: ./.github/actions/ci-setup
6768

6869
- name: Typecheck
69-
run: yarn types:check
70+
run: node --run types:check
7071

7172
lint:
7273
name: Lint
7374
runs-on: ubuntu-latest
7475
timeout-minutes: 20
7576
steps:
76-
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # 6.0.1
77+
- name: Check out repo
78+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
7779
with:
7880
persist-credentials: false
7981

8082
- uses: ./.github/actions/ci-setup
8183

8284
- name: Lint
83-
run: yarn lint
85+
run: node --run lint
8486

8587
- name: Format
86-
run: yarn format
88+
run: node --run format
8789

8890
ci-ok:
8991
name: CI OK

.github/workflows/publish.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ jobs:
2424
pull-requests: write # to create pull request (changesets/action)
2525
id-token: write # to use OpenID Connect token for trusted publishing (changesets/action)
2626
steps:
27-
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # 6.0.1
27+
- name: Check out repo
28+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2829
with:
2930
persist-credentials: false
3031

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"type": "git",
2222
"url": "https://github.com/changesets/changesets.git"
2323
},
24-
"packageManager": "yarn@1.22.22",
24+
"packageManager": "pnpm@11.0.4",
2525
"workspaces": [
2626
"packages/*",
2727
"scripts/*"

packages/apply-release-plan/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,18 @@
1010
"license": "MIT",
1111
"repository": "https://github.com/changesets/changesets/tree/main/packages/apply-release-plan",
1212
"dependencies": {
13-
"@changesets/config": "^4.0.0-next.2",
14-
"@changesets/get-version-range-type": "^1.0.0-next.1",
15-
"@changesets/git": "^4.0.0-next.2",
16-
"@changesets/should-skip-package": "^1.0.0-next.2",
17-
"@changesets/types": "^7.0.0-next.2",
13+
"@changesets/config": "workspace:^",
14+
"@changesets/get-version-range-type": "workspace:^",
15+
"@changesets/git": "workspace:^",
16+
"@changesets/should-skip-package": "workspace:^",
17+
"@changesets/types": "workspace:^",
1818
"detect-indent": "^6.0.0",
1919
"import-meta-resolve": "^4.2.0",
2020
"prettier": "^3.7.4",
2121
"semver": "^7.5.3"
2222
},
2323
"devDependencies": {
24-
"@changesets/test-utils": "0.0.9-next.2",
24+
"@changesets/test-utils": "workspace:*",
2525
"@manypkg/get-packages": "^3.0.0",
2626
"outdent": "^0.8.0",
2727
"tinyexec": "^1.0.2"

packages/apply-release-plan/src/index.test.ts

Lines changed: 23 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,15 @@ import {
2323
testdir,
2424
} from "@changesets/test-utils";
2525

26+
const changesetsCliChangelogPath = path.resolve(
27+
import.meta.dirname,
28+
"../../cli/dist/changesets-cli-changelog.js",
29+
);
30+
const changesetsCliCommitPath = path.resolve(
31+
import.meta.dirname,
32+
"../../cli/dist/changesets-cli-commit.js",
33+
);
34+
2635
class FakeReleasePlan {
2736
changesets: NewChangeset[];
2837
releases: ComprehensiveRelease[];
@@ -2083,13 +2092,7 @@ describe("apply release plan", () => {
20832092
releasePlan.getReleasePlan(),
20842093
{
20852094
...releasePlan.config,
2086-
changelog: [
2087-
path.resolve(
2088-
import.meta.dirname,
2089-
"test-utils/simple-get-changelog-entry.ts",
2090-
),
2091-
null,
2092-
],
2095+
changelog: [changesetsCliChangelogPath, null],
20932096
},
20942097
);
20952098

@@ -2128,13 +2131,7 @@ describe("apply release plan", () => {
21282131
releasePlan.getReleasePlan(),
21292132
{
21302133
...releasePlan.config,
2131-
changelog: [
2132-
path.resolve(
2133-
import.meta.dirname,
2134-
"test-utils/simple-get-changelog-entry",
2135-
),
2136-
null,
2137-
],
2134+
changelog: [changesetsCliChangelogPath, null],
21382135
},
21392136
);
21402137

@@ -2197,13 +2194,7 @@ describe("apply release plan", () => {
21972194
releasePlan.getReleasePlan(),
21982195
{
21992196
...releasePlan.config,
2200-
changelog: [
2201-
path.resolve(
2202-
import.meta.dirname,
2203-
"test-utils/simple-get-changelog-entry.ts",
2204-
),
2205-
null,
2206-
],
2197+
changelog: [changesetsCliChangelogPath, null],
22072198
},
22082199
);
22092200

@@ -2292,13 +2283,7 @@ describe("apply release plan", () => {
22922283
access: "restricted",
22932284
baseBranch: "main",
22942285
changedFilePatterns: ["**"],
2295-
changelog: [
2296-
path.resolve(
2297-
import.meta.dirname,
2298-
"test-utils/simple-get-changelog-entry.ts",
2299-
),
2300-
null,
2301-
],
2286+
changelog: [changesetsCliChangelogPath, null],
23022287
updateInternalDependencies: "patch",
23032288
ignore: [],
23042289
prettier: true,
@@ -2350,13 +2335,7 @@ describe("apply release plan", () => {
23502335
releasePlan.getReleasePlan(),
23512336
{
23522337
...releasePlan.config,
2353-
changelog: [
2354-
path.resolve(
2355-
import.meta.dirname,
2356-
"test-utils/simple-get-changelog-entry.ts",
2357-
),
2358-
null,
2359-
],
2338+
changelog: [changesetsCliChangelogPath, null],
23602339
},
23612340
);
23622341

@@ -2433,13 +2412,7 @@ describe("apply release plan", () => {
24332412
preState: undefined,
24342413
},
24352414
{
2436-
changelog: [
2437-
path.resolve(
2438-
import.meta.dirname,
2439-
"test-utils/simple-get-changelog-entry.ts",
2440-
),
2441-
null,
2442-
],
2415+
changelog: [changesetsCliChangelogPath, null],
24432416
commit: false,
24442417
fixed: [],
24452418
linked: [],
@@ -2547,13 +2520,7 @@ describe("apply release plan", () => {
25472520
preState: undefined,
25482521
},
25492522
{
2550-
changelog: [
2551-
path.resolve(
2552-
import.meta.dirname,
2553-
"test-utils/simple-get-changelog-entry.ts",
2554-
),
2555-
null,
2556-
],
2523+
changelog: [changesetsCliChangelogPath, null],
25572524
commit: false,
25582525
fixed: [],
25592526
linked: [],
@@ -2673,13 +2640,7 @@ describe("apply release plan", () => {
26732640
preState: undefined,
26742641
},
26752642
{
2676-
changelog: [
2677-
path.resolve(
2678-
import.meta.dirname,
2679-
"test-utils/simple-get-changelog-entry.ts",
2680-
),
2681-
null,
2682-
],
2643+
changelog: [changesetsCliChangelogPath, null],
26832644
commit: false,
26842645
fixed: [],
26852646
linked: [],
@@ -2813,13 +2774,7 @@ describe("apply release plan", () => {
28132774
preState: undefined,
28142775
},
28152776
{
2816-
changelog: [
2817-
path.resolve(
2818-
import.meta.dirname,
2819-
"test-utils/simple-get-changelog-entry.ts",
2820-
),
2821-
null,
2822-
],
2777+
changelog: [changesetsCliChangelogPath, null],
28232778
commit: false,
28242779
fixed: [],
28252780
linked: [],
@@ -3297,20 +3252,8 @@ describe("apply release plan", () => {
32973252
releasePlan.getReleasePlan(),
32983253
{
32993254
...releasePlan.config,
3300-
commit: [
3301-
path.resolve(
3302-
import.meta.dirname,
3303-
"test-utils/simple-get-commit-entry",
3304-
),
3305-
null,
3306-
],
3307-
changelog: [
3308-
path.resolve(
3309-
import.meta.dirname,
3310-
"test-utils/simple-get-changelog-entry.ts",
3311-
),
3312-
null,
3313-
],
3255+
commit: [changesetsCliCommitPath, null],
3256+
changelog: [changesetsCliChangelogPath, null],
33143257
},
33153258
undefined,
33163259
setupFunc,
@@ -3364,13 +3307,7 @@ describe("apply release plan", () => {
33643307
releasePlan.getReleasePlan(),
33653308
{
33663309
...releasePlan.config,
3367-
commit: [
3368-
path.resolve(
3369-
import.meta.dirname,
3370-
"test-utils/simple-get-commit-entry",
3371-
),
3372-
null,
3373-
],
3310+
commit: [changesetsCliCommitPath, null],
33743311
},
33753312
);
33763313

@@ -3430,13 +3367,7 @@ describe("apply release plan", () => {
34303367
releasePlan.getReleasePlan(),
34313368
{
34323369
...releasePlan.config,
3433-
commit: [
3434-
path.resolve(
3435-
import.meta.dirname,
3436-
"test-utils/simple-get-commit-entry",
3437-
),
3438-
null,
3439-
],
3370+
commit: [changesetsCliCommitPath, null],
34403371
},
34413372
undefined,
34423373
setupFunc,
@@ -3502,13 +3433,7 @@ describe("apply release plan", () => {
35023433
},
35033434
{
35043435
...releasePlan.config,
3505-
commit: [
3506-
path.resolve(
3507-
import.meta.dirname,
3508-
"test-utils/simple-get-commit-entry",
3509-
),
3510-
null,
3511-
],
3436+
commit: [changesetsCliCommitPath, null],
35123437
},
35133438
);
35143439

packages/apply-release-plan/src/test-utils/simple-get-changelog-entry.ts

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

packages/apply-release-plan/src/test-utils/simple-get-commit-entry.ts

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

packages/assemble-release-plan/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
"license": "MIT",
1111
"repository": "https://github.com/changesets/changesets/tree/main/packages/assemble-release-plan",
1212
"dependencies": {
13-
"@changesets/errors": "^1.0.0-next.1",
14-
"@changesets/get-dependents-graph": "^3.0.0-next.2",
15-
"@changesets/should-skip-package": "^1.0.0-next.2",
16-
"@changesets/types": "^7.0.0-next.2",
13+
"@changesets/errors": "workspace:^",
14+
"@changesets/get-dependents-graph": "workspace:^",
15+
"@changesets/should-skip-package": "workspace:^",
16+
"@changesets/types": "workspace:^",
1717
"semver": "^7.5.3"
1818
},
1919
"devDependencies": {
20-
"@changesets/config": "4.0.0-next.2"
20+
"@changesets/config": "workspace:*"
2121
},
2222
"engines": {
2323
"node": "^22 || >=24"

packages/changelog-git/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"license": "MIT",
1111
"repository": "https://github.com/changesets/changesets/tree/main/packages/changelog-git",
1212
"dependencies": {
13-
"@changesets/types": "^7.0.0-next.2"
13+
"@changesets/types": "workspace:^"
1414
},
1515
"engines": {
1616
"node": "^22 || >=24"

0 commit comments

Comments
 (0)