Skip to content

Commit 874252c

Browse files
authored
Merge pull request #1038 from ember-cli/pnpm
Swap to pnpm
2 parents d3b56f1 + 0cea39b commit 874252c

5 files changed

Lines changed: 10134 additions & 9399 deletions

File tree

.github/workflows/ci.yml

Lines changed: 63 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -19,28 +19,35 @@ jobs:
1919

2020
steps:
2121
- uses: actions/checkout@v4
22+
- uses: pnpm/action-setup@v4
23+
with:
24+
version: 9
2225
- uses: actions/setup-node@v4
2326
with:
2427
node-version: 18
28+
cache: pnpm
2529

26-
- run: yarn install
27-
- run: yarn lint
30+
- run: pnpm install --frozen-lockfile
31+
- run: pnpm lint
2832
test:
2933
name: 'Tests'
3034
runs-on: ubuntu-latest
3135
timeout-minutes: 10
3236

3337
steps:
3438
- uses: actions/checkout@v4
39+
- uses: pnpm/action-setup@v4
40+
with:
41+
version: 9
3542
- name: Install Node
3643
uses: actions/setup-node@v4
3744
with:
3845
node-version: 18
39-
cache: yarn
46+
cache: pnpm
4047
- name: Install Dependencies
41-
run: yarn install --frozen-lockfile
48+
run: pnpm install --frozen-lockfile
4249
- name: Run Tests
43-
run: yarn node-test-with-coverage
50+
run: pnpm node-test-with-coverage
4451
- uses: codecov/codecov-action@v5
4552
with:
4653
fail_ci_if_error: true
@@ -53,14 +60,17 @@ jobs:
5360

5461
steps:
5562
- uses: actions/checkout@v4
63+
- uses: pnpm/action-setup@v4
64+
with:
65+
version: 9
5666
- uses: actions/setup-node@v4
5767
with:
5868
node-version: 18
59-
cache: yarn
69+
cache: pnpm
6070
- name: Install Dependencies
61-
run: yarn install --no-lockfile
71+
run: pnpm install --no-lockfile
6272
- name: Run Tests
63-
run: yarn node-test
73+
run: pnpm node-test
6474

6575
all-commands-smoke-tests:
6676
name: Tests (commands smoke test)
@@ -77,72 +87,76 @@ jobs:
7787
matrix:
7888
command:
7989
# try:each
80-
- ./node_modules/.bin/ember try:each
90+
- npx ember try:each
8191

8292
# skip-cleanup option
83-
- ./node_modules/.bin/ember try:each --skip-cleanup
93+
- npx ember try:each --skip-cleanup
8494

8595
# config-path option
86-
- ./node_modules/.bin/ember try:each --config-path='../test/fixtures/dummy-ember-try-config.js'
96+
- npx ember try:each --config-path='../test/fixtures/dummy-ember-try-config.js'
8797

8898
# both ember-try options
89-
- ./node_modules/.bin/ember try:each --config-path='../test/fixtures/dummy-ember-try-config.js' --skip-cleanup true
99+
- npx ember try:each --config-path='../test/fixtures/dummy-ember-try-config.js' --skip-cleanup true
90100

91101
# try:ember
92-
- ./node_modules/.bin/ember try:ember '> 4.10.0 < 5.2.0'
93-
- ./node_modules/.bin/ember try:ember '4.9.0' --config-path='../test/fixtures/dummy-ember-try-config.js'
94-
- ./node_modules/.bin/ember try:ember '4.8.3' --skip-cleanup=true
102+
- npx ember try:ember '> 4.10.0 < 5.2.0'
103+
- npx ember try:ember '4.9.0' --config-path='../test/fixtures/dummy-ember-try-config.js'
104+
- npx ember try:ember '4.8.3' --skip-cleanup=true
95105

96106
# try:config
97-
- ./node_modules/.bin/ember try:config
98-
- ./node_modules/.bin/ember try:config --config-path='../test/fixtures/dummy-ember-try-config.js'
107+
- npx ember try:config
108+
- npx ember try:config --config-path='../test/fixtures/dummy-ember-try-config.js'
99109

100110
# try:one <scenario>
101-
- ./node_modules/.bin/ember try:one default
111+
- npx ember try:one default
102112

103113
# custom command
104-
- ./node_modules/.bin/ember try:one default --- ember help
114+
- npx ember try:one default --- ember help
105115

106116
# skip-cleanup option
107-
- ./node_modules/.bin/ember try:one default --skip-cleanup
117+
- npx ember try:one default --skip-cleanup
108118

109119
# config-path option
110-
- ./node_modules/.bin/ember try:one test1 --config-path='../test/fixtures/dummy-ember-try-config.js'
120+
- npx ember try:one test1 --config-path='../test/fixtures/dummy-ember-try-config.js'
111121

112122
# both ember-try options
113-
- ./node_modules/.bin/ember try:one test1 --config-path='../test/fixtures/dummy-ember-try-config.js' --skip-cleanup true
123+
- npx ember try:one test1 --config-path='../test/fixtures/dummy-ember-try-config.js' --skip-cleanup true
114124

115125
# custom command with options to command
116-
- ./node_modules/.bin/ember try:one default --- ember help --silent
126+
- npx ember try:one default --- ember help --silent
117127

118128
# custom command mixed with ember try's own option
119-
- ./node_modules/.bin/ember try:one default --skip-cleanup --- ember help --silent
129+
- npx ember try:one default --skip-cleanup --- ember help --silent
120130

