Skip to content

Commit

Permalink
Allow @glimmer/component v2 (#941)
Browse files Browse the repository at this point in the history
* Allow `@glimmer/component` v2

* use overrides for `@glimmer/component` v1 test (it seems that we have still v1 & v2

* Set `@glimmer/component` 1.x for ember < 4.8 as its not supported

* Update ci (force re-sync injected deps)

* Inject ember-basic-dropdown in docs and test-app

* Move `@glimmer/component` to `devDependencies`
  • Loading branch information
mkszepp authored Nov 12, 2024
1 parent 274719d commit 45d9029
Show file tree
Hide file tree
Showing 8 changed files with 260 additions and 169 deletions.
51 changes: 33 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ jobs:
lint:
name: Lint
runs-on: ubuntu-latest

timeout-minutes: 10

steps:
- uses: actions/checkout@v4

Expand All @@ -26,10 +27,12 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 18.x
cache: 'pnpm'
cache: pnpm

- name: 'Install dependencies'
run: pnpm install --frozen-lockfile
- run: pnpm build
- run: pnpm i -f # re-sync injected deps

- name: Lint
run: pnpm --filter ember-basic-dropdown lint
Expand All @@ -41,20 +44,23 @@ jobs:

steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v3
with:
version: 8

- name: Install Node
uses: actions/setup-node@v4
with:
node-version: 18.x
cache: 'pnpm'
cache: pnpm

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


- run: pnpm build
- run: pnpm i -f # re-sync injected deps

- name: Run Tests
run: pnpm --filter test-app test:ember

Expand All @@ -78,6 +84,9 @@ jobs:

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

- run: pnpm build
- run: pnpm i -f # re-sync injected deps

- name: Run Tests
run: pnpm --filter test-app test:ember-shadow-dom
Expand All @@ -89,19 +98,22 @@ jobs:

steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v3
with:
version: 8

- uses: actions/setup-node@v4
with:
node-version: 18.x
cache: 'pnpm'
cache: pnpm

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


- run: pnpm build
- run: pnpm i -f # re-sync injected deps

- name: Run Tests
run: pnpm --filter test-app test:ember

Expand All @@ -121,6 +133,7 @@ jobs:
- ember-lts-4.12
- ember-lts-5.4
- ember-lts-5.8
- glimmer-component-v1
- ember-release
- ember-beta
- ember-canary
Expand All @@ -129,21 +142,23 @@ jobs:

steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v3
with:
version: 8

- name: Install Node
uses: actions/setup-node@v4
with:
node-version: 18.x
cache: 'pnpm'
cache: pnpm

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

- run: pnpm build
- run: pnpm i -f # re-sync injected deps

- name: Run Tests
env:
EMBER_TRY_SCENARIO: ${{ matrix.try-scenario }}
run: pnpm --filter test-app test:ember-try $EMBER_TRY_SCENARIO
run: pnpm --filter test-app test:ember-try $EMBER_TRY_SCENARIO --skip-cleanup
13 changes: 11 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ jobs:
- name: 'Install dependencies'
run: pnpm install --frozen-lockfile

- run: pnpm build
- run: pnpm i -f # re-sync injected deps

- name: Lint
run: pnpm --filter docs lint

Expand All @@ -55,7 +58,10 @@ jobs:

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


- run: pnpm build
- run: pnpm i -f # re-sync injected deps

- name: Run Tests
run: pnpm --filter docs test:ember

Expand All @@ -80,10 +86,13 @@ jobs:

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

- run: pnpm build
- run: pnpm i -f # re-sync injected deps

- name: Run Tests
run: pnpm --filter docs build

- name: Setup Pages
uses: actions/configure-pages@v5

Expand Down
7 changes: 6 additions & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@
"test:ember-try": "ember try:one",
"test:ember-compatibility": "ember try:each"
},
"dependenciesMeta": {
"ember-basic-dropdown": {
"injected": true
}
},
"devDependencies": {
"@babel/core": "^7.25.2",
"@babel/eslint-parser": "^7.25.1",
Expand All @@ -35,7 +40,7 @@
"@ember/string": "^4.0.0",
"@ember/test-helpers": "^4.0.2",
"@embroider/test-setup": "^4.0.0",
"@glimmer/component": "^1.1.2",
"@glimmer/component": "^2.0.0",
"@glimmer/tracking": "^1.1.2",
"@glint/core": "^1.4.0",
"@glint/environment-ember-loose": "^1.4.0",
Expand Down
4 changes: 2 additions & 2 deletions ember-basic-dropdown/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
"@glint/environment-ember-loose": "^1.4.0",
"@glint/environment-ember-template-imports": "^1.4.0",
"@glint/template": "^1.4.0",
"@glimmer/component": "^1.1.2",
"@glimmer/component": "^2.0.0",
"@glimmer/tracking": "^1.1.2",
"@rollup/plugin-babel": "^6.0.4",
"@tsconfig/ember": "^3.0.8",
Expand Down Expand Up @@ -136,7 +136,7 @@
"peerDependencies": {
"ember-source": "^3.28.0 || ^4.0.0 || >=5.0.0",
"@ember/test-helpers": "^2.9.4 || ^3.2.1 || ^4.0.2",
"@glimmer/component": "^1.1.2",
"@glimmer/component": "^1.1.2 || ^2.0.0",
"@glimmer/tracking": "^1.1.2"
},
"publishConfig": {
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"build:docs": "pnpm run --filter docs build",
"lint": "pnpm run --filter '*' lint",
"lint:fix": "pnpm run --filter '*' lint:fix",
"prepare": "pnpm run build",
"start": "concurrently 'pnpm:start:*' --restart-after 5000 --prefix-colors cyan,white,yellow",
"start:addon": "pnpm run --filter ember-basic-dropdown start --no-watch.clearScreen",
"start:docs": "pnpm run --filter docs start --preserveWatchOutput",
Expand Down
Loading

0 comments on commit 45d9029

Please sign in to comment.