Skip to content

Commit 607bb9a

Browse files
authored
Configured allowImportingTsExtensions in the addon's tsconfig.json (#61)
* bugfix: Configured allowImportingTsExtensions in the addon's tsconfig.json * chore: Updated fixtures * chore: Updated README --------- Co-authored-by: ijlee2 <[email protected]>
1 parent 39713f0 commit 607bb9a

File tree

12 files changed

+13
-0
lines changed

12 files changed

+13
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ npx ember-codemod-v1-to-v2 <arguments>
2727
Step 2. Review the addon package.
2828

2929
- [x] Update the configuration files.<sup>2</sup>
30+
- [x] Relative import paths must specify the file extension `.js` or `.ts`.
3031
- [x] Colocate stylesheets (if any). Let each component import the relevant stylesheet in the backing class.
3132
- [x] Confirm that you can run all scripts in `package.json`.
3233

src/steps/update-addon-tsconfig-json.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@ function updateCompilerOptions(
1818
compilerOptions.delete('paths');
1919

2020
if (packages.addon.hasGlint) {
21+
compilerOptions.set('allowImportingTsExtensions', true);
2122
compilerOptions.set('declarationDir', 'declarations');
2223
} else {
24+
compilerOptions.set('allowImportingTsExtensions', true);
2325
compilerOptions.set('declaration', true);
2426
compilerOptions.set('declarationDir', 'declarations');
2527
compilerOptions.set('emitDeclarationOnly', true);

tests/fixtures/ember-container-query-customizations/output/packages/ember-container-query/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"extends": "@tsconfig/ember/tsconfig.json",
33
"compilerOptions": {
4+
"allowImportingTsExtensions": true,
45
"declarationDir": "declarations",
56
"skipLibCheck": true
67
},

tests/fixtures/ember-container-query-glint/output/ember-container-query/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"extends": "@tsconfig/ember/tsconfig.json",
33
"compilerOptions": {
4+
"allowImportingTsExtensions": true,
45
"declarationDir": "declarations",
56
"skipLibCheck": true
67
},

tests/fixtures/ember-container-query-scoped/output/ember-container-query/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"extends": "@tsconfig/ember/tsconfig.json",
33
"compilerOptions": {
4+
"allowImportingTsExtensions": true,
45
"declarationDir": "declarations",
56
"skipLibCheck": true
67
},

tests/fixtures/ember-container-query-typescript/output/ember-container-query/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"extends": "@tsconfig/ember/tsconfig.json",
33
"compilerOptions": {
4+
"allowImportingTsExtensions": true,
45
"declaration": true,
56
"declarationDir": "declarations",
67
"emitDeclarationOnly": true,

tests/fixtures/new-v1-addon-customizations/output/packages/new-v1-addon/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"extends": "@tsconfig/ember/tsconfig.json",
33
"compilerOptions": {
4+
"allowImportingTsExtensions": true,
45
"declaration": true,
56
"declarationDir": "declarations",
67
"emitDeclarationOnly": true,

tests/fixtures/new-v1-addon-typescript/output/new-v1-addon/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"extends": "@tsconfig/ember/tsconfig.json",
33
"compilerOptions": {
4+
"allowImportingTsExtensions": true,
45
"declaration": true,
56
"declarationDir": "declarations",
67
"emitDeclarationOnly": true,

tests/fixtures/steps/update-addon-tsconfig-json/customizations/output/packages/ember-container-query/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"extends": "@tsconfig/ember/tsconfig.json",
33
"compilerOptions": {
4+
"allowImportingTsExtensions": true,
45
"declarationDir": "declarations",
56
"skipLibCheck": true
67
},

tests/fixtures/steps/update-addon-tsconfig-json/glint/output/ember-container-query/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"extends": "@tsconfig/ember/tsconfig.json",
33
"compilerOptions": {
4+
"allowImportingTsExtensions": true,
45
"declarationDir": "declarations",
56
"skipLibCheck": true
67
},

0 commit comments

Comments
 (0)