refactor(ngcc): store whether to render legacy i18n message ids in the bundle (#34135)
Placing this configuration in to the bundle avoids having to pass the value around through lots of function calls, but also could enable support for different behaviour per bundle in the future. PR Close #34135
This commit is contained in:

committed by
Miško Hevery

parent
e524322c43
commit
cebe49d3c9
@ -39,13 +39,18 @@ export function makeTestEntryPoint(
|
||||
*/
|
||||
export function makeTestEntryPointBundle(
|
||||
packageName: string, format: EntryPointFormat, isCore: boolean, srcRootNames: AbsoluteFsPath[],
|
||||
dtsRootNames?: AbsoluteFsPath[], config?: TestConfig): EntryPointBundle {
|
||||
dtsRootNames?: AbsoluteFsPath[], config?: TestConfig,
|
||||
enableI18nLegacyMessageIdFormat = false): EntryPointBundle {
|
||||
const entryPoint = makeTestEntryPoint(packageName, packageName, config);
|
||||
const src = makeTestBundleProgram(srcRootNames[0], isCore);
|
||||
const dts =
|
||||
dtsRootNames ? makeTestDtsBundleProgram(dtsRootNames[0], entryPoint.package, isCore) : null;
|
||||
const isFlatCore = isCore && src.r3SymbolsFile === null;
|
||||
return {entryPoint, format, rootDirs: [absoluteFrom('/')], src, dts, isCore, isFlatCore};
|
||||
return {
|
||||
entryPoint,
|
||||
format,
|
||||
rootDirs: [absoluteFrom('/')], src, dts, isCore, isFlatCore, enableI18nLegacyMessageIdFormat
|
||||
};
|
||||
}
|
||||
|
||||
export function makeTestBundleProgram(
|
||||
|
Reference in New Issue
Block a user