Skip to content

Commit a602563

Browse files
filipesilvaBioPhoton
authored andcommitted
fix(compiler-cli): log ngcc skipping messages as debug instead of info (angular#30232)
Related to angular/angular-cli#14194, angular/angular-cli#14320 PR Close angular#30232
1 parent 028e3ea commit a602563

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

integration/ngcc/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ if [[ $? != 0 ]]; then exit 1; fi
6363

6464
# Can it be safely run again (as a noop)?
6565
# And check that it logged skipping compilation as expected
66-
ivy-ngcc | grep 'Skipping'
66+
ivy-ngcc -l debug | grep 'Skipping'
6767
if [[ $? != 0 ]]; then exit 1; fi
6868

6969
# Check that running it with logging level error outputs nothing

packages/compiler-cli/ngcc/src/main.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export function mainNgcc(
9191
if (absoluteTargetEntryPointPath &&
9292
hasProcessedTargetEntryPoint(
9393
fs, absoluteTargetEntryPointPath, propertiesToConsider, compileAllFormats)) {
94-
logger.info('The target entry-point has already been processed');
94+
logger.debug('The target entry-point has already been processed');
9595
return;
9696
}
9797

@@ -124,7 +124,7 @@ export function mainNgcc(
124124

125125
if (hasBeenProcessed(entryPointPackageJson, property)) {
126126
compiledFormats.add(formatPath);
127-
logger.info(`Skipping ${entryPoint.name} : ${property} (already compiled).`);
127+
logger.debug(`Skipping ${entryPoint.name} : ${property} (already compiled).`);
128128
continue;
129129
}
130130

@@ -147,7 +147,7 @@ export function mainNgcc(
147147
`Skipping ${entryPoint.name} : ${format} (no valid entry point file for this format).`);
148148
}
149149
} else if (!compileAllFormats) {
150-
logger.info(`Skipping ${entryPoint.name} : ${property} (already compiled).`);
150+
logger.debug(`Skipping ${entryPoint.name} : ${property} (already compiled).`);
151151
}
152152

153153
// Either this format was just compiled or its underlying format was compiled because of a

packages/compiler-cli/ngcc/test/integration/ngcc_spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ describe('ngcc main()', () => {
8686
basePath: '/node_modules',
8787
targetEntryPointPath: '@angular/common/http/testing', logger,
8888
});
89-
expect(logger.logs.info).toContain(['The target entry-point has already been processed']);
89+
expect(logger.logs.debug).toContain(['The target entry-point has already been processed']);
9090
});
9191

9292
it('should process the target if any `propertyToConsider` is not marked as processed', () => {
@@ -97,7 +97,7 @@ describe('ngcc main()', () => {
9797
targetEntryPointPath: '@angular/common/http/testing',
9898
propertiesToConsider: ['fesm2015', 'esm5', 'esm2015'], logger,
9999
});
100-
expect(logger.logs.info).not.toContain([
100+
expect(logger.logs.debug).not.toContain([
101101
'The target entry-point has already been processed'
102102
]);
103103
});
@@ -115,7 +115,7 @@ describe('ngcc main()', () => {
115115
compileAllFormats: false, logger,
116116
});
117117

118-
expect(logger.logs.info).not.toContain([
118+
expect(logger.logs.debug).not.toContain([
119119
'The target entry-point has already been processed'
120120
]);
121121
});
@@ -132,7 +132,7 @@ describe('ngcc main()', () => {
132132
compileAllFormats: false, logger,
133133
});
134134

135-
expect(logger.logs.info).toContain([
135+
expect(logger.logs.debug).toContain([
136136
'The target entry-point has already been processed'
137137
]);
138138
});

0 commit comments

Comments
 (0)