Skip to content

Commit

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

* Fix owner

* Add test for `@glimmer/component`
  • Loading branch information
mkszepp authored Nov 12, 2024
1 parent 09dda70 commit 102bfd2
Show file tree
Hide file tree
Showing 7 changed files with 74 additions and 52 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ jobs:
- ember-lts-4.12
- ember-lts-5.4
- ember-lts-5.8
- glimmer-component-v1
- ember-release
- ember-beta
- ember-canary
Expand Down
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"@ember/test-helpers": "^4.0.2",
"@ember/test-waiters": "^3.1.0",
"@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-power-select/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,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 @@ -142,7 +142,7 @@
},
"peerDependencies": {
"@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",
"ember-basic-dropdown": "^8.2.0",
"ember-concurrency": "^4.0.2",
Expand Down
3 changes: 2 additions & 1 deletion ember-power-select/src/components/power-select.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import type {
DropdownActions,
TRootEventType,
} from 'ember-basic-dropdown/components/basic-dropdown';
import Owner from '@ember/application';
import type { CalculatePosition } from 'ember-basic-dropdown/utils/calculate-position';
import { isArray } from '@ember/array';
import type { ComponentLike } from '@glint/template';
Expand Down Expand Up @@ -196,7 +197,7 @@ export default class PowerSelectComponent extends Component<PowerSelectSignature
} = { results: [], options: [], searchText: this.searchText };

// Lifecycle hooks
constructor(owner: unknown, args: PowerSelectArgs) {
constructor(owner: Owner, args: PowerSelectArgs) {
super(owner, args);
assert(
'<PowerSelect> requires an `@onChange` function',
Expand Down
103 changes: 56 additions & 47 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions test-app/config/ember-try.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ module.exports = async function () {
npm: {
devDependencies: {
'@ember/test-helpers': '^2.9.4',
'@glimmer/component': '^1.1.2',
'ember-cli': '~4.12.2',
'ember-qunit': '^6.0.0',
'ember-resolver': '^8.0.0',
Expand All @@ -23,6 +24,7 @@ module.exports = async function () {
name: 'ember-lts-4.4',
npm: {
devDependencies: {
'@glimmer/component': '^1.1.2',
'ember-resolver': '^8.0.0',
'ember-source': '~4.4.0',
},
Expand All @@ -32,6 +34,7 @@ module.exports = async function () {
name: 'ember-lts-4.8',
npm: {
devDependencies: {
'@glimmer/component': '^1.1.2',
'ember-resolver': '^11.0.0',
'ember-source': '~4.8.0',
},
Expand Down Expand Up @@ -61,6 +64,14 @@ module.exports = async function () {
},
},
},
{
name: 'glimmer-component-v1',
npm: {
devDependencies: {
'@glimmer/component': '^1.1.2',
},
},
},
{
name: 'ember-release',
npm: {
Expand Down
2 changes: 1 addition & 1 deletion test-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"@ember/test-waiters": "^3.1.0",
"@embroider/test-setup": "^4.0.0",
"@embroider/util": "^1.13.2",
"@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

0 comments on commit 102bfd2

Please sign in to comment.