Skip to content

Commit 0ada165

Browse files
committed
build: fix rollup globals tslint rule not checking all files
Apparently the rollup globals tslint rule did not check all files. Resuling in a few cases where the rollup globals were missing.
1 parent 0982057 commit 0ada165

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

tools/package-tools/rollup-globals.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,12 @@ export const rollupGlobals = {
134134
...rollupYouTubePlayerEntryPoints,
135135
...rollupGoogleMapsEntryPoints,
136136

137+
// For each Angular Material secondary entry-point, we include a testing
138+
// tertiary entry-point.
139+
...matSecondaryEntryPoints.reduce((res, entryPoint) => {
140+
return {...res, ...generateRollupEntryPoints(`material/${entryPoint}`, ['testing'])};
141+
}, []),
142+
137143
'@angular/cdk/private/testing': 'ng.cdk.private.testing',
138144
'@angular/cdk/private/testing/e2e': 'ng.cdk.private.testing.e2e',
139145

tools/tslint-rules/missingRollupGlobalsRule.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class Walker extends Lint.RuleWalker {
3838

3939
this._configPath = path.resolve(process.cwd(), configPath);
4040
this._config = require(this._configPath).rollupGlobals;
41-
this._enabled = fileGlobs.some(p => minimatch(relativeFilePath, p));
41+
this._enabled = fileGlobs.every(p => minimatch(relativeFilePath, p));
4242
}
4343

4444
visitImportDeclaration(node: ts.ImportDeclaration) {

tslint.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,9 @@
134134
"missing-rollup-globals": [
135135
true,
136136
"./tools/package-tools/rollup-globals.ts",
137-
"src/!(a11y-demo|e2e-app|material-examples|universal-app|dev-app)/!(schematics)**/*.ts"
137+
"src/**/!(*.spec).ts",
138+
"!src/+(a11y-demo|e2e-app|universal-app|dev-app)/**/*.ts",
139+
"!src/**/schematics/**/*.ts"
138140
],
139141
"file-name-casing": [true, {
140142
// Exclude custom lint rule files since they have to always be camel-cased and end

0 commit comments

Comments
 (0)