Skip to content

Commit 8b96e52

Browse files
alan-agius4filipesilva
authored andcommitted
fix(@schematics/angular): remove solution style tsconfig from new projects
Following the issues highlighted in https://docs.google.com/document/d/1eB6cGCG_2ircfS5GzpDC9dBgikeYYcMxghVH5sDESHw/edit?usp=sharing and discussions held with the TypeScript team. The best course of action is to rollback this feature. In future, it is not excluded that solution style tsconfigs are re-introduced.. Closes #18040 and closes #18170
1 parent fc5d2b3 commit 8b96e52

27 files changed

+72
-344
lines changed

packages/schematics/angular/application/files/tsconfig.app.json.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* To learn more about this file see: https://angular.io/config/tsconfig. */
22
{
3-
"extends": "<%= relativePathToWorkspaceRoot %>/tsconfig.base.json",
3+
"extends": "<%= relativePathToWorkspaceRoot %>/tsconfig.json",
44
"compilerOptions": {
55
"outDir": "<%= relativePathToWorkspaceRoot %>/out-tsc/app",
66
"types": []

packages/schematics/angular/application/files/tsconfig.spec.json.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* To learn more about this file see: https://angular.io/config/tsconfig. */
22
{
3-
"extends": "<%= relativePathToWorkspaceRoot %>/tsconfig.base.json",
3+
"extends": "<%= relativePathToWorkspaceRoot %>/tsconfig.json",
44
"compilerOptions": {
55
"outDir": "<%= relativePathToWorkspaceRoot %>/out-tsc/spec",
66
"types": [

packages/schematics/angular/application/index.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ import { JSONFile } from '../utility/json-file';
3535
import { latestVersions } from '../utility/latest-versions';
3636
import { applyLintFix } from '../utility/lint-fix';
3737
import { relativePathToWorkspaceRoot } from '../utility/paths';
38-
import { addTsConfigProjectReferences, verifyBaseTsConfigExists } from '../utility/tsconfig';
3938
import { validateProjectName } from '../utility/validation';
4039
import { getWorkspace, updateWorkspace } from '../utility/workspace';
4140
import { Builders, ProjectType } from '../utility/workspace-models';
@@ -280,7 +279,6 @@ export default function (options: ApplicationOptions): Rule {
280279
}
281280

282281
validateProjectName(options.name);
283-
verifyBaseTsConfigExists(host);
284282

285283
const appRootSelector = `${options.prefix}-root`;
286284
const componentOptions: Partial<ComponentOptions> = !options.minimal ?
@@ -363,10 +361,6 @@ export default function (options: ApplicationOptions): Rule {
363361
}),
364362
move(sourceDir),
365363
]), MergeStrategy.Overwrite),
366-
addTsConfigProjectReferences([
367-
join(appDir, 'tsconfig.app.json'),
368-
... options.minimal ? [] : [join(appDir, 'tsconfig.spec.json')],
369-
]),
370364
options.minimal ? noop() : schematic('e2e', e2eOptions),
371365
options.skipPackageJson ? noop() : addDependenciesToPackageJson(options),
372366
options.lintFix ? applyLintFix(appDir) : noop(),

packages/schematics/angular/application/index_spec.ts

Lines changed: 6 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -80,28 +80,6 @@ describe('Application Schematic', () => {
8080
expect(workspace.defaultProject).toBe('foo');
8181
});
8282

83-
it('should add references in solution style tsconfig', async () => {
84-
const tree = await schematicRunner.runSchematicAsync('application', defaultOptions, workspaceTree)
85-
.toPromise();
86-
87-
const { references } = readJsonFile(tree, '/tsconfig.json');
88-
expect(references).toEqual([
89-
{ path: './projects/foo/tsconfig.app.json' },
90-
{ path: './projects/foo/tsconfig.spec.json' },
91-
]);
92-
});
93-
94-
it('minimal=true should add correct reference in tsconfig', async () => {
95-
const options = { ...defaultOptions, minimal: true };
96-
const tree = await schematicRunner.runSchematicAsync('application', options, workspaceTree)
97-
.toPromise();
98-
99-
const { references } = readJsonFile(tree, '/tsconfig.json');
100-
expect(references).toEqual([
101-
{ path: './projects/foo/tsconfig.app.json' },
102-
]);
103-
});
104-
10583
it('should set the prefix to app if none is set', async () => {
10684
const options = { ...defaultOptions };
10785

@@ -166,15 +144,15 @@ describe('Application Schematic', () => {
166144
.toPromise();
167145
const { files, extends: _extends } = readJsonFile(tree, '/projects/foo/tsconfig.app.json');
168146
expect(files).toEqual(['src/main.ts', 'src/polyfills.ts']);
169-
expect(_extends).toBe('../../tsconfig.base.json');
147+
expect(_extends).toBe('../../tsconfig.json');
170148
});
171149

172150
it('should set the right paths in the tsconfig.spec.json', async () => {
173151
const tree = await schematicRunner.runSchematicAsync('application', defaultOptions, workspaceTree)
174152
.toPromise();
175153
const { files, extends: _extends } = readJsonFile(tree, '/projects/foo/tsconfig.spec.json');
176154
expect(files).toEqual(['src/test.ts', 'src/polyfills.ts']);
177-
expect(_extends).toBe('../../tsconfig.base.json');
155+
expect(_extends).toBe('../../tsconfig.json');
178156
});
179157

180158
it('should set the right path and prefix in the tslint file', async () => {
@@ -401,9 +379,9 @@ describe('Application Schematic', () => {
401379
const tree = await schematicRunner.runSchematicAsync('application', options, workspaceTree)
402380
.toPromise();
403381
const appTsConfig = readJsonFile(tree, '/tsconfig.app.json');
404-
expect(appTsConfig.extends).toEqual('./tsconfig.base.json');
382+
expect(appTsConfig.extends).toEqual('./tsconfig.json');
405383
const specTsConfig = readJsonFile(tree, '/tsconfig.spec.json');
406-
expect(specTsConfig.extends).toEqual('./tsconfig.base.json');
384+
expect(specTsConfig.extends).toEqual('./tsconfig.json');
407385
expect(specTsConfig.files).toEqual(['src/test.ts', 'src/polyfills.ts']);
408386
});
409387

@@ -447,9 +425,9 @@ describe('Application Schematic', () => {
447425
expect(buildOpt.tsConfig).toEqual('foo/tsconfig.app.json');
448426

449427
const appTsConfig = readJsonFile(tree, '/foo/tsconfig.app.json');
450-
expect(appTsConfig.extends).toEqual('../tsconfig.base.json');
428+
expect(appTsConfig.extends).toEqual('../tsconfig.json');
451429
const specTsConfig = readJsonFile(tree, '/foo/tsconfig.spec.json');
452-
expect(specTsConfig.extends).toEqual('../tsconfig.base.json');
430+
expect(specTsConfig.extends).toEqual('../tsconfig.json');
453431
});
454432
});
455433

packages/schematics/angular/e2e/files/tsconfig.json.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* To learn more about this file see: https://angular.io/config/tsconfig. */
22
{
3-
"extends": "<%= relativePathToWorkspaceRoot %>/tsconfig.base.json",
3+
"extends": "<%= relativePathToWorkspaceRoot %>/tsconfig.json",
44
"compilerOptions": {
55
"outDir": "<%= relativePathToWorkspaceRoot %>/out-tsc/e2e",
66
"module": "commonjs",

packages/schematics/angular/e2e/index.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import {
1818
url,
1919
} from '@angular-devkit/schematics';
2020
import { relativePathToWorkspaceRoot } from '../utility/paths';
21-
import { verifyBaseTsConfigExists } from '../utility/tsconfig';
2221
import { getWorkspace, updateWorkspace } from '../utility/workspace';
2322
import { Builders } from '../utility/workspace-models';
2423
import { Schema as E2eOptions } from './schema';
@@ -32,8 +31,6 @@ export default function (options: E2eOptions): Rule {
3231
throw new SchematicsException(`Project name "${appProject}" doesn't not exist.`);
3332
}
3433

35-
verifyBaseTsConfigExists(host);
36-
3734
const root = join(normalize(project.root), 'e2e');
3835

3936
project.targets.add({

packages/schematics/angular/library/files/tsconfig.lib.json.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* To learn more about this file see: https://angular.io/config/tsconfig. */
22
{
3-
"extends": "<%= relativePathToWorkspaceRoot %>/tsconfig.base.json",
3+
"extends": "<%= relativePathToWorkspaceRoot %>/tsconfig.json",
44
"compilerOptions": {
55
"outDir": "<%= relativePathToWorkspaceRoot %>/out-tsc/lib",
66
"target": "es2015",

packages/schematics/angular/library/files/tsconfig.spec.json.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* To learn more about this file see: https://angular.io/config/tsconfig. */
22
{
3-
"extends": "<%= relativePathToWorkspaceRoot %>/tsconfig.base.json",
3+
"extends": "<%= relativePathToWorkspaceRoot %>/tsconfig.json",
44
"compilerOptions": {
55
"outDir": "<%= relativePathToWorkspaceRoot %>/out-tsc/spec",
66
"types": [

packages/schematics/angular/library/index.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import { NodeDependencyType, addPackageJsonDependency } from '../utility/depende
2525
import { latestVersions } from '../utility/latest-versions';
2626
import { applyLintFix } from '../utility/lint-fix';
2727
import { relativePathToWorkspaceRoot } from '../utility/paths';
28-
import { addTsConfigProjectReferences, verifyBaseTsConfigExists } from '../utility/tsconfig';
2928
import { validateProjectName } from '../utility/validation';
3029
import { getWorkspace, updateWorkspace } from '../utility/workspace';
3130
import { Builders, ProjectType } from '../utility/workspace-models';
@@ -59,9 +58,9 @@ function updateJsonFile<T>(host: Tree, path: string, callback: UpdateJsonFn<T>):
5958
function updateTsConfig(packageName: string, ...paths: string[]) {
6059

6160
return (host: Tree) => {
62-
if (!host.exists('tsconfig.base.json')) { return host; }
61+
if (!host.exists('tsconfig.json')) { return host; }
6362

64-
return updateJsonFile(host, 'tsconfig.base.json', (tsconfig: TsConfigPartialType) => {
63+
return updateJsonFile(host, 'tsconfig.json', (tsconfig: TsConfigPartialType) => {
6564
if (!tsconfig.compilerOptions.paths) {
6665
tsconfig.compilerOptions.paths = {};
6766
}
@@ -174,7 +173,6 @@ export default function (options: LibraryOptions): Rule {
174173
const prefix = options.prefix;
175174

176175
validateProjectName(options.name);
177-
verifyBaseTsConfigExists(host);
178176

179177
// If scoped project (i.e. "@foo/bar"), convert projectDir to "foo/bar".
180178
const projectName = options.name;
@@ -240,10 +238,6 @@ export default function (options: LibraryOptions): Rule {
240238
path: sourceDir,
241239
project: options.name,
242240
}),
243-
addTsConfigProjectReferences([
244-
`${projectRoot}/tsconfig.lib.json`,
245-
`${projectRoot}/tsconfig.spec.json`,
246-
]),
247241
options.lintFix ? applyLintFix(sourceDir) : noop(),
248242
(_tree: Tree, context: SchematicContext) => {
249243
if (!options.skipPackageJson && !options.skipInstall) {

packages/schematics/angular/library/index_spec.ts

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -202,19 +202,19 @@ describe('Library Schematic', () => {
202202
});
203203
});
204204

205-
describe(`update tsconfig.base.json`, () => {
205+
describe(`update tsconfig.json`, () => {
206206
it(`should add paths mapping to empty tsconfig`, async () => {
207207
const tree = await schematicRunner.runSchematicAsync('library', defaultOptions, workspaceTree).toPromise();
208208

209-
const tsConfigJson = getJsonFileContent(tree, 'tsconfig.base.json');
209+
const tsConfigJson = getJsonFileContent(tree, 'tsconfig.json');
210210
expect(tsConfigJson.compilerOptions.paths.foo).toBeTruthy();
211211
expect(tsConfigJson.compilerOptions.paths.foo.length).toEqual(2);
212212
expect(tsConfigJson.compilerOptions.paths.foo[0]).toEqual('dist/foo/foo');
213213
expect(tsConfigJson.compilerOptions.paths.foo[1]).toEqual('dist/foo');
214214
});
215215

216216
it(`should append to existing paths mappings`, async () => {
217-
workspaceTree.overwrite('tsconfig.base.json', JSON.stringify({
217+
workspaceTree.overwrite('tsconfig.json', JSON.stringify({
218218
compilerOptions: {
219219
paths: {
220220
'unrelated': ['./something/else.ts'],
@@ -224,7 +224,7 @@ describe('Library Schematic', () => {
224224
}));
225225
const tree = await schematicRunner.runSchematicAsync('library', defaultOptions, workspaceTree).toPromise();
226226

227-
const tsConfigJson = getJsonFileContent(tree, 'tsconfig.base.json');
227+
const tsConfigJson = getJsonFileContent(tree, 'tsconfig.json');
228228
expect(tsConfigJson.compilerOptions.paths.foo).toBeTruthy();
229229
expect(tsConfigJson.compilerOptions.paths.foo.length).toEqual(3);
230230
expect(tsConfigJson.compilerOptions.paths.foo[1]).toEqual('dist/foo/foo');
@@ -237,7 +237,7 @@ describe('Library Schematic', () => {
237237
skipTsConfig: true,
238238
}, workspaceTree).toPromise();
239239

240-
const tsConfigJson = getJsonFileContent(tree, 'tsconfig.base.json');
240+
const tsConfigJson = getJsonFileContent(tree, 'tsconfig.json');
241241
expect(tsConfigJson.compilerOptions.paths).toBeUndefined();
242242
});
243243
});
@@ -266,12 +266,12 @@ describe('Library Schematic', () => {
266266
expect(pkgJson.name).toEqual(scopedName);
267267

268268
const tsConfigJson = getJsonFileContent(tree, '/projects/myscope/mylib/tsconfig.spec.json');
269-
expect(tsConfigJson.extends).toEqual('../../../tsconfig.base.json');
269+
expect(tsConfigJson.extends).toEqual('../../../tsconfig.json');
270270

271271
const cfg = JSON.parse(tree.readContent('/angular.json'));
272272
expect(cfg.projects['@myscope/mylib']).toBeDefined();
273273

274-
const rootTsCfg = getJsonFileContent(tree, '/tsconfig.base.json');
274+
const rootTsCfg = getJsonFileContent(tree, '/tsconfig.json');
275275
expect(rootTsCfg.compilerOptions.paths['@myscope/mylib']).toEqual(['dist/myscope/mylib/myscope-mylib', 'dist/myscope/mylib']);
276276

277277
const karmaConf = getFileContent(tree, '/projects/myscope/mylib/karma.conf.js');
@@ -316,9 +316,9 @@ describe('Library Schematic', () => {
316316
expect(buildOpt.tsConfig).toEqual('foo/tsconfig.lib.json');
317317

318318
const appTsConfig = getJsonFileContent(tree, '/foo/tsconfig.lib.json');
319-
expect(appTsConfig.extends).toEqual('../tsconfig.base.json');
319+
expect(appTsConfig.extends).toEqual('../tsconfig.json');
320320
const specTsConfig = getJsonFileContent(tree, '/foo/tsconfig.spec.json');
321-
expect(specTsConfig.extends).toEqual('../tsconfig.base.json');
321+
expect(specTsConfig.extends).toEqual('../tsconfig.json');
322322
});
323323

324324
it(`should add 'production' configuration`, async () => {
@@ -328,16 +328,4 @@ describe('Library Schematic', () => {
328328
const workspace = JSON.parse(tree.readContent('/angular.json'));
329329
expect(workspace.projects.foo.architect.build.configurations.production).toBeDefined();
330330
});
331-
332-
it('should add reference in solution style tsconfig', async () => {
333-
const tree = await schematicRunner.runSchematicAsync('library', defaultOptions, workspaceTree)
334-
.toPromise();
335-
336-
// tslint:disable-next-line:no-any
337-
const { references } = getJsonFileContent(tree, '/tsconfig.json');
338-
expect(references).toEqual([
339-
{ path: './projects/foo/tsconfig.lib.json' },
340-
{ path: './projects/foo/tsconfig.spec.json' },
341-
]);
342-
});
343331
});

packages/schematics/angular/library/schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"skipTsConfig": {
4242
"type": "boolean",
4343
"default": false,
44-
"description": "When true, does not update \"tsconfig.base.json\" to add a path mapping for the new library. The path mapping is needed to use the library in an app, but can be disabled here to simplify development."
44+
"description": "When true, does not update \"tsconfig.json\" to add a path mapping for the new library. The path mapping is needed to use the library in an app, but can be disabled here to simplify development."
4545
},
4646
"lintFix": {
4747
"type": "boolean",

packages/schematics/angular/migrations/update-10/solution-style-tsconfig.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ function updateTsconfigExtendsRule(): Rule {
7373
}
7474

7575
// Rename workspace tsconfig to base tsconfig.
76-
host.rename('tsconfig.json', 'tsconfig.base.json');
76+
host.rename('tsconfig.json', 'tsconfig.json');
7777

78-
// Iterate over all tsconfig files and change the extends from 'tsconfig.json' 'tsconfig.base.json'
78+
// Iterate over all tsconfig files and change the extends from 'tsconfig.json' 'tsconfig.json'
7979
for (const [tsconfigPath, extendsAst] of visitExtendedJsonFiles(host.root, context.logger)) {
8080
const tsConfigDir = dirname(normalize(tsconfigPath));
8181
if ('/tsconfig.json' !== resolve(tsConfigDir, normalize(extendsAst.value))) {
@@ -127,7 +127,7 @@ export default function (): Rule {
127127
return (host, context) => {
128128
const logger = context.logger;
129129

130-
if (host.exists('tsconfig.base.json')) {
130+
if (host.exists('tsconfig.json')) {
131131
logger.info('Migration has already been executed.');
132132

133133
return;

packages/schematics/angular/migrations/update-10/solution-style-tsconfig_spec.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,16 +79,16 @@ describe('Migration to create "Solution Style" tsconfig', () => {
7979
createJsonFile(tree, 'src/tsconfig.worker.json', { extends: './../tsconfig.json', compilerOptions });
8080
});
8181

82-
it(`should rename 'tsconfig.json' to 'tsconfig.base.json'`, async () => {
82+
it(`should rename 'tsconfig.json' to 'tsconfig.json'`, async () => {
8383
const newTree = await schematicRunner.runSchematicAsync(schematicName, {}, tree).toPromise();
84-
expect(newTree.exists('tsconfig.base.json')).toBeTrue();
84+
expect(newTree.exists('tsconfig.json')).toBeTrue();
8585
});
8686

87-
it(`should update extends from 'tsconfig.json' to 'tsconfig.base.json'`, async () => {
87+
it(`should update extends from 'tsconfig.json' to 'tsconfig.json'`, async () => {
8888
const newTree = await schematicRunner.runSchematicAsync(schematicName, {}, tree).toPromise();
89-
expect(readJsonFile(newTree, 'src/tsconfig.json').extends).toEqual('./../tsconfig.base.json');
90-
expect(readJsonFile(newTree, 'src/tsconfig.spec.json').extends).toEqual('./../tsconfig.base.json');
91-
expect(readJsonFile(newTree, 'src/tsconfig.worker.json').extends).toEqual('./../tsconfig.base.json');
89+
expect(readJsonFile(newTree, 'src/tsconfig.json').extends).toEqual('./../tsconfig.json');
90+
expect(readJsonFile(newTree, 'src/tsconfig.spec.json').extends).toEqual('./../tsconfig.json');
91+
expect(readJsonFile(newTree, 'src/tsconfig.worker.json').extends).toEqual('./../tsconfig.json');
9292
});
9393

9494
it('should not update extends if not extended the root tsconfig', async () => {
@@ -118,7 +118,7 @@ describe('Migration to create "Solution Style" tsconfig', () => {
118118
it('should not error out when a JSON file is a blank', async () => {
119119
tree.create('blank.json', '');
120120
const newTree = await schematicRunner.runSchematicAsync(schematicName, {}, tree).toPromise();
121-
expect(readJsonFile(newTree, 'src/tsconfig.json').extends).toEqual('./../tsconfig.base.json');
121+
expect(readJsonFile(newTree, 'src/tsconfig.json').extends).toEqual('./../tsconfig.json');
122122
});
123123

124124
it('should show warning with full path when parsing invalid JSON', async () => {

packages/schematics/angular/migrations/update-10/update-module-and-target-compiler-options.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ export default function (): Rule {
2323
return async (host, { logger }) => {
2424
// Workspace level tsconfig
2525
try {
26-
updateModuleAndTarget(host, 'tsconfig.base.json', {
26+
updateModuleAndTarget(host, 'tsconfig.json', {
2727
oldModule: 'esnext',
2828
newModule: 'es2020',
2929
});
3030
} catch (error) {
3131
logger.warn(
32-
`Unable to update 'tsconfig.base.json' module option from 'esnext' to 'es2020': ${
32+
`Unable to update 'tsconfig.json' module option from 'esnext' to 'es2020': ${
3333
error.message || error
3434
}`,
3535
);

packages/schematics/angular/migrations/update-10/update-module-and-target-compiler-options_spec.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ describe('Migration to update target and module compiler options', () => {
9191
const compilerOptions = { target: 'es2015', module: 'esnext' };
9292

9393
// Workspace
94-
createJsonFile(tree, 'tsconfig.base.json', { compilerOptions });
94+
createJsonFile(tree, 'tsconfig.json', { compilerOptions });
9595

9696
// Application
9797
createJsonFile(tree, 'src/tsconfig.app.json', { compilerOptions });
@@ -106,19 +106,19 @@ describe('Migration to update target and module compiler options', () => {
106106
createJsonFile(tree, 'src/tsconfig.server.json', { compilerOptions: { module: 'commonjs' } });
107107
});
108108

109-
it(`should update module and target in workspace 'tsconfig.base.json'`, async () => {
109+
it(`should update module and target in workspace 'tsconfig.json'`, async () => {
110110
const newTree = await schematicRunner.runSchematicAsync(schematicName, {}, tree).toPromise();
111-
const { module } = readJsonFile(newTree, 'tsconfig.base.json').compilerOptions;
111+
const { module } = readJsonFile(newTree, 'tsconfig.json').compilerOptions;
112112
expect(module).toBe('es2020');
113113
});
114114

115-
it(`should update module and target in 'tsconfig.base.json' which is referenced in option`, async () => {
115+
it(`should update module and target in 'tsconfig.json' which is referenced in option`, async () => {
116116
const newTree = await schematicRunner.runSchematicAsync(schematicName, {}, tree).toPromise();
117117
const { module } = readJsonFile(newTree, 'src/tsconfig.spec.json').compilerOptions;
118118
expect(module).toBe('es2020');
119119
});
120120

121-
it(`should update module and target in 'tsconfig.base.json' which is referenced in a configuration`, async () => {
121+
it(`should update module and target in 'tsconfig.json' which is referenced in a configuration`, async () => {
122122
const newTree = await schematicRunner.runSchematicAsync(schematicName, {}, tree).toPromise();
123123
const { module } = readJsonFile(newTree, 'src/tsconfig.app.prod.json').compilerOptions;
124124
expect(module).toBe('es2020');

packages/schematics/angular/migrations/update-9/update-app-tsconfigs_spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ describe('Migration to version 9', () => {
6262
.toPromise();
6363

6464
// Pre version 9 - tsconfig.json was the base tsconfig file.
65-
tree.overwrite('tsconfig.json', tree.readContent('tsconfig.base.json'));
65+
tree.overwrite('tsconfig.json', tree.readContent('tsconfig.json'));
6666
});
6767

6868
it('should update apps tsConfig with stricter files inclusions', async () => {

0 commit comments

Comments
 (0)