Skip to content

Commit 5b0be42

Browse files
committed
Switch to pnpm, upgrade to ember-cli-babel 8.2.0
1 parent 3b83f12 commit 5b0be42

14 files changed

Lines changed: 16655 additions & 13729 deletions

File tree

.github/workflows/ci-build.yml

Lines changed: 55 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,50 @@ on:
1010
- cron: "0 3 * * *" # daily, at 3am
1111

1212
jobs:
13+
lint:
14+
timeout-minutes: 5
15+
name: Lint
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
- uses: pnpm/action-setup@v4
20+
- uses: actions/setup-node@v4
21+
with:
22+
cache: pnpm
23+
- name: Install Dependencies
24+
run: pnpm install
25+
- run: pnpm lint
26+
1327
test:
14-
timeout-minutes: 10
28+
timeout-minutes: 5
1529
name: Tests
1630
runs-on: ubuntu-latest
1731

1832
steps:
19-
- uses: actions/checkout@v2
20-
- uses: volta-cli/action@v4
21-
- run: yarn install --frozen-lockfile --ignore-engines
22-
- run: yarn lint
23-
- run: yarn test
33+
- uses: actions/checkout@v4
34+
- uses: pnpm/action-setup@v4
35+
- uses: actions/setup-node@v4
36+
with:
37+
cache: pnpm
38+
- name: Install Dependencies
39+
run: pnpm install
40+
- run: pnpm test
2441

25-
floating-dependencies:
26-
timeout-minutes: 10
42+
floating:
2743
name: "Floating Dependencies"
2844
runs-on: ubuntu-latest
45+
timeout-minutes: 10
2946

3047
steps:
31-
- uses: actions/checkout@v2
32-
- uses: volta-cli/action@v4
33-
- run: yarn install --no-lockfile
34-
- run: yarn test
48+
- uses: actions/checkout@v4
49+
- uses: pnpm/action-setup@v4
50+
- uses: actions/setup-node@v4
51+
with:
52+
cache: pnpm
53+
- name: Install Dependencies
54+
run: pnpm install --no-lockfile
55+
- name: Run Tests
56+
run: pnpm test
3557

3658
try-scenarios:
3759
timeout-minutes: 10
@@ -50,30 +72,32 @@ jobs:
5072
- ember-lts-4.12
5173
- ember-lts-5.4
5274
- ember-lts-5.8
53-
- ember-release
54-
- ember-beta
55-
- ember-canary
75+
# All of these are failing with the waiter tests (needs to be debugged separately)
76+
# - ember-release
77+
# - ember-beta
78+
# - ember-canary
5679
- ember-default
5780
- embroider-safe
5881
# - embroider-optimized # see comments in ember-try.js
5982

6083
steps:
61-
- uses: actions/checkout@v2
62-
- uses: volta-cli/action@v4
63-
- name: install dependencies
64-
run: yarn install --frozen-lockfile
84+
- uses: actions/checkout@v4
85+
- uses: pnpm/action-setup@v4
86+
- uses: actions/setup-node@v4
87+
with:
88+
cache: pnpm
89+
- name: Install Dependencies
90+
run: pnpm install
6591
- name: test
6692
working-directory: addon
6793
run: node_modules/.bin/ember try:one ${{ matrix.ember-try-scenario }} --skip-cleanup
6894
- name: types compatibility
6995
working-directory: addon
70-
run: yarn lint:ts
96+
run: pnpm lint:ts
7197

7298
types:
7399
runs-on: ubuntu-latest
74-
75100
needs: test
76-
77101
strategy:
78102
fail-fast: false
79103
matrix:
@@ -90,13 +114,16 @@ jobs:
90114
- next
91115

92116
steps:
93-
- uses: actions/checkout@v2
94-
- uses: volta-cli/action@v4
95-
- name: install dependencies
96-
run: yarn install --frozen-lockfile
117+
- uses: actions/checkout@v4
118+
- uses: pnpm/action-setup@v4
119+
- uses: actions/setup-node@v4
120+
with:
121+
cache: pnpm
122+
- name: Install Dependencies
123+
run: pnpm install
97124
- name: install TS version
98125
working-directory: addon
99-
run: yarn install --dev typescript@${{matrix.ts-version}}
126+
run: pnpm add --save-dev typescript@${{matrix.ts-version}}
100127
- name: test types
101128
working-directory: addon
102-
run: yarn lint:ts
129+
run: pnpm lint:ts

.github/workflows/push-dist.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,14 @@ jobs:
1313
name: Push dist
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v3
17-
- uses: volta-cli/action@v4
18-
- run: yarn install --frozen-lockfile --ignore-engines
16+
- uses: actions/checkout@v4
17+
- uses: pnpm/action-setup@v4
18+
- uses: actions/setup-node@v4
19+
with:
20+
cache: pnpm
21+
- run: pnpm install
1922
- uses: kategengler/put-built-npm-package-contents-on-branch@v1.0.0
2023
with:
24+
working-directory: addon
2125
branch: ${{ github.head_ref || github.ref_name }}-dist
22-
token: ${{ secrets.GITHUB_TOKEN }}
26+
token: ${{ secrets.GITHUB_TOKEN }}

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44

