Skip to content

Commit 5ba40c1

Browse files
devversionamysorto
authored andcommitted
build: check .ng-dev tool configuration in CI
Checks the `.ng-dev` tool configuration in CI, compared to doing it locally when the caretaker intends to perform a merge and then realizes the config is broken.
1 parent 2f0e6a5 commit 5ba40c1

File tree

7 files changed

+22
-7
lines changed

7 files changed

+22
-7
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ jobs:
387387
- *setup_bazel_binary
388388

389389
- run: yarn build-and-check-release-output
390-
- run: yarn check-tools
390+
- run: yarn check-tooling-setup
391391

392392
# TODO(devversion): replace this with bazel tests that run Madge. This is
393393
# cumbersome and doesn't guarantee no circular deps for other entry-points.

.ng-dev/tsconfig.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"compilerOptions": {
3+
"strict": true,
4+
"target": "es2015",
5+
"module": "commonjs",
6+
"noEmit": true,
7+
"skipLibCheck": true,
8+
"types": []
9+
},
10+
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"integration-tests:size-test": "bazel test //integration/size-test/...",
4848
"check-mdc-tests": "ts-node --project scripts/tsconfig.json scripts/check-mdc-tests.ts",
4949
"check-mdc-exports": "ts-node --project scripts/tsconfig.json scripts/check-mdc-exports.ts",
50-
"check-tools": "yarn tsc --project tools/tsconfig-ci.json",
50+
"check-tooling-setup": "yarn tsc --project tools/tsconfig-ci.json && yarn tsc --project .ng-dev/tsconfig.json",
5151
"tsc": "node ./node_modules/typescript/bin/tsc",
5252
"prepare": "husky install"
5353
},

scripts/build-packages-dist.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ function buildReleasePackages(useIvy: boolean, distPath: string,
7272
const targets = exec(queryPackagesCmd, true).split(/\r?\n/);
7373
const packageNames = getPackageNamesOfTargets(targets);
7474
const bazelBinPath = exec(`${bazelCmd} info bazel-bin`, true);
75-
const getOutputPath = pkgName => join(bazelBinPath, 'src', pkgName, 'npm_package');
75+
const getOutputPath = (pkgName: string) => join(bazelBinPath, 'src', pkgName, 'npm_package');
7676

7777
// Build with "--config=release" or `--config=snapshot-build` so that Bazel
7878
// runs the workspace stamping script. The stamping script ensures that the

scripts/caretaking/resync-caretaker-app-prs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as Octokit from '@octokit/rest';
1+
import {Octokit} from '@octokit/rest';
22
import * as fetch from 'node-fetch';
33

44
const apiBaseUrl = 'https://test-jperrott.firebaseio.com/pulls';

scripts/check-mdc-exports-config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ export const config = {
2121
// Irrelevant for the MDC implementation, because the slider doesn't dispatch any events.
2222
'MatSliderChange'
2323
]
24-
}
24+
} as {[entryPointName: string]: string[]}
2525
};

scripts/tsconfig.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@
55
"lib": ["es2016"],
66
"moduleResolution": "node",
77
"types": ["node"],
8-
"strictNullChecks": true,
8+
"strict": true,
9+
"noEmit": true,
10+
"skipLibCheck": true,
911
"downlevelIteration": true
10-
}
12+
},
13+
// The `firebase-functions` folder has its own `package.json` and does
14+
// not pass type-checking. This excludes it from being checked.
15+
"exclude": ["caretaking/firebase-functions/**"]
1116
}

0 commit comments

Comments
 (0)