Skip to content
Closed
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
44 changes: 21 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,19 @@ jobs:
steps:
- uses: actions/checkout@v1
- uses: volta-cli/action@v1
env:
ACTIONS_STEP_DEBUG: true
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache
- name: Cache pnpm modules
uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}-v1
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn --frozen-lockfile
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: ${{ runner.os }}-pnpm-
- uses: pnpm/action-setup@v2.2.2
with:
version: 7.1.2
- name: Install Dependencies
run: pnpm install
- name: lint
run: yarn lint
run: pnpm lint
- id: set-matrix
working-directory: test-packages/support
run: echo "::set-output name=matrix::$(node ./suite-setup-util.js --matrix)"
Expand All @@ -61,17 +59,17 @@ jobs:
- uses: volta-cli/action@v1
env:
ACTIONS_STEP_DEBUG: true
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache
- name: Cache pnpm modules
uses: actions/cache@v3
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: ${{ runner.os }}-pnpm-
- uses: pnpm/action-setup@v2.2.2
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}-v1
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn --no-lockfile
version: 7.1.2
- name: Install Dependencies
run: pnpm install
- name: suite
run: ${{ matrix.command }}
working-directory: ${{ matrix.dir }}
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
auto-install-peers=true
19 changes: 9 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@
## Preparing for local development

1. Clone this repo.
2. Run `yarn install`. This will also trigger a typescript compile.
3. If you edit the typescript, you will need to compile again via `yarn compile` or `yarn compile --watch`.
2. Run `pnpm install`. This will also trigger a typescript compile.
3. If you edit the typescript, you will need to compile again via `pnpm compile` or `pnpm compile --watch`.

## Running lints

`yarn lint` at the top of the monorepo will lint everything.
`pnpm lint` at the top of the monorepo will lint everything.

## Running tests

Tests can be run per-package, or combined all together.

Per-package test suites are defined as the `yarn test` command within each `packages/*` or `test-packages/*`.
Per-package test suites are defined as the `pnpm test` command within each `packages/*` or `test-packages/*`.

The combined suite can be run via the top-level `yarn test` command. It's defined by combining
The combined suite can be run via the top-level `pnpm test` command. It's defined by combining

- all the `yarn test:*` commands within each `packages/*` or `test-packages/*`. These are typically complete Ember apps that need to get built and tested in the browser.
- we have special handling for `ember try:each`. When you use the top-level `yarn test` locally we _don't_ run these by default, because they can't be parallelized easily. If you want to run them, just go into the specific package you care about and run `ember try:each` there.
- all the `pnpm test:*` commands within each `packages/*` or `test-packages/*`. These are typically complete Ember apps that need to get built and tested in the browser.
- we have special handling for `ember try:each`. When you use the top-level `pnpm test` locally we _don't_ run these by default, because they can't be parallelized easily. If you want to run them, just go into the specific package you care about and run `ember try:each` there.
- all Jest tests that are configured in the entire monorepo. These are typically Node unit & integration tests of the build tooling.

When you run the combined test suite locally, we emit Jest stubs for each of the various suites so that everything runs together under Jest.
Expand All @@ -33,6 +33,5 @@ In the tests directory we derive our tests off of base app and addon templates (
## Use a local version of embroider to compile your projects

1. Clone this repo.
2. Run `yarn compile` (or `yarn compile --watch`).
3. In each of the `./packages/*` directories, run `yarn link`.
4. In your app, `yarn link @embroider/core` and any other embroider packages that appear in your package.json.
2. Run `pnpm compile` (or `pnpm compile --watch`).
4. In your app, `pnpm link ../embroider/packages/core` and any other embroider packages that appear in your package.json.
39 changes: 13 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,42 +4,19 @@
"type": "git",
"url": "git@github.com:embroider-build/embroider.git"
},
"workspaces": {
"packages": [
"packages/*",
"test-packages/*",
"test-packages/@embroider/*",
"types/babel-core",
"types/@babel__traverse",
"types/broccoli-funnel",
"types/broccoli-concat",
"types/ember-cli-htmlbars",
"tests/scenarios",
"tests/app-template",
"tests/addon-template",
"tests/v2-addon-template"
],
"nohoist": [
"**/@types/broccoli-plugin"
]
},
"scripts": {
"clean": "git clean -x -f",
"compile": "tsc",
"lint": "eslint . --cache",
"prepare": "tsc",
"test": "cd tests/scenarios && yarn test"
"test": "cd tests/scenarios && pnpm test"
},
"jest": {
"projects": [
"<rootDir>/packages/*",
"<rootDir>/test-packages/"
]
},
"resolutions": {
"**/browserslist": "^4.14.0",
"**/qunit": "^2.14.1"
},
"devDependencies": {
"@types/jest": "^24.0.0",
"@typescript-eslint/eslint-plugin": "^4.1.1",
Expand Down Expand Up @@ -86,9 +63,19 @@
},
"npm": false
},
"packageManager": "pnpm@7.1.7",
"pnpm": {
"overrides": {
"browserslist": "^4.14.0",
"qunit": "^2.14.1",
"@types/eslint": "7.29.0"
},
"overrides-notes": {
"@types/eslint": "webpack brings in @types/eslint@8, which breaks our type checking"
}
},
"volta": {
"node": "14.19.3",
"yarn": "1.22.11"
"node": "14.19.3"
},
"version": "1.7.1"
}
1 change: 1 addition & 0 deletions packages/addon-shim/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
},
"devDependencies": {
"@types/semver": "^7.3.6",
"broccoli-node-api": "^1.7.0",
"typescript": "*",
"webpack": "^5"
},
Expand Down
1 change: 1 addition & 0 deletions packages/compat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
"@types/resolve": "^1.20.0",
"@types/semver": "^7.3.6",
"@types/strip-bom": "^4.0.1",
"broccoli-node-api": "^1.7.0",
"broccoli-stew": "^3.0.0",
"ember-cli-htmlbars-3": "npm:ember-cli-htmlbars@3",
"ember-cli-htmlbars-inline-precompile": "^2.1.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/router/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

- `git clone <repository-url>`
- `cd @embroider/router`
- `yarn install`
- `pnpm install`

## Linting

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

## Running tests

Expand Down
9 changes: 5 additions & 4 deletions packages/shared-internals/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,19 @@
"dependencies": {
"babel-import-util": "^1.1.0",
"ember-rfc176-data": "^0.3.17",
"js-string-escape": "^1.0.1",
"resolve-package-path": "^4.0.1",
"typescript-memoize": "^1.0.1",
"fs-extra": "^9.1.0",
"js-string-escape": "^1.0.1",
"lodash": "^4.17.21",
"semver": "^7.3.5"
"resolve-package-path": "^4.0.1",
"semver": "^7.3.5",
"typescript-memoize": "^1.0.1"
},
"devDependencies": {
"@embroider/test-support": "0.36.0",
"@types/js-string-escape": "^1.0.0",
"@types/semver": "^7.3.6",
"@types/tmp": "^0.1.0",
"broccoli-node-api": "^1.7.0",
"fixturify": "^2.1.1",
"tmp": "^0.1.0",
"typescript": "*"
Expand Down
8 changes: 4 additions & 4 deletions packages/util/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

- `git clone <repository-url>`
- `cd @embroider/util`
- `yarn install`
- `pnpm install`

## Linting

- `yarn lint:hbs`
- `yarn lint:js`
- `yarn lint:js --fix`
- `pnpm lint:hbs`
- `pnpm lint:js`
- `pnpm lint:js --fix`

## Running tests

Expand Down
Loading