Skip to content

Commit

Permalink
chore: cleanup pnpm configuration, polish test harness (#8278)
Browse files Browse the repository at this point in the history
  • Loading branch information
runspired committed Oct 30, 2022
1 parent b501511 commit 019f2f3
Show file tree
Hide file tree
Showing 35 changed files with 5,130 additions and 6,062 deletions.
8 changes: 6 additions & 2 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,18 @@ inputs:
description: Ref to Setup
required: false
default: ${{ github.sha }}
node-version:
description: Node Version to USe
required: false
default: 19.x

runs:
using: composite
steps:
- uses: pnpm/action-setup@c3b53f6a16e57305370b4ae5a540c2077a1d50dd # tag=v2.2.4
- uses: actions/setup-node@v3
with:
node-version: 18.x
node-version: ${{inputs.node-version }}
cache: 'pnpm'
- name: Configure Parallel Builds
if: ${{ inputs.parallel-build == 'true' }}
Expand Down Expand Up @@ -72,7 +76,7 @@ runs:
- name: Exec Library Prepackage Steps
if: ${{ inputs.build-addons == 'true' }}
shell: bash
run: pnpm build-v2-addons
run: pnpm build-v2-addons && pnpm install

- name: Restore Lint Caches
if: ${{ inputs.restore-lint-caches == 'true' }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/alpha-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- uses: pnpm/action-setup@c3b53f6a16e57305370b4ae5a540c2077a1d50dd # tag=v2.2.4
- uses: actions/setup-node@v3
with:
node-version: 18.x
node-version: 19.x
cache: 'pnpm'
- name: Install dependencies for master
run: pnpm install
Expand All @@ -39,7 +39,7 @@ jobs:
- uses: actions/setup-node@v3
with:
registry-url: 'https://registry.npmjs.org'
node-version: 18.x
node-version: 19.x
cache: 'pnpm'
- name: Install dependencies for master
run: pnpm install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/asset-size-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- uses: pnpm/action-setup@c3b53f6a16e57305370b4ae5a540c2077a1d50dd # tag=v2.2.4
- uses: actions/setup-node@v3
with:
node-version: 18.x
node-version: 19.x
cache: 'pnpm'
- name: Check SHA
run: |
Expand Down
54 changes: 54 additions & 0 deletions .github/workflows/compat-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Ecosystem Compat Tests

on:
pull_request:
branches:
- master

concurrency:
group: compat-${{ github.head_ref }}
cancel-in-progress: true

jobs:
fastboot:
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup
with:
restore-broccoli-cache: true
install: true
build-addons: true
- name: Run Tests
run: pnpm test:fastboot
floating-dependencies:
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup
- name: Install dependencies w/o lockfile
run: pnpm install --no-lockfile
- name: Build V2 Addons
run: pnpm build-v2-addons && pnpm install
- name: Basic Tests
run: pnpm test
node-version-test:
name: Use Node.js ${{ matrix.node-version }}
timeout-minutes: 8
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x, 18.x]
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup
with:
node-version: ${{ matrix.node-version }}
restore-broccoli-cache: true
install: true
build-addons: true
- name: Basic Tests
run: pnpm test

54 changes: 0 additions & 54 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,24 +81,6 @@ jobs:
EMBER_DATA_FULL_COMPAT: true
run: pnpm test:production
fastboot-tests:
needs: [lint]
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
scenario: [fastboot-with-ember-fetch]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup
with:
restore-broccoli-cache: true
install: true
build-addons: true
- name: Fastboot Test ${{ matrix.scenario }}
timeout-minutes: 12
run: pnpm test:fastboot ${{ matrix.scenario }}

browser-tests:
needs: [lint]
timeout-minutes: 20
Expand Down Expand Up @@ -132,20 +114,6 @@ jobs:
CI: true
run: pnpm test:production

floating-dependencies:
timeout-minutes: 10
needs: [lint, basic-tests]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup
- name: Install dependencies w/o lockfile
run: pnpm install --no-lockfile
- name: Build V2 Addons
run: pnpm build-v2-addons
- name: Basic Tests
run: pnpm test

lts:
needs: [lint, basic-tests]
strategy:
Expand Down Expand Up @@ -214,25 +182,3 @@ jobs:
env:
CI: true
run: pnpm test:try-one ${{ matrix.scenario }} -- ember test --test-port=0

node-version-test:
name: Use Node.js ${{ matrix.node-version }}
timeout-minutes: 8
needs: [lint, basic-tests]
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x, 18.x]
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@c3b53f6a16e57305370b4ae5a540c2077a1d50dd # tag=v2.2.4
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Install dependencies w/o lockfile
run: pnpm install
- name: Build V2 Addons
run: pnpm build-v2-addons
- name: Basic Tests
run: pnpm test
4 changes: 2 additions & 2 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- uses: pnpm/action-setup@c3b53f6a16e57305370b4ae5a540c2077a1d50dd # tag=v2.2.4
- uses: actions/setup-node@v3
with:
node-version: 18.x
node-version: 19.x
cache: 'pnpm'
- name: Install dependencies for master
run: pnpm install
Expand Down Expand Up @@ -40,7 +40,7 @@ jobs:
- uses: pnpm/action-setup@c3b53f6a16e57305370b4ae5a540c2077a1d50dd # tag=v2.2.4
- uses: actions/setup-node@v3
with:
node-version: 18.x
node-version: 19.x
cache: 'pnpm'
- name: Install dependencies for ${{ matrix.scenario }}
run: pnpm install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/perf-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- uses: pnpm/action-setup@c3b53f6a16e57305370b4ae5a540c2077a1d50dd # tag=v2.2.4
- uses: actions/setup-node@v3
with:
node-version: 18.x
node-version: 19.x
cache: 'pnpm'
- uses: tracerbench/tracerbench-compare-action@master
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/perf-over-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- uses: pnpm/action-setup@c3b53f6a16e57305370b4ae5a540c2077a1d50dd # tag=v2.2.4
- uses: actions/setup-node@v3
with:
node-version: 18.x
node-version: 19.x
cache: 'pnpm'
- uses: tracerbench/tracerbench-compare-action@master
with:
Expand Down
12 changes: 12 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# package-import-method=hardlink
# module-exists will report false answers for the test apps
# unless we avoid hoisting
hoist=true
# Fastboot Doesnt respect node_modules resolution for whitelisted deps
# https://github.com/ember-fastboot/ember-cli-fastboot/issues/901
hoist-pattern[]=*abortcontroller-polyfill*
hoist-pattern[]=*node-fetch*

