Skip to content

use pnpm #519

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 31 additions & 27 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -18,41 +18,43 @@ jobs:
env:
PERCY_TOKEN: ee0a9d5c1122d6a21852edf19b5b309aaec18077fb3900c98995c90bc48ed240
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 18.x
cache: npm
- run: npm ci
- run: npx percy exec -- npm run test:docs
cache: pnpm
- run: pnpm i --frozen-lockfile
- run: pnpm percy exec -- pnpm run test:docs

test:
name: "Tests"
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: mansona/npm-lockfile-version@v1
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 18.x
cache: npm
- run: npm ci
- run: npm run lint
- run: npx percy exec -- npm run test
cache: pnpm
- run: pnpm i --frozen-lockfile
- run: pnpm run lint
- run: pnpm run test

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

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

try-scenarios:
name: ${{ matrix.try-scenario }}
@@ -73,14 +75,15 @@ jobs:
- no-deprecations

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 18.x
cache: npm
- run: npm ci
cache: pnpm
- run: pnpm install --frozen-lockfile
- name: Run Tests
run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }}
run: pnpm ember try:one ${{ matrix.try-scenario }}

allow-fail-try-scenarios:
name: ${{ matrix.try-scenario }} - Allowed to fail
@@ -97,15 +100,16 @@ jobs:
- ember-release-no-deprecations

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 18.x
cache: npm
- run: npm ci
cache: pnpm
- run: pnpm install --frozen-lockfile
- name: Run Tests
id: tests
run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }}
run: pnpm ember try:one ${{ matrix.try-scenario }}
continue-on-error: true
- uses: mainmatter/continue-on-error-comment@v1
with:
14 changes: 6 additions & 8 deletions .github/workflows/plan-release.yml
Original file line number Diff line number Diff line change
@@ -4,9 +4,10 @@ on:
branches:
- main
- master
pull_request:
pull_request_target: # This workflow has permissions on the repo, do NOT run code from PRs in this workflow. See https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
types:
- labeled
- unlabeled

concurrency:
group: plan-release # only the latest one of these should ever be running
@@ -41,7 +42,7 @@ jobs:
explanation: ${{ steps.explanation.outputs.text }}
# only run on push event if plan wasn't updated (don't create a release plan when we're releasing)
# only run on labeled event if the PR has already been merged
if: (github.event_name == 'push' && needs.check-plan.outputs.command != 'release') || (github.event_name == 'pull_request' && github.event.pull_request.merged == true)
if: (github.event_name == 'push' && needs.check-plan.outputs.command != 'release') || (github.event_name == 'pull_request_target' && github.event.pull_request.merged == true)

steps:
- uses: actions/checkout@v4
@@ -53,16 +54,13 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 18

- run: npm ci

- uses: pnpm/action-setup@v4
- 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
7 changes: 3 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -49,11 +49,10 @@ 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
- 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 }}
1 change: 1 addition & 0 deletions config/ember-try.js
Original file line number Diff line number Diff line change
@@ -5,6 +5,7 @@ const { embroiderSafe, embroiderOptimized } = require('@embroider/test-setup');

module.exports = async function () {
return {
usePnpm: true,
scenarios: [
{
name: 'ember-lts-3.28',
62,331 changes: 0 additions & 62,331 deletions package-lock.json

This file was deleted.

18 changes: 14 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -97,7 +97,6 @@
"lint-to-the-future-eslint": "^0.4.0",
"loader.js": "^4.7.0",
"npm-run-all": "^4.1.5",
"pnpm": "^7.0.0",
"prember": "^2.0.0",
"prettier": "^2.5.1",
"qunit": "^2.17.2",
@@ -108,12 +107,10 @@
"stylelint-order": "^4.0.0",
"webpack": "^5.52.1"
},
"packageManager": "pnpm@9.5.0",
"engines": {
"node": "18.* || >= 20"
},
"volta": {
"node": "18.18.2"
},
"publishConfig": {
"registry": "https://registry.npmjs.org"
},
@@ -125,5 +122,18 @@
},
"ember-addon": {
"configPath": "tests/dummy/config"
},
"pnpm": {
"packageExtensions": {
"ember-resolver": {
"dependency": {
"@ember/string": "*",
"ember-auto-import": "*"
}
}
},
"patchedDependencies": {
"ember-resolver@8.1.0": "patches/ember-resolver@8.1.0.patch"
}
}
}
21 changes: 21 additions & 0 deletions patches/ember-resolver@8.1.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
diff --git a/package.json b/package.json
index cfa624641c428833823c52427998e2f1bb6c7c87..45393c60d4a449e5d801191eca7d4be0df98ddc6 100644
--- a/package.json
+++ b/package.json
@@ -40,6 +40,8 @@
"broccoli-merge-trees": "^4.2.0",
"ember-cli-babel": "^7.26.6",
"ember-cli-version-checker": "^5.1.2",
+ "@ember/string": "*",
+ "ember-auto-import": "*",
"resolve": "^1.20.0"
},
"devDependencies": {
@@ -47,7 +49,6 @@
"@ember/test-helpers": "^2.2.5",
"babel-eslint": "^10.1.0",
"broccoli-asset-rev": "^3.0.0",
- "ember-auto-import": "^1",
"ember-cli": "~3.27.0",
"ember-cli-dependency-checker": "^3.2.0",
"ember-cli-htmlbars": "^5.7.1",
18,225 changes: 18,225 additions & 0 deletions pnpm-lock.yaml

Large diffs are not rendered by default.