File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- /* auto-generated by NAPI-RS */
2- /* eslint-disable */
1+ type BindingErrorsOr < T > = T | BindingErrors ;
2+ type FxHashSet < T > = Set < T > ;
3+ type FxHashMap < K , V > = Map < K , V > ;
4+ type MaybePromise < T > = T | Promise < T > ;
5+ type Nullable < T > = T | null | undefined ;
6+ type VoidNullable < T = void > = T | null | undefined | void ;
7+ export type BindingStringOrRegex = string | RegExp ;
8+ export type BindingResult < T > = { errors : BindingError [ ] ; isBindingErrors : boolean } | T ;
9+
310export interface CodegenOptions {
411 /**
512 * Remove whitespace.
Original file line number Diff line number Diff line change @@ -83,7 +83,8 @@ async function buildNapiBinding() {
8383
8484 const cli = new NapiCli ( ) ;
8585
86- const dtsHeader = process . env . RELEASE_BUILD
86+ const bindingFeatures = [ 'rolldown' ] ;
87+ const dtsHeader = bindingFeatures . includes ( 'rolldown' )
8788 ? ( await import ( '../../rolldown/packages/rolldown/package.json' , { with : { type : 'json' } } ) )
8889 . default . napi . dtsHeader
8990 : '' ;
@@ -100,7 +101,7 @@ async function buildNapiBinding() {
100101 jsBinding : 'index.cjs' ,
101102 dts : 'index.d.cts' ,
102103 release : process . env . VP_CLI_DEBUG !== '1' ,
103- features : [ 'rolldown' ] ,
104+ features : bindingFeatures ,
104105 } ) ;
105106
106107 const outputs = await task ;
Original file line number Diff line number Diff line change 11{
22 "type" : " module" ,
33 "scripts" : {
4- "hello" : " vp fmt "
4+ "hello" : " node -e \" console.log('hello') \" "
55 }
66}
Original file line number Diff line number Diff line change 11> vp run hello # create the cache for 'echo hello'
2- $ vp fmt
3- Finished in <variable>ms on 4 files using <variable> threads.
2+ $ node -e "console.log('hello')"
3+ hello
44
5- ---
6- vp run: hello not cached because it modified its input. (Run `vp run --last-details` for full details)
75
86> vp run hello # hit the cache
9- $ vp fmt
10- Finished in <variable>ms on 4 files using <variable> threads.
7+ $ node -e "console.log('hello')" ◉ cache hit, replaying
8+ hello
119
1210---
13- vp run: hello not cached because it modified its input. (Run `vp run --last-details` for full details)
11+ vp run: cache hit, <variable>ms saved.
1412
1513> vp cache clean # clean the cache
1614> vp run hello # cache miss after clean
17- $ vp fmt
18- Finished in <variable>ms on 4 files using <variable> threads.
19-
20- ---
21- vp run: hello not cached because it modified its input. (Run `vp run --last-details` for full details)
15+ $ node -e "console.log('hello')"
16+ hello
2217
2318> cd subfolder && vp cache clean # cache can be located and cleaned from subfolder
2419> vp run hello # cache miss after clean
25- $ vp fmt
26- Finished in <variable>ms on 4 files using <variable> threads.
27-
28- ---
29- vp run: hello not cached because it modified its input. (Run `vp run --last-details` for full details)
20+ $ node -e "console.log('hello')"
21+ hello
Original file line number Diff line number Diff line change 11> vp run lint
2- $ vp lint
3- Found 0 warnings and 0 errors.
4- Finished in <variable>ms on 1 file with <variable> rules using <variable> threads.
2+ $ node -e "console.log('lint')"
3+ lint
54
6- ---
7- vp run: lint not cached because it modified its input. (Run `vp run --last-details` for full details)
85
96> mkdir dist
107> vp run lint # new dist folder should not invalidate cache
11- $ vp lint
12- Found 0 warnings and 0 errors.
13- Finished in <variable>ms on 1 file with <variable> rules using <variable> threads.
8+ $ node -e "console.log('lint')" ◉ cache hit, replaying
9+ lint
1410
1511---
16- vp run: lint not cached because it modified its input. (Run `vp run --last-details` for full details)
12+ vp run: cache hit, <variable>ms saved.
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ export default {
22 run : {
33 tasks : {
44 lint : {
5- command : 'vp lint' ,
5+ command : 'node -e "console.log(\' lint\')" ' ,
66 } ,
77 } ,
88 } ,
You can’t perform that action at this time.
0 commit comments