Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions files/jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/**
* This jsconfig is not used for publishing.
* It enables Glint editor tooling for the addon's local editing experience.
*/
{
"extends": "@ember/app-tsconfig",
"include": [
"src/**/*",
"tests/**/*",
"unpublished-development-types/**/*",
"demo-app/**/*"
],
"compilerOptions": {
"allowJs": true,
"noEmit": true,
"rootDir": ".",
"types": [
"ember-source/types",
"vite/client",
"@embroider/core/virtual",
"@glint/ember-tsc/types"
]
}
}
10 changes: 5 additions & 5 deletions files/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@
"@embroider/macros": "^1.20.1",
"@embroider/vite": "^1.1.5",
"@eslint/js": "^9.17.0",
"@glimmer/component": "^2.0.0<% if (typescript) { %>",
"@glimmer/component": "^2.0.0",
"@glint/ember-tsc": "^1.0.3",
"@glint/template": "^1.6.1",
"@glint/tsserver-plugin": "^2.0.0<% } %>",
"@glint/tsserver-plugin": "^2.0.0",
"@rollup/plugin-babel": "^6.0.4<% if (typescript) { %>",
"@types/qunit": "^2.19.12<% } %>",
"babel-plugin-ember-template-compilation": "^4.0.0",
Expand All @@ -74,9 +74,9 @@
"qunit": "^2.24.1",
"qunit-dom": "^3.4.0",
"rollup": "^4.22.5",
"testem": "^3.15.1<% if (typescript) { %>",
"typescript": "~5.8.3",
"typescript-eslint": "^8.19.1<% } %>",
"testem": "^3.15.1",
"typescript": "~5.8.3",<% if (typescript) { %>
"typescript-eslint": "^8.19.1",<% } %>
"vite": "^7.1.9"
},
"ember": {
Expand Down
2 changes: 1 addition & 1 deletion files/rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,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'<% if (typescript) {%>, 'template-registry.js'<% } %>]),
addon.publicEntrypoints(['**/*.js', 'index.js']),

// These are the modules that should get reexported into the traditional
// "app" tree. Things in here should also be in publicEntrypoints above, but
Expand Down
10 changes: 0 additions & 10 deletions files/src/template-registry.ts

This file was deleted.

3 changes: 3 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ module.exports = {
files = files.filter(
(filename) => !filename.match(/.*\.ts$/) && !ignoredFiles.includes(filename),
);
} else {
// jsconfig.json is only for the JS path; TS addons use tsconfig.json.
files = files.filter((filename) => filename !== 'jsconfig.json');
}

return files;
Expand Down
17 changes: 0 additions & 17 deletions tests/fixtures/explicit-imports/my-addon/src/template-registry.ts

This file was deleted.

Empty file.
4 changes: 0 additions & 4 deletions tests/rollup-build-tests/explicit-imports.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,13 @@ describe(`rollup-build | explicit-imports`, () => {
'services',
'index.js',
'index.js.map',
'template-registry.js',
'template-registry.js.map',
]);

expect(await dirContents(declarationsDir)).to.deep.equal([
'components',
'index.d.ts',
'index.d.ts.map',
'services',
'template-registry.d.ts',
'template-registry.d.ts.map',
]);

expect(await dirContents(path.join(distDir, 'services'))).to.deep.equal([
Expand Down
5 changes: 0 additions & 5 deletions tests/smoke-tests/--typescript.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ for (let packageManager of SUPPORTED_PACKAGE_MANAGERS) {
"src/lint-test-gts.gts",
"src/lint-test-ts.ts",
"src/services/example.ts",
"src/template-registry.ts",
]
`);

Expand All @@ -126,8 +125,6 @@ for (let packageManager of SUPPORTED_PACKAGE_MANAGERS) {
"declarations/lint-test-ts.d.ts.map",
"declarations/services/example.d.ts",
"declarations/services/example.d.ts.map",
"declarations/template-registry.d.ts",
"declarations/template-registry.d.ts.map",
"dist/_app_/components/another-gts.js",
"dist/_app_/components/template-import.js",
"dist/_app_/services/example.js",
Expand All @@ -143,8 +140,6 @@ for (let packageManager of SUPPORTED_PACKAGE_MANAGERS) {
"dist/lint-test-ts.js.map",
"dist/services/example.js",
"dist/services/example.js.map",
"dist/template-registry.js",
"dist/template-registry.js.map",
]
`);
});
Expand Down
Loading