Skip to content

Commit

Permalink
Adopt pnpm
Browse files Browse the repository at this point in the history
- Move test app to use ember-prism and updated ember-code-snippet
  • Loading branch information
lukemelia committed Sep 28, 2024
1 parent 46d5b8e commit 6ce2482
Show file tree
Hide file tree
Showing 15 changed files with 17,147 additions and 12,240 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@
/package.json.ember-try
/package-lock.json.ember-try
/yarn.lock.ember-try
/pnpm-lock.yaml.ember-try
89 changes: 69 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,33 +17,66 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Install Node
uses: actions/setup-node@v2
- uses: actions/checkout@v4
- name: Install volta
uses: volta-cli/action@v4
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path -s)" >> $GITHUB_OUTPUT
- name: Setup pnpm cache
uses: actions/cache@v4
id: cache
with:
node-version: 16.x
cache: yarn
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install Dependencies
run: yarn install --frozen-lockfile
shell: bash
run: pnpm install --frozen-lockfile
- name: Prune pnpm store
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
shell: bash
run: pnpm store prune
- name: Lint
run: yarn lint
run: pnpm lint
- name: Run Tests
run: yarn test:ember
run: pnpm test:ember

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

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v4
- name: Install volta
uses: volta-cli/action@v4
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path -s)" >> $GITHUB_OUTPUT
- name: Setup pnpm cache
uses: actions/cache@v4
id: cache
with:
node-version: 16.x
cache: yarn
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install Dependencies
run: yarn install --no-lockfile
shell: bash
run: pnpm install --no-frozen-lockfile
- name: Prune pnpm store
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
shell: bash
run: pnpm store prune
- name: Run Tests
run: yarn test:ember
run: pnpm test:ember

try-scenarios:
name: ${{ matrix.try-scenario }}
Expand All @@ -65,13 +98,29 @@ jobs:
- embroider-optimized

steps:
- uses: actions/checkout@v2
- name: Install Node
uses: actions/setup-node@v2
- uses: actions/checkout@v4
- name: Install volta
uses: volta-cli/action@v4
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path -s)" >> $GITHUB_OUTPUT
- name: Setup pnpm cache
uses: actions/cache@v4
id: cache
with:
node-version: 16.x
cache: yarn
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install Dependencies
run: yarn install --frozen-lockfile
shell: bash
run: pnpm install --frozen-lockfile
- name: Prune pnpm store
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
shell: bash
run: pnpm store prune
- name: Run Tests
run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@
/package.json.ember-try
/package-lock.json.ember-try
/yarn.lock.ember-try
/pnpm-lock.yaml.ember-try
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
/tests/
/yarn-error.log
/yarn.lock
/pnpm-lock.yaml
.gitkeep

# ember-try
Expand All @@ -38,3 +39,4 @@
/package.json.ember-try
/package-lock.json.ember-try
/yarn.lock.ember-try
/pnpm-lock.yaml.ember-try
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@
/package.json.ember-try
/package-lock.json.ember-try
/yarn.lock.ember-try
/pnpm-lock.yaml.ember-try
2 changes: 1 addition & 1 deletion RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Once the prep work is completed, the actual release is straight forward:
* First, ensure that you have installed your projects dependencies:

```
yarn install
pnpm install
```

* Second, ensure that you have obtained a
Expand Down
4 changes: 4 additions & 0 deletions ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ const EmberAddon = require('ember-cli/lib/broccoli/ember-addon');
module.exports = function (defaults) {
let app = new EmberAddon(defaults, {
snippetSearchPaths: ['tests/dummy/app'],
'ember-prism': {
theme: 'twilight',
components: ['scss', 'javascript', 'markup'],
},
});

/*
Expand Down
28 changes: 13 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"test": "tests"
},
"scripts": {
"preinstall": "npx only-allow pnpm",
"build": "ember build --environment=production",
"deploy": "ember github-pages:commit --message \"Deploy gh-pages from commit $(git rev-parse HEAD)\"; git push; git checkout -",
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel \"lint:!(fix)\"",
Expand All @@ -30,9 +31,9 @@
"dependencies": {
"@embroider/macros": "^1.0.0",
"@embroider/util": "^1.0.0",
"ember-cli-babel": "^7.26.8",
"ember-cli-htmlbars": "^6.0.1",
"ember-cli-version-checker": "^2.1.0",
"ember-cli-babel": "^7.26.11",
"ember-cli-htmlbars": "^6.2.0",
"ember-cli-version-checker": "^2.2.0",
"ember-decorators": "^6.1.1",
"ember-wormhole": "^0.6.0"
},
Expand All @@ -46,22 +47,23 @@
"@glimmer/tracking": "^1.1.2",
"babel-eslint": "^10.1.0",
"broccoli-asset-rev": "^3.0.0",
"ember-auto-import": "^2.4.0",
"ember-auto-import": "^2.6.3",
"ember-cli": "~4.0.1",
"ember-cli-dependency-checker": "^3.2.0",
"ember-cli-deprecation-workflow": "^2.1.0",
"ember-cli-github-pages": "^0.2.2",
"ember-cli-inject-live-reload": "^2.1.0",
"ember-cli-terser": "^4.0.2",
"ember-code-snippet": "^2.4.0",
"ember-code-snippet": "^3.0.0",
"ember-disable-prototype-extensions": "^1.1.3",
"ember-export-application-global": "^2.0.1",
"ember-load-initializers": "^2.1.2",
"ember-prism": "^1.0.0",
"ember-qunit": "^5.1.5",
"ember-resolver": "^8.0.3",
"ember-source": "~3.28.8",
"ember-source-channel-url": "^3.0.0",
"ember-template-lint": "^3.15.0",
"ember-template-lint": "^3.16.0",
"ember-tether": "^3.0.0",
"ember-truth-helpers": "^3.0.0",
"ember-try": "^2.0.0",
Expand All @@ -79,8 +81,8 @@
"prettier": "^2.5.1",
"qunit": "^2.17.2",
"qunit-dom": "^2.0.0",
"release-it": "^13.6.5",
"release-it-lerna-changelog": "^2.3.0",
"release-it": "^13.7.2",
"release-it-lerna-changelog": "^2.4.0",
"webpack": "^5.67.0"
},
"peerDependencies": {
Expand All @@ -91,12 +93,8 @@
"optional": true
}
},
"resolutions": {
"**/@embroider/macros": "^1.0.0",
"**/@embroider/util": "^1.0.0"
},
"engines": {
"node": "12.* || 14.* || >= 16"
"node": "18.* || >= 20"
},
"publishConfig": {
"registry": "https://registry.npmjs.org"
Expand Down Expand Up @@ -127,7 +125,7 @@
}
},
"volta": {
"node": "16.19.1",
"yarn": "1.22.19"
"node": "20.14.0",
"pnpm": "9.2.0"
}
}
Loading

0 comments on commit 6ce2482

Please sign in to comment.