Skip to content

Commit

Permalink
Internal: Replace yarn with pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
pichfl committed Feb 4, 2022
1 parent 26ef867 commit dbe977b
Show file tree
Hide file tree
Showing 6 changed files with 10,049 additions and 11,763 deletions.
41 changes: 27 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
- 'v*'
pull_request: {}

env:
PNPM_VERSION: 6.29.1

concurrency:
group: ci-${{ github.head_ref || github.ref }}
cancel-in-progress: true
Expand All @@ -18,32 +21,39 @@ jobs:

steps:
- uses: actions/checkout@v2
- uses: pnpm/[email protected]
with:
version: ${{ env.PNPM_VERSION }}
- name: Install Node
uses: actions/setup-node@v2
with:
node-version: 12.x
cache: yarn
node-version: 14.x
cache: pnpm
- name: Install Dependencies
run: yarn install --frozen-lockfile
run: pnpm install
- name: Lint
run: yarn lint
run: pnpm run lint
- name: Run Tests
run: yarn test
run: pnpm run test

floating:
name: "Floating Dependencies"
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: pnpm/[email protected]
with:
version: ${{ env.PNPM_VERSION }}
- name: Install Node
uses: actions/setup-node@v2
with:
node-version: 12.x
cache: yarn
node-version: 14.x
cache: pnpm
- name: Install Dependencies
run: yarn install --no-lockfile
run: pnpm install
- name: Run Tests
run: yarn test
run: pnpm run test

try-scenarios:
name: ${{ matrix.try-scenario }}
Expand All @@ -68,12 +78,15 @@ jobs:

steps:
- uses: actions/checkout@v2
- uses: pnpm/[email protected]
with:
version: ${{ env.PNPM_VERSION }}
- name: Install Node
uses: actions/setup-node@v2
with:
node-version: 12.x
cache: yarn
node-version: 14.x
cache: pnpm
- name: Install Dependencies
run: yarn install --frozen-lockfile
run: pnpm install
- name: Run Tests
run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }}
run: pnpm exec ember try:one ${{ matrix.try-scenario }}
16 changes: 9 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
# How To Contribute

This project uses the [pnpm](https://pnpm.io) package manager to manage its dependencies.

## Installation

- `git clone <repository-url>`
- `cd ember-promise-modals`
- `yarn install`
- `pnpm install`

## Linting

- `yarn lint:hbs`
- `yarn lint:js`
- `yarn lint:js --fix`
- `pnpm lint:hbs`
- `pnpm lint:js`
- `pnpm lint:js --fix`

## Running tests

- `ember test` – Runs the test suite on the current Ember version
- `ember test --server` – Runs the test suite in "watch mode"
- `ember try:each` – Runs the test suite against multiple Ember versions
- `pnpm exec ember test` – Runs the test suite on the current Ember version
- `pnpm exec ember test --server` – Runs the test suite in "watch mode"
- `pnpm exec ember try:each` – Runs the test suite against multiple Ember versions

## Running the dummy application

Expand Down
4 changes: 2 additions & 2 deletions config/ember-try.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const getChannelURL = require('ember-source-channel-url');

module.exports = async function () {
return {
useYarn: true,
usePnpm: true,
scenarios: [
{
name: 'ember-lts-3.4',
Expand Down Expand Up @@ -97,7 +97,7 @@ module.exports = async function () {
},
},
},
// The default `.travis.yml` runs this scenario via `yarn test`,
// The default `.travis.yml` runs this scenario via `pnpm test`,
// not via `ember try`. It's still included here so that running
// `ember try:each` manually or from a customized CI config will run it
// along with all the other scenarios.
Expand Down
13 changes: 11 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
},
"scripts": {
"build": "ember build --env=production",
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel 'lint:!(fix)'",
"lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*:fix",
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel \"lint:!(fix)\"",
"lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel \"lint:*:fix\"",
"lint:hbs": "ember-template-lint .",
"lint:hbs:fix": "ember-template-lint . --fix",
"lint:js": "eslint . --cache",
Expand Down Expand Up @@ -83,5 +83,14 @@
},
"ember-addon": {
"configPath": "tests/dummy/config"
},
"pnpm": {
"peerDependencyRules": {
"ignoreMissing": [
"@babel/core",
"postcss",
"webpack"
]
}
}
}
Loading

0 comments on commit dbe977b

Please sign in to comment.