fix(ngcc): do not warn if paths
mapping does not exist (#36525)
In cc4b813e759f16fb0f4dfa92a0e6464ed768a629 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:
parent
b40b5576df
commit
717df13207
@ -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.`);
|
||||
|
@ -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` +
|
||||
|
Loading…
x
Reference in New Issue
Block a user