Skip to content

Commit 72f5c79

Browse files
ember-cli 5 beta, switch from yarn to pnpm (#1646)
* ember/ember-cli 5 * Use pnpm
1 parent 7e35eb5 commit 72f5c79

File tree

92 files changed

+22653
-22040
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+22653
-22040
lines changed

.eslintignore

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,17 @@
11
# unconventional js
22
/blueprints/*/files/
3-
/vendor/
43

54
# compiled output
65
/dist/
76
/electron-out/
8-
/tmp/
9-
10-
# dependencies
11-
/bower_components/
12-
/node_modules/
137

148
# misc
159
/coverage/
1610
!.*
1711
.*/
18-
.eslintcache
1912

2013
# ember-try
2114
/.node_modules.ember-try/
22-
/bower.json.ember-try
23-
/npm-shrinkwrap.json.ember-try
24-
/package.json.ember-try
25-
/package-lock.json.ember-try
26-
/yarn.lock.ember-try
2715

2816
# ember-electron
2917
/electron-app/node_modules/

.eslintrc.js

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -9,30 +9,30 @@ module.exports = {
99
requireConfigFile: false,
1010
babelOptions: {
1111
plugins: [
12-
['@babel/plugin-proposal-decorators', { decoratorsBeforeExport: true }]
13-
]
14-
}
12+
['@babel/plugin-proposal-decorators', { decoratorsBeforeExport: true }],
13+
],
14+
},
1515
},
1616
plugins: ['ember'],
1717
extends: [
1818
'eslint:recommended',
1919
'plugin:ember/recommended',
2020
'plugin:prettier/recommended',
21-
'@clark/ember-order-imports'
21+
'@clark/ember-order-imports',
2222
],
2323
env: {
24-
browser: true
24+
browser: true,
2525
},
2626
globals: {
27-
requireNode: false
27+
requireNode: false,
2828
},
2929
rules: {
3030
'require-yield': 'off',
3131
'sort-imports': [
3232
'error',
33-
{ allowSeparatedGroups: true, ignoreDeclarationSort: true }
33+
{ allowSeparatedGroups: true, ignoreDeclarationSort: true },
3434
],
35-
'ember/no-array-prototype-extensions': 'off'
35+
'ember/no-array-prototype-extensions': 'off',
3636
},
3737
overrides: [
3838
// node files
@@ -42,7 +42,6 @@ module.exports = {
4242
'./.prettierrc.js',
4343
'./.stylelintrc.js',
4444
'./.template-lintrc.js',
45-
'./babel.config.js',
4645
'./ember-cli-build.js',
4746
'./tailwind.config.js',
4847
'./testem.js',
@@ -51,17 +50,17 @@ module.exports = {
5150
'./config/**/*.js',
5251
'./electron-app/**/*.js',
5352
'./lib/*/index.js',
54-
'./server/**/*.js'
53+
'./server/**/*.js',
5554
],
5655
parserOptions: {
57-
sourceType: 'script'
56+
sourceType: 'script',
5857
},
5958
env: {
6059
browser: false,
61-
node: true
60+
node: true,
6261
},
6362
globals: {
64-
document: false
63+
document: false,
6564
},
6665
extends: ['plugin:n/recommended'],
6766
rules: {
@@ -73,16 +72,16 @@ module.exports = {
7372
'n/no-extraneous-require': [
7473
'error',
7574
{
76-
allowModules: ['ember-electron', 'electron']
77-
}
75+
allowModules: ['ember-electron', 'electron'],
76+
},
7877
],
7978
'n/no-missing-require': [
8079
'error',
8180
{
82-
allowModules: ['electron']
83-
}
84-
]
85-
}
81+
allowModules: ['electron'],
82+
},
83+
],
84+
},
8685
},
8786
// Typescript files
8887
{
@@ -91,13 +90,13 @@ module.exports = {
9190
plugins: ['@typescript-eslint'],
9291
extends: ['plugin:@typescript-eslint/recommended'],
9392
rules: {
94-
'prefer-rest-params': 'off'
95-
}
93+
'prefer-rest-params': 'off',
94+
},
9695
},
9796
{
9897
// test files
9998
files: ['tests/**/*-test.{js,ts}'],
100-
extends: ['plugin:qunit/recommended']
101-
}
102-
]
99+
extends: ['plugin:qunit/recommended'],
100+
},
101+
],
103102
};

