File tree 6 files changed +19
-8
lines changed
6 files changed +19
-8
lines changed Original file line number Diff line number Diff line change 21
21
"build" : " pnpm unbuild" ,
22
22
"dev" : " pnpm unbuild test/fixture" ,
23
23
"lint" : " eslint --ext .ts,.js . && prettier -c src test" ,
24
+ "lint:fix" : " eslint --fix --ext .ts,.js . && prettier -w src test" ,
24
25
"prepack" : " pnpm unbuild" ,
25
26
"release" : " vitest run && changelogen --release && git push --follow-tags && npm publish" ,
26
27
"stub" : " pnpm unbuild --stub" ,
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ const defaultLoaders: { [ext: string]: Loader } = {
10
10
".ts" : "ts" ,
11
11
".js" : "js" ,
12
12
".tsx" : "tsx" ,
13
- ".jsx" : "jsx"
13
+ ".jsx" : "jsx" ,
14
14
} ;
15
15
16
16
export interface Options {
Original file line number Diff line number Diff line change @@ -270,9 +270,11 @@ export function getRollupOptions(ctx: BuildContext): RollupOptions {
270
270
[ ctx . pkg . name ! ] : ctx . options . rootDir ,
271
271
...ctx . options . alias ,
272
272
...( Array . isArray ( ctx . options . rollup . alias . entries )
273
- ? Object . fromEntries ( ctx . options . rollup . alias . entries . map ( entry => {
274
- return [ entry . find , entry . replacement ]
275
- } ) )
273
+ ? Object . fromEntries (
274
+ ctx . options . rollup . alias . entries . map ( ( entry ) => {
275
+ return [ entry . find , entry . replacement ] ;
276
+ } )
277
+ )
276
278
: ctx . options . rollup . alias . entries ) ,
277
279
} ,
278
280
} ) ,
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ export interface BuildOptions {
67
67
declaration ?: boolean ;
68
68
outDir : string ;
69
69
stub : boolean ;
70
- externals : ( string | RegExp ) [ ] ;
70
+ externals : ( string | RegExp ) [ ] ;
71
71
dependencies : string [ ] ;
72
72
peerDependencies : string [ ] ;
73
73
devDependencies : string [ ] ;
Original file line number Diff line number Diff line change @@ -163,6 +163,10 @@ export function extractExportFilenames(
163
163
) ;
164
164
}
165
165
166
- export function arrayIncludes ( arr : ( string | RegExp ) [ ] , searchElement : string ) {
167
- return arr . some ( entry => entry instanceof RegExp ? entry . test ( searchElement ) : entry === searchElement ) ;
166
+ export function arrayIncludes ( arr : ( string | RegExp ) [ ] , searchElement : string ) {
167
+ return arr . some ( ( entry ) =>
168
+ entry instanceof RegExp
169
+ ? entry . test ( searchElement )
170
+ : entry === searchElement
171
+ ) ;
168
172
}
Original file line number Diff line number Diff line change 1
1
import { describe , it , expect } from "vitest" ;
2
- import { arrayIncludes , extractExportFilenames , inferExportType } from "../src/utils" ;
2
+ import {
3
+ arrayIncludes ,
4
+ extractExportFilenames ,
5
+ inferExportType ,
6
+ } from "../src/utils" ;
3
7
4
8
describe ( "inferExportType" , ( ) => {
5
9
it ( "infers export type by condition" , ( ) => {
You can’t perform that action at this time.
0 commit comments