Skip to content

Commit bd1aad6

Browse files
authored
Merge pull request #835 from ember-learn/npm-instead-of-yarn
Use NPM instead of Yarn
2 parents b0e3a7d + 38cf235 commit bd1aad6

File tree

8 files changed

+71395
-15317
lines changed

8 files changed

+71395
-15317
lines changed

.github/workflows/ci.yml

Lines changed: 23 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -7,76 +7,59 @@ on:
77
pull_request:
88

99
env:
10-
NODE_VERSION: 12
10+
NODE_VERSION: 14
1111
PERCY_PARALLEL_NONCE: ${{ github.run_id }}-${{ github.run_number }}
1212
PERCY_PARALLEL_TOTAL: 1
1313

1414
jobs:
1515
lint:
1616
name: Lint files
1717
runs-on: ubuntu-latest
18-
timeout-minutes: 3
18+
timeout-minutes: 5
1919
steps:
2020
- name: Check out a copy of the repo
21-
uses: actions/checkout@v2
21+
uses: actions/checkout@v3
2222

23-
- name: Use Node.js 14
24-
uses: volta-cli/action@v4
23+
- name: Check lockfile version
24+
uses: mansona/npm-lockfile-version@v1
2525

26-
- name: Get Yarn cache path
27-
id: yarn-cache-dir-path
28-
run: echo "::set-output name=dir::$(yarn cache dir)"
29-
30-
- name: Cache Yarn cache and node_modules
31-
id: cache-dependencies
32-
uses: actions/cache@v2
26+
- name: Use Node.js ${{ env.NODE_VERSION }}
27+
uses: actions/setup-node@v3
3328
with:
34-
path: |
35-
${{ steps.yarn-cache-dir-path.outputs.dir }}
36-
node_modules
37-
key: ${{ runner.os }}-${{ env.NODE_VERSION }}-${{ hashFiles('**/yarn.lock') }}
38-
restore-keys: ${{ runner.os }}-${{ env.NODE_VERSION }}-
29+
cache: 'npm'
30+
node-version: ${{ env.NODE_VERSION }}
31+
32+
- run: npm i -g npm@9
3933

4034
- name: Install dependencies
41-
run: yarn install --frozen-lockfile
42-
if: steps.cache-dependencies.outputs.cache-hit != 'true'
35+
run: npm ci
4336

4437
- name: Lint
45-
run: yarn lint
38+
run: npm run lint
4639

4740

4841
test-app:
4942
name: Test app
5043
runs-on: ubuntu-latest
51-
timeout-minutes: 7
44+
timeout-minutes: 10
5245
steps:
5346
- name: Check out a copy of the repo
54-
uses: actions/checkout@v2
55-
56-
- name: Use Node.js 14
57-
uses: volta-cli/action@v4
47+
uses: actions/checkout@v3
5848

59-
- name: Get Yarn cache path
60-
id: yarn-cache-dir-path
61-
run: echo "::set-output name=dir::$(yarn cache dir)"
62-
63-
- name: Cache Yarn cache and node_modules
64-
id: cache-dependencies
65-
uses: actions/cache@v2
49+
- name: Use Node.js ${{ env.NODE_VERSION }}
50+
uses: actions/setup-node@v3
6651
with:
67-
path: |
68-
${{ steps.yarn-cache-dir-path.outputs.dir }}
69-
node_modules
70-
key: ${{ runner.os }}-14-${{ hashFiles('**/yarn.lock') }}
71-
restore-keys: ${{ runner.os }}-14-
52+
cache: 'npm'
53+
node-version: ${{ env.NODE_VERSION }}
54+
55+
- run: npm i -g npm@9
7256

7357
- name: Install dependencies
74-
run: yarn install --frozen-lockfile
75-
if: steps.cache-dependencies.outputs.cache-hit != 'true'
58+
run: npm ci
7659

7760
- name: Test
7861
env:
7962
PERCY_PARALLEL_NONCE: ${{ env.PERCY_PARALLEL_NONCE }}
8063
PERCY_PARALLEL_TOTAL: ${{ env.PERCY_PARALLEL_TOTAL }}
8164
PERCY_TOKEN: 5ad6687f6b1ad3dec2b964f94d3d59ff3880baccf1492c0663e85c1ce79c1a52
82-
run: yarn run percy exec -- yarn test:ember
65+
run: npx percy exec -- npm run test:ember

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ terraform.tfstate.backup
2727
/libpeerconnection.log
2828
/npm-debug.log*
2929
/testem.log
30-
/yarn-error.log
3130

3231
public/json-docs/
3332
public/rev-index/

CONTRIBUTING.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,20 +77,20 @@ clone the latest ember.js api docs from github
7777
cd to the cloned ember-api-docs directory
7878
- cd ember-api-docs
7979

80-
ensure Node.js and yarn are installed
80+
ensure Node.js and npm are installed
8181

8282
follow these commands to build ember.js
83-
- yarn install
84-
- yarn run build
83+
- npm install
84+
- npm build
8585
```
8686

8787
## Development steps
8888

8989
1. Follow the setup steps listed above under [Building Ember.js API](#building-emberjs-api-docs).
9090

91-
2. To start the development server, run `yarn start`.
91+
2. To start the development server, run `npm start`.
9292

93-
3. To run all tests run `yarn test`
93+
3. To run all tests run `npm test`
9494

9595
4. To run the app with fastboot cli like our server deployment run the following commands,
9696
```
@@ -106,7 +106,7 @@ We love pull requests. Here's a quick guide:
106106
1. Fork the repo.
107107

108108
2. Run the tests. We only take pull requests with passing tests, and it's great
109-
to know that you have a clean slate: `yarn install && yarn test`.
109+
to know that you have a clean slate: `npm install && npm test`.
110110

111111
3. Add a test for your change. Only refactoring and documentation changes
112112
require no new tests. If you are adding functionality or fixing a bug, we need

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ locally yourself.
4242
```
4343
git clone https://github.com/ember-learn/ember-api-docs.git
4444
cd ember-api-docs
45-
yarn install
45+
npm install
4646
ember serve
4747
```
4848
View at http://localhost:4200
@@ -53,9 +53,9 @@ To run a11y tests, run `test_a11y=yes ember serve`
5353

5454
## Linting
5555

56-
* `yarn run lint:hbs`
57-
* `yarn run lint:js`
58-
* `yarn run lint:js -- --fix`
56+
* `npm run lint:hbs`
57+
* `npm run lint:js`
58+
* `npm run lint:js -- --fix`
5959

6060
## Staging and Deployment
6161

config/ember-cli-update.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
"codemodsSource": "ember-app-codemods-manifest@1",
1212
"isBaseBlueprint": true,
1313
"options": [
14-
"--yarn",
1514
"--no-welcome"
1615
]
1716
}

0 commit comments

Comments
 (0)