Skip to content

Commit

Permalink
Merge pull request #696 from adopted-ember-addons/pnpm
Browse files Browse the repository at this point in the history
Switch from npm to pnpm
  • Loading branch information
SergeAstapov authored Nov 9, 2024
2 parents 2f23bd6 + be4cc94 commit 7f3d422
Show file tree
Hide file tree
Showing 13 changed files with 14,134 additions and 35,722 deletions.
45 changes: 27 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,34 +18,40 @@ jobs:
timeout-minutes: 10

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9
- name: Install Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18.x
cache: npm
node-version: 18
cache: pnpm
- name: Install Dependencies
run: npm ci
run: pnpm install --frozen-lockfile
- name: Lint
run: npm run lint
run: pnpm lint
- name: Run Tests
run: npm run test:ember
run: pnpm test:ember

floating:
name: "Floating Dependencies"
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9
- uses: actions/setup-node@v4
with:
node-version: 18.x
cache: npm
node-version: 18
cache: pnpm
- name: Install Dependencies
run: npm install --no-shrinkwrap
run: pnpm install --no-lockfile
- name: Run Tests
run: npm run test:ember
run: pnpm test:ember

try-scenarios:
name: ${{ matrix.try-scenario }}
Expand Down Expand Up @@ -74,13 +80,16 @@ jobs:
# - embroider-optimized

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9
- name: Install Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18.x
cache: npm
node-version: 18
cache: pnpm
- name: Install Dependencies
run: npm ci
run: pnpm install --frozen-lockfile
- name: Run Tests
run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }}
7 changes: 5 additions & 2 deletions .github/workflows/plan-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,15 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 18
- run: npm ci
- uses: pnpm/action-setup@v4
with:
version: 9
- run: pnpm install --frozen-lockfile
- name: "Generate Explanation and Prep Changelogs"
id: explanation
run: |
set +e
npx release-plan prepare 2> >(tee -a release-plan-stderr.txt >&2)
pnpm release-plan prepare 2> >(tee -a release-plan-stderr.txt >&2)
if [ $? -ne 0 ]; then
echo 'text<<EOF' >> $GITHUB_OUTPUT
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,12 @@ jobs:
node-version: 18
# This creates an .npmrc that reads the NODE_AUTH_TOKEN environment variable
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- uses: pnpm/action-setup@v4
with:
version: 9
- run: pnpm install --frozen-lockfile
- name: npm publish
run: npx release-plan publish
run: pnpm release-plan publish
env:
GITHUB_AUTH: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
5 changes: 0 additions & 5 deletions .template-lintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,4 @@

module.exports = {
extends: 'recommended',

rules: {
// TODO: consider enabling this rule
'no-action': false,
},
};
14 changes: 7 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,22 +47,22 @@ issue's number to the description of your pull-request.

- `git clone git@github.com:adopted-ember-addons/ember-changeset.git`
- `cd ember-changeset`
- `npm install`
- `pnpm install`

## Linting

- `npm run lint`
- `npm run lint:fix`
- `pnpm lint`
- `pnpm lint:fix`

## Running tests

- `npm run test` – Runs the test suite on the current Ember version
- `npm run test:ember -- --server` – Runs the test suite in "watch mode"
- `npm run 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

- `npm run 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 ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module.exports = function (defaults) {
addon, located in `/tests/dummy`
This build file does *not* influence how the addon or the app using it
behave. You most likely want to be modifying `./index.js` or app's build file
*/
*/

const { maybeEmbroider } = require('@embroider/test-setup');
return maybeEmbroider(app, {
Expand Down
Loading

0 comments on commit 7f3d422

Please sign in to comment.