Skip to content

Commit a95a32d

Browse files
authored
Updated blueprints (#66)
* chore: Updated latestVersions * feature: Downstreamed changes from @embroider/[email protected] and [email protected] * chore: Updated test fixtures --------- Co-authored-by: ijlee2 <[email protected]>
1 parent f707f4a commit a95a32d

File tree

52 files changed

+156
-154
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+156
-154
lines changed

src/blueprints/ember-addon/__testAppLocation__/ember-cli-build.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ module.exports = function (defaults) {
77
// Add options here
88
autoImport: {
99
watchDependencies: ['<%= options.packages.addon.name %>'],
10-
},
10+
},<% if (options.packages.addon.hasTypeScript) { %>
11+
'ember-cli-babel': {
12+
enableTypeScriptTransform: true,
13+
},<% } %>
1114
});
1215

1316
const { maybeEmbroider } = require('@embroider/test-setup');

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,11 @@ function updateCompilerOptions(
1919

2020
if (packages.addon.hasGlint) {
2121
compilerOptions.set('allowImportingTsExtensions', true);
22+
compilerOptions.set('allowJs', true);
2223
compilerOptions.set('declarationDir', 'declarations');
2324
} else {
2425
compilerOptions.set('allowImportingTsExtensions', true);
26+
compilerOptions.set('allowJs', true);
2527
compilerOptions.set('declaration', true);
2628
compilerOptions.set('declarationDir', 'declarations');
2729
compilerOptions.set('emitDeclarationOnly', true);

src/steps/update-test-app-tsconfig-json.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ function updateCompilerOptions(
2323
tsConfigJson['compilerOptions'] = convertToObject(compilerOptions);
2424
}
2525

26-
function updateInclude(tsConfigJson: TsConfigJson): void {
27-
tsConfigJson['include'] = ['app/**/*', 'tests/**/*', 'types/**/*'];
26+
function removeInclude(tsConfigJson: TsConfigJson) {
27+
delete tsConfigJson['include'];
2828
}
2929

3030
export function updateTestAppTsConfigJson(options: Options): void {
@@ -39,7 +39,7 @@ export function updateTestAppTsConfigJson(options: Options): void {
3939
const tsConfigJson = JSON.parse(sanitizeJson(oldFile));
4040

4141
updateCompilerOptions(tsConfigJson, options);
42-
updateInclude(tsConfigJson);
42+
removeInclude(tsConfigJson);
4343

4444
const newFile = JSON.stringify(tsConfigJson, null, 2) + '\n';
4545

src/utils/blueprints/get-version.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,21 @@ import { decideVersion } from '@codemod-utils/blueprints';
33
import type { Options } from '../../types/index.js';
44

55
const latestVersions = new Map([
6-
['@babel/core', '7.22.11'],
7-
['@babel/plugin-proposal-decorators', '7.22.10'],
6+
['@babel/core', '7.22.17'],
7+
['@babel/plugin-proposal-decorators', '7.22.15'],
88
['@babel/plugin-transform-class-properties', '7.22.5'],
9-
['@babel/preset-typescript', '7.22.11'],
10-
['@babel/runtime', '7.22.11'],
9+
['@babel/preset-typescript', '7.22.15'],
10+
['@babel/runtime', '7.22.15'],
1111
['@embroider/addon-dev', '4.1.0'],
1212
['@embroider/addon-shim', '1.8.6'],
13+
['@embroider/test-setup', '3.0.1'],
1314
['@rollup/plugin-babel', '6.0.3'],
1415
['concurrently', '8.2.1'],
1516
['ember-auto-import', '2.6.3'],
1617
['ember-cli-babel', '8.0.0'],
1718
['ember-cli-htmlbars', '6.3.0'],
18-
['rollup', '3.28.1'],
19-
['rollup-plugin-copy', '3.4.0'],
19+
['rollup', '3.29.1'],
20+
['rollup-plugin-copy', '3.5.0'],
2021
]);
2122

2223
export function getVersion(packageName: string, options: Options): string {

tests/fixtures/ember-container-query-customizations/output/demo-app/ember-cli-build.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ module.exports = function (defaults) {
88
autoImport: {
99
watchDependencies: ['ember-container-query'],
1010
},
11+
'ember-cli-babel': {
12+
enableTypeScriptTransform: true,
13+
},
1114
});
1215

1316
const { maybeEmbroider } = require('@embroider/test-setup');

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,6 @@
1515
},
1616
"skipLibCheck": true
1717
},
18-
"include": [
19-
"app/**/*",
20-
"tests/**/*",
21-
"types/**/*"
22-
],
2318
"glint": {
2419
"environment": "ember-loose"
2520
}

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,16 +67,16 @@
6767
"ember-test-selectors": "^6.0.0"
6868
},
6969
"devDependencies": {
70-
"@babel/core": "^7.22.11",
71-
"@babel/plugin-proposal-decorators": "^7.22.10",
70+
"@babel/core": "^7.22.17",
71+
"@babel/plugin-proposal-decorators": "^7.22.15",
7272
"@babel/plugin-transform-class-properties": "^7.22.5",
73-
"@babel/preset-typescript": "^7.22.11",
74-
"@babel/runtime": "^7.22.11",
73+
"@babel/preset-typescript": "^7.22.15",
74+
"@babel/runtime": "^7.22.15",
7575
"@embroider/addon-dev": "^4.1.0",
7676
"@rollup/plugin-babel": "^6.0.3",
7777
"concurrently": "^7.6.0",
78-
"rollup": "^3.28.1",
79-
"rollup-plugin-copy": "^3.4.0"
78+
"rollup": "^3.29.1",
79+
"rollup-plugin-copy": "^3.5.0"
8080
},
8181
"engines": {
8282
"node": "14.* || 16.* || >= 18"

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
@@ -2,6 +2,7 @@
22
"extends": "@tsconfig/ember/tsconfig.json",
33
"compilerOptions": {
44
"allowImportingTsExtensions": true,
5+
"allowJs": true,
56
"declarationDir": "declarations",
67
"skipLibCheck": true
78
},

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,16 +67,16 @@
6767
"ember-test-selectors": "^6.0.0"
6868
},
6969
"devDependencies": {
70-
"@babel/core": "^7.22.11",
71-
"@babel/plugin-proposal-decorators": "^7.22.10",
70+
"@babel/core": "^7.22.17",
71+
"@babel/plugin-proposal-decorators": "^7.22.15",
7272
"@babel/plugin-transform-class-properties": "^7.22.5",
73-
"@babel/preset-typescript": "^7.22.11",
74-
"@babel/runtime": "^7.22.11",
73+
"@babel/preset-typescript": "^7.22.15",
74+
"@babel/runtime": "^7.22.15",
7575
"@embroider/addon-dev": "^4.1.0",
7676
"@rollup/plugin-babel": "^6.0.3",
7777
"concurrently": "^7.6.0",
78-
"rollup": "^3.28.1",
79-
"rollup-plugin-copy": "^3.4.0"
78+
"rollup": "^3.29.1",
79+
"rollup-plugin-copy": "^3.5.0"
8080
},
8181
"engines": {
8282
"node": "14.* || 16.* || >= 18"

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
@@ -2,6 +2,7 @@
22
"extends": "@tsconfig/ember/tsconfig.json",
33
"compilerOptions": {
44
"allowImportingTsExtensions": true,
5+
"allowJs": true,
56
"declarationDir": "declarations",
67
"skipLibCheck": true
78
},

0 commit comments

Comments
 (0)