Skip to content
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

Migrate from yarn to pnpm #24

Merged
merged 4 commits into from
Jun 1, 2023
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
97 changes: 43 additions & 54 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,30 +33,31 @@ on:
push:
branches:
- main
- 'v*'
- "v*"
pull_request:

env:
NODE_VERSION: '14.x'
NODE_VERSION: "16.x"

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Checkout
uses: actions/checkout@v3
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: '${{ env.NODE_VERSION }}'
cache: yarn

node-version: "${{ env.NODE_VERSION }}"
- name: Install pnpm
uses: NullVoxPopuli/action-setup-pnpm@v2
with:
pnpm-version: 8.6.0
- name: Install Dependencies
run: yarn install --frozen-lockfile

run: pnpm install --frozen-lockfile
- name: Lint
run: yarn lint
run: pnpm lint

test:
name: Tests
Expand All @@ -69,17 +70,20 @@ jobs:
browser: [chrome]

steps:
- uses: actions/checkout@v3

- name: Checkout
uses: actions/checkout@v3
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: '${{ env.NODE_VERSION }}'
cache: yarn
node-version: "${{ env.NODE_VERSION }}"
- name: Install pnpm
uses: NullVoxPopuli/action-setup-pnpm@v2
with:
pnpm-version: 8.6.0
- name: Install Dependencies
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile
- name: Run Tests
run: yarn test:ember --launch ${{ matrix.browser }}
run: pnpm test:ember --launch ${{ matrix.browser }}
working-directory: test-app

floating-dependencies:
Expand All @@ -93,34 +97,20 @@ jobs:
browser: [chrome]

steps:
- uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
fetch-depth: 1

- uses: actions/setup-node@v2-beta
with:
node-version: '${{ env.NODE_VERSION }}'

- name: Get package manager's global cache path
id: global-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- name: Cache package manager's global cache and node_modules
id: cache-dependencies
uses: actions/cache@v2
node-version: "${{ env.NODE_VERSION }}"
- name: Install pnpm
uses: NullVoxPopuli/action-setup-pnpm@v2
with:
path: |
${{ steps.global-cache-dir-path.outputs.dir }}
node_modules
key: ${{ runner.os }}-${{ matrix.node-version }}-floating-deps
restore-keys: |
${{ runner.os }}-${{ matrix.node-version }}-

- name: Install Dependencies
run: yarn install --no-lockfile --non-interactive

- name: Test
run: yarn test:ember --launch ${{ matrix.browser }}
pnpm-version: 8.6.0
no-lockfile: true
- name: Install dependencies
run: pnpm install --no-lockfile
- name: Run tests
run: pnpm test:ember
working-directory: test-app

try-scenarios:
Expand Down Expand Up @@ -149,19 +139,18 @@ jobs:
allow-failure: true

steps:
- uses: actions/checkout@v3

- name: Checkout
uses: actions/checkout@v3
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: '${{ env.NODE_VERSION }}'
cache: yarn

- name: Install Dependencies
run: yarn install --frozen-lockfile

- name: Run Tests
env:
EMBER_TRY_SCENARIO: ${{ matrix.ember-try-scenario }}
run: ./node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO
node-version: "${{ env.NODE_VERSION }}"
- name: Install pnpm
uses: NullVoxPopuli/action-setup-pnpm@v2
with:
pnpm-version: 8.6.0
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run tests
run: pnpm ember try:one ${{ matrix.ember-try-scenario }} --skip-cleanup
working-directory: test-app
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

# compiled output
dist/
.pnpm-store/

# dependencies
node_modules/
Expand All @@ -18,6 +19,8 @@ node_modules/
/npm-debug.log*
/testem.log
/yarn-error.log
package-lock.json
yarn.lock

# ember-try
/.node_modules.ember-try/
Expand Down
26 changes: 13 additions & 13 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,30 @@

## Installation

* `git clone <repository-url>`
* `cd ember-prismic-dom`
* `yarn install`
- `git clone <repository-url>`
- `cd ember-prismic-dom`
- `pnpm install`

## Linting

* `yarn lint`
* `yarn lint:fix`
- `pnpm lint`
- `pnpm lint:fix`

## Building the addon

