Skip to content

Commit 93e253b

Browse files
alan-agius4mgechev
authored andcommitted
refactor: rename tsconfig.json to tsconfig.base.json
1 parent 9423a9e commit 93e253b

Some content is hidden

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

42 files changed

+214
-140
lines changed

integration/angular_cli/e2e/tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "../tsconfig.json",
2+
"extends": "../tsconfig.base.json",
33
"compilerOptions": {
44
"outDir": "../out-tsc/e2e",
55
"module": "commonjs",

integration/angular_cli/tsconfig.app.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "./tsconfig.json",
2+
"extends": "./tsconfig.base.json",
33
"compilerOptions": {
44
"outDir": "./out-tsc/app",
55
"types": []
+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"compileOnSave": false,
3+
"compilerOptions": {
4+
"baseUrl": "./",
5+
"outDir": "./dist/out-tsc",
6+
"sourceMap": true,
7+
"declaration": false,
8+
"moduleResolution": "node",
9+
"emitDecoratorMetadata": true,
10+
"experimentalDecorators": true,
11+
"target": "es2015",
12+
"module": "es2020",
13+
"typeRoots": [
14+
"node_modules/@types"
15+
],
16+
"lib": [
17+
"es2017",
18+
"dom"
19+
]
20+
},
21+
"angularCompilerOptions": {
22+
"enableIvy": true,
23+
"disableTypeScriptVersionCheck": true
24+
}
25+
}

integration/angular_cli/tsconfig.json

+11-21
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,13 @@
1+
// This tsConfig file is used by editors and TypeScript’s language server to improve development experience.
2+
// Note: This should not be used to perform a compilation.
13
{
2-
"compileOnSave": false,
3-
"compilerOptions": {
4-
"baseUrl": "./",
5-
"outDir": "./dist/out-tsc",
6-
"sourceMap": true,
7-
"declaration": false,
8-
"downlevelIteration": true,
9-
"experimentalDecorators": true,
10-
"module": "es2020",
11-
"moduleResolution": "node",
12-
"importHelpers": true,
13-
"target": "es2015",
14-
"lib": [
15-
"es2018",
16-
"dom"
17-
]
18-
},
19-
"angularCompilerOptions": {
20-
"fullTemplateTypeCheck": true,
21-
"strictInjectionParameters": true
22-
}
4+
"files": [],
5+
"references": [
6+
{
7+
"path": "./tsconfig.app.json"
8+
},
9+
{
10+
"path": "./tsconfig.spec.json"
11+
}
12+
]
2313
}

integration/angular_cli/tsconfig.spec.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "./tsconfig.json",
2+
"extends": "./tsconfig.base.json",
33
"compilerOptions": {
44
"outDir": "./out-tsc/spec",
55
"types": [

packages/angular/cli/commands/version-impl.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ export class VersionCommand extends Command<VersionCommandSchema> {
194194

195195
private getIvyWorkspace(): string {
196196
try {
197-
const content = fs.readFileSync(path.resolve(this.workspace.root, 'tsconfig.json'), 'utf-8');
197+
const content = fs.readFileSync(path.resolve(this.workspace.root, 'tsconfig.base.json'), 'utf-8');
198198
const tsConfig = parseJson(content, JsonParseMode.Loose);
199199
if (!isJsonObject(tsConfig)) {
200200
return '<error>';

packages/angular_devkit/build_angular/src/browser/specs/allow-js_spec.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ describe('Browser Builder allow js', () => {
2929
});
3030

3131
host.replaceInFile(
32-
'tsconfig.json',
32+
'tsconfig.base.json',
3333
'"target": "es2015"',
3434
'"target": "es5", "allowJs": true',
3535
);
@@ -54,7 +54,7 @@ describe('Browser Builder allow js', () => {
5454
});
5555

5656
host.replaceInFile(
57-
'tsconfig.json',
57+
'tsconfig.base.json',
5858
'"target": "es2015"',
5959
'"target": "es5", "allowJs": true',
6060
);
@@ -81,7 +81,7 @@ describe('Browser Builder allow js', () => {
8181
});
8282

8383
host.replaceInFile(
84-
'tsconfig.json',
84+
'tsconfig.base.json',
8585
'"target": "es2015"',
8686
'"target": "es5", "allowJs": true',
8787
);

packages/angular_devkit/build_angular/src/browser/specs/differential_loading_spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ describe('Browser Builder with differential loading', () => {
6464

6565
it('emits all the neccessary files for target of ES2016', async () => {
6666
host.replaceInFile(
67-
'tsconfig.json',
67+
'tsconfig.base.json',
6868
'"target": "es2015",',
6969
`"target": "es2016",`,
7070
);
@@ -106,7 +106,7 @@ describe('Browser Builder with differential loading', () => {
106106

107107
it('emits all the neccessary files for target of ESNext', async () => {
108108
host.replaceInFile(
109-
'tsconfig.json',
109+
'tsconfig.base.json',
110110
'"target": "es2015",',
111111
`"target": "esnext",`,
112112
);

packages/angular_devkit/build_angular/src/browser/specs/optimization-level_spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ describe('Browser Builder optimization level', () => {
2727
});
2828

2929
it('tsconfig target changes optimizations to use ES2015', async () => {
30-
host.replaceInFile('tsconfig.json', '"target": "es5"', '"target": "es2015"');
30+
host.replaceInFile('tsconfig.base.json', '"target": "es5"', '"target": "es2015"');
3131

3232
const overrides = { optimization: true };
3333
const { files } = await browserBuild(architect, host, target, overrides);

packages/angular_devkit/build_angular/src/browser/specs/resolve-json-module_spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ describe('Browser Builder resolve json module', () => {
2929
});
3030

3131
host.replaceInFile(
32-
'tsconfig.json',
32+
'tsconfig.base.json',
3333
'"target": "es2015"',
3434
'"target": "es5", "resolveJsonModule": true',
3535
);

packages/angular_devkit/build_angular/src/browser/specs/tsconfig-paths_spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ describe('Browser Builder tsconfig paths', () => {
2222

2323
it('works', async () => {
2424
host.replaceInFile('src/app/app.module.ts', './app.component', '@root/app/app.component');
25-
host.replaceInFile('tsconfig.json', /"baseUrl": ".\/",/, `
25+
host.replaceInFile('tsconfig.base.json', /"baseUrl": ".\/",/, `
2626
"baseUrl": "./",
2727
"paths": {
2828
"@root/*": [
@@ -40,7 +40,7 @@ describe('Browser Builder tsconfig paths', () => {
4040
'src/app/shared/meaning.ts': 'export var meaning = 42;',
4141
'src/app/shared/index.ts': `export * from './meaning'`,
4242
});
43-
host.replaceInFile('tsconfig.json', /"baseUrl": ".\/",/, `
43+
host.replaceInFile('tsconfig.base.json', /"baseUrl": ".\/",/, `
4444
"baseUrl": "./",
4545
"paths": {
4646
"@shared": [

packages/angular_devkit/build_angular/src/browser/specs/web-worker_spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ describe('Browser Builder Web Worker support', () => {
5757
// tests, and integration with other build targets.
5858
'./src/tsconfig.worker.json': `
5959
{
60-
"extends": "../tsconfig.json",
60+
"extends": "../tsconfig.base.json",
6161
"compilerOptions": {
6262
"outDir": "../out-tsc/worker",
6363
"lib": [
@@ -73,7 +73,7 @@ describe('Browser Builder Web Worker support', () => {
7373
// Alter the app tsconfig to not include *.worker.ts files.
7474
'./src/tsconfig.app.json': `
7575
{
76-
"extends": "../tsconfig.json",
76+
"extends": "../tsconfig.base.json",
7777
"compilerOptions": {
7878
"outDir": "../out-tsc/worker",
7979
"types": []

packages/angular_devkit/build_angular/src/karma/code-coverage_spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ describe('Karma Builder code coverage', () => {
8787

8888
host.writeMultipleFiles(files);
8989

90-
host.replaceInFile('tsconfig.json', /"baseUrl": ".\/",/, `
90+
host.replaceInFile('tsconfig.base.json', /"baseUrl": ".\/",/, `
9191
"baseUrl": "./",
9292
"paths": {
9393
"my-lib": [

packages/angular_devkit/build_angular/src/karma/works_spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ describe('Karma Builder', () => {
4141
});
4242

4343
it('supports ES2015 target', async () => {
44-
host.replaceInFile('tsconfig.json', '"target": "es5"', '"target": "es2015"');
44+
host.replaceInFile('tsconfig.base.json', '"target": "es5"', '"target": "es2015"');
4545

4646
const run = await architect.scheduleTarget(karmaTargetSpec);
4747

packages/angular_devkit/build_angular/src/test-utils.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export async function createArchitect(workspaceRoot: Path) {
5555

5656
// Set AOT compilation to use VE if needed.
5757
if (veEnabled) {
58-
host.replaceInFile('tsconfig.json', `"enableIvy": true,`, `"enableIvy": false,`);
58+
host.replaceInFile('tsconfig.base.json', `"enableIvy": true,`, `"enableIvy": false,`);
5959
}
6060

6161
return {

packages/angular_devkit/build_angular/test/hello-world-app/e2e/tsconfig.e2e.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "../tsconfig.json",
2+
"extends": "../tsconfig.base.json",
33
"compilerOptions": {
44
"outDir": "../out-tsc/e2e",
55
"module": "commonjs",

packages/angular_devkit/build_angular/test/hello-world-app/src/tsconfig.app.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "../tsconfig.json",
2+
"extends": "../tsconfig.base.json",
33
"compilerOptions": {
44
"outDir": "../out-tsc/app",
55
"types": []

packages/angular_devkit/build_angular/test/hello-world-app/src/tsconfig.spec.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "../tsconfig.json",
2+
"extends": "../tsconfig.base.json",
33
"compilerOptions": {
44
"outDir": "../out-tsc/spec",
55
"types": [
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"compileOnSave": false,
3+
"compilerOptions": {
4+
"baseUrl": "./",
5+
"outDir": "./dist/out-tsc",
6+
"sourceMap": true,
7+
"declaration": false,
8+
"moduleResolution": "node",
9+
"emitDecoratorMetadata": true,
10+
"experimentalDecorators": true,
11+
"target": "es2015",
12+
"module": "es2020",
13+
"typeRoots": [
14+
"node_modules/@types"
15+
],
16+
"lib": [
17+
"es2017",
18+
"dom"
19+
]
20+
},
21+
"angularCompilerOptions": {
22+
"enableIvy": true,
23+
"disableTypeScriptVersionCheck": true
24+
}
25+
}
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,19 @@
1+
// This tsConfig file is used by editors and TypeScript’s language server to improve development experience.
2+
// Note: This should not be used to perform a compilation.
13
{
2-
"compileOnSave": false,
3-
"compilerOptions": {
4-
"preserveSymlinks": true,
5-
"baseUrl": "./",
6-
"outDir": "./dist/out-tsc",
7-
"sourceMap": true,
8-
"declaration": false,
9-
"moduleResolution": "node",
10-
"emitDecoratorMetadata": true,
11-
"experimentalDecorators": true,
12-
"target": "es2015",
13-
"module": "es2020",
14-
"typeRoots": [
15-
"../node_modules/@types"
16-
],
17-
"lib": [
18-
"es2017",
19-
"dom"
20-
]
21-
},
22-
"angularCompilerOptions": {
23-
"enableIvy": true,
24-
"disableTypeScriptVersionCheck": true
25-
}
4+
"files": [],
5+
"references": [
6+
{
7+
"path": "./src/tsconfig.app.json"
8+
},
9+
{
10+
"path": "./src/tsconfig.spec.json"
11+
},
12+
{
13+
"path": "./src/tsconfig.server.json"
14+
},
15+
{
16+
"path": "./e2e/tsconfig.e2e.json"
17+
}
18+
]
2619
}

packages/angular_devkit/build_ng_packagr/src/build/index_spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ describe('NgPackagr Builder', () => {
5050

5151
// Set AOT compilation to use VE if needed.
5252
if (veEnabled) {
53-
host.replaceInFile('tsconfig.json', `"enableIvy": true,`, `"enableIvy": false,`);
53+
host.replaceInFile('tsconfig.base.json', `"enableIvy": true,`, `"enableIvy": false,`);
5454
}
5555
});
5656

packages/angular_devkit/build_ng_packagr/test/ng-packaged/projects/lib/tsconfig.lib.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "../../tsconfig.json",
2+
"extends": "../../tsconfig.base.json",
33
"compilerOptions": {
44
"target": "es2015",
55
"declaration": true,

packages/angular_devkit/build_ng_packagr/test/ng-packaged/projects/lib/tsconfig.spec.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "../../tsconfig.json",
2+
"extends": "../../tsconfig.base.json",
33
"compilerOptions": {
44
"outDir": "../../out-tsc/spec",
55
"types": [
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"compileOnSave": false,
3+
"compilerOptions": {
4+
"baseUrl": "./",
5+
"outDir": "./dist/out-tsc",
6+
"sourceMap": true,
7+
"declaration": false,
8+
"moduleResolution": "node",
9+
"experimentalDecorators": true,
10+
"target": "es2015",
11+
"module": "es2020",
12+
"typeRoots": [
13+
"node_modules/@types"
14+
],
15+
"lib": [
16+
"es2017",
17+
"dom"
18+
]
19+
},
20+
"angularCompilerOptions": {
21+
"enableIvy": true,
22+
"disableTypeScriptVersionCheck": true
23+
}
24+
}
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,13 @@
1+
// This tsConfig file is used by editors and TypeScript’s language server to improve development experience.
2+
// Note: This should not be used to perform a compilation.
13
{
2-
"compileOnSave": false,
3-
"compilerOptions": {
4-
"baseUrl": "./",
5-
"outDir": "./dist/out-tsc",
6-
"sourceMap": true,
7-
"declaration": false,
8-
"moduleResolution": "node",
9-
"experimentalDecorators": true,
10-
"target": "es2015",
11-
"module": "es2020",
12-
"typeRoots": [
13-
"node_modules/@types"
14-
],
15-
"lib": [
16-
"es2017",
17-
"dom"
18-
]
19-
},
20-
"angularCompilerOptions": {
21-
"enableIvy": true,
22-
"disableTypeScriptVersionCheck": true
23-
}
4+
"files": [],
5+
"references": [
6+
{
7+
"path": "./projects/lib/tsconfig.lib.json"
8+
},
9+
{
10+
"path": "./projects/lib/tsconfig.spec.json"
11+
}
12+
]
2413
}

0 commit comments

Comments
 (0)