From 9f02ca245092acdc4c07e89d895d99f7806b38e6 Mon Sep 17 00:00:00 2001 From: Isaac Lee <16869656+ijlee2@users.noreply.github.com> Date: Tue, 13 Aug 2024 15:51:03 +0200 Subject: [PATCH] Replaced @types/ember__* with native types (#150) * chore: Temporarily committed declarations * refactor: Replaced @types/ember__* with native types * chore: Added lockfile * Revert "chore: Temporarily committed declarations" This reverts commit 054ee209cf5e378a123c165b28e735af1719b958. * chore: Removed preview types * chore: Added changeset --------- Co-authored-by: ijlee2 --- .changeset/large-beers-destroy.md | 11 +++ .../my-app-with-ember-css-modules/index.d.ts | 1 - docs/my-app/types/my-app/index.d.ts | 1 - docs/my-v1-addon/types/dummy/index.d.ts | 1 - docs/my-v2-addon/package.json | 1 + .../unpublished-development-types/index.d.ts | 1 + packages/embroider-css-modules/package.json | 3 +- .../unpublished-development-types/index.d.ts | 1 + pnpm-lock.yaml | 89 +++++++++++++++---- .../index.d.ts | 1 - .../types/test-app-for-my-v2-addon/index.d.ts | 1 - 11 files changed, 85 insertions(+), 26 deletions(-) create mode 100644 .changeset/large-beers-destroy.md diff --git a/.changeset/large-beers-destroy.md b/.changeset/large-beers-destroy.md new file mode 100644 index 00000000..677fd91c --- /dev/null +++ b/.changeset/large-beers-destroy.md @@ -0,0 +1,11 @@ +--- +"my-app-with-ember-css-modules": patch +"embroider-css-modules": patch +"test-app-for-embroider-css-modules": patch +"test-app-for-my-v2-addon": patch +"my-v1-addon": patch +"my-v2-addon": patch +"my-app": patch +--- + +Replaced @types/ember\_\_\* with native types diff --git a/docs/my-app-with-ember-css-modules/types/my-app-with-ember-css-modules/index.d.ts b/docs/my-app-with-ember-css-modules/types/my-app-with-ember-css-modules/index.d.ts index 5ad2dd58..d040d967 100644 --- a/docs/my-app-with-ember-css-modules/types/my-app-with-ember-css-modules/index.d.ts +++ b/docs/my-app-with-ember-css-modules/types/my-app-with-ember-css-modules/index.d.ts @@ -1,7 +1,6 @@ import '@glint/environment-ember-loose'; import '@glint/environment-ember-template-imports'; import 'ember-source/types'; -import 'ember-source/types/preview'; import type { HelperLike } from '@glint/template'; import type EmberPageTitleRegistry from 'ember-page-title/template-registry'; diff --git a/docs/my-app/types/my-app/index.d.ts b/docs/my-app/types/my-app/index.d.ts index 1cc6c0ad..d033f181 100644 --- a/docs/my-app/types/my-app/index.d.ts +++ b/docs/my-app/types/my-app/index.d.ts @@ -1,7 +1,6 @@ import '@glint/environment-ember-loose'; import '@glint/environment-ember-template-imports'; import 'ember-source/types'; -import 'ember-source/types/preview'; import type { ComponentLike } from '@glint/template'; import type EmberContainerQueryRegistry from 'ember-container-query/template-registry'; diff --git a/docs/my-v1-addon/types/dummy/index.d.ts b/docs/my-v1-addon/types/dummy/index.d.ts index 490f5bf3..67d24569 100644 --- a/docs/my-v1-addon/types/dummy/index.d.ts +++ b/docs/my-v1-addon/types/dummy/index.d.ts @@ -1,7 +1,6 @@ import '@glint/environment-ember-loose'; import '@glint/environment-ember-template-imports'; import 'ember-source/types'; -import 'ember-source/types/preview'; import type EmberContainerQueryRegistry from 'ember-container-query/template-registry'; import type EmberPageTitleRegistry from 'ember-page-title/template-registry'; diff --git a/docs/my-v2-addon/package.json b/docs/my-v2-addon/package.json index d376cf35..e601737d 100644 --- a/docs/my-v2-addon/package.json +++ b/docs/my-v2-addon/package.json @@ -88,6 +88,7 @@ "@shared-configs/typescript": "workspace:*", "babel-plugin-ember-template-compilation": "^2.2.5", "concurrently": "^8.2.2", + "ember-source": "~5.10.2", "ember-template-lint": "^6.0.0", "eslint": "^8.57.0", "postcss": "^8.4.36", diff --git a/docs/my-v2-addon/unpublished-development-types/index.d.ts b/docs/my-v2-addon/unpublished-development-types/index.d.ts index bddc7419..9c050b10 100644 --- a/docs/my-v2-addon/unpublished-development-types/index.d.ts +++ b/docs/my-v2-addon/unpublished-development-types/index.d.ts @@ -3,6 +3,7 @@ import '@glint/environment-ember-loose'; import '@glint/environment-ember-template-imports'; +import 'ember-source/types'; import type EmbroiderCssModulesRegistry from 'embroider-css-modules/template-registry'; diff --git a/packages/embroider-css-modules/package.json b/packages/embroider-css-modules/package.json index 89215010..28d3b76a 100644 --- a/packages/embroider-css-modules/package.json +++ b/packages/embroider-css-modules/package.json @@ -79,10 +79,9 @@ "@shared-configs/eslint-config-ember": "workspace:*", "@shared-configs/prettier": "workspace:*", "@shared-configs/typescript": "workspace:*", - "@types/ember__component": "^4.0.22", - "@types/ember__debug": "^4.0.8", "babel-plugin-ember-template-compilation": "^2.2.5", "concurrently": "^8.2.2", + "ember-source": "~5.10.2", "ember-template-lint": "^6.0.0", "eslint": "^8.57.0", "prettier": "^3.3.3", diff --git a/packages/embroider-css-modules/unpublished-development-types/index.d.ts b/packages/embroider-css-modules/unpublished-development-types/index.d.ts index baee80bb..7798eb0f 100644 --- a/packages/embroider-css-modules/unpublished-development-types/index.d.ts +++ b/packages/embroider-css-modules/unpublished-development-types/index.d.ts @@ -3,6 +3,7 @@ import '@glint/environment-ember-loose'; import '@glint/environment-ember-template-imports'; +import 'ember-source/types'; import type EmbroiderCssModulesRegistry from '../src/template-registry.ts'; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 86454688..4eb3e344 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -840,6 +840,9 @@ importers: concurrently: specifier: ^8.2.2 version: 8.2.2 + ember-source: + specifier: ~5.10.2 + version: 5.10.2(@glimmer/component@1.1.2(@babel/core@7.25.2))(@glint/template@1.4.0)(rsvp@4.8.5)(webpack@5.93.0) ember-template-lint: specifier: ^6.0.0 version: 6.0.0 @@ -974,18 +977,15 @@ importers: '@shared-configs/typescript': specifier: workspace:* version: link:../../configs/typescript - '@types/ember__component': - specifier: ^4.0.22 - version: 4.0.22(@babel/core@7.25.2) - '@types/ember__debug': - specifier: ^4.0.8 - version: 4.0.8(@babel/core@7.25.2) babel-plugin-ember-template-compilation: specifier: ^2.2.5 version: 2.2.5 concurrently: specifier: ^8.2.2 version: 8.2.2 + ember-source: + specifier: ~5.10.2 + version: 5.10.2(@glimmer/component@1.1.2(@babel/core@7.25.2))(@glint/template@1.4.0)(rsvp@4.8.5)(webpack@5.93.0) ember-template-lint: specifier: ^6.0.0 version: 6.0.0 @@ -11455,6 +11455,27 @@ snapshots: '@types/css-tree@2.3.8': {} + '@types/ember@4.0.11': + dependencies: + '@types/ember__application': 4.0.11(@babel/core@7.25.2) + '@types/ember__array': 4.0.10(@babel/core@7.25.2) + '@types/ember__component': 4.0.22(@babel/core@7.25.2) + '@types/ember__controller': 4.0.12(@babel/core@7.25.2) + '@types/ember__debug': 4.0.8(@babel/core@7.25.2) + '@types/ember__engine': 4.0.11(@babel/core@7.25.2) + '@types/ember__error': 4.0.6 + '@types/ember__object': 4.0.12(@babel/core@7.25.2) + '@types/ember__polyfills': 4.0.6 + '@types/ember__routing': 4.0.22(@babel/core@7.25.2) + '@types/ember__runloop': 4.0.10 + '@types/ember__service': 4.0.9(@babel/core@7.25.2) + '@types/ember__string': 3.0.15 + '@types/ember__template': 4.0.7 + '@types/ember__test': 4.0.6(@babel/core@7.25.2) + '@types/ember__utils': 4.0.7(@babel/core@7.25.2) + '@types/rsvp': 4.0.9 + optional: true + '@types/ember@4.0.11(@babel/core@7.25.2)': dependencies: '@types/ember__application': 4.0.11(@babel/core@7.25.2) @@ -11462,13 +11483,13 @@ snapshots: '@types/ember__component': 4.0.22(@babel/core@7.25.2) '@types/ember__controller': 4.0.12(@babel/core@7.25.2) '@types/ember__debug': 4.0.8(@babel/core@7.25.2) - '@types/ember__engine': 4.0.11 + '@types/ember__engine': 4.0.11(@babel/core@7.25.2) '@types/ember__error': 4.0.6 '@types/ember__object': 4.0.12(@babel/core@7.25.2) '@types/ember__polyfills': 4.0.6 '@types/ember__routing': 4.0.22(@babel/core@7.25.2) '@types/ember__runloop': 4.0.10(@babel/core@7.25.2) - '@types/ember__service': 4.0.9 + '@types/ember__service': 4.0.9(@babel/core@7.25.2) '@types/ember__string': 3.0.15 '@types/ember__template': 4.0.7 '@types/ember__test': 4.0.6(@babel/core@7.25.2) @@ -11477,18 +11498,20 @@ snapshots: transitivePeerDependencies: - '@babel/core' - supports-color + optional: true '@types/ember__application@4.0.11(@babel/core@7.25.2)': dependencies: '@glimmer/component': 1.1.2(@babel/core@7.25.2) - '@types/ember': 4.0.11(@babel/core@7.25.2) - '@types/ember__engine': 4.0.11 + '@types/ember': 4.0.11 + '@types/ember__engine': 4.0.11(@babel/core@7.25.2) '@types/ember__object': 4.0.12(@babel/core@7.25.2) '@types/ember__owner': 4.0.9 '@types/ember__routing': 4.0.22(@babel/core@7.25.2) transitivePeerDependencies: - '@babel/core' - supports-color + optional: true '@types/ember__array@4.0.10(@babel/core@7.25.2)': dependencies: @@ -11497,6 +11520,7 @@ snapshots: transitivePeerDependencies: - '@babel/core' - supports-color + optional: true '@types/ember__component@4.0.22(@babel/core@7.25.2)': dependencies: @@ -11505,6 +11529,7 @@ snapshots: transitivePeerDependencies: - '@babel/core' - supports-color + optional: true '@types/ember__controller@4.0.12(@babel/core@7.25.2)': dependencies: @@ -11512,6 +11537,7 @@ snapshots: transitivePeerDependencies: - '@babel/core' - supports-color + optional: true '@types/ember__debug@4.0.8(@babel/core@7.25.2)': dependencies: @@ -11520,13 +11546,19 @@ snapshots: transitivePeerDependencies: - '@babel/core' - supports-color + optional: true - '@types/ember__engine@4.0.11': + '@types/ember__engine@4.0.11(@babel/core@7.25.2)': dependencies: '@types/ember__object': 4.0.12(@babel/core@7.25.2) '@types/ember__owner': 4.0.9 + transitivePeerDependencies: + - '@babel/core' + - supports-color + optional: true - '@types/ember__error@4.0.6': {} + '@types/ember__error@4.0.6': + optional: true '@types/ember__object@4.0.12(@babel/core@7.25.2)': dependencies: @@ -11535,20 +11567,29 @@ snapshots: transitivePeerDependencies: - '@babel/core' - supports-color + optional: true - '@types/ember__owner@4.0.9': {} + '@types/ember__owner@4.0.9': + optional: true - '@types/ember__polyfills@4.0.6': {} + '@types/ember__polyfills@4.0.6': + optional: true '@types/ember__routing@4.0.22(@babel/core@7.25.2)': dependencies: '@types/ember': 4.0.11(@babel/core@7.25.2) '@types/ember__controller': 4.0.12(@babel/core@7.25.2) '@types/ember__object': 4.0.12(@babel/core@7.25.2) - '@types/ember__service': 4.0.9 + '@types/ember__service': 4.0.9(@babel/core@7.25.2) transitivePeerDependencies: - '@babel/core' - supports-color + optional: true + + '@types/ember__runloop@4.0.10': + dependencies: + '@types/ember': 4.0.11 + optional: true '@types/ember__runloop@4.0.10(@babel/core@7.25.2)': dependencies: @@ -11556,14 +11597,21 @@ snapshots: transitivePeerDependencies: - '@babel/core' - supports-color + optional: true - '@types/ember__service@4.0.9': + '@types/ember__service@4.0.9(@babel/core@7.25.2)': dependencies: '@types/ember__object': 4.0.12(@babel/core@7.25.2) + transitivePeerDependencies: + - '@babel/core' + - supports-color + optional: true - '@types/ember__string@3.0.15': {} + '@types/ember__string@3.0.15': + optional: true - '@types/ember__template@4.0.7': {} + '@types/ember__template@4.0.7': + optional: true '@types/ember__test@4.0.6(@babel/core@7.25.2)': dependencies: @@ -11571,6 +11619,7 @@ snapshots: transitivePeerDependencies: - '@babel/core' - supports-color + optional: true '@types/ember__utils@4.0.7(@babel/core@7.25.2)': dependencies: @@ -11578,6 +11627,7 @@ snapshots: transitivePeerDependencies: - '@babel/core' - supports-color + optional: true '@types/eslint-scope@3.7.7': dependencies: @@ -11674,7 +11724,8 @@ snapshots: '@types/glob': 8.1.0 '@types/node': 18.19.44 - '@types/rsvp@4.0.9': {} + '@types/rsvp@4.0.9': + optional: true '@types/semver@7.5.8': {} diff --git a/tests/embroider-css-modules/types/test-app-for-embroider-css-modules/index.d.ts b/tests/embroider-css-modules/types/test-app-for-embroider-css-modules/index.d.ts index e7a93581..36e89c7f 100644 --- a/tests/embroider-css-modules/types/test-app-for-embroider-css-modules/index.d.ts +++ b/tests/embroider-css-modules/types/test-app-for-embroider-css-modules/index.d.ts @@ -1,7 +1,6 @@ import '@glint/environment-ember-loose'; import '@glint/environment-ember-template-imports'; import 'ember-source/types'; -import 'ember-source/types/preview'; import type EmberPageTitleRegistry from 'ember-page-title/template-registry'; import type EmbroiderCssModulesRegistry from 'embroider-css-modules/template-registry'; diff --git a/tests/my-v2-addon/types/test-app-for-my-v2-addon/index.d.ts b/tests/my-v2-addon/types/test-app-for-my-v2-addon/index.d.ts index a3635d0f..a1767d9d 100644 --- a/tests/my-v2-addon/types/test-app-for-my-v2-addon/index.d.ts +++ b/tests/my-v2-addon/types/test-app-for-my-v2-addon/index.d.ts @@ -1,7 +1,6 @@ import '@glint/environment-ember-loose'; import '@glint/environment-ember-template-imports'; import 'ember-source/types'; -import 'ember-source/types/preview'; import type EmberPageTitleRegistry from 'ember-page-title/template-registry'; import type MyV2AddonRegistry from 'my-v2-addon/template-registry';