# we want true but cannot use true until the below issue is fixed
# https://github.com/pnpm/pnpm/issues/5340
strict-peer-dependencies=false
30 changes: 17 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
"problems": "tsc -p tsconfig.json --noEmit --pretty false",
"test": "pnpm --filter main-test-app --filter graph-test-app run test",
"test:production": "pnpm --filter main-test-app --filter graph-test-app run test -e production",
"test:try-one": "pnpm --filter main-test-app --filter graph-test-app run test:try-one --",
"test:try-one": "pnpm --filter main-test-app run test:try-one",
"test:docs": "pnpm build:docs && pnpm --filter docs-tests test",
"test:encapsulation": "lerna run --stream --scope='*-encapsulation-test-app' test",
"test:fastboot": "pnpm --filter fastboot-test-app test:scenario",
"test:fastboot": "pnpm --filter fastboot-test-app test",
"test:infra": "pnpm --filter @ember-data/unpublished-test-infra test",
"test-external:ember-m3": "node ./scripts/test-external-partner-project.js ember-m3 https://github.com/hjdivad/ember-m3.git",
"test-external:ember-data-change-tracker": "node ./scripts/test-external-partner-project.js ember-data-change-tracker https://github.com/danielspaniel/ember-data-change-tracker.git",
Expand All @@ -34,10 +34,10 @@
"test-external:ember-data-relationship-tracker": "node ./scripts/test-external-partner-project.js ember-data-relationship-tracker https://github.com/ef4/ember-data-relationship-tracker.git"
},
"devDependencies": {
"@babel/core": "^7.19.6",
"@babel/eslint-parser": "^7.19.1",
"@babel/plugin-proposal-decorators": "^7.20.0",
"@babel/plugin-transform-typescript": "^7.20.0",
"@babel/core": "^7.19.6",
"@babel/runtime": "^7.20.0",
"@ember/edition-utils": "^1.2.0",
"@ember/optional-features": "^2.0.0",
Expand All @@ -46,26 +46,26 @@
"@glimmer/env": "^0.1.7",
"@types/ember": "^4.0.2",
"@types/ember-qunit": "^5.0.2",
"@types/ember-resolver": "^5.0.12",
"@types/ember-testing-helpers": "^0.0.4",
"@types/ember__debug": "^4.0.2",
"@types/ember__application": "^4.0.3",
"@types/ember__array": "^4.0.3",
"@types/ember__component": "^4.0.11",
"@types/ember__controller": "^4.0.3",
"@types/ember__debug": "^4.0.2",
"@types/ember__engine": "^4.0.3",
"@types/ember__error": "^4.0.1",
"@types/ember__object": "^4.0.5",
"@types/ember__polyfills": "^4.0.1",
"@types/ember__routing": "^4.0.12",
"@types/ember__runloop": "^4.0.2",
"@types/ember__service": "^4.0.1",
"@types/ember__string": "^3.0.10",
"@types/ember__template": "^4.0.1",
"@types/ember__test": "^4.0.1",
"@types/ember-resolver": "^5.0.12",
"@types/htmlbars-inline-precompile": "^3.0.0",
"@types/ember__application": "^4.0.3",
"@types/ember__service": "^4.0.1",
"@types/ember__utils": "^4.0.2",
"@types/ember__object": "^4.0.5",
"@types/ember__engine": "^4.0.3",
"@types/ember__test-helpers": "^2.8.2",
"@types/ember__routing": "^4.0.12",
"@types/ember__utils": "^4.0.2",
"@types/htmlbars-inline-precompile": "^3.0.0",
"@types/qunit": "^2.19.3",
"@types/rsvp": "^4.0.4",
"@typescript-eslint/eslint-plugin": "^5.41.0",
Expand Down Expand Up @@ -145,7 +145,6 @@
"yuidocjs": "^0.10.2",
"zlib": "1.0.5"
},
"dependencies": {},
"engines": {
"node": "^14.8.0 || 16.* || >= 18.*",
"yarn": "use pnpm",
Expand All @@ -169,5 +168,10 @@
"changelog:test": ":goal_net: Test",
"changelog:chore": ":house: Internal"
}
},
"pnpm": {
"patchedDependencies": {
"@embroider/macros@1.9.0": "patches/@embroider__macros@1.9.0.patch"
}
}
}
26 changes: 14 additions & 12 deletions packages/-ember-data/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"test": "tests"
},
"scripts": {
"prepublishOnly": "cd ../.. && pnpm build:docs"
"prepack": "cd ../../ && pnpm build:docs"
},
"author": "",
"license": "MIT",
Expand All @@ -35,19 +35,21 @@
"ember-inflector": "^4.0.2"
},
"dependenciesMeta": {
"injected": {
"@ember-data/adapter": "workspace:4.9.0-alpha.6",
"@ember-data/debug": "workspace:4.9.0-alpha.6",
"@ember-data/model": "workspace:4.9.0-alpha.6",
"@ember-data/record-data": "workspace:4.9.0-alpha.6",
"@ember-data/serializer": "workspace:4.9.0-alpha.6",
"@ember-data/store": "workspace:4.9.0-alpha.6",
"@ember-data/tracking": "workspace:4.9.0-alpha.6",
"@ember-data/private-build-infra": "workspace:4.9.0-alpha.6"
}
"@ember-data/adapter": { "injected": true },
"@ember-data/debug": { "injected": true },
"@ember-data/model": { "injected": true },
"@ember-data/record-data": { "injected": true },
"@ember-data/serializer":{ "injected": true },
"@ember-data/store": { "injected": true },
"@ember-data/tracking": { "injected": true },
"@ember-data/private-build-infra": { "injected": true }
},
"devDependencies": {
"webpack": "^5.74.0"
"@babel/core": "^7.19.6",
"@glimmer/tracking": "^1.1.2",
"@glimmer/component": "^1.1.2",
"webpack": "^5.74.0",
"ember-source": "~4.8.0"
},
"engines": {
"node": "^14.8.0 || 16.* || >= 18.*"
Expand Down
5 changes: 2 additions & 3 deletions packages/adapter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,12 @@
"@ember-data/store": "workspace:4.9.0-alpha.6"
},
"dependenciesMeta": {
"injected": {
"@ember-data/private-build-infra": "workspace:4.9.0-alpha.6"
}
"@ember-data/private-build-infra": { "injected": true }
},
"dependencies": {
"@ember-data/private-build-infra": "workspace:4.9.0-alpha.6",
"@ember/edition-utils": "^1.2.0",
"@embroider/macros": "^1.8.3",
"ember-auto-import": "^2.4.3",
"ember-cli-babel": "^7.26.11",
"ember-cli-test-info": "^1.0.0"
Expand Down
1 change: 1 addition & 0 deletions packages/canary-features/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"directories": {},
"scripts": {},
"dependencies": {
"@embroider/macros": "^1.8.3",
"ember-cli-babel": "^7.26.11"
},
"devDependencies": {},
Expand Down
5 changes: 2 additions & 3 deletions packages/debug/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,12 @@
"@ember/string": "^3.0.0"
},
"dependenciesMeta": {
"injected": {
"@ember-data/private-build-infra": "workspace:4.9.0-alpha.6"
}
"@ember-data/private-build-infra": { "injected": true }
},
"dependencies": {
"@ember-data/private-build-infra": "workspace:4.9.0-alpha.6",
"@ember/edition-utils": "^1.2.0",
"@embroider/macros": "^1.8.3",
"ember-auto-import": "^2.4.3",
"ember-cli-babel": "^7.26.11"
},
Expand Down
Loading

0 comments on commit 019f2f3

Please sign in to comment.