.github/actions/pnpm/action.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Setup node and pnpm
2+
description: Setup node and install dependencies using pnpm
3+
runs:
4+
using: "composite"
5+
steps:
6+
- name: Install Node.js
7+
uses: actions/setup-node@v3
8+
with:
9+
node-version: 16
10+
11+
- uses: pnpm/action-setup@v2
12+
name: Install pnpm
13+
id: pnpm-install
14+
with:
15+
version: ^8.2.0
16+
run_install: false
17+
18+
- name: Get pnpm store directory
19+
id: pnpm-cache
20+
shell: bash
21+
run: |
22+
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
23+
24+
- uses: actions/cache@v3
25+
name: Setup pnpm cache
26+
with:
27+
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
28+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
29+
restore-keys: |
30+
${{ runner.os }}-pnpm-store-
31+
32+
- name: Install dependencies
33+
run: pnpm install
34+
shell: 'bash'

.github/workflows/electron.yml

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,9 @@ jobs:
1212
runs-on: ubuntu-latest
1313
timeout-minutes: 10
1414
steps:
15-
- name: Checkout
16-
uses: actions/checkout@v1
17-
- name: Use node 16.x
18-
uses: volta-cli/action@v1
19-
with:
20-
node-version: 16.x
21-
# Cache dependencies
22-
- name: Cache Dependencies
23-
uses: actions/cache@v2
24-
id: cache
25-
with:
26-
path: |
27-
**/node_modules
28-
key: yarn-${{ hashFiles('**/package.json', 'yarn.lock') }}
29-
# Install project dependencies
30-
- name: Install Dependencies
31-
if: steps.cache.outputs.cache-hit != 'true'
32-
run: yarn install-deps
15+
- uses: actions/checkout@v3
16+
- uses: ./.github/actions/pnpm
3317
- name: Get xvfb
3418
run: sudo apt-get install xvfb
3519
- name: Electron Test
36-
run: xvfb-run --auto-servernum yarn test:electron
20+
run: xvfb-run --auto-servernum pnpm test:electron

.github/workflows/ember.yml

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
timeout-minutes: 10
1414
steps:
15-
- name: Checkout
16-
uses: actions/checkout@v1
17-
- name: Use node 16.x
18-
uses: volta-cli/action@v1
19-
with:
20-
node-version: 16.x
21-
# Cache dependencies
22-
- name: Cache Dependencies
23-
uses: actions/cache@v2
24-
id: cache
25-
with:
26-
path: |
27-
**/node_modules
28-
key: yarn-${{ hashFiles('**/package.json', 'yarn.lock') }}
29-
# Install project dependencies
30-
- name: Install Dependencies
31-
if: steps.cache.outputs.cache-hit != 'true'
32-
run: yarn install-deps
15+
- uses: actions/checkout@v3
16+
- uses: ./.github/actions/pnpm
3317
- name: Ember Test
34-
run: yarn test:ember
18+
run: pnpm test:ember

.github/workflows/lint.yml

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,9 @@ jobs:
1212
runs-on: ubuntu-latest
1313
timeout-minutes: 10
1414
steps:
15-
- name: Checkout
16-
uses: actions/checkout@v1
17-
- name: Use node 16.x
18-
uses: volta-cli/action@v1
19-
with:
20-
node-version: 16.x
21-
# Cache dependencies
22-
- name: Cache Dependencies
23-
uses: actions/cache@v2
24-
id: cache
25-
with:
26-
path: |
27-
**/node_modules
28-
key: yarn-${{ hashFiles('**/package.json', 'yarn.lock') }}
29-
# Install project dependencies
30-
- name: Install Dependencies
31-
if: steps.cache.outputs.cache-hit != 'true'
32-
run: yarn install-deps
15+
- uses: actions/checkout@v3
16+
- uses: ./.github/actions/pnpm
3317
- name: Lint JS
34-
run: yarn lint:js
18+
run: pnpm lint:js
3519
- name: Lint HBS
36-
run: yarn lint:hbs
20+
run: pnpm lint:hbs

.github/workflows/release.yml

