Skip to content

Commit

Permalink
Switch from yarn to pnpm (#1816)
Browse files Browse the repository at this point in the history
* Switch from yarn to pnpm

* Remove lib changes

* Delete lib/tasks/pnpm-yarn-or-npm.js
  • Loading branch information
RobbieTheWagner authored Oct 1, 2024
1 parent 6e7e4b4 commit f6a6e2e
Show file tree
Hide file tree
Showing 8 changed files with 20,459 additions and 17,013 deletions.
49 changes: 34 additions & 15 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,21 @@ jobs:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: volta-cli/action@v1
- run: yarn install --frozen-lockfile --network-timeout 100000
- uses: actions/checkout@v4
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 18.x
- uses: pnpm/action-setup@v2
with:
version: 9
- name: Install Dependencies
run: pnpm install --frozen-lockfile

- name: 'Lint'
run: |
yarn lint:hbs
yarn lint:js
pnpm lint:hbs
pnpm lint:js
test:
name: Basic tests (${{ matrix.os }})
Expand All @@ -34,12 +41,18 @@ jobs:
os: [macos-latest, ubuntu-latest, windows-latest]

steps:
- uses: actions/checkout@v2
- uses: volta-cli/action@v1
- run: yarn install --frozen-lockfile --network-timeout 100000

- uses: actions/checkout@v4
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 18.x
- uses: pnpm/action-setup@v2
with:
version: 9
- name: Install Dependencies
run: pnpm install --frozen-lockfile
- name: 'Basic Tests'
run: yarn test-fast
run: pnpm test-fast

# runs slow end-to-end tests, parallelizing yarn and npm cases
test-end-to-end:
Expand All @@ -50,14 +63,20 @@ jobs:
os: [macos-latest, ubuntu-latest, windows-latest]

steps:
- uses: actions/checkout@v2
- uses: volta-cli/action@v1
- run: yarn install --frozen-lockfile --network-timeout 100000

- uses: actions/checkout@v4
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 18.x
- uses: pnpm/action-setup@v2
with:
version: 9
- name: Install Dependencies
run: pnpm install --frozen-lockfile
- name: 'End-to-end Tests'
uses: GabrielBB/xvfb-action@v1
with:
run: yarn test-slow
run: pnpm test-slow

automerge:
needs: [lint, test, test-end-to-end]
Expand Down
14 changes: 7 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@

* `git clone <repository-url>`
* `cd ember-electron`
* `yarn install`
* `pnpm install`

## Linting

* `yarn lint`
* `yarn lint:fix`
* `pnpm lint`
* `pnpm lint:fix`

## Running tests

* `yarn test` – Runs the test suite on the current Ember version
* `yarn test:ember --server` – Runs the test suite in "watch mode"
* `yarn test:ember-compatibility` – Runs the test suite against multiple Ember versions
* `pnpm test` – Runs the test suite on the current Ember version
* `pnpm test:ember --server` – Runs the test suite in "watch mode"
* `pnpm test:ember-compatibility` – Runs the test suite against multiple Ember versions

## Running the dummy application

* `yarn start`
* `pnpm start`
* Visit the dummy application at [http://localhost:4200](http://localhost:4200).

For more information on using ember-cli, visit [https://cli.emberjs.com/release/](https://cli.emberjs.com/release/).
2 changes: 1 addition & 1 deletion config/ember-cli-update.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"codemodsSource": "ember-addon-codemods-manifest@1",
"isBaseBlueprint": true,
"options": [
"--yarn",
"--pnpm",
"--no-welcome"
]
}
Expand Down
7 changes: 1 addition & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"lint:js:fix": "eslint . --fix",
"release": "release-it",
"test": "concurrently \"npm:lint\" \"npm:test:*\" --names \"lint,test:\"",
"test:electron": "yarn test-fast && yarn test-slow",
"test:electron": "pnpm test-fast && pnpm test-slow",
"test:ember": "ember test",
"test:ember-compatibility": "ember try:each",
"test-fast": "mocha node-tests/integration/**/*.js node-tests/unit/**/*.js",
Expand All @@ -63,7 +63,6 @@
"debug": "^4.1.1",
"ember-cli-babel": "^8.2.0",
"execa": "^5.0.0",
"find-yarn-workspace-root": "^2.0.0",
"ncp": "^2.0.0",
"portfinder": "^1.0.25",
"rimraf": "^3.0.2",
Expand Down Expand Up @@ -164,9 +163,5 @@
"github": {
"release": true
}
},
"volta": {
"node": "20.12.2",
"yarn": "1.22.19"
}
}
Loading

0 comments on commit f6a6e2e

Please sign in to comment.