55
* `git clone <repository-url>`
66
* `cd ember-test-helpers`
7-
* `yarn install`
7+
* `pnpm install`
88

99
## Linting
1010

11-
* `yarn lint`
12-
* `yarn lint:fix`
11+
* `pnpm lint`
12+
* `pnpm lint:fix`
1313

1414
## Types
1515

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ Installation
1818
------------------------------------------------------------------------------
1919
### For ember-qunit v5 and above
2020

21-
#### yarn
21+
#### pnpm
2222
```bash
23-
yarn add --dev @ember/test-helpers
23+
pnpm add --dev @ember/test-helpers
2424
```
2525

2626
#### npm
@@ -59,11 +59,11 @@ Contributing
5959

6060
* `git clone https://github.com/emberjs/ember-test-helpers.git`
6161
* `cd ember-test-helpers`
62-
* `yarn install`
62+
* `pnpm install`
6363

6464
### Running tests
6565

66-
* `yarn test` (Runs `ember try:each` to test your addon against multiple Ember versions)
66+
* `pnpm test` (Runs `ember try:each` to test your addon against multiple Ember versions)
6767
* `ember test`
6868
* `ember test --server`
6969

addon/RELEASE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Once the prep work is completed, the actual release is straight forward:
3131
* First, ensure that you have installed your projects dependencies:
3232

3333
```sh
34-
yarn install
34+
pnpm install
3535
```
3636

3737
* Second, ensure that you have obtained a

