@@ -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,16 +161,13 @@ 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 ) =>
171- // TODO(devversion): Put all types under `/types/` folder. Breaking change in v20.
172- copyFile ( path . join ( metadata . dtsBundlesOut . path , f ) , f ) ,
173- ) ;
170+ dtsFiles . forEach ( f => copyFile ( path . join ( metadata . dtsBundlesOut . path , f ) , path . join ( 'types' , f ) ) ) ;
174171
175172 for ( const file of staticFiles ) {
176173 // We copy all files into the package output while preserving the sub-path from
@@ -326,10 +323,10 @@ function main(args: string[]): void {
326323
327324 const sideEffects = packageJson . sideEffects as undefined | false | string [ ] ;
328325 const neededSideEffects = sideEffectEntryPoints . map (
329- ( entryPointModule ) => `./${ metadata . entryPoints [ entryPointModule ] . fesm2022RelativePath } ` ,
326+ entryPointModule => `./${ metadata . entryPoints [ entryPointModule ] . fesm2022RelativePath } ` ,
330327 ) ;
331328 const missingSideEffects = neededSideEffects . filter (
332- ( p ) =>
329+ p =>
333330 // It's missing, if the whole package is marked as having no side effects.
334331 sideEffects === false ||
335332 // Alternatively, it's missing if the explicit list doesn't contain the pattern.
@@ -348,9 +345,7 @@ function main(args: string[]): void {
348345 // of the `ng_package` known entry points.
349346 const unexpectedExtra =
350347 sideEffects !== false
351- ? ( sideEffects ?? [ ] ) . filter (
352- ( p ) => p . includes ( 'fesm2022' ) && ! neededSideEffects . includes ( p ) ,
353- )
348+ ? ( sideEffects ?? [ ] ) . filter ( p => p . includes ( 'fesm2022' ) && ! neededSideEffects . includes ( p ) )
354349 : [ ] ;
355350 if ( unexpectedExtra . length > 0 ) {
356351 throw Error (
0 commit comments