@@ -150,7 +150,7 @@ function main(args: string[]): void {
150150 return getEntryPointSubpath ( moduleName ) !== '' ;
151151 }
152152
153- const crossEntryPointFailures = esm2022 . flatMap ( file =>
153+ const crossEntryPointFailures = esm2022 . flatMap ( ( file ) =>
154154 analyzeFileAndEnsureNoCrossImports ( file , metadata ) ,
155155 ) ;
156156
@@ -161,13 +161,16 @@ function main(args: string[]): void {
161161
162162 // Copy all FESM files (and their potential shared chunks) into the package output.
163163 const fesmFiles = globSync ( '**/*' , { cwd : metadata . fesmBundlesOut . path } ) ;
164- fesmFiles . forEach ( f =>
164+ fesmFiles . forEach ( ( f ) =>
165165 copyFile ( path . join ( metadata . fesmBundlesOut . path , f ) , path . join ( 'fesm2022' , f ) ) ,
166166 ) ;
167167
168168 // Copy all dts files (and their potential shared chunks) into the package output.
169169 const dtsFiles = globSync ( '**/*' , { cwd : metadata . dtsBundlesOut . path } ) ;
170- dtsFiles . forEach ( f => copyFile ( path . join ( metadata . dtsBundlesOut . path , f ) , path . join ( 'types' , f ) ) ) ;
170+ dtsFiles . forEach ( ( f ) =>
171+ // TODO(devversion): Put all types under `/types/` folder. Breaking change in v20.
172+ copyFile ( path . join ( metadata . dtsBundlesOut . path , f ) , f ) ,
173+ ) ;
171174
172175 for ( const file of staticFiles ) {
173176 // We copy all files into the package output while preserving the sub-path from
@@ -323,10 +326,10 @@ function main(args: string[]): void {
323326
324327 const sideEffects = packageJson . sideEffects as undefined | false | string [ ] ;
325328 const neededSideEffects = sideEffectEntryPoints . map (
326- entryPointModule => `./${ metadata . entryPoints [ entryPointModule ] . fesm2022RelativePath } ` ,
329+ ( entryPointModule ) => `./${ metadata . entryPoints [ entryPointModule ] . fesm2022RelativePath } ` ,
327330 ) ;
328331 const missingSideEffects = neededSideEffects . filter (
329- p =>
332+ ( p ) =>
330333 // It's missing, if the whole package is marked as having no side effects.
331334 sideEffects === false ||
332335 // Alternatively, it's missing if the explicit list doesn't contain the pattern.
@@ -345,7 +348,9 @@ function main(args: string[]): void {
345348 // of the `ng_package` known entry points.
346349 const unexpectedExtra =
347350 sideEffects !== false
348- ? ( sideEffects ?? [ ] ) . filter ( p => p . includes ( 'fesm2022' ) && ! neededSideEffects . includes ( p ) )
351+ ? ( sideEffects ?? [ ] ) . filter (
352+ ( p ) => p . includes ( 'fesm2022' ) && ! neededSideEffects . includes ( p ) ,
353+ )
349354 : [ ] ;
350355 if ( unexpectedExtra . length > 0 ) {
351356 throw Error (
0 commit comments