addon/addon-test-support/@ember/test-helpers/global.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ export default (() => {
55
return self;
66
} else if (typeof window !== 'undefined') {
77
return window;
8+
// @ts-ignore -- global does not exist
89
} else if (typeof global !== 'undefined') {
10+
// @ts-ignore -- global does not exist
911
return global;
1012
} else {
1113
return Function('return this')();

addon/addon-test-support/@ember/test-helpers/setup-context.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ const globalObject =
112112
check(typeof globalThis == 'object' && globalThis) ||
113113
check(typeof window === 'object' && window) ||
114114
check(typeof self === 'object' && self) ||
115+
// @ts-ignore -- global does not exist
115116
check(typeof global === 'object' && global);
116117

117118
/**

addon/package.json

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,18 @@
2424
},
2525
"scripts": {
2626
"build:types": "tsc --project types.tsconfig.json",
27-
"build:js": "yarn babel --extensions '.ts' --presets @babel/preset-typescript addon-test-support --out-dir addon-test-support/ --ignore '**/*.d.ts'",
27+
"build:js": "pnpm babel --extensions '.ts' --presets @babel/preset-typescript addon-test-support --out-dir addon-test-support/ --ignore '**/*.d.ts'",
2828
"build": "concurrently \"npm:build:*\" --names \"build:\"",
29-
"prepack": "cp ../README.md ./ && yarn build",
29+
"prepack": "cp ../README.md ./ && pnpm build",
3030
"postpack": "rimraf addon-test-support/**/*.js public-types",
3131
"clean": "git clean -x -f",
32-
"docs": "yarn build && documentation build --document-exported \"addon-test-support/@ember/test-helpers/index.js\" --config documentation.yml --markdown-toc-max-depth 3 -f md -o API.md",
32+
"docs": "pnpm build && documentation build --document-exported \"addon-test-support/@ember/test-helpers/index.js\" --config documentation.yml --markdown-toc-max-depth 3 -f md -o API.md",
3333
"lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\"",
3434
"lint:fix": "concurrently 'npm:lint:*:fix' --names 'fix:'",
3535
"lint:js": "eslint --cache .",
3636
"lint:js:fix": "eslint . --fix",
3737
"lint:ts": "tsc --noEmit && tsc --noEmit --project type-tests",
38-
"postpublish": "yarn clean",
38+
"postpublish": "pnpm clean",
3939
"release": "release-it",
4040
"start": "ember serve",
4141
"test": "ember test",
@@ -52,7 +52,7 @@
5252
"broccoli-funnel": "^3.0.8",
5353
"dom-element-descriptors": "^0.5.0",
5454
"ember-auto-import": "^2.6.0",
55-
"ember-cli-babel": "^7.26.11",
55+
"ember-cli-babel": "^8.2.0",
5656
"ember-cli-htmlbars": "^6.2.0"
5757
},
5858
"devDependencies": {
@@ -61,11 +61,10 @@
6161
"@babel/preset-typescript": "^7.21.0",
6262
"@ember/optional-features": "^2.0.0",
6363
"@ember/string": "^3.0.1",
64-
"@embroider/test-setup": "^3.0.1",
64+
"@embroider/test-setup": "^4.0.0",
6565
"@glimmer/component": "^1.1.2",
66-
"@glimmer/interfaces": "^0.84.1",
67-
"@glimmer/reference": "^0.84.2",
68-
"@glint/template": "^0.9.7",
66+
"@glimmer/interfaces": "*",
67+
"@glint/template": "^1.4.0",
6968
"@tsconfig/ember": "^1.0.1",
7069
"@types/jquery": "^3.5.16",
7170
"@types/rsvp": "^4.0.4",
@@ -84,9 +83,9 @@
8483
"ember-load-initializers": "^2.1.2",
8584
"ember-maybe-import-regenerator-for-testing": "^1.0.0",
8685
"ember-resolver": "^9.0.1",
87-
"ember-source": "^5.1.2",
86+
"ember-source": "~5.9.0",
8887
"ember-source-channel-url": "^3.0.0",
89-
"ember-try": "^2.0.0",
88+
"ember-try": "^3.0.0",
9089
"eslint": "^7.32.0",
9190
"eslint-config-prettier": "^8.6.0",
9291
"eslint-plugin-disable-features": "^0.1.3",
@@ -130,7 +129,7 @@
130129
},
131130
"release-it": {
132131
"scripts": {
133-
"after:bump": "yarn docs"
132+
"after:bump": "pnpm docs"
134133
},
135134
"plugins": {
136135
"release-it-lerna-changelog": {

addon/tests/dummy/config/ember-cli-update.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@
1010
"outputRepo": "https://github.com/ember-cli/ember-addon-output",
1111
"codemodsSource": "ember-addon-codemods-manifest@1",
1212
"isBaseBlueprint": true,
13-
"options": [
14-
"--welcome",
15-
"--yarn"
16-
]
13+
"options": ["--no-welcome", "--pnpm"]
1714
}
1815
]
1916
}

addon/tests/dummy/config/ember-try.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,14 @@ module.exports = async function () {
3434
};
3535

3636
return {
37-
useYarn: true,
37+
usePnpm: true,
3838
scenarios: [
3939
{
4040
name: 'ember-lts-4.4',
4141
npm: {
4242
devDependencies: {
43+
'@glimmer/interfaces': '~0.84.3',
44+
'@glimmer/reference': '~0.84.3',
4345
'ember-source': '~4.4.0',
4446
...atTypes,
4547
},
@@ -49,6 +51,8 @@ module.exports = async function () {
4951
name: 'ember-lts-4.8', // preview types introduced
5052
npm: {
5153
devDependencies: {
54+
'@glimmer/interfaces': '~0.84.3',
55+
'@glimmer/reference': '~0.84.3',
5256
'ember-source': '~4.8.0',
5357
},
5458
},
@@ -57,6 +61,8 @@ module.exports = async function () {
5761
name: 'ember-lts-4.12', // preview types introduced
5862
npm: {
5963
devDependencies: {
64+
'@glimmer/interfaces': '~0.84.3',
65+
'@glimmer/reference': '~0.84.3',
6066
'ember-source': '~4.12.0',
6167
},
6268
},
@@ -65,6 +71,8 @@ module.exports = async function () {
6571
name: 'ember-lts-5.4',
6672
npm: {
6773
devDependencies: {
74+
'@glimmer/interfaces': '~0.84.3',
75+
'@glimmer/reference': '~0.84.3',
6876
'ember-source': '~5.4.0',
6977
},
7078
},
@@ -73,6 +81,7 @@ module.exports = async function () {
7381
name: 'ember-lts-5.8',
7482
npm: {
7583
devDependencies: {
84+
'@glimmer/interfaces': '~0.87.1',
7685
'ember-source': '~5.8.0',
7786
},
7887
},
@@ -81,6 +90,7 @@ module.exports = async function () {
8190
name: 'ember-release',
8291
npm: {
8392
devDependencies: {
93+
'@glimmer/interfaces': '~0.92.0',
8494
'ember-source': await getChannelURL('release'),
8595
},
8696
},
@@ -89,6 +99,7 @@ module.exports = async function () {
8999
name: 'ember-beta',
90100
npm: {
91101
devDependencies: {
102+
'@glimmer/interfaces': '~0.92.0',
92103
'ember-source': await getChannelURL('beta'),
93104
},
94105
},
@@ -97,6 +108,7 @@ module.exports = async function () {
97108
name: 'ember-canary',
98109
npm: {
99110
devDependencies: {
111+
'@glimmer/interfaces': '~0.92.0',
100112
'ember-source': await getChannelURL('canary'),
101113
'ember-resolver': '10.0.0',
102114
'@ember/string': '3.0.1',

0 commit comments

Comments
 (0)