From d5769069a3ac2f5ed3fd5ec4a3631865644af651 Mon Sep 17 00:00:00 2001 From: Sergey Astapov Date: Tue, 9 Jul 2024 13:59:31 -0400 Subject: [PATCH] Enable TypeScript support in addon and test-app --- .editorconfig | 19 + .github/workflows/ci.yml | 2 +- .github/workflows/push-dist.yml | 2 + .gitignore | 5 + CONTRIBUTING.md | 8 +- config/ember-cli-update.json | 22 + ember-lazy-mount/.eslintrc.cjs | 42 +- ember-lazy-mount/.gitignore | 36 +- ember-lazy-mount/babel.config.json | 5 + ember-lazy-mount/package.json | 50 +- ember-lazy-mount/rollup.config.mjs | 6 +- ember-lazy-mount/src/template-registry.ts | 11 + ember-lazy-mount/tsconfig.json | 53 ++ .../unpublished-development-types/index.d.ts | 17 + pnpm-lock.yaml | 454 +++++++++++++++--- test-app/.ember-cli | 2 +- test-app/.eslintrc.js | 23 +- test-app/app/{app.js => app.ts} | 0 test-app/app/config/environment.d.ts | 14 + test-app/app/{router.js => router.ts} | 4 +- test-app/app/templates/application.hbs | 4 +- test-app/config/ember-cli-update.json | 5 +- test-app/ember-cli-build.js | 2 +- test-app/package.json | 13 +- test-app/tests/helpers/{index.js => index.ts} | 7 +- .../tests/{test-helper.js => test-helper.ts} | 0 test-app/tsconfig.json | 14 + test-app/types/global.d.ts | 4 + 28 files changed, 677 insertions(+), 147 deletions(-) create mode 100644 .editorconfig create mode 100644 config/ember-cli-update.json create mode 100644 ember-lazy-mount/src/template-registry.ts create mode 100644 ember-lazy-mount/tsconfig.json create mode 100644 ember-lazy-mount/unpublished-development-types/index.d.ts rename test-app/app/{app.js => app.ts} (100%) create mode 100644 test-app/app/config/environment.d.ts rename test-app/app/{router.js => router.ts} (77%) rename test-app/tests/helpers/{index.js => index.ts} (81%) rename test-app/tests/{test-helper.js => test-helper.ts} (100%) create mode 100644 test-app/tsconfig.json create mode 100644 test-app/types/global.d.ts diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..c35a002 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,19 @@ +# EditorConfig helps developers define and maintain consistent +# coding styles between different editors and IDEs +# editorconfig.org + +root = true + +[*] +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +indent_style = space +indent_size = 2 + +[*.hbs] +insert_final_newline = false + +[*.{diff,md}] +trim_trailing_whitespace = false diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index df3269e..fcee09c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -83,5 +83,5 @@ jobs: - name: Install Dependencies run: pnpm install --frozen-lockfile - name: Run Tests - run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }} + run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }} --skip-cleanup working-directory: test-app diff --git a/.github/workflows/push-dist.yml b/.github/workflows/push-dist.yml index 1cf29c5..a57ceb5 100644 --- a/.github/workflows/push-dist.yml +++ b/.github/workflows/push-dist.yml @@ -4,11 +4,13 @@ # This workflow brings back that capability by placing the compiled assets on a "dist" branch # (configurable via the "branch" option below) name: Push dist + on: push: branches: - main - master + jobs: push-dist: name: Push dist diff --git a/.gitignore b/.gitignore index 11db839..adebb1b 100644 --- a/.gitignore +++ b/.gitignore @@ -3,9 +3,14 @@ # dependencies /node_modules/ +# misc +.pnpm-debug.log + # ember-try /.node_modules.ember-try/ /npm-shrinkwrap.json.ember-try /package.json.ember-try /package-lock.json.ember-try /yarn.lock.ember-try +/pnpm-lock.ember-try.yaml + diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6177359..4121693 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -11,6 +11,11 @@ - `pnpm lint` - `pnpm lint:fix` +## Building the addon + +- `cd ember-lazy-mount` +- `pnpm build` + ## Running tests - `cd ember-lazy-mount && pnpm start` – Builds the addon in "watch mode" so changes picked up by test app. @@ -25,4 +30,5 @@ During development, if you'd like test app to pick up changes in the addon, make - `cd test-app && ember serve` - Visit the test application at [http://localhost:4200](http://localhost:4200). - For more information on using ember-cli, visit [https://cli.emberjs.com/release/](https://cli.emberjs.com/release/). + +For more information on using ember-cli, visit [https://cli.emberjs.com/release/](https://cli.emberjs.com/release/). diff --git a/config/ember-cli-update.json b/config/ember-cli-update.json new file mode 100644 index 0000000..82a29d3 --- /dev/null +++ b/config/ember-cli-update.json @@ -0,0 +1,22 @@ +{ + "schemaVersion": "1.0.0", + "projectName": "ember-lazy-mount", + "packages": [ + { + "name": "@embroider/addon-blueprint", + "version": "2.17.0", + "blueprints": [ + { + "name": "@embroider/addon-blueprint", + "isBaseBlueprint": true, + "options": [ + "--ci-provider=github", + "--pnpm", + "--release-it", + "--typescript" + ] + } + ] + } + ] +} diff --git a/ember-lazy-mount/.eslintrc.cjs b/ember-lazy-mount/.eslintrc.cjs index 136bbab..06ae47c 100644 --- a/ember-lazy-mount/.eslintrc.cjs +++ b/ember-lazy-mount/.eslintrc.cjs @@ -6,15 +6,11 @@ module.exports = { // https://github.com/ember-cli/eslint-plugin-ember?tab=readme-ov-file#gtsgjs overrides: [ { - files: ['**/*.js'], + files: ['**/*.js', '**/*.ts'], env: { browser: true }, - parser: '@babel/eslint-parser', + parser: '@typescript-eslint/parser', parserOptions: { ecmaVersion: 'latest', - sourceType: 'module', - babelOptions: { - root: __dirname, - }, }, plugins: ['ember', 'import'], extends: [ @@ -28,6 +24,40 @@ module.exports = { // Add any custom rules here }, }, + // ts files + { + files: ['**/*.ts'], + extends: [ + 'eslint:recommended', + 'plugin:ember/recommended', + 'plugin:@typescript-eslint/eslint-recommended', + 'plugin:@typescript-eslint/recommended', + 'plugin:prettier/recommended', + ], + rules: { + // require relative imports use full extensions + 'import/extensions': ['error', 'always', { ignorePackages: true }], + // Add any custom rules here + }, + }, + { + files: ['**/*.gts'], + parser: 'ember-eslint-parser', + plugins: ['ember', 'import'], + extends: [ + 'eslint:recommended', + 'plugin:@typescript-eslint/eslint-recommended', + 'plugin:@typescript-eslint/recommended', + 'plugin:ember/recommended', + 'plugin:ember/recommended-gts', + 'plugin:prettier/recommended', + ], + rules: { + // require relative imports use full extensions + 'import/extensions': ['error', 'always', { ignorePackages: true }], + // Add any custom rules here + }, + }, { files: ['**/*.gjs'], parser: 'ember-eslint-parser', diff --git a/ember-lazy-mount/.gitignore b/ember-lazy-mount/.gitignore index 71ad79d..eedd0d8 100644 --- a/ember-lazy-mount/.gitignore +++ b/ember-lazy-mount/.gitignore @@ -1,25 +1,17 @@ -# compiled output -/dist/ -/declarations/ - -# dependencies -/node_modules/ +# The authoritative copies of these live in the monorepo root (because they're +# more useful on github that way), but the build copies them into here so they +# will also appear in published NPM packages. +/README.md +/LICENSE.md -# misc -/.env* -/.pnp* -/.eslintcache -/coverage/ -/npm-debug.log* -/testem.log -/yarn-error.log +# compiled output +dist/ +declarations/ -# ember-try -/.node_modules.ember-try/ -/npm-shrinkwrap.json.ember-try -/package.json.ember-try -/package-lock.json.ember-try -/yarn.lock.ember-try +# npm/pnpm/yarn pack output +*.tgz -# broccoli-debug -/DEBUG/ +# deps & caches +node_modules/ +.eslintcache +.prettiercache diff --git a/ember-lazy-mount/babel.config.json b/ember-lazy-mount/babel.config.json index 804d752..1282a36 100644 --- a/ember-lazy-mount/babel.config.json +++ b/ember-lazy-mount/babel.config.json @@ -1,5 +1,10 @@ { "plugins": [ + ["@babel/plugin-transform-typescript", { + "allExtensions": true, + "onlyRemoveTypeImports": true, + "allowDeclareFields": true + }], "@embroider/addon-dev/template-colocation-plugin", ["babel-plugin-ember-template-compilation", { "targetFormat": "hbs", diff --git a/ember-lazy-mount/package.json b/ember-lazy-mount/package.json index 13f3f59..554bc46 100644 --- a/ember-lazy-mount/package.json +++ b/ember-lazy-mount/package.json @@ -12,22 +12,45 @@ "repository": "buschtoens/ember-lazy-mount", "license": "MIT", "author": "Jan Buschtöns (https://jan.buschtoens.me)", + "exports": { + ".": { + "types": "./declarations/index.d.ts", + "default": "./dist/index.js" + }, + "./*": { + "types": "./declarations/*.d.ts", + "default": "./dist/*.js" + }, + "./addon-main.js": "./addon-main.cjs" + }, + "typesVersions": { + "*": { + "*": [ + "declarations/*" + ] + } + }, "files": [ "addon-main.cjs", "declarations", "dist" ], "scripts": { - "build": "rollup --config", + "build": "concurrently 'pnpm:build:*'", + "build:js": "rollup --config", + "build:types": "glint --declaration", "lint": "concurrently 'pnpm:lint:*(!fix)' --names 'lint:'", "lint:fix": "concurrently 'pnpm:lint:*:fix' --names 'fix:'", "lint:hbs": "ember-template-lint . --no-error-on-unmatched-pattern", - "lint:js": "eslint . --cache", "lint:hbs:fix": "ember-template-lint . --fix --no-error-on-unmatched-pattern", + "lint:js": "eslint . --cache", "lint:js:fix": "eslint . --fix", - "start": "rollup --config --watch", - "test": "echo 'A v2 addon does not have tests, run tests in test-app'", - "prepack": "rollup --config" + "lint:types": "glint", + "prepack": "concurrently 'pnpm:build:*'", + "start": "concurrently 'pnpm:start:*'", + "start:js": "rollup --config --watch --no-watch.clearScreen", + "start:types": "glint --declaration --watch", + "test": "echo 'A v2 addon does not have tests, run tests in test-app'" }, "dependencies": { "@ember/test-waiters": "^3.1.0", @@ -36,10 +59,19 @@ }, "devDependencies": { "@babel/core": "^7.24.7", + "@babel/plugin-transform-typescript": "^7.24.4", "@babel/eslint-parser": "^7.24.7", "@babel/runtime": "^7.24.7", "@embroider/addon-dev": "^5.0.0", + "@glimmer/component": "^1.1.2", + "@glint/core": "^1.4.0", + "@glint/environment-ember-loose": "^1.4.0", + "@glint/environment-ember-template-imports": "^1.4.0", + "@glint/template": "^1.4.0", "@rollup/plugin-babel": "^6.0.4", + "@tsconfig/ember": "^3.0.6", + "@typescript-eslint/eslint-plugin": "^7.7.1", + "@typescript-eslint/parser": "^7.7.1", "babel-plugin-ember-template-compilation": "^2.2.5", "concurrently": "^8.2.2", "ember-template-lint": "^6.0.0", @@ -51,7 +83,8 @@ "eslint-plugin-prettier": "^5.1.3", "prettier": "^3.3.2", "prettier-plugin-ember-template-tag": "^2.0.2", - "rollup": "^4.18.1" + "rollup": "^4.18.1", + "typescript": "^5.5.3" }, "peerDependencies": { "ember-source": "^4.12.0 || >= 5" @@ -71,11 +104,6 @@ "./services/engine-loader.js": "./dist/_app_/services/engine-loader.js" } }, - "exports": { - ".": "./dist/index.js", - "./*": "./dist/*.js", - "./addon-main.js": "./addon-main.cjs" - }, "volta": { "extends": "../package.json" } diff --git a/ember-lazy-mount/rollup.config.mjs b/ember-lazy-mount/rollup.config.mjs index 2842306..3cd430b 100644 --- a/ember-lazy-mount/rollup.config.mjs +++ b/ember-lazy-mount/rollup.config.mjs @@ -11,8 +11,6 @@ export default { // You can augment this if you need to. output: addon.output(), - external: ['require'], - plugins: [ // These are the modules that users should be able to import from your // addon. Anything not listed here may get optimized away. @@ -21,7 +19,7 @@ export default { // up your addon's public API. Also make sure your package.json#exports // is aligned to the config here. // See https://github.com/embroider-build/embroider/blob/main/docs/v2-faq.md#how-can-i-define-the-public-exports-of-my-addon - addon.publicEntrypoints(['**/*.js', 'index.js']), + addon.publicEntrypoints(['**/*.js', 'index.js', 'template-registry.js']), // These are the modules that should get reexported into the traditional // "app" tree. Things in here should also be in publicEntrypoints above, but @@ -45,7 +43,7 @@ export default { // By default, this will load the actual babel config from the file // babel.config.json. babel({ - extensions: ['.js', '.gjs'], + extensions: ['.js', '.gjs', '.ts', '.gts'], babelHelpers: 'bundled', }), diff --git a/ember-lazy-mount/src/template-registry.ts b/ember-lazy-mount/src/template-registry.ts new file mode 100644 index 0000000..0758d89 --- /dev/null +++ b/ember-lazy-mount/src/template-registry.ts @@ -0,0 +1,11 @@ +// Easily allow apps, which are not yet using strict mode templates, to consume your Glint types, by importing this file. +// Add all your components, helpers and modifiers to the template registry here, so apps don't have to do this. +// See https://typed-ember.gitbook.io/glint/environments/ember/authoring-addons + +// import type MyComponent from './components/my-component'; + +// Remove this once entries have been added! 👇 +// eslint-disable-next-line @typescript-eslint/no-empty-interface +export default interface Registry { + // MyComponent: typeof MyComponent +} diff --git a/ember-lazy-mount/tsconfig.json b/ember-lazy-mount/tsconfig.json new file mode 100644 index 0000000..a80eff6 --- /dev/null +++ b/ember-lazy-mount/tsconfig.json @@ -0,0 +1,53 @@ +{ + "extends": "@tsconfig/ember/tsconfig.json", + "include": [ + "src/**/*", + "unpublished-development-types/**/*" + ], + "glint": { + "environment": ["ember-loose", "ember-template-imports"] + }, + "compilerOptions": { + "allowJs": true, + "declarationDir": "declarations", + /** + https://www.typescriptlang.org/tsconfig#noEmit + + We want to emit declarations, so this option must be set to `false`. + @tsconfig/ember sets this to `true`, which is incompatible with our need to set `emitDeclarationOnly`. + @tsconfig/ember is more optimized for apps, which wouldn't emit anything, only type check. + */ + "noEmit": false, + /** + https://www.typescriptlang.org/tsconfig#emitDeclarationOnly + We want to only emit declarations as we use Rollup to emit JavaScript. + */ + "emitDeclarationOnly": true, + + /** + https://www.typescriptlang.org/tsconfig#noEmitOnError + Do not block emit on TS errors. + */ + "noEmitOnError": false, + + /** + https://www.typescriptlang.org/tsconfig#rootDir + "Default: The longest common path of all non-declaration input files." + + Because we want our declarations' structure to match our rollup output, + we need this "rootDir" to match the "srcDir" in the rollup.config.mjs. + + This way, we can have simpler `package.json#exports` that matches + imports to files on disk + */ + "rootDir": "./src", + + /** + https://www.typescriptlang.org/tsconfig#allowImportingTsExtensions + + We want our tooling to know how to resolve our custom files so the appropriate plugins + can do the proper transformations on those files. + */ + "allowImportingTsExtensions": true + } +} diff --git a/ember-lazy-mount/unpublished-development-types/index.d.ts b/ember-lazy-mount/unpublished-development-types/index.d.ts new file mode 100644 index 0000000..4d16f38 --- /dev/null +++ b/ember-lazy-mount/unpublished-development-types/index.d.ts @@ -0,0 +1,17 @@ +// Add any types here that you need for local development only. +// These will *not* be published as part of your addon, so be careful that your published code does not rely on them! + +import 'ember-source/types'; +import 'ember-source/types/preview'; + +import '@glint/environment-ember-loose'; +import '@glint/environment-ember-template-imports'; + +declare module '@glint/environment-ember-loose/registry' { + // Remove this once entries have been added! 👇 + // eslint-disable-next-line @typescript-eslint/no-empty-interface + export default interface Registry { + // Add any registry entries from other addons here that your addon itself uses (in non-strict mode templates) + // See https://typed-ember.gitbook.io/glint/using-glint/ember/using-addons + } +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2809eb6..4dfbc9e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -36,15 +36,42 @@ importers: '@babel/eslint-parser': specifier: ^7.24.7 version: 7.24.7(@babel/core@7.24.7)(eslint@8.57.0) + '@babel/plugin-transform-typescript': + specifier: ^7.24.4 + version: 7.24.7(@babel/core@7.24.7) '@babel/runtime': specifier: ^7.24.7 version: 7.24.7 '@embroider/addon-dev': specifier: ^5.0.0 - version: 5.0.0(rollup@4.18.1) + version: 5.0.0(@glint/template@1.4.0)(rollup@4.18.1) + '@glimmer/component': + specifier: ^1.1.2 + version: 1.1.2(@babel/core@7.24.7) + '@glint/core': + specifier: ^1.4.0 + version: 1.4.0(typescript@5.5.3) + '@glint/environment-ember-loose': + specifier: ^1.4.0 + version: 1.4.0(@glimmer/component@1.1.2)(@glint/template@1.4.0)(ember-cli-htmlbars@6.3.0)(ember-modifier@4.2.0) + '@glint/environment-ember-template-imports': + specifier: ^1.4.0 + version: 1.4.0(@glint/environment-ember-loose@1.4.0)(@glint/template@1.4.0) + '@glint/template': + specifier: ^1.4.0 + version: 1.4.0 '@rollup/plugin-babel': specifier: ^6.0.4 version: 6.0.4(@babel/core@7.24.7)(rollup@4.18.1) + '@tsconfig/ember': + specifier: ^3.0.6 + version: 3.0.8 + '@typescript-eslint/eslint-plugin': + specifier: ^7.7.1 + version: 7.16.0(@typescript-eslint/parser@7.16.0)(eslint@8.57.0)(typescript@5.5.3) + '@typescript-eslint/parser': + specifier: ^7.7.1 + version: 7.16.0(eslint@8.57.0)(typescript@5.5.3) babel-plugin-ember-template-compilation: specifier: ^2.2.5 version: 2.2.5 @@ -62,10 +89,10 @@ importers: version: 9.1.0(eslint@8.57.0) eslint-plugin-ember: specifier: ^12.1.1 - version: 12.1.1(@babel/core@7.24.7)(eslint@8.57.0) + version: 12.1.1(@babel/core@7.24.7)(@typescript-eslint/parser@7.16.0)(eslint@8.57.0) eslint-plugin-import: specifier: ^2.29.1 - version: 2.29.1(eslint@8.57.0) + version: 2.29.1(@typescript-eslint/parser@7.16.0)(eslint@8.57.0) eslint-plugin-n: specifier: ^17.9.0 version: 17.9.0(eslint@8.57.0) @@ -81,18 +108,15 @@ importers: rollup: specifier: ^4.18.1 version: 4.18.1 + typescript: + specifier: ^5.5.3 + version: 5.5.3 test-app: devDependencies: '@babel/core': specifier: ^7.24.7 version: 7.24.7 - '@babel/eslint-parser': - specifier: ^7.24.7 - version: 7.24.7(@babel/core@7.24.7)(eslint@8.57.0) - '@babel/plugin-proposal-decorators': - specifier: ^7.24.7 - version: 7.24.7(@babel/core@7.24.7) '@ember/optional-features': specifier: ^2.1.0 version: 2.1.0 @@ -101,7 +125,7 @@ importers: version: 3.1.1 '@ember/test-helpers': specifier: ^3.3.0 - version: 3.3.0(ember-source@5.10.0)(webpack@5.92.1) + version: 3.3.0(@glint/template@1.4.0)(ember-source@5.10.0)(webpack@5.92.1) '@embroider/test-setup': specifier: ^4.0.0 version: 4.0.0 @@ -111,6 +135,24 @@ importers: '@glimmer/tracking': specifier: ^1.1.2 version: 1.1.2 + '@glint/environment-ember-loose': + specifier: ^1.4.0 + version: 1.4.0(@glimmer/component@1.1.2)(@glint/template@1.4.0)(ember-cli-htmlbars@6.3.0)(ember-modifier@4.2.0) + '@glint/template': + specifier: ^1.4.0 + version: 1.4.0 + '@tsconfig/ember': + specifier: ^3.0.8 + version: 3.0.8 + '@types/qunit': + specifier: ^2.19.10 + version: 2.19.10 + '@typescript-eslint/eslint-plugin': + specifier: ^7.16.0 + version: 7.16.0(@typescript-eslint/parser@7.16.0)(eslint@8.57.0)(typescript@5.5.3) + '@typescript-eslint/parser': + specifier: ^7.16.0 + version: 7.16.0(eslint@8.57.0)(typescript@5.5.3) broccoli-asset-rev: specifier: ^3.0.0 version: 3.0.0 @@ -119,7 +161,7 @@ importers: version: 8.2.2 ember-auto-import: specifier: ^2.7.4 - version: 2.7.4(webpack@5.92.1) + version: 2.7.4(@glint/template@1.4.0)(webpack@5.92.1) ember-cli: specifier: ~5.10.0 version: 5.10.0 @@ -149,7 +191,7 @@ importers: version: 4.0.2 ember-engines: specifier: ^0.11.0 - version: 0.11.0(ember-source@5.10.0) + version: 0.11.0(@glint/template@1.4.0)(ember-source@5.10.0) ember-fetch: specifier: ^8.1.2 version: 8.1.2 @@ -167,13 +209,13 @@ importers: version: 8.2.3(ember-source@5.10.0) ember-qunit: specifier: ^8.1.0 - version: 8.1.0(@ember/test-helpers@3.3.0)(ember-source@5.10.0)(qunit@2.21.0) + version: 8.1.0(@ember/test-helpers@3.3.0)(@glint/template@1.4.0)(ember-source@5.10.0)(qunit@2.21.0) ember-resolver: specifier: ^12.0.1 version: 12.0.1(ember-source@5.10.0) ember-source: specifier: ~5.10.0 - version: 5.10.0(@glimmer/component@1.1.2)(rsvp@4.8.5)(webpack@5.92.1) + version: 5.10.0(@glimmer/component@1.1.2)(@glint/template@1.4.0)(rsvp@4.8.5)(webpack@5.92.1) ember-source-channel-url: specifier: ^3.0.0 version: 3.0.0 @@ -183,9 +225,6 @@ importers: ember-try: specifier: ^3.0.0 version: 3.0.0 - ember-welcome-page: - specifier: ^7.0.2 - version: 7.0.2 eslint: specifier: ^8.57.0 version: 8.57.0 @@ -194,7 +233,7 @@ importers: version: 9.1.0(eslint@8.57.0) eslint-plugin-ember: specifier: ^12.1.1 - version: 12.1.1(@babel/core@7.24.7)(eslint@8.57.0) + version: 12.1.1(@babel/core@7.24.7)(@typescript-eslint/parser@7.16.0)(eslint@8.57.0) eslint-plugin-n: specifier: ^17.9.0 version: 17.9.0(eslint@8.57.0) @@ -221,7 +260,7 @@ importers: version: 4.8.5 stylelint: specifier: ^15.11.0 - version: 15.11.0 + version: 15.11.0(typescript@5.5.3) stylelint-config-standard: specifier: ^34.0.0 version: 34.0.0(stylelint@15.11.0) @@ -237,6 +276,9 @@ importers: tracked-built-ins: specifier: ^3.3.0 version: 3.3.0 + typescript: + specifier: ^5.5.3 + version: 5.5.3 webpack: specifier: ^5.92.1 version: 5.92.1 @@ -264,7 +306,7 @@ importers: version: 2.1.0 '@ember/test-helpers': specifier: ^3.3.0 - version: 3.3.0(ember-source@5.10.0)(webpack@5.92.1) + version: 3.3.0(@glint/template@1.4.0)(ember-source@5.10.0)(webpack@5.92.1) '@embroider/test-setup': specifier: ^4.0.0 version: 4.0.0 @@ -282,7 +324,7 @@ importers: version: 8.2.2 ember-auto-import: specifier: ^2.7.4 - version: 2.7.4(webpack@5.92.1) + version: 2.7.4(@glint/template@1.4.0)(webpack@5.92.1) ember-cli: specifier: ~5.10.0 version: 5.10.0 @@ -303,7 +345,7 @@ importers: version: 4.0.2 ember-engines: specifier: ^0.11.0 - version: 0.11.0(ember-source@5.10.0) + version: 0.11.0(@glint/template@1.4.0)(ember-source@5.10.0) ember-load-initializers: specifier: ^2.1.2 version: 2.1.2(@babel/core@7.24.7) @@ -312,13 +354,13 @@ importers: version: 8.2.3(ember-source@5.10.0) ember-qunit: specifier: ^8.1.0 - version: 8.1.0(@ember/test-helpers@3.3.0)(ember-source@5.10.0)(qunit@2.21.0) + version: 8.1.0(@ember/test-helpers@3.3.0)(@glint/template@1.4.0)(ember-source@5.10.0)(qunit@2.21.0) ember-resolver: specifier: ^12.0.1 version: 12.0.1(ember-source@5.10.0) ember-source: specifier: ~5.10.0 - version: 5.10.0(@glimmer/component@1.1.2)(rsvp@4.8.5)(webpack@5.92.1) + version: 5.10.0(@glimmer/component@1.1.2)(@glint/template@1.4.0)(rsvp@4.8.5)(webpack@5.92.1) ember-source-channel-url: specifier: ^3.0.0 version: 3.0.0 @@ -336,7 +378,7 @@ importers: version: 9.1.0(eslint@8.57.0) eslint-plugin-ember: specifier: ^12.1.1 - version: 12.1.1(@babel/core@7.24.7)(eslint@8.57.0) + version: 12.1.1(@babel/core@7.24.7)(@typescript-eslint/parser@7.16.0)(eslint@8.57.0) eslint-plugin-n: specifier: ^17.9.0 version: 17.9.0(eslint@8.57.0) @@ -388,7 +430,7 @@ importers: version: 2.1.0 '@ember/test-helpers': specifier: ^3.3.0 - version: 3.3.0(ember-source@5.10.0)(webpack@5.92.1) + version: 3.3.0(@glint/template@1.4.0)(ember-source@5.10.0)(webpack@5.92.1) '@embroider/test-setup': specifier: ^4.0.0 version: 4.0.0 @@ -406,7 +448,7 @@ importers: version: 8.2.2 ember-auto-import: specifier: ^2.7.4 - version: 2.7.4(webpack@5.92.1) + version: 2.7.4(@glint/template@1.4.0)(webpack@5.92.1) ember-cli: specifier: ~5.10.0 version: 5.10.0 @@ -427,7 +469,7 @@ importers: version: 4.0.2 ember-engines: specifier: ^0.11.0 - version: 0.11.0(ember-source@5.10.0) + version: 0.11.0(@glint/template@1.4.0)(ember-source@5.10.0) ember-load-initializers: specifier: ^2.1.2 version: 2.1.2(@babel/core@7.24.7) @@ -436,13 +478,13 @@ importers: version: 8.2.3(ember-source@5.10.0) ember-qunit: specifier: ^8.1.0 - version: 8.1.0(@ember/test-helpers@3.3.0)(ember-source@5.10.0)(qunit@2.21.0) + version: 8.1.0(@ember/test-helpers@3.3.0)(@glint/template@1.4.0)(ember-source@5.10.0)(qunit@2.21.0) ember-resolver: specifier: ^12.0.1 version: 12.0.1(ember-source@5.10.0) ember-source: specifier: ~5.10.0 - version: 5.10.0(@glimmer/component@1.1.2)(rsvp@4.8.5)(webpack@5.92.1) + version: 5.10.0(@glimmer/component@1.1.2)(@glint/template@1.4.0)(rsvp@4.8.5)(webpack@5.92.1) ember-source-channel-url: specifier: ^3.0.0 version: 3.0.0 @@ -460,7 +502,7 @@ importers: version: 9.1.0(eslint@8.57.0) eslint-plugin-ember: specifier: ^12.1.1 - version: 12.1.1(@babel/core@7.24.7)(eslint@8.57.0) + version: 12.1.1(@babel/core@7.24.7)(@typescript-eslint/parser@7.16.0)(eslint@8.57.0) eslint-plugin-n: specifier: ^17.9.0 version: 17.9.0(eslint@8.57.0) @@ -1870,22 +1912,22 @@ packages: - supports-color dev: true - /@ember/test-helpers@3.3.0(ember-source@5.10.0)(webpack@5.92.1): + /@ember/test-helpers@3.3.0(@glint/template@1.4.0)(ember-source@5.10.0)(webpack@5.92.1): resolution: {integrity: sha512-HEI28wtjnQuEj9+DstHUEEKPtqPAEVN9AAVr4EifVCd3DyEDy0m6hFT4qbap1WxAIktLja2QXGJg50lVWzZc5g==} engines: {node: 16.* || >= 18} peerDependencies: ember-source: ^4.0.0 || ^5.0.0 dependencies: '@ember/test-waiters': 3.1.0 - '@embroider/macros': 1.16.5 + '@embroider/macros': 1.16.5(@glint/template@1.4.0) '@simple-dom/interface': 1.4.0 broccoli-debug: 0.6.5 broccoli-funnel: 3.0.8 dom-element-descriptors: 0.5.1 - ember-auto-import: 2.7.4(webpack@5.92.1) + ember-auto-import: 2.7.4(@glint/template@1.4.0)(webpack@5.92.1) ember-cli-babel: 7.26.11 ember-cli-htmlbars: 6.3.0 - ember-source: 5.10.0(@glimmer/component@1.1.2)(rsvp@4.8.5)(webpack@5.92.1) + ember-source: 5.10.0(@glimmer/component@1.1.2)(@glint/template@1.4.0)(rsvp@4.8.5)(webpack@5.92.1) transitivePeerDependencies: - '@glint/template' - supports-color @@ -1903,7 +1945,7 @@ packages: transitivePeerDependencies: - supports-color - /@embroider/addon-dev@5.0.0(rollup@4.18.1): + /@embroider/addon-dev@5.0.0(@glint/template@1.4.0)(rollup@4.18.1): resolution: {integrity: sha512-cEaPnhNJBqb+1Mp/1iDsfZjXU/odQ+vYqtqg19qh/28KBbbL5do1TzFPfXuGjzuDHiTIagklpGoNGkMwU/bJtw==} engines: {node: 12.* || 14.* || >= 16} hasBin: true @@ -1913,7 +1955,7 @@ packages: rollup: optional: true dependencies: - '@embroider/core': 3.4.14 + '@embroider/core': 3.4.14(@glint/template@1.4.0) '@rollup/pluginutils': 4.2.1 content-tag: 2.0.1 fs-extra: 10.1.0 @@ -1942,14 +1984,14 @@ packages: transitivePeerDependencies: - supports-color - /@embroider/core@3.4.14: + /@embroider/core@3.4.14(@glint/template@1.4.0): resolution: {integrity: sha512-WVVKup9j1LzciQDL3jfvADJIyLTPe3+cWKzZwqwSnDkYIx2Nsq5a/drKcjJZPJtwU1ddbMpDnUVgGtOurN1VcA==} engines: {node: 12.* || 14.* || >= 16} dependencies: '@babel/core': 7.24.7 '@babel/parser': 7.24.7 '@babel/traverse': 7.24.7 - '@embroider/macros': 1.16.5 + '@embroider/macros': 1.16.5(@glint/template@1.4.0) '@embroider/shared-internals': 2.6.2 assert-never: 1.3.0 babel-plugin-ember-template-compilation: 2.2.5 @@ -1978,7 +2020,7 @@ packages: - utf-8-validate dev: true - /@embroider/macros@1.16.5: + /@embroider/macros@1.16.5(@glint/template@1.4.0): resolution: {integrity: sha512-Oz8bUZvZzOV1Gk3qSgIzZJJzs6acclSTcEFyB+KdKbKqjTC3uebn53aU2gAlLU7/YdTRZrg2gNbQuwAp+tGkGg==} engines: {node: 12.* || 14.* || >= 16} peerDependencies: @@ -1988,6 +2030,7 @@ packages: optional: true dependencies: '@embroider/shared-internals': 2.6.2 + '@glint/template': 1.4.0 assert-never: 1.3.0 babel-import-util: 2.1.1 ember-cli-babel: 7.26.11 @@ -2342,6 +2385,88 @@ packages: '@glimmer/util': 0.92.0 dev: true + /@glint/core@1.4.0(typescript@5.5.3): + resolution: {integrity: sha512-nq27a/1R6kc3lsuciz8z9IZO1NQCbNkEBxf5KJI7AUrnps6RzQzmq3pmwO24zQYmFcH4sqpod8fleNIpg8YEqg==} + hasBin: true + peerDependencies: + typescript: '>=4.8.0' + dependencies: + '@glimmer/syntax': 0.84.3 + escape-string-regexp: 4.0.0 + semver: 7.6.2 + silent-error: 1.1.1 + typescript: 5.5.3 + uuid: 8.3.2 + vscode-languageserver: 8.1.0 + vscode-languageserver-textdocument: 1.0.11 + vscode-uri: 3.0.8 + yargs: 17.7.2 + transitivePeerDependencies: + - supports-color + dev: true + + /@glint/environment-ember-loose@1.4.0(@glimmer/component@1.1.2)(@glint/template@1.4.0)(ember-cli-htmlbars@6.3.0)(ember-modifier@4.2.0): + resolution: {integrity: sha512-vFR3qgPTisGzS36e04195wTUrtUc6GuVwm6hsC/XXx6PeRw/6rtMxhK08Aw/VtDc00UqQzM9sIEghPVKHwqVVQ==} + peerDependencies: + '@glimmer/component': ^1.1.2 + '@glint/template': ^1.4.0 + '@types/ember__array': ^4.0.2 + '@types/ember__component': ^4.0.10 + '@types/ember__controller': ^4.0.2 + '@types/ember__object': ^4.0.4 + '@types/ember__routing': ^4.0.11 + ember-cli-htmlbars: ^6.0.1 + ember-modifier: ^3.2.7 || ^4.0.0 + peerDependenciesMeta: + '@types/ember__array': + optional: true + '@types/ember__component': + optional: true + '@types/ember__controller': + optional: true + '@types/ember__object': + optional: true + '@types/ember__routing': + optional: true + ember-cli-htmlbars: + optional: true + ember-modifier: + optional: true + dependencies: + '@glimmer/component': 1.1.2(@babel/core@7.24.7) + '@glint/template': 1.4.0 + ember-cli-htmlbars: 6.3.0 + ember-modifier: 4.2.0(@babel/core@7.24.7)(ember-source@5.10.0) + dev: true + + /@glint/environment-ember-template-imports@1.4.0(@glint/environment-ember-loose@1.4.0)(@glint/template@1.4.0): + resolution: {integrity: sha512-VXcUgea92l7NFShU26rpQn+hYUZ7ex/rNtU9vnw2BAVZaPfxZROokW8ABj8aMaCUDe60CoMVZ1/QSeONSCln3w==} + peerDependencies: + '@glint/environment-ember-loose': ^1.4.0 + '@glint/template': ^1.4.0 + '@types/ember__component': ^4.0.10 + '@types/ember__helper': ^4.0.1 + '@types/ember__modifier': ^4.0.3 + '@types/ember__routing': ^4.0.12 + peerDependenciesMeta: + '@types/ember__component': + optional: true + '@types/ember__helper': + optional: true + '@types/ember__modifier': + optional: true + '@types/ember__routing': + optional: true + dependencies: + '@glint/environment-ember-loose': 1.4.0(@glimmer/component@1.1.2)(@glint/template@1.4.0)(ember-cli-htmlbars@6.3.0)(ember-modifier@4.2.0) + '@glint/template': 1.4.0 + content-tag: 2.0.1 + dev: true + + /@glint/template@1.4.0: + resolution: {integrity: sha512-yD271NhLei/HSQ6utm6hKgoU+B5D5DY+B1irPvgI4KsDEcZI7v/INf5HAMJfzCg92bP1sIxSOuXu5DU6VsY7Mw==} + dev: true + /@handlebars/parser@2.0.0: resolution: {integrity: sha512-EP9uEDZv/L5Qh9IWuMUGJRfwhXJ4h1dqKTT4/3+tY0eu7sPis7xh23j61SYUnNF4vqCQvvUXpDo9Bh/+q1zASA==} @@ -2871,6 +2996,10 @@ packages: resolution: {integrity: sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==} dev: true + /@tsconfig/ember@3.0.8: + resolution: {integrity: sha512-OVnIsZIt/8q0VEtcdz3rRryNrm6gdJTxXlxefkGIrkZnME0wqslmwHlUEZ7mvh377df9FqBhNKrYNarhCW8zJA==} + dev: true + /@types/acorn@4.0.6: resolution: {integrity: sha512-veQTnWP+1D/xbxVrPC3zHnCZRjSrKfhbMUlEA43iMZLu7EsnTtkJklIuwrCPbOi8YkvDQAiW05VQQFvvz9oieQ==} dependencies: @@ -3039,6 +3168,10 @@ packages: resolution: {integrity: sha512-uXHQKES6DQKKCLh441Xv/dwxOq1TVS3JPUMlEqoEglvlhR6Mxnlew/Xq/LRVHpLyk7iK3zODe1qYHIMltO7XGg==} dev: true + /@types/qunit@2.19.10: + resolution: {integrity: sha512-gVB+rxvxmbyPFWa6yjjKgcumWal3hyqoTXI0Oil161uWfo1OCzWZ/rnEumsx+6uVgrwPrCrhpQbLkzfildkSbg==} + dev: true + /@types/range-parser@1.2.7: resolution: {integrity: sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==} dev: true @@ -3077,6 +3210,133 @@ packages: resolution: {integrity: sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==} dev: true + /@typescript-eslint/eslint-plugin@7.16.0(@typescript-eslint/parser@7.16.0)(eslint@8.57.0)(typescript@5.5.3): + resolution: {integrity: sha512-py1miT6iQpJcs1BiJjm54AMzeuMPBSPuKPlnT8HlfudbcS5rYeX5jajpLf3mrdRh9dA/Ec2FVUY0ifeVNDIhZw==} + engines: {node: ^18.18.0 || >=20.0.0} + peerDependencies: + '@typescript-eslint/parser': ^7.0.0 + eslint: ^8.56.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@eslint-community/regexpp': 4.11.0 + '@typescript-eslint/parser': 7.16.0(eslint@8.57.0)(typescript@5.5.3) + '@typescript-eslint/scope-manager': 7.16.0 + '@typescript-eslint/type-utils': 7.16.0(eslint@8.57.0)(typescript@5.5.3) + '@typescript-eslint/utils': 7.16.0(eslint@8.57.0)(typescript@5.5.3) + '@typescript-eslint/visitor-keys': 7.16.0 + eslint: 8.57.0 + graphemer: 1.4.0 + ignore: 5.3.1 + natural-compare: 1.4.0 + ts-api-utils: 1.3.0(typescript@5.5.3) + typescript: 5.5.3 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/parser@7.16.0(eslint@8.57.0)(typescript@5.5.3): + resolution: {integrity: sha512-ar9E+k7CU8rWi2e5ErzQiC93KKEFAXA2Kky0scAlPcxYblLt8+XZuHUZwlyfXILyQa95P6lQg+eZgh/dDs3+Vw==} + engines: {node: ^18.18.0 || >=20.0.0} + peerDependencies: + eslint: ^8.56.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/scope-manager': 7.16.0 + '@typescript-eslint/types': 7.16.0 + '@typescript-eslint/typescript-estree': 7.16.0(typescript@5.5.3) + '@typescript-eslint/visitor-keys': 7.16.0 + debug: 4.3.5 + eslint: 8.57.0 + typescript: 5.5.3 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/scope-manager@7.16.0: + resolution: {integrity: sha512-8gVv3kW6n01Q6TrI1cmTZ9YMFi3ucDT7i7aI5lEikk2ebk1AEjrwX8MDTdaX5D7fPXMBLvnsaa0IFTAu+jcfOw==} + engines: {node: ^18.18.0 || >=20.0.0} + dependencies: + '@typescript-eslint/types': 7.16.0 + '@typescript-eslint/visitor-keys': 7.16.0 + dev: true + + /@typescript-eslint/type-utils@7.16.0(eslint@8.57.0)(typescript@5.5.3): + resolution: {integrity: sha512-j0fuUswUjDHfqV/UdW6mLtOQQseORqfdmoBNDFOqs9rvNVR2e+cmu6zJu/Ku4SDuqiJko6YnhwcL8x45r8Oqxg==} + engines: {node: ^18.18.0 || >=20.0.0} + peerDependencies: + eslint: ^8.56.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/typescript-estree': 7.16.0(typescript@5.5.3) + '@typescript-eslint/utils': 7.16.0(eslint@8.57.0)(typescript@5.5.3) + debug: 4.3.5 + eslint: 8.57.0 + ts-api-utils: 1.3.0(typescript@5.5.3) + typescript: 5.5.3 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/types@7.16.0: + resolution: {integrity: sha512-fecuH15Y+TzlUutvUl9Cc2XJxqdLr7+93SQIbcZfd4XRGGKoxyljK27b+kxKamjRkU7FYC6RrbSCg0ALcZn/xw==} + engines: {node: ^18.18.0 || >=20.0.0} + dev: true + + /@typescript-eslint/typescript-estree@7.16.0(typescript@5.5.3): + resolution: {integrity: sha512-a5NTvk51ZndFuOLCh5OaJBELYc2O3Zqxfl3Js78VFE1zE46J2AaVuW+rEbVkQznjkmlzWsUI15BG5tQMixzZLw==} + engines: {node: ^18.18.0 || >=20.0.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/types': 7.16.0 + '@typescript-eslint/visitor-keys': 7.16.0 + debug: 4.3.5 + globby: 11.1.0 + is-glob: 4.0.3 + minimatch: 9.0.5 + semver: 7.6.2 + ts-api-utils: 1.3.0(typescript@5.5.3) + typescript: 5.5.3 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/utils@7.16.0(eslint@8.57.0)(typescript@5.5.3): + resolution: {integrity: sha512-PqP4kP3hb4r7Jav+NiRCntlVzhxBNWq6ZQ+zQwII1y/G/1gdIPeYDCKr2+dH6049yJQsWZiHU6RlwvIFBXXGNA==} + engines: {node: ^18.18.0 || >=20.0.0} + peerDependencies: + eslint: ^8.56.0 + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) + '@typescript-eslint/scope-manager': 7.16.0 + '@typescript-eslint/types': 7.16.0 + '@typescript-eslint/typescript-estree': 7.16.0(typescript@5.5.3) + eslint: 8.57.0 + transitivePeerDependencies: + - supports-color + - typescript + dev: true + + /@typescript-eslint/visitor-keys@7.16.0: + resolution: {integrity: sha512-rMo01uPy9C7XxG7AFsxa8zLnWXTF8N3PYclekWSrurvhwiw1eW88mrKiAYe6s53AUY57nTRz8dJsuuXdkAhzCg==} + engines: {node: ^18.18.0 || >=20.0.0} + dependencies: + '@typescript-eslint/types': 7.16.0 + eslint-visitor-keys: 3.4.3 + dev: true + /@ungap/structured-clone@1.2.0: resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} dev: true @@ -5394,7 +5654,7 @@ packages: vary: 1.1.2 dev: true - /cosmiconfig@8.3.6: + /cosmiconfig@8.3.6(typescript@5.5.3): resolution: {integrity: sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==} engines: {node: '>=14'} peerDependencies: @@ -5407,6 +5667,7 @@ packages: js-yaml: 4.1.0 parse-json: 5.2.0 path-type: 4.0.0 + typescript: 5.5.3 dev: true /cosmiconfig@9.0.0: @@ -5911,7 +6172,7 @@ packages: - supports-color dev: true - /ember-auto-import@2.7.4(webpack@5.92.1): + /ember-auto-import@2.7.4(@glint/template@1.4.0)(webpack@5.92.1): resolution: {integrity: sha512-6CdXSegJJc8nwwK7+1lIcBUnMVrJRNd4ZdMgcKbCAwPvcGxMgRVBddSzrX/+q/UuflvTEO26Dk1g7Z6KHMXUhw==} engines: {node: 12.* || 14.* || >= 16} dependencies: @@ -5921,7 +6182,7 @@ packages: '@babel/plugin-proposal-private-methods': 7.18.6(@babel/core@7.24.7) '@babel/plugin-transform-class-static-block': 7.24.7(@babel/core@7.24.7) '@babel/preset-env': 7.24.7(@babel/core@7.24.7) - '@embroider/macros': 1.16.5 + '@embroider/macros': 1.16.5(@glint/template@1.4.0) '@embroider/shared-internals': 2.6.2 babel-loader: 8.3.0(@babel/core@7.24.7)(webpack@5.92.1) babel-plugin-ember-modules-api-polyfill: 3.5.0 @@ -5962,7 +6223,7 @@ packages: ember-source: ^3.28.0 || >= 4.0.0 dependencies: ember-cli-babel: 7.26.11 - ember-source: 5.10.0(@glimmer/component@1.1.2)(rsvp@4.8.5)(webpack@5.92.1) + ember-source: 5.10.0(@glimmer/component@1.1.2)(@glint/template@1.4.0)(rsvp@4.8.5)(webpack@5.92.1) git-repo-info: 2.1.1 transitivePeerDependencies: - supports-color @@ -6460,7 +6721,7 @@ packages: - supports-color dev: true - /ember-engines@0.11.0(ember-source@5.10.0): + /ember-engines@0.11.0(@glint/template@1.4.0)(ember-source@5.10.0): resolution: {integrity: sha512-AfIuttjI2O5vtx7JkTQwmb2jHeuPJxivha+867NVNyyNobT6HnwqFJQ2Q2kfwaj4qdqAIIzs5uFsjOBNXUAOiA==} engines: {node: 16.* || 18.* || >= 20} peerDependencies: @@ -6471,7 +6732,7 @@ packages: optional: true dependencies: '@babel/core': 7.24.7 - '@embroider/macros': 1.16.5 + '@embroider/macros': 1.16.5(@glint/template@1.4.0) amd-name-resolver: 1.3.1 babel-plugin-compact-reexports: 1.1.0 broccoli-babel-transpiler: 7.8.1 @@ -6488,14 +6749,14 @@ packages: ember-cli-preprocess-registry: 3.3.0 ember-cli-string-utils: 1.1.0 ember-cli-version-checker: 5.1.2 - ember-source: 5.10.0(@glimmer/component@1.1.2)(rsvp@4.8.5)(webpack@5.92.1) + ember-source: 5.10.0(@glimmer/component@1.1.2)(@glint/template@1.4.0)(rsvp@4.8.5)(webpack@5.92.1) lodash: 4.17.21 transitivePeerDependencies: - '@glint/template' - supports-color dev: true - /ember-eslint-parser@0.4.3(@babel/core@7.24.7)(eslint@8.57.0): + /ember-eslint-parser@0.4.3(@babel/core@7.24.7)(@typescript-eslint/parser@7.16.0)(eslint@8.57.0): resolution: {integrity: sha512-wMPoaaA+i/F/tPPxURRON9XXJH5MRUOZ5x/9CVJTSpL+0n4EWphyztb20gR+ZJeShnOACQpAdFy6YSS1/JSHKw==} engines: {node: '>=16.0.0'} peerDependencies: @@ -6508,6 +6769,7 @@ packages: '@babel/core': 7.24.7 '@babel/eslint-parser': 7.23.10(@babel/core@7.24.7)(eslint@8.57.0) '@glimmer/syntax': 0.92.0 + '@typescript-eslint/parser': 7.16.0(eslint@8.57.0)(typescript@5.5.3) content-tag: 1.2.2 eslint-scope: 7.2.2 html-tags: 3.3.1 @@ -6561,7 +6823,7 @@ packages: decorator-transforms: 2.0.0(@babel/core@7.24.7) ember-cli-normalize-entity-name: 1.0.0 ember-cli-string-utils: 1.1.0 - ember-source: 5.10.0(@glimmer/component@1.1.2)(rsvp@4.8.5)(webpack@5.92.1) + ember-source: 5.10.0(@glimmer/component@1.1.2)(@glint/template@1.4.0)(rsvp@4.8.5)(webpack@5.92.1) transitivePeerDependencies: - '@babel/core' - supports-color @@ -6575,23 +6837,23 @@ packages: dependencies: '@embroider/addon-shim': 1.8.9 '@simple-dom/document': 1.4.0 - ember-source: 5.10.0(@glimmer/component@1.1.2)(rsvp@4.8.5)(webpack@5.92.1) + ember-source: 5.10.0(@glimmer/component@1.1.2)(@glint/template@1.4.0)(rsvp@4.8.5)(webpack@5.92.1) transitivePeerDependencies: - supports-color dev: true - /ember-qunit@8.1.0(@ember/test-helpers@3.3.0)(ember-source@5.10.0)(qunit@2.21.0): + /ember-qunit@8.1.0(@ember/test-helpers@3.3.0)(@glint/template@1.4.0)(ember-source@5.10.0)(qunit@2.21.0): resolution: {integrity: sha512-55/xqvVQwhiNcnh/tCzWyvlYzrYqwDY0/cIPyDQbAxGKtkUt9jCfRUGllfyOofC6LX0fL/0fIi+5e9sg1m6vXw==} peerDependencies: '@ember/test-helpers': '>=3.0.3' ember-source: '>=4.0.0' qunit: ^2.13.0 dependencies: - '@ember/test-helpers': 3.3.0(ember-source@5.10.0)(webpack@5.92.1) + '@ember/test-helpers': 3.3.0(@glint/template@1.4.0)(ember-source@5.10.0)(webpack@5.92.1) '@embroider/addon-shim': 1.8.9 - '@embroider/macros': 1.16.5 + '@embroider/macros': 1.16.5(@glint/template@1.4.0) ember-cli-test-loader: 3.1.0 - ember-source: 5.10.0(@glimmer/component@1.1.2)(rsvp@4.8.5)(webpack@5.92.1) + ember-source: 5.10.0(@glimmer/component@1.1.2)(@glint/template@1.4.0)(rsvp@4.8.5)(webpack@5.92.1) qunit: 2.21.0 qunit-theme-ember: 1.0.0 transitivePeerDependencies: @@ -6609,7 +6871,7 @@ packages: optional: true dependencies: ember-cli-babel: 7.26.11 - ember-source: 5.10.0(@glimmer/component@1.1.2)(rsvp@4.8.5)(webpack@5.92.1) + ember-source: 5.10.0(@glimmer/component@1.1.2)(@glint/template@1.4.0)(rsvp@4.8.5)(webpack@5.92.1) transitivePeerDependencies: - supports-color dev: true @@ -6638,7 +6900,7 @@ packages: - encoding dev: true - /ember-source@5.10.0(@glimmer/component@1.1.2)(rsvp@4.8.5)(webpack@5.92.1): + /ember-source@5.10.0(@glimmer/component@1.1.2)(@glint/template@1.4.0)(rsvp@4.8.5)(webpack@5.92.1): resolution: {integrity: sha512-auzkUAPtqYd4oP6ol4JLB1DMwEt7USZVwFKN+HuuvZkZGrDGADXBFJMYv3y9BPNrcW72DdEvvH4gYrxaoRMQLQ==} engines: {node: '>= 16.*'} peerDependencies: @@ -6670,7 +6932,7 @@ packages: broccoli-funnel: 3.0.8 broccoli-merge-trees: 4.2.0 chalk: 4.1.2 - ember-auto-import: 2.7.4(webpack@5.92.1) + ember-auto-import: 2.7.4(@glint/template@1.4.0)(webpack@5.92.1) ember-cli-babel: 8.2.0(@babel/core@7.24.7) ember-cli-get-component-path-option: 1.0.0 ember-cli-is-package-missing: 1.0.0 @@ -6800,15 +7062,6 @@ packages: - supports-color dev: true - /ember-welcome-page@7.0.2: - resolution: {integrity: sha512-TyaKxFIRXhODW5BTbqD/by0Gu8Z9B9AA1ki3Bzzm6fOj2b30Qlprtt+XUG52kS0zVNmxYj/WWoT0TsKiU61VOw==} - engines: {node: 14.* || 16.* || >= 18} - dependencies: - '@embroider/addon-shim': 1.8.9 - transitivePeerDependencies: - - supports-color - dev: true - /emoji-regex@10.3.0: resolution: {integrity: sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==} dev: true @@ -7075,7 +7328,7 @@ packages: - supports-color dev: true - /eslint-module-utils@2.8.1(eslint-import-resolver-node@0.3.9)(eslint@8.57.0): + /eslint-module-utils@2.8.1(@typescript-eslint/parser@7.16.0)(eslint-import-resolver-node@0.3.9)(eslint@8.57.0): resolution: {integrity: sha512-rXDXR3h7cs7dy9RNpUlQf80nX31XWJEyGq1tRMo+6GsO5VmTe4UTwtmonAD4ZkAsrfMVDA2wlGJ3790Ys+D49Q==} engines: {node: '>=4'} peerDependencies: @@ -7096,6 +7349,7 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: + '@typescript-eslint/parser': 7.16.0(eslint@8.57.0)(typescript@5.5.3) debug: 3.2.7 eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 @@ -7103,7 +7357,7 @@ packages: - supports-color dev: true - /eslint-plugin-ember@12.1.1(@babel/core@7.24.7)(eslint@8.57.0): + /eslint-plugin-ember@12.1.1(@babel/core@7.24.7)(@typescript-eslint/parser@7.16.0)(eslint@8.57.0): resolution: {integrity: sha512-95YWz2nVWtFHwrNlW8kpBivudieTHkiW3vlG3X1P24IpQLigVtPe14LDcZ/vPtEV92Ccao4xcKPKWWOeG0hSNQ==} engines: {node: 18.* || 20.* || >= 21} peerDependencies: @@ -7114,8 +7368,9 @@ packages: optional: true dependencies: '@ember-data/rfc395-data': 0.0.4 + '@typescript-eslint/parser': 7.16.0(eslint@8.57.0)(typescript@5.5.3) css-tree: 2.3.1 - ember-eslint-parser: 0.4.3(@babel/core@7.24.7)(eslint@8.57.0) + ember-eslint-parser: 0.4.3(@babel/core@7.24.7)(@typescript-eslint/parser@7.16.0)(eslint@8.57.0) ember-rfc176-data: 0.3.18 eslint: 8.57.0 eslint-utils: 3.0.0(eslint@8.57.0) @@ -7140,7 +7395,7 @@ packages: eslint-compat-utils: 0.5.1(eslint@8.57.0) dev: true - /eslint-plugin-import@2.29.1(eslint@8.57.0): + /eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.16.0)(eslint@8.57.0): resolution: {integrity: sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==} engines: {node: '>=4'} peerDependencies: @@ -7150,6 +7405,7 @@ packages: '@typescript-eslint/parser': optional: true dependencies: + '@typescript-eslint/parser': 7.16.0(eslint@8.57.0)(typescript@5.5.3) array-includes: 3.1.8 array.prototype.findlastindex: 1.2.5 array.prototype.flat: 1.3.2 @@ -7158,7 +7414,7 @@ packages: doctrine: 2.1.0 eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.1(eslint-import-resolver-node@0.3.9)(eslint@8.57.0) + eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.16.0)(eslint-import-resolver-node@0.3.9)(eslint@8.57.0) hasown: 2.0.2 is-core-module: 2.14.0 is-glob: 4.0.3 @@ -13033,7 +13289,7 @@ packages: peerDependencies: stylelint: ^15.10.0 dependencies: - stylelint: 15.11.0 + stylelint: 15.11.0(typescript@5.5.3) dev: true /stylelint-config-standard@34.0.0(stylelint@15.11.0): @@ -13042,7 +13298,7 @@ packages: peerDependencies: stylelint: ^15.10.0 dependencies: - stylelint: 15.11.0 + stylelint: 15.11.0(typescript@5.5.3) stylelint-config-recommended: 13.0.0(stylelint@15.11.0) dev: true @@ -13055,10 +13311,10 @@ packages: dependencies: prettier: 3.3.2 prettier-linter-helpers: 1.0.0 - stylelint: 15.11.0 + stylelint: 15.11.0(typescript@5.5.3) dev: true - /stylelint@15.11.0: + /stylelint@15.11.0(typescript@5.5.3): resolution: {integrity: sha512-78O4c6IswZ9TzpcIiQJIN49K3qNoXTM8zEJzhaTE/xRTCZswaovSEVIa/uwbOltZrk16X4jAxjaOhzz/hTm1Kw==} engines: {node: ^14.13.1 || >=16.0.0} hasBin: true @@ -13069,7 +13325,7 @@ packages: '@csstools/selector-specificity': 3.1.1(postcss-selector-parser@6.1.0) balanced-match: 2.0.0 colord: 2.9.3 - cosmiconfig: 8.3.6 + cosmiconfig: 8.3.6(typescript@5.5.3) css-functions-list: 3.2.2 css-tree: 2.3.1 debug: 4.3.5 @@ -13561,6 +13817,15 @@ packages: engines: {node: '>=12'} dev: true + /ts-api-utils@1.3.0(typescript@5.5.3): + resolution: {integrity: sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==} + engines: {node: '>=16'} + peerDependencies: + typescript: '>=4.2.0' + dependencies: + typescript: 5.5.3 + dev: true + /tsconfig-paths@3.15.0: resolution: {integrity: sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==} dependencies: @@ -13667,6 +13932,12 @@ packages: /typescript-memoize@1.1.1: resolution: {integrity: sha512-GQ90TcKpIH4XxYTI2F98yEQYZgjNMOGPpOgdjIBhaLaWji5HPWlRnZ4AeA1hfBxtY7bCGDJsqDDHk/KaHOl5bA==} + /typescript@5.5.3: + resolution: {integrity: sha512-/hreyEujaB0w76zKo6717l3L0o/qEUtRgdvUBvlkhoWeOVMjMuHNHk0BRBzikzuGDqNmPQbg5ifMEqsHLiIUcQ==} + engines: {node: '>=14.17'} + hasBin: true + dev: true + /uc.micro@1.0.6: resolution: {integrity: sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==} dev: true @@ -13931,6 +14202,37 @@ packages: engines: {node: '>= 0.8'} dev: true + /vscode-jsonrpc@8.1.0: + resolution: {integrity: sha512-6TDy/abTQk+zDGYazgbIPc+4JoXdwC8NHU9Pbn4UJP1fehUyZmM4RHp5IthX7A6L5KS30PRui+j+tbbMMMafdw==} + engines: {node: '>=14.0.0'} + dev: true + + /vscode-languageserver-protocol@3.17.3: + resolution: {integrity: sha512-924/h0AqsMtA5yK22GgMtCYiMdCOtWTSGgUOkgEDX+wk2b0x4sAfLiO4NxBxqbiVtz7K7/1/RgVrVI0NClZwqA==} + dependencies: + vscode-jsonrpc: 8.1.0 + vscode-languageserver-types: 3.17.3 + dev: true + + /vscode-languageserver-textdocument@1.0.11: + resolution: {integrity: sha512-X+8T3GoiwTVlJbicx/sIAF+yuJAqz8VvwJyoMVhwEMoEKE/fkDmrqUgDMyBECcM2A2frVZIUj5HI/ErRXCfOeA==} + dev: true + + /vscode-languageserver-types@3.17.3: + resolution: {integrity: sha512-SYU4z1dL0PyIMd4Vj8YOqFvHu7Hz/enbWtpfnVbJHU4Nd1YNYx8u0ennumc6h48GQNeOLxmwySmnADouT/AuZA==} + dev: true + + /vscode-languageserver@8.1.0: + resolution: {integrity: sha512-eUt8f1z2N2IEUDBsKaNapkz7jl5QpskN2Y0G01T/ItMxBxw1fJwvtySGB9QMecatne8jFIWJGWI61dWjyTLQsw==} + hasBin: true + dependencies: + vscode-languageserver-protocol: 3.17.3 + dev: true + + /vscode-uri@3.0.8: + resolution: {integrity: sha512-AyFQ0EVmsOZOlAnxoFOGOq1SQDWAB7C6aqMGS23svWAllfOaxbuFvcT8D1i8z3Gyn8fraVeZNNmN6e9bxxXkKw==} + dev: true + /w3c-hr-time@1.0.2: resolution: {integrity: sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==} deprecated: Use your platform's native performance.now() and performance.timeOrigin. diff --git a/test-app/.ember-cli b/test-app/.ember-cli index 465c405..4defd28 100644 --- a/test-app/.ember-cli +++ b/test-app/.ember-cli @@ -3,5 +3,5 @@ Setting `isTypeScriptProject` to true will force the blueprint generators to generate TypeScript rather than JavaScript by default, when a TypeScript version of a given blueprint is available. */ - "isTypeScriptProject": false + "isTypeScriptProject": true } diff --git a/test-app/.eslintrc.js b/test-app/.eslintrc.js index 0c355be..032d0ba 100644 --- a/test-app/.eslintrc.js +++ b/test-app/.eslintrc.js @@ -2,18 +2,11 @@ module.exports = { root: true, - parser: '@babel/eslint-parser', + parser: '@typescript-eslint/parser', parserOptions: { ecmaVersion: 'latest', - sourceType: 'module', - requireConfigFile: false, - babelOptions: { - plugins: [ - ['@babel/plugin-proposal-decorators', { decoratorsBeforeExport: true }], - ], - }, }, - plugins: ['ember'], + plugins: ['ember', '@typescript-eslint'], extends: [ 'eslint:recommended', 'plugin:ember/recommended', @@ -24,6 +17,15 @@ module.exports = { }, rules: {}, overrides: [ + // ts files + { + files: ['**/*.ts'], + extends: [ + 'plugin:@typescript-eslint/eslint-recommended', + 'plugin:@typescript-eslint/recommended', + ], + rules: {}, + }, // node files { files: [ @@ -38,9 +40,6 @@ module.exports = { './lib/*/index.js', './server/**/*.js', ], - parserOptions: { - sourceType: 'script', - }, env: { browser: false, node: true, diff --git a/test-app/app/app.js b/test-app/app/app.ts similarity index 100% rename from test-app/app/app.js rename to test-app/app/app.ts diff --git a/test-app/app/config/environment.d.ts b/test-app/app/config/environment.d.ts new file mode 100644 index 0000000..a1d67fd --- /dev/null +++ b/test-app/app/config/environment.d.ts @@ -0,0 +1,14 @@ +/** + * Type declarations for + * import config from 'test-app/config/environment' + */ +declare const config: { + environment: string; + modulePrefix: string; + podModulePrefix: string; + locationType: 'history' | 'hash' | 'none'; + rootURL: string; + APP: Record; +}; + +export default config; diff --git a/test-app/app/router.js b/test-app/app/router.ts similarity index 77% rename from test-app/app/router.js rename to test-app/app/router.ts index 38a0b80..c4a2c0c 100644 --- a/test-app/app/router.js +++ b/test-app/app/router.ts @@ -6,4 +6,6 @@ export default class Router extends EmberRouter { rootURL = config.rootURL; } -Router.map(function () {}); +Router.map(function () { + // Add route declarations here +}); diff --git a/test-app/app/templates/application.hbs b/test-app/app/templates/application.hbs index 0eacef7..1dc4a0d 100644 --- a/test-app/app/templates/application.hbs +++ b/test-app/app/templates/application.hbs @@ -1,7 +1,5 @@ {{page-title "TestApp"}} -{{! The following component displays Ember's default welcome message. }} - -{{! Feel free to remove this! }} +