* `cd ember-prismic-dom`
* `yarn build`
- `cd ember-prismic-dom`
- `pnpm build`

## Running tests

* `cd test-app`
* `yarn test` – Runs the test suite on the current Ember version
* `yarn test:watch` – Runs the test suite in "watch mode"
- `cd test-app`
- `pnpm test` – Runs the test suite on the current Ember version
- `pnpm test:watch` – Runs the test suite in "watch mode"

## Running the test application

* `cd test-app`
* `yarn start`
* Visit the test application at [http://localhost:4200](http://localhost:4200).
- `cd test-app`
- `pnpm start`
- Visit the test 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/).
31 changes: 16 additions & 15 deletions ember-prismic-dom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,39 +14,40 @@
],
"scripts": {
"build": "rollup --config",
"lint": "concurrently 'npm:lint:*(!fix)' --names 'lint:'",
"lint:fix": "concurrently 'npm:lint:*:fix' --names 'fix:'",
"lint": "concurrently 'pnpm:lint:*(!fix)' --names 'lint:'",
"lint:fix": "concurrently 'pnpm:lint:*:fix' --names 'fix:'",
"lint:hbs": "ember-template-lint . --no-error-on-unmatched-pattern",
"lint:js": "eslint . --cache",
"lint:hbs:fix": "ember-template-lint . --fix --no-error-on-unmatched-pattern",
"lint:js:fix": "eslint . --fix",
"start": "rollup --config --watch",
"test": "echo 'A v2 addon does not have tests, run tests in test-app'",
"prepack": "yarn run build",
"prepare": "yarn run build"
"prepack": "rollup --config",
"prepare": "rollup --config"
},
"dependencies": {
"@embroider/addon-shim": "^1.0.0",
"@prismicio/richtext": "^1.1.0",
"ember-element-helper": "^0.6.1"
},
"devDependencies": {
"@babel/core": "^7.17.0",
"@babel/eslint-parser": "^7.18.2",
"@babel/core": "7.21.3",
"@babel/eslint-parser": "^7.18.6",
"@babel/plugin-proposal-class-properties": "^7.16.7",
"@babel/plugin-proposal-decorators": "^7.17.0",
"@babel/plugin-proposal-decorators": "^7.21.0",
"@babel/plugin-syntax-decorators": "^7.17.0",
"@babel/runtime": "^7.21.0",
"@embroider/addon-dev": "^3.0.0",
"@rollup/plugin-babel": "^5.3.0",
"concurrently": "^7.2.1",
"ember-template-lint": "^4.0.0",
"eslint": "^7.32.0",
"@rollup/plugin-babel": "^6.0.3",
"concurrently": "^8.0.1",
"ember-template-lint": "^5.8.0",
"eslint": "^8.41.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-ember": "^10.5.8",
"eslint-plugin-ember": "^11.6.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^4.0.0",
"prettier": "^2.5.1",
"rollup": "^2.67.0",
"eslint-plugin-prettier": "^4.2.1",
"prettier": "^2.8.8",
"rollup": "^3.22.0",
"rollup-plugin-copy": "^3.4.0"
},
"publishConfig": {
Expand Down
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
"license": "MIT",
"author": "",
"scripts": {
"build": "yarn workspace ember-prismic-dom run build",
"lint": "yarn workspaces run lint",
"lint:fix": "yarn workspaces run lint:fix",
"prepare": "yarn build",
"start": "concurrently 'npm:start:*' --restart-after 5000 --prefix-colors cyan,white,yellow",
"start:addon": "yarn workspace ember-prismic-dom run start",
"start:test-app": "yarn workspace test-app run start",
"test": "yarn workspaces run test"
"build": "pnpm --filter ember-prismic-dom build",
"lint": "pnpm --filter '*' lint",
"lint:fix": "pnpm --filter '*' lint:fix",
"prepare": "pnpm build",
"start": "concurrently 'pnpm:start:*' --restart-after 5000 --prefix-colors cyan,white,yellow",
"start:addon": "pnpm --filter ember-prismic-dom start",
"start:test-app": "pnpm --filter test-app start",
"test": "pnpm --filter '*' test"
},
"devDependencies": {
"@release-it-plugins/lerna-changelog": "^5.0.0",
Expand Down
Loading