File tree 1 file changed +9
-9
lines changed
1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -262,27 +262,27 @@ const sortScripts = onObject((scripts, packageJson) => {
262
262
} )
263
263
264
264
/*
265
- - Move `types` and versioned types to top
266
- - Move `default` to last
265
+ - Move `types` and versioned type condition to top
266
+ - Move `default` condition to bottom
267
267
*/
268
268
const sortConditions = ( conditions ) => {
269
269
const {
270
- types = [ ] ,
271
- default : defaultConditions = [ ] ,
272
- rest : restConditions = [ ] ,
270
+ typesConditions = [ ] ,
271
+ defaultConditions = [ ] ,
272
+ restConditions = [ ] ,
273
273
} = objectGroupBy ( conditions , ( condition ) => {
274
274
if ( condition === 'types' || condition . startsWith ( 'types@' ) ) {
275
- return 'types '
275
+ return 'typesConditions '
276
276
}
277
277
278
278
if ( condition === 'default' ) {
279
- return 'default '
279
+ return 'defaultConditions '
280
280
}
281
281
282
- return 'rest '
282
+ return 'restConditions '
283
283
} )
284
284
285
- return [ ...types , ...restConditions , ...defaultConditions ]
285
+ return [ ...typesConditions , ...restConditions , ...defaultConditions ]
286
286
}
287
287
288
288
const sortExports = onObject ( ( exports ) => {
You can’t perform that action at this time.
0 commit comments