Welcome to Ember

{{outlet}} \ No newline at end of file diff --git a/test-app/config/ember-cli-update.json b/test-app/config/ember-cli-update.json index 8f93a4d..878be69 100644 --- a/test-app/config/ember-cli-update.json +++ b/test-app/config/ember-cli-update.json @@ -11,7 +11,10 @@ "codemodsSource": "ember-app-codemods-manifest@1", "isBaseBlueprint": true, "options": [ - "--pnpm" + "--no-welcome", + "--pnpm", + "--ci-provider=github", + "--typescript" ] } ] diff --git a/test-app/ember-cli-build.js b/test-app/ember-cli-build.js index 8cbfa84..163859f 100644 --- a/test-app/ember-cli-build.js +++ b/test-app/ember-cli-build.js @@ -4,7 +4,7 @@ const EmberApp = require('ember-cli/lib/broccoli/ember-app'); module.exports = function (defaults) { const app = new EmberApp(defaults, { - // Add options here + 'ember-cli-babel': { enableTypeScriptTransform: true }, autoImport: { forbidEval: true, watchDependencies: ['ember-lazy-mount'], diff --git a/test-app/package.json b/test-app/package.json index 2c32139..cff57a3 100644 --- a/test-app/package.json +++ b/test-app/package.json @@ -20,19 +20,24 @@ "lint:hbs:fix": "ember-template-lint . --fix", "lint:js": "eslint . --cache", "lint:js:fix": "eslint . --fix", + "lint:types": "tsc --noEmit", "start": "ember serve", "test": "ember test" }, "devDependencies": { "@babel/core": "^7.24.7", - "@babel/eslint-parser": "^7.24.7", - "@babel/plugin-proposal-decorators": "^7.24.7", "@ember/optional-features": "^2.1.0", "@ember/string": "^3.1.1", "@ember/test-helpers": "^3.3.0", "@embroider/test-setup": "^4.0.0", "@glimmer/component": "^1.1.2", "@glimmer/tracking": "^1.1.2", + "@glint/environment-ember-loose": "^1.4.0", + "@glint/template": "^1.4.0", + "@tsconfig/ember": "^3.0.8", + "@types/qunit": "^2.19.10", + "@typescript-eslint/eslint-plugin": "^7.16.0", + "@typescript-eslint/parser": "^7.16.0", "broccoli-asset-rev": "^3.0.0", "concurrently": "^8.2.2", "ember-auto-import": "^2.7.4", @@ -57,7 +62,6 @@ "ember-source-channel-url": "^3.0.0", "ember-template-lint": "^6.0.0", "ember-try": "^3.0.0", - "ember-welcome-page": "^7.0.2", "eslint": "^8.57.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-ember": "^12.1.1", @@ -75,10 +79,11 @@ "test-engine1": "workspace:*", "test-engine2": "workspace:*", "tracked-built-ins": "^3.3.0", + "typescript": "^5.5.3", "webpack": "^5.92.1" }, "engines": { - "node": ">= 10" + "node": ">= 18" }, "ember": { "edition": "octane" diff --git a/test-app/tests/helpers/index.js b/test-app/tests/helpers/index.ts similarity index 81% rename from test-app/tests/helpers/index.js rename to test-app/tests/helpers/index.ts index ab04c16..e190f56 100644 --- a/test-app/tests/helpers/index.js +++ b/test-app/tests/helpers/index.ts @@ -2,13 +2,14 @@ import { setupApplicationTest as upstreamSetupApplicationTest, setupRenderingTest as upstreamSetupRenderingTest, setupTest as upstreamSetupTest, + type SetupTestOptions, } from 'ember-qunit'; // This file exists to provide wrappers around ember-qunit's // test setup functions. This way, you can easily extend the setup that is // needed per test type. -function setupApplicationTest(hooks, options) { +function setupApplicationTest(hooks: NestedHooks, options?: SetupTestOptions) { upstreamSetupApplicationTest(hooks, options); // Additional setup for application tests can be done here. @@ -27,13 +28,13 @@ function setupApplicationTest(hooks, options) { // setupMirage(hooks); // ember-cli-mirage } -function setupRenderingTest(hooks, options) { +function setupRenderingTest(hooks: NestedHooks, options?: SetupTestOptions) { upstreamSetupRenderingTest(hooks, options); // Additional setup for rendering tests can be done here. } -function setupTest(hooks, options) { +function setupTest(hooks: NestedHooks, options?: SetupTestOptions) { upstreamSetupTest(hooks, options); // Additional setup for unit tests can be done here. diff --git a/test-app/tests/test-helper.js b/test-app/tests/test-helper.ts similarity index 100% rename from test-app/tests/test-helper.js rename to test-app/tests/test-helper.ts diff --git a/test-app/tsconfig.json b/test-app/tsconfig.json new file mode 100644 index 0000000..6e6f1f7 --- /dev/null +++ b/test-app/tsconfig.json @@ -0,0 +1,14 @@ +{ + "extends": "@tsconfig/ember/tsconfig.json", + "compilerOptions": { + // The combination of `baseUrl` with `paths` allows Ember's classic package + // layout, which is not resolvable with the Node resolution algorithm, to + // work with TypeScript. + "baseUrl": ".", + "paths": { + "test-app/tests/*": ["tests/*"], + "test-app/*": ["app/*"], + "*": ["types/*"] + } + } +} diff --git a/test-app/types/global.d.ts b/test-app/types/global.d.ts new file mode 100644 index 0000000..066b479 --- /dev/null +++ b/test-app/types/global.d.ts @@ -0,0 +1,4 @@ +import 'ember-source/types'; +import 'ember-source/types/preview'; + +import '@glint/environment-ember-loose';