121131
# try:reset
122-
- ./node_modules/.bin/ember try:reset
132+
- npx ember try:reset
123133

124134
# Environment variables availability
125-
- FOO="5" ./node_modules/.bin/ember try:one default --- ./fail-if-no-foo.sh
135+
- FOO="5" npx ember try:one default --- ./fail-if-no-foo.sh
126136

127-
- ./node_modules/.bin/ember try:one default --- FOO=5 ./fail-if-no-foo.sh
137+
- npx ember try:one default --- FOO=5 ./fail-if-no-foo.sh
128138

129139
# Custom, compound commands
130-
- ./node_modules/.bin/ember try:one default --- 'echo 1 && echo 2'
140+
- npx ember try:one default --- 'echo 1 && echo 2'
131141

132142
# Environment variables from config
133-
- ./node_modules/.bin/ember try:each --config-path='../test/fixtures/dummy-ember-try-config-different-env-vars.js'
143+
- npx ember try:each --config-path='../test/fixtures/dummy-ember-try-config-different-env-vars.js'
134144

135145
# fs-extra versions 7.x and above caused a regresion
136-
- ./node_modules/.bin/ember try:each --config-path='../test/fixtures/dummy-ember-try-config-fs-extra-scenarios.js'
146+
- npx ember try:each --config-path='../test/fixtures/dummy-ember-try-config-fs-extra-scenarios.js'
137147

138148
steps:
139149
- uses: actions/checkout@v4
150+
- uses: pnpm/action-setup@v4
151+
with:
152+
version: 9
140153
- uses: actions/setup-node@v4
141154
with:
142155
node-version: 18
156+
cache: pnpm
143157

144158
- name: install deps
145-
run: yarn install
159+
run: pnpm install --frozen-lockfile
146160
- name: install smoke-test-app deps
147161
# using `npm` to install in the smoke-test-app so that `file:` will be treated
148162
# as a symlink (npm handles `file:../` as symlink, and `yarn` treats it
@@ -168,16 +182,20 @@ jobs:
168182

169183
steps:
170184
- uses: actions/checkout@v4
185+
- uses: pnpm/action-setup@v4
186+
with:
187+
version: 9
171188
- uses: actions/setup-node@v4
172189
with:
173190
node-version: ${{ matrix.node }}
191+
cache: pnpm
174192

175193
- name: install deps
176-
run: yarn install
194+
run: pnpm install --frozen-lockfile
177195
- name: install smoke-test-app deps
178196
run: npm install
179197
working-directory: smoke-test-app
180-
- run: ./node_modules/.bin/ember try:one test2 --config-path='../test/fixtures/dummy-ember-try-config-with-npm-scenarios.js'
198+
- run: npx ember try:one test2 --config-path='../test/fixtures/dummy-ember-try-config-with-npm-scenarios.js'
181199
working-directory: smoke-test-app
182200

183201
yarn-smoke-tests:
@@ -196,16 +214,20 @@ jobs:
196214

197215
steps:
198216
- uses: actions/checkout@v4
217+
- uses: pnpm/action-setup@v4
218+
with:
219+
version: 9
199220
- uses: actions/setup-node@v4
200221
with:
201222
node-version: ${{ matrix.node }}
223+
cache: pnpm
202224

203225
- name: install deps
204-
run: yarn install
226+
run: pnpm install --frozen-lockfile
205227
- name: install smoke-test-app deps
206228
run: yarn install
207229
working-directory: smoke-test-app
208-
- run: ./node_modules/.bin/ember try:one test2 --config-path='../test/fixtures/dummy-ember-try-config-with-yarn-scenarios.js'
230+
- run: npx ember try:one test2 --config-path='../test/fixtures/dummy-ember-try-config-with-yarn-scenarios.js'
209231
working-directory: smoke-test-app
210232

211233
windows-smoke-tests:
@@ -219,14 +241,18 @@ jobs:
219241

220242
steps:
221243
- uses: actions/checkout@v4
244+
- uses: pnpm/action-setup@v4
245+
with:
246+
version: 9
222247
- uses: actions/setup-node@v4
223248
with:
224249
node-version: 18
250+
cache: pnpm
225251

226252
- name: install deps
227-
run: yarn install
253+
run: pnpm install --frozen-lockfile
228254
- name: install smoke-test-app deps
229255
run: npm install
230256
working-directory: smoke-test-app
231-
- run: ./node_modules/.bin/ember try:one test2 --config-path='../test/fixtures/dummy-ember-try-config-with-npm-scenarios.js'
257+
- run: npx ember try:one test2 --config-path='../test/fixtures/dummy-ember-try-config-with-npm-scenarios.js'
232258
working-directory: smoke-test-app

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
/CHANGELOG.md
2+
pnpm-lock.yaml

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
},
2424
"scripts": {
2525
"format": "prettier . --cache --write",
26-
"lint": "concurrently --group --prefix-colors auto --timings \"yarn:lint:*(!fix)\"",
27-
"lint:fix": "concurrently --group --prefix-colors auto --timings \"yarn:lint:*:fix\" && yarn format",
26+
"lint": "concurrently --group --prefix-colors auto --timings \"pnpm:lint:*(!fix)\"",
27+
"lint:fix": "concurrently --group --prefix-colors auto --timings \"pnpm:lint:*:fix\" && pnpm format",
2828
"lint:format": "prettier . --cache --check",
2929
"lint:js": "eslint . --cache",
3030
"lint:js:fix": "eslint . --fix",

0 commit comments

Comments
 (0)