Skip to content

Commit

Permalink
Merge pull request #69 from smile-io/pnpm
Browse files Browse the repository at this point in the history
Use pnpm
  • Loading branch information
vladucu authored Jan 4, 2024
2 parents 43e8509 + 992a5d0 commit 84970f1
Show file tree
Hide file tree
Showing 9 changed files with 18,263 additions and 14,165 deletions.
44 changes: 19 additions & 25 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,55 +4,52 @@ on:
push:
branches:
- main
- v*
- "v*"
pull_request: {}
merge_group:
schedule:
- cron: '0 3 * * *' # daily, at 3am
- cron: "0 3 * * *" # daily, at 3am

concurrency:
group: ci-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
test:
name: 'Tests'
name: "Tests"
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- uses: actions/checkout@v3
- name: Install Node
uses: actions/setup-node@v3
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: wyvox/action-setup-pnpm@v3
with:
node-version: 16
cache: yarn
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Lint
run: yarn lint
run: pnpm lint
- name: Run Tests
run: yarn test:ember
run: pnpm test:ember

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

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: wyvox/action-setup-pnpm@v3
with:
node-version: 16
cache: yarn
- name: Install Dependencies
run: yarn install --no-lockfile
args: "--no-lockfile"
- name: Run Tests
run: yarn test:ember
run: pnpm test:ember

try-scenarios:
name: ${{ matrix.try-scenario }}
runs-on: ubuntu-latest
needs: 'test'
needs: "test"
timeout-minutes: 10

strategy:
Expand All @@ -68,13 +65,10 @@ jobs:
- embroider-optimized

steps:
- uses: actions/checkout@v3
- name: Install Node
uses: actions/setup-node@v3
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: wyvox/action-setup-pnpm@v3
with:
node-version: 16
cache: yarn
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Run Tests
run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }}
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn lint-staged
pnpm lint-staged
8 changes: 8 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# these settings allow us to be good stewards of the ecosystem
# end-consumers can flip these settings in their own projects,
# but library authors should not allow for less-than-strictest
# behavior.
#
# For more information: https://pnpm.io/npmrc
auto-install-peers=false
resolve-peers-from-workspace-root=false
23 changes: 12 additions & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@

## Installation

* `git clone <repository-url>`
* `cd ember-smile-polaris`
* `yarn install`
- `git clone <repository-url>`
- `cd ember-smile-polaris`
- `pnpm install`

## Linting

* `yarn lint`
* `yarn lint:fix`
- `pnpm lint`
- `pnpm lint: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
- `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

## Running the dummy application

* `ember serve`
* Visit the dummy application at [http://localhost:4200](http://localhost:4200).
- `ember serve`
- Visit the dummy application at [http://localhost:4200](http://localhost:4200).

For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/).

Expand All @@ -31,8 +31,8 @@ For more information on using ember-cli, visit [https://ember-cli.com/](https://
git remote add upstream --no-tags [email protected]:smile-io/ember-polaris.git

```
**NOTE:** Make sure you use `--no-tags` when adding upstream so that fetching from upstream does not pull in `ember-polaris`'s tags and overwrite this addon's own tags.

**NOTE:** Make sure you use `--no-tags` when adding upstream so that fetching from upstream does not pull in `ember-polaris`'s tags and overwrite this addon's own tags.

### Merging upstream changes

Expand All @@ -43,4 +43,5 @@ git checkout master;
git checkout -b upstream-merge;
git merge ember-polaris-master --no-ff;
```

On the last step among other possible conflicts, you'll notice a conflict in the `package.json` file for the package information. Ensure you keep `ember-smile-polaris'` info as is & resolve any other conflicts on a case by case basis.
2 changes: 1 addition & 1 deletion config/ember-try.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const { embroiderSafe, embroiderOptimized } = require('@embroider/test-setup');

module.exports = async function () {
return {
useYarn: true,
usePnpm: true,
scenarios: [
{
name: 'ember-lts-3.24',
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"lint:hbs:fix": "ember-template-lint . --fix",
"lint:js": "eslint . --cache",
"lint:js:fix": "eslint . --fix",
"preinstall": "npx only-allow pnpm",
"prettier": "prettier --write '{addon,app,blueprints,config,lib,tests,mirage}/**/*.js' *.js",
"prepare": "husky install",
"start": "ember serve",
Expand Down Expand Up @@ -138,7 +139,7 @@
},
"volta": {
"node": "16.20.2",
"yarn": "1.22.19"
"pnpm": "8.14.0"
},
"lintTodo": {
"ember-template-lint": {
Expand Down
Loading

0 comments on commit 84970f1

Please sign in to comment.