Skip to content

Commit c17d745

Browse files
Migrate package manager to pnpm (#59)
1 parent a278445 commit c17d745

13 files changed

Lines changed: 15460 additions & 25563 deletions

File tree

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
---
3+
4+
No release needed for the package manager migration.

.github/workflows/ci.yml

Lines changed: 28 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -17,32 +17,38 @@ jobs:
1717
runs-on: ubuntu-latest
1818

1919
steps:
20-
- uses: actions/checkout@v3
21-
- uses: actions/setup-node@v3
20+
- uses: actions/checkout@v4
21+
- uses: pnpm/action-setup@v4
2222
with:
23-
node-version: 18
24-
cache: npm
23+
version: 11.1.3
24+
- uses: actions/setup-node@v4
25+
with:
26+
node-version: 26
27+
cache: pnpm
2528
- name: Install Dependencies
26-
run: npm ci
29+
run: pnpm install --frozen-lockfile
2730
- name: Lint
28-
run: npm run lint
31+
run: pnpm lint
2932
- name: Run Tests
30-
run: npm run test
33+
run: pnpm test
3134

3235
floating:
3336
name: "Floating Dependencies"
3437
runs-on: ubuntu-latest
3538

3639
steps:
37-
- uses: actions/checkout@v3
38-
- uses: actions/setup-node@v3
40+
- uses: actions/checkout@v4
41+
- uses: pnpm/action-setup@v4
42+
with:
43+
version: 11.1.3
44+
- uses: actions/setup-node@v4
3945
with:
40-
node-version: 18
41-
cache: npm
46+
node-version: 26
47+
cache: pnpm
4248
- name: Install Dependencies
43-
run: npm ci
49+
run: pnpm install --no-lockfile
4450
- name: Run Tests
45-
run: npm run test
51+
run: pnpm test
4652

4753
try-scenarios:
4854
name: ${{ matrix.try-scenario }}
@@ -65,16 +71,16 @@ jobs:
6571
- embroider-optimized
6672

6773
steps:
68-
- uses: actions/checkout@v3
69-
- uses: actions/setup-node@v3
74+
- uses: actions/checkout@v4
75+
- uses: pnpm/action-setup@v4
76+
with:
77+
version: 11.1.3
78+
- uses: actions/setup-node@v4
7079
with:
71-
node-version: 18
72-
cache: npm
73-
# https://discord.com/channels/480462759797063690/1049716681225797723/1049738716635205772
74-
- name: Set legacy peer dependencies
75-
run: npm config set legacy-peer-deps=true --location=project
80+
node-version: 26
81+
cache: pnpm
7682
- name: Install Dependencies
77-
run: npm ci
83+
run: pnpm install --frozen-lockfile
7884
- name: Run Tests
79-
run: npx ember try:one ${{ matrix.try-scenario }}
85+
run: pnpm exec ember try:one ${{ matrix.try-scenario }}
8086
working-directory: test-app

.github/workflows/push-dist.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,17 @@ jobs:
1616
name: Push dist
1717
runs-on: ubuntu-latest
1818
steps:
19-
- uses: actions/checkout@v3
19+
- uses: actions/checkout@v4
20+
- uses: pnpm/action-setup@v4
21+
with:
22+
version: 11.1.3
2023
- name: Install Node
21-
uses: actions/setup-node@v3
24+
uses: actions/setup-node@v4
2225
with:
23-
cache: 'npm'
26+
node-version: 26
27+
cache: 'pnpm'
2428
- name: Install Dependencies
25-
run: npm ci
29+
run: pnpm install --frozen-lockfile
2630
- uses: kategengler/put-built-npm-package-contents-on-branch@5b33924ea713bcde29273ef55bac7e4142a7b917 # v2.0.0
2731
with:
2832
branch: dist

.github/workflows/release.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,23 +21,29 @@ jobs:
2121
- name: Checkout Repo
2222
uses: actions/checkout@v4
2323

24+
- name: Setup pnpm
25+
uses: pnpm/action-setup@v4
26+
with:
27+
version: 11.1.3
28+
2429
- name: Setup node.js
2530
uses: actions/setup-node@v4
2631
with:
27-
node-version: 20
32+
node-version: 26
33+
cache: pnpm
2834
registry-url: 'https://registry.npmjs.org'
2935

3036
- name: Install npm 11.5.1+ for OIDC support
3137
run: npm install -g npm@11.5.1
3238

3339
- name: Install dependencies
34-
run: npm ci
40+
run: pnpm install --frozen-lockfile
3541

3642
- name: Create Release Pull Request or Publish to npm
3743
id: changesets
3844
uses: changesets/action@dafcd08ca059722e5ab7b05b4069899018ee94c8 # v1.4.10
3945
with:
40-
version: npm run version
41-
publish: npm run release
46+
version: pnpm run version
47+
publish: pnpm run release
4248
env:
4349
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

CONTRIBUTING.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,29 @@
44

55
- `git clone <repository-url>`
66
- `cd ember-provide-consume-context`
7-
- `npm install`
7+
- Use Node.js 26 or newer
8+
- `pnpm install`
89

910
## Linting
1011

11-
- `npm run lint`
12-
- `npm run lint:fix`
12+
- `pnpm lint`
13+
- `pnpm lint:fix`
1314

1415
## Building the addon
1516

1617
- `cd ember-provide-consume-context`
17-
- `npm run build`
18+
- `pnpm build`
1819

1920
## Running tests
2021

2122
- `cd test-app`
22-
- `npm run test` – Runs the test suite on the current Ember version
23-
- `npm run test:watch` – Runs the test suite in "watch mode"
23+
- `pnpm test` – Runs the test suite on the current Ember version
24+
- `pnpm test:ember -- --server` – Runs the Ember tests in watch mode
2425

2526
## Running the test application
2627

2728
- `cd test-app`
28-
- `npm run start`
29+
- `pnpm start`
2930
- Visit the test application at [http://localhost:4200](http://localhost:4200).
3031

3132
For more information on using ember-cli, visit [https://cli.emberjs.com/release/](https://cli.emberjs.com/release/).

ember-provide-consume-context/package.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,24 +42,25 @@
4242
"dist"
4343
],
4444
"scripts": {
45-
"build": "concurrently 'npm:build:*'",
45+
"build": "concurrently 'pnpm build:js' 'pnpm build:types'",
4646
"build:js": "rollup --config",
4747
"build:types": "glint --declaration",
48-
"lint": "concurrently 'npm:lint:*(!fix)' --names 'lint:'",
49-
"lint:fix": "concurrently 'npm:lint:*:fix' --names 'fix:'",
48+
"lint": "concurrently 'pnpm lint:hbs' 'pnpm lint:js' 'pnpm lint:types' --names 'lint:'",
49+
"lint:fix": "concurrently 'pnpm lint:hbs:fix' 'pnpm lint:js:fix' --names 'fix:'",
5050
"lint:hbs": "ember-template-lint . --no-error-on-unmatched-pattern",
5151
"lint:hbs:fix": "ember-template-lint . --fix --no-error-on-unmatched-pattern",
5252
"lint:js": "eslint . --cache",
5353
"lint:js:fix": "eslint . --fix",
5454
"lint:types": "glint",
5555
"prepack": "rollup --config",
56-
"start": "concurrently 'npm:start:*'",
56+
"start": "concurrently 'pnpm start:js' 'pnpm start:types'",
5757
"start:js": "rollup --config --watch --no-watch.clearScreen",
5858
"start:types": "glint --declaration --watch",
5959
"test": "echo 'A v2 addon does not have tests, run tests in test-app'"
6060
},
6161
"dependencies": {
62-
"@embroider/addon-shim": "^1.0.0"
62+
"@embroider/addon-shim": "^1.0.0",
63+
"@embroider/macros": "^1.16.6"
6364
},
6465
"peerDependencies": {
6566
"ember-source": "^4.8.0 || ^5.0.0 || >= 6.0.0",
@@ -107,6 +108,7 @@
107108
"babel-plugin-ember-template-compilation": "^2.2.0",
108109
"concurrently": "^8.0.1",
109110
"ember-cli-htmlbars": "^6.2.0",
111+
"ember-source": "~4.12.2",
110112
"ember-template-lint": "^5.11.2",
111113
"eslint": "^8.33.0",
112114
"eslint-config-prettier": "^9.0.0",

0 commit comments

Comments
 (0)