refactor(ivy): ngcc - remove formatProperty
from EntryPointBundle
(#32052)
Remove the `formatProperty` property from the `EntryPointBundle` interface, because the property is not directly related to that type. It was only used in one place, when calling `fileWriter.writeBundle()`, but we can pass `formatProperty` directrly to `writeBundle()`. PR Close #32052
This commit is contained in:

committed by
Alex Rickabaugh

parent
ef12e10e59
commit
ed70f73794
@ -9,7 +9,7 @@ import * as ts from 'typescript';
|
||||
import {AbsoluteFsPath, NgtscCompilerHost, absoluteFrom, getFileSystem} from '../../../src/ngtsc/file_system';
|
||||
import {TestFile} from '../../../src/ngtsc/file_system/testing';
|
||||
import {BundleProgram, makeBundleProgram} from '../../src/packages/bundle_program';
|
||||
import {EntryPoint, EntryPointFormat, EntryPointJsonProperty} from '../../src/packages/entry_point';
|
||||
import {EntryPoint, EntryPointFormat} from '../../src/packages/entry_point';
|
||||
import {EntryPointBundle} from '../../src/packages/entry_point_bundle';
|
||||
import {NgccSourcesCompilerHost} from '../../src/packages/ngcc_compiler_host';
|
||||
|
||||
@ -32,19 +32,13 @@ export function makeTestEntryPoint(
|
||||
* @param dtsFiles The typings files to include the bundle.
|
||||
*/
|
||||
export function makeTestEntryPointBundle(
|
||||
packageName: string, formatProperty: EntryPointJsonProperty, format: EntryPointFormat,
|
||||
isCore: boolean, srcRootNames: AbsoluteFsPath[],
|
||||
packageName: string, format: EntryPointFormat, isCore: boolean, srcRootNames: AbsoluteFsPath[],
|
||||
dtsRootNames?: AbsoluteFsPath[]): EntryPointBundle {
|
||||
const entryPoint = makeTestEntryPoint(packageName);
|
||||
const src = makeTestBundleProgram(srcRootNames[0], isCore);
|
||||
const dts = dtsRootNames ? makeTestDtsBundleProgram(dtsRootNames[0], isCore) : null;
|
||||
const isFlatCore = isCore && src.r3SymbolsFile === null;
|
||||
return {
|
||||
entryPoint,
|
||||
formatProperty,
|
||||
format,
|
||||
rootDirs: [absoluteFrom('/')], src, dts, isCore, isFlatCore
|
||||
};
|
||||
return {entryPoint, format, rootDirs: [absoluteFrom('/')], src, dts, isCore, isFlatCore};
|
||||
}
|
||||
|
||||
export function makeTestBundleProgram(
|
||||
|
Reference in New Issue
Block a user