Skip to content
Permalink
Browse files

fix(compiler-cli): log ngcc skipping messages as debug instead of info

  • Loading branch information...
filipesilva committed May 2, 2019
1 parent b70d20b commit dbee62ee99d52b6c5df61af6893b3a176428042e
@@ -90,7 +90,7 @@ export function mainNgcc(
if (absoluteTargetEntryPointPath &&
hasProcessedTargetEntryPoint(
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;
}

@@ -123,7 +123,7 @@ export function mainNgcc(

if (hasBeenProcessed(entryPointPackageJson, property)) {
compiledFormats.add(formatPath);
logger.info(`Skipping ${entryPoint.name} : ${property} (already compiled).`);
logger.debug(`Skipping ${entryPoint.name} : ${property} (already compiled).`);
continue;
}

@@ -146,7 +146,7 @@ export function mainNgcc(
`Skipping ${entryPoint.name} : ${format} (no valid entry point file for this format).`);
}
} 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
@@ -86,7 +86,7 @@ describe('ngcc main()', () => {
basePath: '/node_modules',
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', () => {
@@ -97,7 +97,7 @@ describe('ngcc main()', () => {
targetEntryPointPath: '@angular/common/http/testing',
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'
]);
});
@@ -115,7 +115,7 @@ describe('ngcc main()', () => {
compileAllFormats: false, logger,
});

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

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

0 comments on commit dbee62e

Please sign in to comment.
You can’t perform that action at this time.