fix(ngcc): do not warn if `paths` mapping does not exist (#36525)

In cc4b813e75 the `getBasePaths()`
function was changed to log a warning if a `basePath()` computed from
the `paths` mappings did not exist. It turns out this is a common and
accepted scenario, so we should not log warnings in this case.

Fixes #36518

PR Close #36525
This commit is contained in:
Pete Bacon Darwin 2020-04-08 19:34:19 +01:00 committed by atscott
parent b40b5576df
commit 717df13207
2 changed files with 3 additions and 3 deletions

View File

@ -50,7 +50,7 @@ export function getBasePaths(
if (fs.exists(basePath)) {
basePaths.push(basePath);
} else {
logger.warn(
logger.debug(
`The basePath "${basePath}" computed from baseUrl "${baseUrl}" and path mapping "${
path}" does not exist in the file-system.\n` +
`It will not be scanned for entry-points.`);

View File

@ -115,7 +115,7 @@ runInEachFileSystem(() => {
]);
});
it('should discard basePaths that do not exists and log a warning', () => {
it('should discard basePaths that do not exists and log a debug message', () => {
const projectDirectory = _('/path/to/project');
const fs = getFileSystem();
fs.ensureDir(fs.resolve(projectDirectory, 'dist-1'));
@ -131,7 +131,7 @@ runInEachFileSystem(() => {
sourceDirectory,
fs.resolve(projectDirectory, 'dist-1'),
]);
expect(logger.logs.warn).toEqual([
expect(logger.logs.debug).toEqual([
[`The basePath "${
fs.resolve(projectDirectory, 'sub-folder/dist-2')}" computed from baseUrl "${
projectDirectory}" and path mapping "sub-folder/dist-2" does not exist in the file-system.\n` +