Lines changed: 14 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -11,34 +11,18 @@ jobs:
1111
runs-on: ubuntu-latest
1212
timeout-minutes: 10
1313
steps:
14-
- name: Checkout
15-
uses: actions/checkout@v1
16-
- name: Use node 16.x
17-
uses: volta-cli/action@v1
18-
with:
19-
node-version: 16.x
20-
# Cache dependencies
21-
- name: Cache Dependencies
22-
uses: actions/cache@v2
23-
id: cache
24-
with:
25-
path: |
26-
**/node_modules
27-
key: yarn-${{ hashFiles('**/package.json', 'yarn.lock') }}
28-
# Install project dependencies
29-
- name: Install Dependencies
30-
if: steps.cache.outputs.cache-hit != 'true'
31-
run: yarn install-deps
14+
- uses: actions/checkout@v3
15+
- uses: ./.github/actions/pnpm
3216
- name: Lint JS
33-
run: yarn lint:js
17+
run: pnpm lint:js
3418
- name: Lint HBS
35-
run: yarn lint:hbs
19+
run: pnpm lint:hbs
3620
- name: Get xvfb
3721
run: sudo apt-get install xvfb
3822
- name: Browser Test
39-
run: yarn test:ember
23+
run: pnpm test:ember
4024
- name: Electron Test
41-
run: xvfb-run --auto-servernum yarn test:electron
25+
run: xvfb-run --auto-servernum pnpm test:electron
4226
build:
4327
name: Build (${{ matrix.os }})
4428
if: startsWith(github.ref, 'refs/tags/')
@@ -49,15 +33,8 @@ jobs:
4933
matrix:
5034
os: [macos-latest, ubuntu-latest, windows-latest]
5135
steps:
52-
- name: Checkout
53-
uses: actions/checkout@v1
54-
- name: Use node 16.x
55-
uses: volta-cli/action@v1
56-
with:
57-
node-version: 16.x
58-
# Install project dependencies
59-
- name: Install Dependencies
60-
run: yarn install-deps
36+
- uses: actions/checkout@v3
37+
- uses: ./.github/actions/pnpm
6138
- name: Add macOS certs
6239
if: startsWith(matrix.os, 'macos') && startsWith(github.ref, 'refs/tags/')
6340
run: chmod +x add-osx-cert.sh && ./add-osx-cert.sh
@@ -73,15 +50,15 @@ jobs:
7350
encodedString: ${{ secrets.CERTIFICATE_WINDOWS_PFX }}
7451
- name: Make
7552
if: startsWith(github.ref, 'refs/tags/')
76-
run: yarn make
53+
run: pnpm make
7754
env:
7855
APPLE_ID: ${{ secrets.APPLE_ID }}
7956
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
8057
WINDOWS_PFX_FILE: ${{ steps.write_file.outputs.filePath }}
8158
WINDOWS_PFX_PASSWORD: ${{ secrets.WINDOWS_PFX_PASSWORD }}
8259
# - name: Make Apple arm64
8360
# if: matrix.os == 'macos-11.0' && startsWith(github.ref, 'refs/tags/')
84-
# run: yarn make --arch=arm64
61+
# run: pnpm make --arch=arm64
8562
# env:
8663
# APPLE_ID: ${{ secrets.APPLE_ID }}
8764
# APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD_ARM }}
@@ -115,23 +92,19 @@ jobs:
11592
continue-on-error: true
11693
if: startsWith(github.ref, 'refs/tags/')
11794
steps:
118-
- name: Checkout
119-
uses: actions/checkout@v1
120-
- name: Use node 16.x
121-
uses: volta-cli/action@v1
122-
- name: Yarn install
123-
run: yarn install-deps
95+
- uses: actions/checkout@v3
96+
- uses: ./.github/actions/pnpm
12497
- name: Install Snapcraft
12598
uses: samuelmeuli/action-snapcraft@v1
12699
with:
127100
snapcraft_token: ${{ secrets.snapcraft_token }}
128101
- name: Electron Builder Snapcraft
129102
run: |
130103
sudo apt update
131-
yarn make:snapcraft
104+
pnpm make:snapcraft
132105
cd electron-app
133106
set +e
134-
yarn build
107+
pnpm build
135108
set -e
136109
env:
137110
SNAPCRAFT_BUILD_ENVIRONMENT: host

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22

33
# compiled output
44
/dist/
5-
/tmp/
65

76
# dependencies
8-
/bower_components/
97
/node_modules/
108

119
# misc
@@ -22,7 +20,6 @@
2220

2321
# ember-try
2422
/.node_modules.ember-try/
25-
/bower.json.ember-try
2623
/npm-shrinkwrap.json.ember-try
2724
/package.json.ember-try
2825
/package-lock.json.ember-try

0 commit comments

Comments
 (0)