Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

build: switch to pnpm #738

Merged
merged 2 commits into from
Dec 5, 2022
Merged
Show file tree
Hide file tree
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
13 changes: 11 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,22 @@ jobs:
with:
fetch-depth: 0
persist-credentials: false

- name: Install pnpm
uses: pnpm/[email protected]
with:
version: 7.17.1

- uses: actions/setup-node@v2
with:
node-version: "16"
cache: "pnpm"

- name: Install dependencies
run: yarn install
run: pnpm install

- name: Release on NPM
run: yarn semantic-release
run: pnpm semantic-release
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
40 changes: 19 additions & 21 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
- ember-octane

env:
NODE_VERSION: 14
NODE_VERSION: 16

jobs:
lint:
Expand All @@ -26,23 +26,22 @@ jobs:

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2

- name: Install pnpm
uses: pnpm/[email protected]
with:
node-version: ${{ env.NODE_VERSION }}
version: 7.17.1

- uses: actions/cache@v2
- uses: actions/setup-node@v2
with:
path: node_modules
key: node-modules-v2-${{ hashFiles('yarn.lock') }}
restore-keys: |
node-modules-v2-${{ hashFiles('yarn.lock') }}
node-modules-v2-
node-version: ${{ env.NODE_VERSION }}
cache: "pnpm"

- name: Install dependencies
run: yarn install
run: pnpm install

- name: Lint ${{ matrix.target }}
run: yarn lint:${{ matrix.target }}
run: pnpm lint:${{ matrix.target }}

test:
name: Tests
Expand All @@ -52,26 +51,25 @@ jobs:

steps:
- uses: actions/checkout@v2

- name: Install pnpm
uses: pnpm/[email protected]
with:
version: 7.17.1

- uses: actions/setup-node@v2
with:
node-version: ${{ env.NODE_VERSION }}
cache: "pnpm"

- uses: actions/cache@v2
with:
path: node_modules
key: node-modules-v2-${{ hashFiles('yarn.lock') }}
restore-keys: |
node-modules-v2-${{ hashFiles('yarn.lock') }}
node-modules-v2-
- name: Install dependencies
run: yarn install
run: pnpm install

- name: Run tests
run: yarn test
run: pnpm test
env:
COVERAGE: true


# TODO enable this again after flaky tests are added back
# - name: Upload coverage report to Codecov
# uses: codecov/codecov-action@v1
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
/coverage/*
/libpeerconnection.log
npm-debug.log*
yarn-error.log
testem.log
*.swp
*.orig
Expand Down
2 changes: 1 addition & 1 deletion .husky/commit-msg
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
. "$(dirname "$0")/_/husky.sh"

# lint commit message
yarn commitlint --edit $1
pnpm commitlint --edit $1
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
[ -n "$CI" ] && exit 0

# lint staged files
yarn lint-staged
pnpm lint-staged
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ You will need the following things properly installed on your computer.

- [Git](https://git-scm.com/)
- [Node.js](https://nodejs.org/)
- [Yarn](https://yarnpkg.com/)
- [pnpm](https://pnpm.io/)
- [Ember CLI](https://ember-cli.com/)
- [Chrome](https://www.google.com/chrome/)
- [Firefox](https://www.mozilla.org/firefox/)
Expand All @@ -24,7 +24,7 @@ Optional:

- `git clone [email protected]/adfinis-sygroup/timed-frontend`
- `cd timed-frontend`
- `yarn`
- `pnpm i`

## Running / Development

Expand All @@ -35,7 +35,7 @@ If you have a running [backend](https://github.com/adfinis-sygroup/timed-backend

- `ember server --proxy=http://localhost:8000`
or
- `yarn start`
- `pnpm start`

If you are using docker-compose you can start a static frontend and the backend by following the instructions in the [backend](https://github.com/adfinis-sygroup/timed-backend)

Expand Down
5 changes: 1 addition & 4 deletions ember-cli-build.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use strict";

// eslint-disable-next-line node/no-extraneous-require
// eslint-disable-next-line node/no-missing-require
const Funnel = require("broccoli-funnel");
const EmberApp = require("ember-cli/lib/broccoli/ember-app");

Expand All @@ -9,9 +9,6 @@ module.exports = function (defaults) {
sassOptions: {
onlyIncluded: true,
},
babel: {
plugins: ["@babel/plugin-proposal-object-rest-spread"],
},
"ember-site-tour": {
importHopscotchJS: true,
importHopscotchCSS: true,
Expand Down
21 changes: 14 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"lint:hbs:fix": "ember-template-lint . --fix",
"lint:js": "eslint . --cache",
"prepare": "husky install",
"preinstall": "npx only-allow pnpm",
"lint:js:fix": "eslint . --fix",
"start": "ember server --proxy http://localhost:8000",
"test": "npm-run-all lint test:*",
Expand All @@ -38,8 +39,6 @@
"devDependencies": {
"@adfinis-sygroup/eslint-config": "1.5.0",
"@adfinis-sygroup/semantic-release-config": "3.4.0",
"@babel/helper-simple-access": "7.19.4",
"@babel/plugin-proposal-object-rest-spread": "7.18.9",
"@commitlint/cli": "17.2.0",
"@commitlint/config-conventional": "17.2.0",
"@ember/jquery": "2.0.0",
Expand All @@ -56,17 +55,18 @@
"ember-ajax": "5.1.2",
"ember-auto-import": "2.4.3",
"ember-basic-dropdown": "6.0.1",
"ember-classic-decorator": "3.0.1",
"ember-can": "4.2.0",
"ember-changeset": "4.1.1",
"ember-changeset-validations": "4.1.0",
"ember-classic-decorator": "3.0.1",
"ember-cli": "3.28.0",
"ember-cli-app-version": "5.0.0",
"ember-cli-babel": "7.26.11",
"ember-cli-chart": "3.7.2",
"ember-cli-code-coverage": "1.0.3",
"ember-cli-dependency-lint": "2.0.1",
"ember-cli-deprecation-workflow": "2.1.0",
"ember-cli-htmlbars": "5.7.2",
"ember-cli-htmlbars": "6.0.0",
"ember-cli-inject-live-reload": "2.1.0",
"ember-cli-mirage": "2.4.0",
"ember-cli-moment-shim": "3.8.0",
Expand Down Expand Up @@ -137,8 +137,15 @@
"ember": {
"edition": "octane"
},
"resolutions": {
"@embroider/macros": "^1.0.0",
"ember-concurrency": "2.2.1"
"pnpm": {
"overrides": {
"ember-concurrency": "^2.1.1"
},
"peerDependencyRules": {
"ignoreMissing": [
"@babel/core",
"@types/node"
]
}
}
}
Loading