fix(compiler-cli): log ngcc skipping messages as debug instead of info (#30232)
Related to https://github.com/angular/angular-cli/issues/14194, https://github.com/angular/angular-cli/pull/14320 PR Close #30232
This commit is contained in:
parent
4537816c1d
commit
60a8888b4f
|
@ -63,7 +63,7 @@ if [[ $? != 0 ]]; then exit 1; fi
|
||||||
|
|
||||||
# Can it be safely run again (as a noop)?
|
# Can it be safely run again (as a noop)?
|
||||||
# And check that it logged skipping compilation as expected
|
# And check that it logged skipping compilation as expected
|
||||||
ivy-ngcc | grep 'Skipping'
|
ivy-ngcc -l debug | grep 'Skipping'
|
||||||
if [[ $? != 0 ]]; then exit 1; fi
|
if [[ $? != 0 ]]; then exit 1; fi
|
||||||
|
|
||||||
# Check that running it with logging level error outputs nothing
|
# Check that running it with logging level error outputs nothing
|
||||||
|
|
|
@ -91,7 +91,7 @@ export function mainNgcc(
|
||||||
if (absoluteTargetEntryPointPath &&
|
if (absoluteTargetEntryPointPath &&
|
||||||
hasProcessedTargetEntryPoint(
|
hasProcessedTargetEntryPoint(
|
||||||
fs, absoluteTargetEntryPointPath, propertiesToConsider, compileAllFormats)) {
|
fs, absoluteTargetEntryPointPath, propertiesToConsider, compileAllFormats)) {
|
||||||
logger.info('The target entry-point has already been processed');
|
logger.debug('The target entry-point has already been processed');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -124,7 +124,7 @@ export function mainNgcc(
|
||||||
|
|
||||||
if (hasBeenProcessed(entryPointPackageJson, property)) {
|
if (hasBeenProcessed(entryPointPackageJson, property)) {
|
||||||
compiledFormats.add(formatPath);
|
compiledFormats.add(formatPath);
|
||||||
logger.info(`Skipping ${entryPoint.name} : ${property} (already compiled).`);
|
logger.debug(`Skipping ${entryPoint.name} : ${property} (already compiled).`);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -147,7 +147,7 @@ export function mainNgcc(
|
||||||
`Skipping ${entryPoint.name} : ${format} (no valid entry point file for this format).`);
|
`Skipping ${entryPoint.name} : ${format} (no valid entry point file for this format).`);
|
||||||
}
|
}
|
||||||
} else if (!compileAllFormats) {
|
} else if (!compileAllFormats) {
|
||||||
logger.info(`Skipping ${entryPoint.name} : ${property} (already compiled).`);
|
logger.debug(`Skipping ${entryPoint.name} : ${property} (already compiled).`);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Either this format was just compiled or its underlying format was compiled because of a
|
// Either this format was just compiled or its underlying format was compiled because of a
|
||||||
|
|
|
@ -86,7 +86,7 @@ describe('ngcc main()', () => {
|
||||||
basePath: '/node_modules',
|
basePath: '/node_modules',
|
||||||
targetEntryPointPath: '@angular/common/http/testing', logger,
|
targetEntryPointPath: '@angular/common/http/testing', logger,
|
||||||
});
|
});
|
||||||
expect(logger.logs.info).toContain(['The target entry-point has already been processed']);
|
expect(logger.logs.debug).toContain(['The target entry-point has already been processed']);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should process the target if any `propertyToConsider` is not marked as processed', () => {
|
it('should process the target if any `propertyToConsider` is not marked as processed', () => {
|
||||||
|
@ -97,7 +97,7 @@ describe('ngcc main()', () => {
|
||||||
targetEntryPointPath: '@angular/common/http/testing',
|
targetEntryPointPath: '@angular/common/http/testing',
|
||||||
propertiesToConsider: ['fesm2015', 'esm5', 'esm2015'], logger,
|
propertiesToConsider: ['fesm2015', 'esm5', 'esm2015'], logger,
|
||||||
});
|
});
|
||||||
expect(logger.logs.info).not.toContain([
|
expect(logger.logs.debug).not.toContain([
|
||||||
'The target entry-point has already been processed'
|
'The target entry-point has already been processed'
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
@ -115,7 +115,7 @@ describe('ngcc main()', () => {
|
||||||
compileAllFormats: false, logger,
|
compileAllFormats: false, logger,
|
||||||
});
|
});
|
||||||
|
|
||||||
expect(logger.logs.info).not.toContain([
|
expect(logger.logs.debug).not.toContain([
|
||||||
'The target entry-point has already been processed'
|
'The target entry-point has already been processed'
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
@ -132,7 +132,7 @@ describe('ngcc main()', () => {
|
||||||
compileAllFormats: false, logger,
|
compileAllFormats: false, logger,
|
||||||
});
|
});
|
||||||
|
|
||||||
expect(logger.logs.info).toContain([
|
expect(logger.logs.debug).toContain([
|
||||||
'The target entry-point has already been processed'
|
'The target entry-point has already been processed'
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue