diff --git a/.gitignore b/.gitignore index ec933ae1..3671a941 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ # compiled output dist/ .pnpm-store/ +declarations/ # dependencies node_modules/ diff --git a/ember-autofocus-modifier/.eslintignore b/ember-autofocus-modifier/.eslintignore index e69140be..4e982747 100644 --- a/ember-autofocus-modifier/.eslintignore +++ b/ember-autofocus-modifier/.eslintignore @@ -3,6 +3,7 @@ # compiled output /dist/ +/declarations/ # misc /coverage/ diff --git a/ember-autofocus-modifier/.eslintrc.cjs b/ember-autofocus-modifier/.eslintrc.cjs index 8df4063a..c71fc919 100644 --- a/ember-autofocus-modifier/.eslintrc.cjs +++ b/ember-autofocus-modifier/.eslintrc.cjs @@ -1,11 +1,11 @@ -'use strict'; +"use strict"; module.exports = { root: true, - parser: '@babel/eslint-parser', + parser: "@typescript-eslint/parser", parserOptions: { - ecmaVersion: 'latest', - sourceType: 'module', + ecmaVersion: "latest", + sourceType: "module", ecmaFeatures: { legacyDecorators: true, }, @@ -13,11 +13,11 @@ module.exports = { root: __dirname, }, }, - plugins: ['ember'], + plugins: ["ember"], extends: [ - 'eslint:recommended', - 'plugin:ember/recommended', - 'plugin:prettier/recommended', + "eslint:recommended", + "plugin:ember/recommended", + "plugin:prettier/recommended", ], env: { browser: true, @@ -27,20 +27,98 @@ module.exports = { // node files { files: [ - './.eslintrc.js', - './.prettierrc.js', - './.template-lintrc.js', - './addon-main.js', + "./.eslintrc.js", + "./.prettierrc.js", + "./.template-lintrc.js", + "./addon-main.js", ], parserOptions: { - sourceType: 'script', + sourceType: "script", }, env: { browser: false, node: true, }, - plugins: ['node'], - extends: ['plugin:node/recommended'], + plugins: ["node"], + extends: ["plugin:node/recommended"], + }, + // ts files + { + files: ["**/*.ts"], + extends: [ + "plugin:@typescript-eslint/eslint-recommended", + "plugin:@typescript-eslint/recommended", + ], + rules: { + // https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/src/configs/recommended.ts + "@typescript-eslint/no-explicit-any": "error", + "@typescript-eslint/no-non-null-assertion": "error", + "@typescript-eslint/no-unused-vars": "error", + // https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/src/configs/strict.ts + "@typescript-eslint/array-type": [ + "error", + { + default: "array", + readonly: "array", + }, + ], + "@typescript-eslint/ban-tslint-comment": "error", + "@typescript-eslint/class-literal-property-style": "error", + "@typescript-eslint/consistent-generic-constructors": "error", + "@typescript-eslint/consistent-indexed-object-style": "error", + "@typescript-eslint/consistent-type-assertions": "error", + "@typescript-eslint/consistent-type-definitions": "error", + "@typescript-eslint/consistent-type-imports": "error", + "@typescript-eslint/explicit-function-return-type": "error", + "@typescript-eslint/explicit-member-accessibility": [ + "error", + { + accessibility: "no-public", + }, + ], + "no-restricted-syntax": [ + "error", + { + selector: + ':matches(PropertyDefinition, MethodDefinition)[accessibility="private"]', + message: "Use #private instead", + }, + { + selector: + ':matches(PropertyDefinition, MethodDefinition)[accessibility="protected"]', + message: "Use #private instead", + }, + ], + "@typescript-eslint/explicit-module-boundary-types": "error", + "@typescript-eslint/member-delimiter-style": "error", + "@typescript-eslint/member-ordering": "error", + "@typescript-eslint/method-signature-style": "error", + "@typescript-eslint/no-confusing-non-null-assertion": "error", + "@typescript-eslint/no-duplicate-enum-values": "error", + "@typescript-eslint/no-dynamic-delete": "error", + "@typescript-eslint/no-extraneous-class": "error", + "@typescript-eslint/no-import-type-side-effects": "error", + "@typescript-eslint/no-invalid-void-type": "error", + "@typescript-eslint/no-non-null-asserted-nullish-coalescing": "error", + "@typescript-eslint/no-require-imports": "error", + "@typescript-eslint/no-type-alias": [ + "error", + { + allowGenerics: "always", + }, + ], + "@typescript-eslint/no-unsafe-declaration-merging": "error", + "@typescript-eslint/parameter-properties": "error", + "@typescript-eslint/prefer-enum-initializers": "error", + "@typescript-eslint/prefer-for-of": "error", + "@typescript-eslint/prefer-function-type": "error", + "@typescript-eslint/prefer-literal-enum-member": "error", + "@typescript-eslint/prefer-ts-expect-error": "error", + "@typescript-eslint/sort-type-constituents": "error", + "@typescript-eslint/type-annotation-spacing": "error", + "@typescript-eslint/typedef": "error", + "@typescript-eslint/unified-signatures": "error", + }, }, ], }; diff --git a/ember-autofocus-modifier/.prettierignore b/ember-autofocus-modifier/.prettierignore index 4178fd57..2d1b8715 100644 --- a/ember-autofocus-modifier/.prettierignore +++ b/ember-autofocus-modifier/.prettierignore @@ -4,6 +4,7 @@ # compiled output /dist/ +/declarations/ /tmp/ # dependencies diff --git a/ember-autofocus-modifier/babel.config.json b/ember-autofocus-modifier/babel.config.json index cfcf8a3c..739f8261 100644 --- a/ember-autofocus-modifier/babel.config.json +++ b/ember-autofocus-modifier/babel.config.json @@ -1,4 +1,5 @@ { + "presets": [["@babel/preset-typescript"]], "plugins": [ "@embroider/addon-dev/template-colocation-plugin", ["@babel/plugin-proposal-decorators", { "legacy": true }], diff --git a/ember-autofocus-modifier/package.json b/ember-autofocus-modifier/package.json index 33706bf4..cc3d4008 100644 --- a/ember-autofocus-modifier/package.json +++ b/ember-autofocus-modifier/package.json @@ -13,17 +13,23 @@ "author": "", "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:types": "glint", "lint:hbs:fix": "ember-template-lint . --fix --no-error-on-unmatched-pattern", "lint:js:fix": "eslint . --fix", - "start": "rollup --config --watch", + "start": "concurrently 'pnpm:start:*'", + "start:js": "rollup --config --watch --no-watch.clearScreen", + "start:types": "glint -d --watch", "test": "echo 'A v2 addon does not have tests, run tests in test-app'", "prepack": "rollup --config", "prepare": "rollup --config", @@ -39,8 +45,16 @@ "@babel/plugin-proposal-class-properties": "^7.18.6", "@babel/plugin-proposal-decorators": "^7.23.0", "@babel/plugin-syntax-decorators": "^7.17.0", + "@babel/preset-typescript": "^7.23.0", "@embroider/addon-dev": "^4.1.0", + "@glimmer/component": "^1.1.2", + "@glint/core": "^1.2.0", + "@glint/environment-ember-loose": "^1.2.0", + "@glint/template": "^1.2.0", "@rollup/plugin-babel": "^6.0.3", + "@tsconfig/ember": "^3.0.1", + "@typescript-eslint/eslint-plugin": "^6.5.0", + "@typescript-eslint/parser": "^6.5.0", "concurrently": "^8.2.1", "ember-template-lint": "^5.11.2", "eslint": "^8.49.0", @@ -51,7 +65,8 @@ "prettier": "^3.0.3", "release-it": "^15.11.0", "rollup": "^2.67.0", - "rollup-plugin-copy": "^3.5.0" + "rollup-plugin-copy": "^3.5.0", + "typescript": "^5.2.2" }, "peerDependencies": { "ember-source": "^3.28.0 || ^4.0.0" @@ -71,8 +86,21 @@ } }, "exports": { - ".": "./dist/index.js", - "./*": "./dist/*.js", + ".": { + "types": "./declarations/index.d.ts", + "default": "./dist/index.js" + }, + "./*": { + "types": "./declarations/*.d.ts", + "default": "./dist/*.js" + }, "./addon-main.js": "./addon-main.cjs" + }, + "typesVersions": { + "*": { + "*": [ + "declarations/*" + ] + } } } diff --git a/ember-autofocus-modifier/rollup.config.mjs b/ember-autofocus-modifier/rollup.config.mjs index 278a83c3..d63bb801 100644 --- a/ember-autofocus-modifier/rollup.config.mjs +++ b/ember-autofocus-modifier/rollup.config.mjs @@ -1,12 +1,15 @@ -import { babel } from '@rollup/plugin-babel'; -import copy from 'rollup-plugin-copy'; -import { Addon } from '@embroider/addon-dev/rollup'; +import { babel } from "@rollup/plugin-babel"; +import copy from "rollup-plugin-copy"; +import { Addon } from "@embroider/addon-dev/rollup"; const addon = new Addon({ - srcDir: 'src', - destDir: 'dist', + srcDir: "src", + destDir: "dist", }); +// Add extensions here, such as ts, gjs, etc that you may import +const extensions = [".js", ".ts"]; + export default { // This provides defaults that work well alongside `publicEntrypoints` below. // You can augment this if you need to. @@ -15,12 +18,12 @@ export default { plugins: [ // These are the modules that users should be able to import from your // addon. Anything not listed here may get optimized away. - addon.publicEntrypoints(["index.js", "**/*.js"]), + addon.publicEntrypoints(["modifiers/**/*.js"]), // These are the modules that should get reexported into the traditional // "app" tree. Things in here should also be in publicEntrypoints above, but // not everything in publicEntrypoints necessarily needs to go here. - addon.appReexports(['components/**/*.js', "modifiers/**/*.js"]), + addon.appReexports(["modifiers/**/*.js"]), // Follow the V2 Addon rules about dependencies. Your code can import from // `dependencies` and `peerDependencies` as well as standard Ember-provided @@ -34,7 +37,8 @@ export default { // By default, this will load the actual babel config from the file // babel.config.json. babel({ - babelHelpers: 'bundled', + extensions, + babelHelpers: "bundled", }), // Ensure that standalone .hbs files are properly integrated as Javascript. @@ -42,7 +46,7 @@ export default { // addons are allowed to contain imports of .css files, which we want rollup // to leave alone and keep in the published output. - addon.keepAssets(['**/*.css']), + addon.keepAssets(["**/*.css"]), // Remove leftover build artifacts when starting a new build. addon.clean(), @@ -50,9 +54,9 @@ export default { // Copy Readme and License into published package copy({ targets: [ - { src: '../README.md', dest: '.' }, - { src: '../LICENSE.md', dest: '.' }, - { src: '../CHANGELOG.md', dest: '.' }, + { src: "../README.md", dest: "." }, + { src: "../LICENSE.md", dest: "." }, + { src: "../CHANGELOG.md", dest: "." }, ], }), ], diff --git a/ember-autofocus-modifier/src/unpublished-development-types/index.d.ts b/ember-autofocus-modifier/src/unpublished-development-types/index.d.ts new file mode 100644 index 00000000..a88af7e2 --- /dev/null +++ b/ember-autofocus-modifier/src/unpublished-development-types/index.d.ts @@ -0,0 +1,10 @@ +import "@glint/environment-ember-loose"; +import "ember-source/types"; +import "ember-source/types/preview"; + +declare module "@glint/environment-ember-loose/registry" { + 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/ember-autofocus-modifier/tsconfig.json b/ember-autofocus-modifier/tsconfig.json new file mode 100644 index 00000000..fa7eb7fe --- /dev/null +++ b/ember-autofocus-modifier/tsconfig.json @@ -0,0 +1,12 @@ +{ + "extends": "@tsconfig/ember/tsconfig.json", + "include": ["src/**/*", "unpublished-development-types/**/*"], + "glint": { + "environment": "ember-loose" + }, + "compilerOptions": { + "allowJs": true, + "declarationDir": "declarations", + "skipLibCheck": true + } +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cf8617d5..64764368 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -34,7 +34,7 @@ importers: version: 4.1.0(ember-source@4.12.0) ember-source: specifier: ^3.28.0 || ^4.0.0 - version: 4.12.0(@babel/core@7.23.0)(@glimmer/component@1.1.2)(webpack@5.88.2) + version: 4.12.0(@babel/core@7.23.0)(@glimmer/component@1.1.2)(@glint/template@1.2.0)(webpack@5.88.2) devDependencies: '@babel/core': specifier: ^7.23.0 @@ -51,12 +51,36 @@ importers: '@babel/plugin-syntax-decorators': specifier: ^7.17.0 version: 7.17.0(@babel/core@7.23.0) + '@babel/preset-typescript': + specifier: ^7.23.0 + version: 7.23.0(@babel/core@7.23.0) '@embroider/addon-dev': specifier: ^4.1.0 - version: 4.1.0(rollup@2.67.0) + version: 4.1.0(@glint/template@1.2.0)(rollup@2.67.0) + '@glimmer/component': + specifier: ^1.1.2 + version: 1.1.2(@babel/core@7.23.0) + '@glint/core': + specifier: ^1.2.0 + version: 1.2.0(typescript@5.2.2) + '@glint/environment-ember-loose': + specifier: ^1.2.0 + version: 1.2.0(@glimmer/component@1.1.2)(@glint/template@1.2.0)(ember-modifier@4.1.0) + '@glint/template': + specifier: ^1.2.0 + version: 1.2.0 '@rollup/plugin-babel': specifier: ^6.0.3 version: 6.0.3(@babel/core@7.23.0)(rollup@2.67.0) + '@tsconfig/ember': + specifier: ^3.0.1 + version: 3.0.1 + '@typescript-eslint/eslint-plugin': + specifier: ^6.5.0 + version: 6.5.0(@typescript-eslint/parser@6.5.0)(eslint@8.49.0)(typescript@5.2.2) + '@typescript-eslint/parser': + specifier: ^6.5.0 + version: 6.5.0(eslint@8.49.0)(typescript@5.2.2) concurrently: specifier: ^8.2.1 version: 8.2.1 @@ -90,6 +114,9 @@ importers: rollup-plugin-copy: specifier: ^3.5.0 version: 3.5.0 + typescript: + specifier: ^5.2.2 + version: 5.2.2 test-app: dependencies: @@ -108,10 +135,10 @@ importers: version: 3.1.1 '@ember/test-helpers': specifier: 2.9.3 - version: 2.9.3(@babel/core@7.23.0)(ember-source@4.12.0) + version: 2.9.3(@babel/core@7.23.0)(@glint/environment-ember-loose@1.2.0)(@glint/template@1.2.0)(ember-source@4.12.0) '@embroider/macros': specifier: 1.13.0 - version: 1.13.0 + version: 1.13.0(@glint/template@1.2.0) '@embroider/test-setup': specifier: 3.0.1 version: 3.0.1 @@ -121,6 +148,27 @@ importers: '@glimmer/tracking': specifier: ^1.1.2 version: 1.1.2 + '@glint/core': + specifier: ^1.2.0 + version: 1.2.0(typescript@5.2.2) + '@glint/environment-ember-loose': + specifier: ^1.2.0 + version: 1.2.0(@glimmer/component@1.1.2)(@glint/template@1.2.0)(ember-cli-htmlbars@6.3.0) + '@glint/template': + specifier: ^1.2.0 + version: 1.2.0 + '@tsconfig/ember': + specifier: ^3.0.1 + version: 3.0.1 + '@types/qunit': + specifier: ^2.19.6 + version: 2.19.6 + '@typescript-eslint/eslint-plugin': + specifier: ^6.5.0 + version: 6.5.0(@typescript-eslint/parser@6.5.0)(eslint@8.49.0)(typescript@5.2.2) + '@typescript-eslint/parser': + specifier: ^6.5.0 + version: 6.5.0(eslint@8.49.0)(typescript@5.2.2) broccoli-asset-rev: specifier: 3.0.0 version: 3.0.0 @@ -129,7 +177,7 @@ importers: version: 8.2.1 ember-auto-import: specifier: 2.6.3 - version: 2.6.3(webpack@5.88.2) + version: 2.6.3(@glint/template@1.2.0)(webpack@5.88.2) ember-cli: specifier: 4.12.2 version: 4.12.2 @@ -154,6 +202,9 @@ importers: ember-cli-terser: specifier: 4.0.2 version: 4.0.2 + ember-cli-typescript: + specifier: ^5.2.1 + version: 5.2.1 ember-disable-prototype-extensions: specifier: ^1.1.3 version: 1.1.3 @@ -171,13 +222,13 @@ importers: version: 8.0.0 ember-qunit: specifier: 8.0.1 - version: 8.0.1(@ember/test-helpers@2.9.3)(ember-source@4.12.0)(qunit@2.19.4) + version: 8.0.1(@ember/test-helpers@2.9.3)(@glint/template@1.2.0)(ember-source@4.12.0)(qunit@2.19.4) ember-resolver: specifier: 11.0.1 version: 11.0.1(ember-source@4.12.0) ember-source: specifier: 4.12.0 - version: 4.12.0(@babel/core@7.23.0)(@glimmer/component@1.1.2)(webpack@5.88.2) + version: 4.12.0(@babel/core@7.23.0)(@glimmer/component@1.1.2)(@glint/template@1.2.0)(webpack@5.88.2) ember-source-channel-url: specifier: 3.0.0 version: 3.0.0 @@ -229,6 +280,9 @@ importers: release-it: specifier: 15.11.0 version: 15.11.0 + typescript: + specifier: ^5.2.2 + version: 5.2.2 webpack: specifier: 5.88.2 version: 5.88.2 @@ -674,6 +728,16 @@ packages: '@babel/core': 7.23.0 '@babel/helper-plugin-utils': 7.22.5 + /@babel/plugin-syntax-jsx@7.22.5(@babel/core@7.23.0): + resolution: {integrity: sha512-gvyP4hZrgrs/wWMaocvxZ44Hw0b3W8Pe+cMxc8V1ULQ07oh8VNbIRaoD1LRZVTvD+0nieDKjfgKg89sD7rrKrg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.23.0 + '@babel/helper-plugin-utils': 7.22.5 + dev: true + /@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.23.0): resolution: {integrity: sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==} peerDependencies: @@ -1398,6 +1462,20 @@ packages: '@babel/types': 7.23.0 esutils: 2.0.3 + /@babel/preset-typescript@7.23.0(@babel/core@7.23.0): + resolution: {integrity: sha512-6P6VVa/NM/VlAYj5s2Aq/gdVg8FSENCg3wlZ6Qau9AcPaoF5LbN1nyGlR9DTRIw9PpxI94e+ReydsJHcjwAweg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.23.0 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/helper-validator-option': 7.22.15 + '@babel/plugin-syntax-jsx': 7.22.5(@babel/core@7.23.0) + '@babel/plugin-transform-modules-commonjs': 7.23.0(@babel/core@7.23.0) + '@babel/plugin-transform-typescript': 7.22.15(@babel/core@7.23.0) + dev: true + /@babel/regjsgen@0.8.0: resolution: {integrity: sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==} @@ -1490,21 +1568,21 @@ packages: - supports-color dev: true - /@ember/test-helpers@2.9.3(@babel/core@7.23.0)(ember-source@4.12.0): + /@ember/test-helpers@2.9.3(@babel/core@7.23.0)(@glint/environment-ember-loose@1.2.0)(@glint/template@1.2.0)(ember-source@4.12.0): resolution: {integrity: sha512-ejVg4Dj+G/6zyLvQsYOvmGiOLU6AS94tY4ClaO1E2oVvjjtVJIRmVLFN61I+DuyBg9hS3cFoPjQRTZB9MRIbxQ==} engines: {node: 10.* || 12.* || 14.* || 15.* || >= 16.*} peerDependencies: ember-source: '>=3.8.0' dependencies: '@ember/test-waiters': 3.0.2 - '@embroider/macros': 1.13.0 - '@embroider/util': 1.12.0(ember-source@4.12.0) + '@embroider/macros': 1.13.0(@glint/template@1.2.0) + '@embroider/util': 1.12.0(@glint/environment-ember-loose@1.2.0)(@glint/template@1.2.0)(ember-source@4.12.0) broccoli-debug: 0.6.5 broccoli-funnel: 3.0.8 ember-cli-babel: 7.26.11 ember-cli-htmlbars: 6.3.0 ember-destroyable-polyfill: 2.0.3(@babel/core@7.23.0) - ember-source: 4.12.0(@babel/core@7.23.0)(@glimmer/component@1.1.2)(webpack@5.88.2) + ember-source: 4.12.0(@babel/core@7.23.0)(@glimmer/component@1.1.2)(@glint/template@1.2.0)(webpack@5.88.2) transitivePeerDependencies: - '@babel/core' - '@glint/environment-ember-loose' @@ -1524,12 +1602,12 @@ packages: - supports-color dev: true - /@embroider/addon-dev@4.1.0(rollup@2.67.0): + /@embroider/addon-dev@4.1.0(@glint/template@1.2.0)(rollup@2.67.0): resolution: {integrity: sha512-DR9mGlFxcXFIP9jmVbYhy0CwxIzVqMppiIg8at9C+qayr3Wj3SdS7jM95p0kxv3mMgOYs+Z6FsAaj2em6aRs4w==} engines: {node: 12.* || 14.* || >= 16} hasBin: true dependencies: - '@embroider/core': 3.2.1 + '@embroider/core': 3.2.1(@glint/template@1.2.0) '@rollup/pluginutils': 4.2.1 content-tag: 1.1.0 fs-extra: 10.1.0 @@ -1557,14 +1635,14 @@ packages: transitivePeerDependencies: - supports-color - /@embroider/core@3.2.1: + /@embroider/core@3.2.1(@glint/template@1.2.0): resolution: {integrity: sha512-GhKc9pqPcbKpvUkhTnRqJhr3Pc4xslnzhrGQqBDBNwOZ0/zUU02wpiB+PmiA3+mZFTZNQoUCq4A7vm5dXraQug==} engines: {node: 12.* || 14.* || >= 16} dependencies: '@babel/core': 7.23.0 '@babel/parser': 7.23.0 '@babel/traverse': 7.23.0 - '@embroider/macros': 1.13.1 + '@embroider/macros': 1.13.1(@glint/template@1.2.0) '@embroider/shared-internals': 2.4.0 assert-never: 1.2.1 babel-plugin-ember-template-compilation: 2.2.0 @@ -1593,7 +1671,7 @@ packages: - utf-8-validate dev: true - /@embroider/macros@1.13.0: + /@embroider/macros@1.13.0(@glint/template@1.2.0): resolution: {integrity: sha512-V89lvlNPIjcvbuew+FLxcCcgdPO0cZrgHHmX6dHO3TpiweC5G6DN4/QogvdnSprPvWOMQS9u3bSFmR7DBkmSgg==} engines: {node: 12.* || 14.* || >= 16} peerDependencies: @@ -1603,6 +1681,7 @@ packages: optional: true dependencies: '@embroider/shared-internals': 2.3.0 + '@glint/template': 1.2.0 assert-never: 1.2.1 babel-import-util: 2.0.1 ember-cli-babel: 7.26.11 @@ -1613,7 +1692,7 @@ packages: transitivePeerDependencies: - supports-color - /@embroider/macros@1.13.1: + /@embroider/macros@1.13.1(@glint/template@1.2.0): resolution: {integrity: sha512-4htraP/rNIht8uCxXoc59Bw2EsBFfc4YUQD9XSpzJ4xUr1V0GQf9wL/noeSuYSxIhwRfZOErnJhsdyf1hH+I/A==} engines: {node: 12.* || 14.* || >= 16} peerDependencies: @@ -1623,6 +1702,7 @@ packages: optional: true dependencies: '@embroider/shared-internals': 2.4.0 + '@glint/template': 1.2.0 assert-never: 1.2.1 babel-import-util: 2.0.1 ember-cli-babel: 7.26.11 @@ -1685,7 +1765,7 @@ packages: resolve: 1.22.6 dev: true - /@embroider/util@1.12.0(ember-source@4.12.0): + /@embroider/util@1.12.0(@glint/environment-ember-loose@1.2.0)(@glint/template@1.2.0)(ember-source@4.12.0): resolution: {integrity: sha512-P4M1QADEH9ceIYC9mwHeV+6DDgEIQQYFfZi728nVKqTAxakXoiLgu/BCyQmEGyow9fYEPYaC1boDCZxW2JQAXg==} engines: {node: 14.* || >= 16} peerDependencies: @@ -1698,10 +1778,12 @@ packages: '@glint/template': optional: true dependencies: - '@embroider/macros': 1.13.0 + '@embroider/macros': 1.13.0(@glint/template@1.2.0) + '@glint/environment-ember-loose': 1.2.0(@glimmer/component@1.1.2)(@glint/template@1.2.0)(ember-cli-htmlbars@6.3.0) + '@glint/template': 1.2.0 broccoli-funnel: 3.0.8 ember-cli-babel: 7.26.11 - ember-source: 4.12.0(@babel/core@7.23.0)(@glimmer/component@1.1.2)(webpack@5.88.2) + ember-source: 4.12.0(@babel/core@7.23.0)(@glimmer/component@1.1.2)(@glint/template@1.2.0)(webpack@5.88.2) transitivePeerDependencies: - supports-color dev: true @@ -1839,6 +1921,95 @@ packages: transitivePeerDependencies: - '@babel/core' + /@glint/core@1.2.0(typescript@5.2.2): + resolution: {integrity: sha512-dugZ4wSWOubC9O4+pxhX1EgTf7rVi1ZNYsZ66XKEKPY2JGxAtI5dqyjl4BsX8SkbGKKDKeMKIZjcaDsz17VMqw==} + hasBin: true + peerDependencies: + typescript: '>=4.8.0' + dependencies: + '@glimmer/syntax': 0.84.3 + escape-string-regexp: 4.0.0 + semver: 7.5.4 + silent-error: 1.1.1 + typescript: 5.2.2 + uuid: 8.3.2 + vscode-languageserver: 8.1.0 + vscode-languageserver-textdocument: 1.0.11 + vscode-uri: 3.0.7 + yargs: 17.7.2 + transitivePeerDependencies: + - supports-color + dev: true + + /@glint/environment-ember-loose@1.2.0(@glimmer/component@1.1.2)(@glint/template@1.2.0)(ember-cli-htmlbars@6.3.0): + resolution: {integrity: sha512-zj26Gh0cPY8FdT8X+UBUfgXB2Gt7T1RUn9jhlG1O7sZJTCmL8B/UNSZEB4KMAcs/dDv53u/pBl78+JF2B7F+7w==} + peerDependencies: + '@glimmer/component': ^1.1.2 + '@glint/template': ^1.2.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.23.0) + '@glint/template': 1.2.0 + ember-cli-htmlbars: 6.3.0 + dev: true + + /@glint/environment-ember-loose@1.2.0(@glimmer/component@1.1.2)(@glint/template@1.2.0)(ember-modifier@4.1.0): + resolution: {integrity: sha512-zj26Gh0cPY8FdT8X+UBUfgXB2Gt7T1RUn9jhlG1O7sZJTCmL8B/UNSZEB4KMAcs/dDv53u/pBl78+JF2B7F+7w==} + peerDependencies: + '@glimmer/component': ^1.1.2 + '@glint/template': ^1.2.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.23.0) + '@glint/template': 1.2.0 + ember-modifier: 4.1.0(ember-source@4.12.0) + dev: true + + /@glint/template@1.2.0: + resolution: {integrity: sha512-8KsJSLyFQ7lB+ZgJeykoyCs4uw+p2+tMeoOZ1gP7JaoiBhlJOXtGwQv5qt4LGKNX1NjkMkyAYDGVzF1Psgnzhg==} + /@handlebars/parser@2.0.0: resolution: {integrity: sha512-EP9uEDZv/L5Qh9IWuMUGJRfwhXJ4h1dqKTT4/3+tY0eu7sPis7xh23j61SYUnNF4vqCQvvUXpDo9Bh/+q1zASA==} @@ -2223,6 +2394,10 @@ packages: engines: {node: '>= 6'} dev: true + /@tsconfig/ember@3.0.1: + resolution: {integrity: sha512-IBoECN9o9StxTZSy12eNSPdqiH5VzngD5Qx9YQDfteiXk9XyJhnyRQuBoU/MQCVnqau9fJpgKoA8Sy/0qItFXw==} + dev: true + /@types/acorn@4.0.6: resolution: {integrity: sha512-veQTnWP+1D/xbxVrPC3zHnCZRjSrKfhbMUlEA43iMZLu7EsnTtkJklIuwrCPbOi8YkvDQAiW05VQQFvvz9oieQ==} dependencies: @@ -2377,6 +2552,10 @@ packages: resolution: {integrity: sha512-u95svzDlTysU5xecFNTgfFG5RUWu1A9P0VzgpcIiGZA9iraHOdSzcxMxQ55DyeRaGCSxQi7LxXDI4rzq/MYfdg==} dev: true + /@types/qunit@2.19.6: + resolution: {integrity: sha512-bz9STa6EHurtpSfn5cNiScBladlw43bM+7luQA985Kd9YlF4dZaLmKt3c5/oSyN1AWAl50YBpqTq0BxCP64nGg==} + dev: true + /@types/range-parser@1.2.5: resolution: {integrity: sha512-xrO9OoVPqFuYyR/loIHjnbvvyRZREYKLjxV4+dY6v3FQR3stQ9ZxIGkaclF7YhI9hfjpuTbu14hZEy94qKLtOA==} dev: true @@ -2393,6 +2572,10 @@ packages: '@types/glob': 8.1.0 '@types/node': 20.7.1 + /@types/semver@7.5.3: + resolution: {integrity: sha512-OxepLK9EuNEIPxWNME+C6WwbRAOOI2o2BaQEGzz5Lu2e4Z5eDnEo+/aVEDMIXywoJitJ7xWd641wrGLZdtwRyw==} + dev: true + /@types/send@0.17.2: resolution: {integrity: sha512-aAG6yRf6r0wQ29bkS+x97BIs64ZLxeE/ARwyS6wrldMm3C1MdKwCcnnEwMC1slI8wuxJOpiUH9MioC0A0i+GJw==} dependencies: @@ -2415,6 +2598,137 @@ packages: resolution: {integrity: sha512-d0XxK3YTObnWVp6rZuev3c49+j4Lo8g4L1ZRm9z5L0xpoZycUPshHgczK5gsUMaZOstjVYYi09p5gYvUtfChYw==} dev: true + /@typescript-eslint/eslint-plugin@6.5.0(@typescript-eslint/parser@6.5.0)(eslint@8.49.0)(typescript@5.2.2): + resolution: {integrity: sha512-2pktILyjvMaScU6iK3925uvGU87E+N9rh372uGZgiMYwafaw9SXq86U04XPq3UH6tzRvNgBsub6x2DacHc33lw==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + '@typescript-eslint/parser': ^6.0.0 || ^6.0.0-alpha + eslint: ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@eslint-community/regexpp': 4.9.0 + '@typescript-eslint/parser': 6.5.0(eslint@8.49.0)(typescript@5.2.2) + '@typescript-eslint/scope-manager': 6.5.0 + '@typescript-eslint/type-utils': 6.5.0(eslint@8.49.0)(typescript@5.2.2) + '@typescript-eslint/utils': 6.5.0(eslint@8.49.0)(typescript@5.2.2) + '@typescript-eslint/visitor-keys': 6.5.0 + debug: 4.3.4 + eslint: 8.49.0 + graphemer: 1.4.0 + ignore: 5.2.4 + natural-compare: 1.4.0 + semver: 7.5.4 + ts-api-utils: 1.0.3(typescript@5.2.2) + typescript: 5.2.2 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/parser@6.5.0(eslint@8.49.0)(typescript@5.2.2): + resolution: {integrity: sha512-LMAVtR5GN8nY0G0BadkG0XIe4AcNMeyEy3DyhKGAh9k4pLSMBO7rF29JvDBpZGCmp5Pgz5RLHP6eCpSYZJQDuQ==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/scope-manager': 6.5.0 + '@typescript-eslint/types': 6.5.0 + '@typescript-eslint/typescript-estree': 6.5.0(typescript@5.2.2) + '@typescript-eslint/visitor-keys': 6.5.0 + debug: 4.3.4 + eslint: 8.49.0 + typescript: 5.2.2 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/scope-manager@6.5.0: + resolution: {integrity: sha512-A8hZ7OlxURricpycp5kdPTH3XnjG85UpJS6Fn4VzeoH4T388gQJ/PGP4ole5NfKt4WDVhmLaQ/dBLNDC4Xl/Kw==} + engines: {node: ^16.0.0 || >=18.0.0} + dependencies: + '@typescript-eslint/types': 6.5.0 + '@typescript-eslint/visitor-keys': 6.5.0 + dev: true + + /@typescript-eslint/type-utils@6.5.0(eslint@8.49.0)(typescript@5.2.2): + resolution: {integrity: sha512-f7OcZOkRivtujIBQ4yrJNIuwyCQO1OjocVqntl9dgSIZAdKqicj3xFDqDOzHDlGCZX990LqhLQXWRnQvsapq8A==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/typescript-estree': 6.5.0(typescript@5.2.2) + '@typescript-eslint/utils': 6.5.0(eslint@8.49.0)(typescript@5.2.2) + debug: 4.3.4 + eslint: 8.49.0 + ts-api-utils: 1.0.3(typescript@5.2.2) + typescript: 5.2.2 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/types@6.5.0: + resolution: {integrity: sha512-eqLLOEF5/lU8jW3Bw+8auf4lZSbbljHR2saKnYqON12G/WsJrGeeDHWuQePoEf9ro22+JkbPfWQwKEC5WwLQ3w==} + engines: {node: ^16.0.0 || >=18.0.0} + dev: true + + /@typescript-eslint/typescript-estree@6.5.0(typescript@5.2.2): + resolution: {integrity: sha512-q0rGwSe9e5Kk/XzliB9h2LBc9tmXX25G0833r7kffbl5437FPWb2tbpIV9wAATebC/018pGa9fwPDuvGN+LxWQ==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/types': 6.5.0 + '@typescript-eslint/visitor-keys': 6.5.0 + debug: 4.3.4 + globby: 11.1.0 + is-glob: 4.0.3 + semver: 7.5.4 + ts-api-utils: 1.0.3(typescript@5.2.2) + typescript: 5.2.2 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/utils@6.5.0(eslint@8.49.0)(typescript@5.2.2): + resolution: {integrity: sha512-9nqtjkNykFzeVtt9Pj6lyR9WEdd8npPhhIPM992FWVkZuS6tmxHfGVnlUcjpUP2hv8r4w35nT33mlxd+Be1ACQ==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@8.49.0) + '@types/json-schema': 7.0.13 + '@types/semver': 7.5.3 + '@typescript-eslint/scope-manager': 6.5.0 + '@typescript-eslint/types': 6.5.0 + '@typescript-eslint/typescript-estree': 6.5.0(typescript@5.2.2) + eslint: 8.49.0 + semver: 7.5.4 + transitivePeerDependencies: + - supports-color + - typescript + dev: true + + /@typescript-eslint/visitor-keys@6.5.0: + resolution: {integrity: sha512-yCB/2wkbv3hPsh02ZS8dFQnij9VVQXJMN/gbQsaaY+zxALkZnxa/wagvLEFsAWMPv7d7lxQmNsIzGU1w/T/WyA==} + engines: {node: ^16.0.0 || >=18.0.0} + dependencies: + '@typescript-eslint/types': 6.5.0 + eslint-visitor-keys: 3.4.3 + dev: true + /@webassemblyjs/ast@1.11.6: resolution: {integrity: sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q==} dependencies: @@ -5073,7 +5387,7 @@ packages: /electron-to-chromium@1.4.532: resolution: {integrity: sha512-piIR0QFdIGKmOJTSNg5AwxZRNWQSXlRYycqDB9Srstx4lip8KpcmRxVP6zuFWExWziHYZpJ0acX7TxqX95KBpg==} - /ember-auto-import@2.6.3(webpack@5.88.2): + /ember-auto-import@2.6.3(@glint/template@1.2.0)(webpack@5.88.2): resolution: {integrity: sha512-uLhrRDJYWCRvQ4JQ1e64XlSrqAKSd6PXaJ9ZsZI6Tlms9T4DtQFxNXasqji2ZRJBVrxEoLCRYX3RTldsQ0vNGQ==} engines: {node: 12.* || 14.* || >= 16} dependencies: @@ -5081,7 +5395,7 @@ packages: '@babel/plugin-proposal-class-properties': 7.18.6(@babel/core@7.23.0) '@babel/plugin-proposal-decorators': 7.23.0(@babel/core@7.23.0) '@babel/preset-env': 7.22.20(@babel/core@7.23.0) - '@embroider/macros': 1.13.0 + '@embroider/macros': 1.13.0(@glint/template@1.2.0) '@embroider/shared-internals': 2.4.0 babel-loader: 8.3.0(@babel/core@7.23.0)(webpack@5.88.2) babel-plugin-ember-modules-api-polyfill: 3.5.0 @@ -5120,7 +5434,7 @@ packages: ember-source: ^3.28.0 || >= 4.0.0 dependencies: ember-cli-babel: 7.26.11 - ember-source: 4.12.0(@babel/core@7.23.0)(@glimmer/component@1.1.2)(webpack@5.88.2) + ember-source: 4.12.0(@babel/core@7.23.0)(@glimmer/component@1.1.2)(@glint/template@1.2.0)(webpack@5.88.2) git-repo-info: 2.1.1 transitivePeerDependencies: - supports-color @@ -5378,6 +5692,24 @@ packages: - supports-color dev: true + /ember-cli-typescript@5.2.1: + resolution: {integrity: sha512-qqp5TAIuPHxHiGXJKL+78Euyhy0zSKQMovPh8sJpN/ZBYx0H90pONufHR3anaMcp1snVfx4B+mb9+7ijOik8ZA==} + engines: {node: '>= 12.*'} + dependencies: + ansi-to-html: 0.6.15 + broccoli-stew: 3.0.0 + debug: 4.3.4 + execa: 4.1.0 + fs-extra: 9.1.0 + resolve: 1.22.6 + rsvp: 4.8.5 + semver: 7.5.4 + stagehand: 1.0.1 + walk-sync: 2.2.0 + transitivePeerDependencies: + - supports-color + dev: true + /ember-cli-version-checker@3.1.3: resolution: {integrity: sha512-PZNSvpzwWgv68hcXxyjREpj3WWb81A7rtYNQq1lLEgrWIchF8ApKJjWP3NBpHjaatwILkZAV8klair5WFlXAKg==} engines: {node: 6.* || 8.* || >= 10.*} @@ -5649,10 +5981,9 @@ packages: '@embroider/addon-shim': 1.8.6 ember-cli-normalize-entity-name: 1.0.0 ember-cli-string-utils: 1.1.0 - ember-source: 4.12.0(@babel/core@7.23.0)(@glimmer/component@1.1.2)(webpack@5.88.2) + ember-source: 4.12.0(@babel/core@7.23.0)(@glimmer/component@1.1.2)(@glint/template@1.2.0)(webpack@5.88.2) transitivePeerDependencies: - supports-color - dev: false /ember-page-title@8.0.0: resolution: {integrity: sha512-4bu8CpoPObJZNUogwIjpntxS3jMDlZ1eoJsZUuktcCgOI7LfZocuYbu9LnLM215QjEOV0TxGDWwJck1l8cWKeg==} @@ -5663,18 +5994,18 @@ packages: - supports-color dev: true - /ember-qunit@8.0.1(@ember/test-helpers@2.9.3)(ember-source@4.12.0)(qunit@2.19.4): + /ember-qunit@8.0.1(@ember/test-helpers@2.9.3)(@glint/template@1.2.0)(ember-source@4.12.0)(qunit@2.19.4): resolution: {integrity: sha512-13PtywHNPTQKkDW4o8QRkJvcdsZr8hRyvh6xh/YLAX8+HaRLd3nPL8mBF4O/Kur/DAj3QWLvjzktZ2uRNGSh3A==} peerDependencies: '@ember/test-helpers': '>=3.0.3' ember-source: '>=4.0.0' qunit: ^2.13.0 dependencies: - '@ember/test-helpers': 2.9.3(@babel/core@7.23.0)(ember-source@4.12.0) + '@ember/test-helpers': 2.9.3(@babel/core@7.23.0)(@glint/environment-ember-loose@1.2.0)(@glint/template@1.2.0)(ember-source@4.12.0) '@embroider/addon-shim': 1.8.6 - '@embroider/macros': 1.13.1 + '@embroider/macros': 1.13.1(@glint/template@1.2.0) ember-cli-test-loader: 3.1.0 - ember-source: 4.12.0(@babel/core@7.23.0)(@glimmer/component@1.1.2)(webpack@5.88.2) + ember-source: 4.12.0(@babel/core@7.23.0)(@glimmer/component@1.1.2)(@glint/template@1.2.0)(webpack@5.88.2) qunit: 2.19.4 transitivePeerDependencies: - '@glint/template' @@ -5691,7 +6022,7 @@ packages: optional: true dependencies: ember-cli-babel: 7.26.11 - ember-source: 4.12.0(@babel/core@7.23.0)(@glimmer/component@1.1.2)(webpack@5.88.2) + ember-source: 4.12.0(@babel/core@7.23.0)(@glimmer/component@1.1.2)(@glint/template@1.2.0)(webpack@5.88.2) transitivePeerDependencies: - supports-color dev: true @@ -5719,7 +6050,7 @@ packages: - encoding dev: true - /ember-source@4.12.0(@babel/core@7.23.0)(@glimmer/component@1.1.2)(webpack@5.88.2): + /ember-source@4.12.0(@babel/core@7.23.0)(@glimmer/component@1.1.2)(@glint/template@1.2.0)(webpack@5.88.2): resolution: {integrity: sha512-h0lV902A4Mny2eiqXPy15uXXoCc7BnUegE4axLAy4IoxEkJ1o5h0aLJFiB4Tzb1htx8vgHjJz//Y5Jig7NSDTw==} engines: {node: '>= 14.*'} peerDependencies: @@ -5738,7 +6069,7 @@ packages: broccoli-funnel: 3.0.8 broccoli-merge-trees: 4.2.0 chalk: 4.1.2 - ember-auto-import: 2.6.3(webpack@5.88.2) + ember-auto-import: 2.6.3(@glint/template@1.2.0)(webpack@5.88.2) ember-cli-babel: 7.26.11 ember-cli-get-component-path-option: 1.0.0 ember-cli-is-package-missing: 1.0.0 @@ -11275,7 +11606,7 @@ packages: resolution: {integrity: sha512-0Ju4+6A8iOnpL/Thra7dZsSlOHYAHIeMxfhWQRI1/VLcT3WDBZKKtQt/QkBOsiIN9ZpuvHE6cGZ0x4glCMmfiA==} engines: {node: '>=12'} dependencies: - semver: 7.5.1 + semver: 7.5.4 dev: true /semver@5.7.2: @@ -12307,6 +12638,15 @@ packages: - supports-color dev: true + /ts-api-utils@1.0.3(typescript@5.2.2): + resolution: {integrity: sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==} + engines: {node: '>=16.13.0'} + peerDependencies: + typescript: '>=4.2.0' + dependencies: + typescript: 5.2.2 + dev: true + /tslib@1.14.1: resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} dev: true @@ -12405,6 +12745,12 @@ packages: /typescript-memoize@1.1.1: resolution: {integrity: sha512-GQ90TcKpIH4XxYTI2F98yEQYZgjNMOGPpOgdjIBhaLaWji5HPWlRnZ4AeA1hfBxtY7bCGDJsqDDHk/KaHOl5bA==} + /typescript@5.2.2: + resolution: {integrity: sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==} + engines: {node: '>=14.17'} + hasBin: true + dev: true + /uc.micro@1.0.6: resolution: {integrity: sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==} dev: true @@ -12567,7 +12913,7 @@ packages: is-yarn-global: 0.4.1 latest-version: 7.0.0 pupa: 3.1.0 - semver: 7.5.1 + semver: 7.5.4 semver-diff: 4.0.0 xdg-basedir: 5.1.0 dev: true @@ -12690,6 +13036,37 @@ packages: acorn-walk: 8.2.0 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.7: + resolution: {integrity: sha512-eOpPHogvorZRobNqJGhapa0JdwaxpjVvyBp0QIUMRMSf8ZAlqOdEquKuRmw9Qwu0qXtJIWqFtMkmvJjUZmMjVA==} + 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/.eslintrc.js b/test-app/.eslintrc.js index 0cf7d1b5..f2c833a9 100644 --- a/test-app/.eslintrc.js +++ b/test-app/.eslintrc.js @@ -2,7 +2,7 @@ module.exports = { root: true, - parser: '@babel/eslint-parser', + parser: '@typescript-eslint/parser', parserOptions: { ecmaVersion: 2018, sourceType: 'module', @@ -54,5 +54,83 @@ module.exports = { files: ['tests/**/*-test.{js,ts}'], extends: ['plugin:qunit/recommended'], }, + // ts files + { + files: ['**/*.ts'], + extends: [ + 'plugin:@typescript-eslint/eslint-recommended', + 'plugin:@typescript-eslint/recommended', + ], + rules: { + // https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/src/configs/recommended.ts + '@typescript-eslint/no-explicit-any': 'error', + '@typescript-eslint/no-non-null-assertion': 'error', + '@typescript-eslint/no-unused-vars': 'error', + // https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/src/configs/strict.ts + '@typescript-eslint/array-type': [ + 'error', + { + default: 'array', + readonly: 'array', + }, + ], + '@typescript-eslint/ban-tslint-comment': 'error', + '@typescript-eslint/class-literal-property-style': 'error', + '@typescript-eslint/consistent-generic-constructors': 'error', + '@typescript-eslint/consistent-indexed-object-style': 'error', + '@typescript-eslint/consistent-type-assertions': 'error', + '@typescript-eslint/consistent-type-definitions': 'error', + '@typescript-eslint/consistent-type-imports': 'error', + '@typescript-eslint/explicit-function-return-type': 'error', + '@typescript-eslint/explicit-member-accessibility': [ + 'error', + { + accessibility: 'no-public', + }, + ], + 'no-restricted-syntax': [ + 'error', + { + selector: + ':matches(PropertyDefinition, MethodDefinition)[accessibility="private"]', + message: 'Use #private instead', + }, + { + selector: + ':matches(PropertyDefinition, MethodDefinition)[accessibility="protected"]', + message: 'Use #private instead', + }, + ], + '@typescript-eslint/explicit-module-boundary-types': 'error', + '@typescript-eslint/member-delimiter-style': 'error', + '@typescript-eslint/member-ordering': 'error', + '@typescript-eslint/method-signature-style': 'error', + '@typescript-eslint/no-confusing-non-null-assertion': 'error', + '@typescript-eslint/no-duplicate-enum-values': 'error', + '@typescript-eslint/no-dynamic-delete': 'error', + '@typescript-eslint/no-extraneous-class': 'error', + '@typescript-eslint/no-import-type-side-effects': 'error', + '@typescript-eslint/no-invalid-void-type': 'error', + '@typescript-eslint/no-non-null-asserted-nullish-coalescing': 'error', + '@typescript-eslint/no-require-imports': 'error', + '@typescript-eslint/no-type-alias': [ + 'error', + { + allowGenerics: 'always', + }, + ], + '@typescript-eslint/no-unsafe-declaration-merging': 'error', + '@typescript-eslint/parameter-properties': 'error', + '@typescript-eslint/prefer-enum-initializers': 'error', + '@typescript-eslint/prefer-for-of': 'error', + '@typescript-eslint/prefer-function-type': 'error', + '@typescript-eslint/prefer-literal-enum-member': 'error', + '@typescript-eslint/prefer-ts-expect-error': 'error', + '@typescript-eslint/sort-type-constituents': 'error', + '@typescript-eslint/type-annotation-spacing': 'error', + '@typescript-eslint/typedef': 'error', + '@typescript-eslint/unified-signatures': 'error', + }, + }, ], }; diff --git a/test-app/config/environment.d.ts b/test-app/config/environment.d.ts new file mode 100644 index 00000000..fbda509a --- /dev/null +++ b/test-app/config/environment.d.ts @@ -0,0 +1,13 @@ +export default config; + +/** + * Type declarations for import config from 'my-app/config/environment' + */ +declare const config: { + environment: string; + modulePrefix: string; + podModulePrefix: string; + locationType: 'auto' | 'hash' | 'history' | 'none'; + rootURL: string; + APP: Record; +}; diff --git a/test-app/package.json b/test-app/package.json index d69b9450..d8b7eb8a 100644 --- a/test-app/package.json +++ b/test-app/package.json @@ -31,6 +31,13 @@ "@embroider/test-setup": "3.0.1", "@glimmer/component": "^1.1.2", "@glimmer/tracking": "^1.1.2", + "@glint/core": "^1.2.0", + "@glint/environment-ember-loose": "^1.2.0", + "@glint/template": "^1.2.0", + "@tsconfig/ember": "^3.0.1", + "@types/qunit": "^2.19.6", + "@typescript-eslint/eslint-plugin": "^6.5.0", + "@typescript-eslint/parser": "^6.5.0", "broccoli-asset-rev": "3.0.0", "concurrently": "8.2.1", "ember-auto-import": "2.6.3", @@ -42,6 +49,7 @@ "ember-cli-inject-live-reload": "2.1.0", "ember-cli-sri": "2.1.1", "ember-cli-terser": "4.0.2", + "ember-cli-typescript": "^5.2.1", "ember-disable-prototype-extensions": "^1.1.3", "ember-fetch": "8.1.2", "ember-load-initializers": "2.1.2", @@ -67,6 +75,7 @@ "qunit": "2.19.4", "qunit-dom": "2.0.0", "release-it": "15.11.0", + "typescript": "^5.2.2", "webpack": "5.88.2" }, "engines": { diff --git a/test-app/tsconfig.json b/test-app/tsconfig.json new file mode 100644 index 00000000..6d69f8a1 --- /dev/null +++ b/test-app/tsconfig.json @@ -0,0 +1,23 @@ +{ + "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": ".", + // Type check only the code specifically refered to in the source code. + "skipLibCheck": true, + "paths": { + "test-app/tests/*": ["tests/*"], + "test-app/*": ["app/*"], + "*": ["types/*"] + } + }, + "include": ["app/**/*", "tests/**/*", "types/**/*"], + "glint": { + "environment": "ember-loose", + "transform": { + "include": ["app/**", "tests/**"] + } + } +} diff --git a/test-app/types/glint.d.ts b/test-app/types/glint.d.ts new file mode 100644 index 00000000..2a6c3057 --- /dev/null +++ b/test-app/types/glint.d.ts @@ -0,0 +1,5 @@ +import '@glint/environment-ember-loose'; + +declare module '@glint/environment-ember-loose/registry' { + export default interface Registry {} +} diff --git a/test-app/types/index.d.ts b/test-app/types/index.d.ts new file mode 100644 index 00000000..2109bac6 --- /dev/null +++ b/test-app/types/index.d.ts @@ -0,0 +1,2 @@ +import 'ember-source/types'; +import 'ember-source/types/preview';