Skip to content

Commit d60700f

Browse files
Merge pull request #340 from embroider-build/nvp/fix-tsconfig
Move off @tsconfig/ember
2 parents be089ee + e436aba commit d60700f

File tree

5 files changed

+247
-189
lines changed

5 files changed

+247
-189
lines changed

files/__addonLocation__/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@
3939
"@babel/core": "^7.25.2",
4040
<% if (typescript) { %>"@babel/plugin-transform-typescript": "^7.25.2",<% } %>
4141
"@babel/eslint-parser": "^7.25.1",
42-
"@babel/runtime": "^7.25.6",
42+
"@babel/runtime": "^7.25.6",<% if (typescript) { %>
43+
"@ember/library-tsconfig": "^1.1.3",<% } %>
4344
"@eslint/js": "^9.17.0",
4445
"@embroider/addon-dev": "^7.1.0",<% if (typescript) { %>
4546
"@glint/core": "^1.4.0",
4647
"@glint/environment-ember-loose": "^1.4.0",
4748
"@glint/environment-ember-template-imports": "^1.4.0",
48-
"@glint/template": "^1.4.0",
49-
"@tsconfig/ember": "^3.0.8",<% } %>
49+
"@glint/template": "^1.4.0",<% } %>
5050
"@rollup/plugin-babel": "^6.0.4",
5151
"babel-plugin-ember-template-compilation": "^2.2.5",
5252
"concurrently": "^9.0.1",
Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,12 @@
11
{
2-
"extends": "@tsconfig/ember/tsconfig.json",
2+
"extends": "@ember/library-tsconfig",
33
"include": ["src/**/*", "unpublished-development-types/**/*"],
44
"glint": {
55
"environment": ["ember-loose", "ember-template-imports"]
66
},
77
"compilerOptions": {
88
"allowJs": true,
99
"declarationDir": "declarations",
10-
/**
11-
https://www.typescriptlang.org/tsconfig#noEmit
12-
13-
We want to emit declarations, so this option must be set to `false`.
14-
@tsconfig/ember sets this to `true`, which is incompatible with our need to set `emitDeclarationOnly`.
15-
@tsconfig/ember is more optimized for apps, which wouldn't emit anything, only type check.
16-
*/
17-
"noEmit": false,
18-
/**
19-
https://www.typescriptlang.org/tsconfig#emitDeclarationOnly
20-
We want to only emit declarations as we use Rollup to emit JavaScript.
21-
*/
22-
"emitDeclarationOnly": true,
23-
24-
/**
25-
https://www.typescriptlang.org/tsconfig#noEmitOnError
26-
Do not block emit on TS errors.
27-
*/
28-
"noEmitOnError": false,
29-
3010
/**
3111
https://www.typescriptlang.org/tsconfig#rootDir
3212
"Default: The longest common path of all non-declaration input files."
@@ -38,15 +18,6 @@
3818
imports to files on disk
3919
*/
4020
"rootDir": "./src",
41-
42-
/**
43-
https://www.typescriptlang.org/tsconfig#allowImportingTsExtensions
44-
45-
We want our tooling to know how to resolve our custom files so the appropriate plugins
46-
can do the proper transformations on those files.
47-
*/
48-
"allowImportingTsExtensions": true,
49-
5021
"types": ["ember-source/types"]
5122
}
5223
}

index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ module.exports = {
177177
await appBlueprint.install(appOptions);
178178

179179
await Promise.all([
180-
this.updateTestAppPackageJson(path.join(testAppPath, 'package.json'), isPnpm(options)),
180+
this.updateTestAppPackageJson(path.join(testAppPath, 'package.json'), options),
181181
this.overrideTestAppFiles(testAppPath, path.join(options.target, 'test-app-overrides')),
182182
]);
183183

@@ -198,7 +198,8 @@ module.exports = {
198198
}
199199
},
200200

201-
async updateTestAppPackageJson(packageJsonPath, useWorkspaceProtocol) {
201+
async updateTestAppPackageJson(packageJsonPath, options) {
202+
const useWorkspaceProtocol = isPnpm(options);
202203
const pkg = await fs.readJSON(packageJsonPath);
203204
const additions = require('./additional-test-app-package.json');
204205

0 commit comments

Comments
 (0)