@ast-grep/napi 0.14.2 → 0.14.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +7 -6
- package/package.json +11 -11
package/index.d.ts
CHANGED
|
@@ -62,6 +62,7 @@ export class SgNode {
|
|
|
62
62
|
follows(m: string): boolean
|
|
63
63
|
getMatch(m: string): SgNode | null
|
|
64
64
|
getMultipleMatches(m: string): Array<SgNode>
|
|
65
|
+
getTransformed(m: string): string | null
|
|
65
66
|
/** Returns the node's SgRoot */
|
|
66
67
|
getRoot(): SgRoot
|
|
67
68
|
children(): Array<SgNode>
|
|
@@ -92,7 +93,7 @@ export namespace html {
|
|
|
92
93
|
export function parse(src: string): SgRoot
|
|
93
94
|
/**
|
|
94
95
|
* Parse a string to an ast-grep instance asynchronously in threads.
|
|
95
|
-
* It
|
|
96
|
+
* It utilize multiple CPU cores when **concurrent processing sources**.
|
|
96
97
|
* However, spawning excessive many threads may backfire.
|
|
97
98
|
* Please refer to libuv doc, nodejs' underlying runtime
|
|
98
99
|
* for its default behavior and performance tuning tricks.
|
|
@@ -114,7 +115,7 @@ export namespace js {
|
|
|
114
115
|
export function parse(src: string): SgRoot
|
|
115
116
|
/**
|
|
116
117
|
* Parse a string to an ast-grep instance asynchronously in threads.
|
|
117
|
-
* It
|
|
118
|
+
* It utilize multiple CPU cores when **concurrent processing sources**.
|
|
118
119
|
* However, spawning excessive many threads may backfire.
|
|
119
120
|
* Please refer to libuv doc, nodejs' underlying runtime
|
|
120
121
|
* for its default behavior and performance tuning tricks.
|
|
@@ -136,7 +137,7 @@ export namespace jsx {
|
|
|
136
137
|
export function parse(src: string): SgRoot
|
|
137
138
|
/**
|
|
138
139
|
* Parse a string to an ast-grep instance asynchronously in threads.
|
|
139
|
-
* It
|
|
140
|
+
* It utilize multiple CPU cores when **concurrent processing sources**.
|
|
140
141
|
* However, spawning excessive many threads may backfire.
|
|
141
142
|
* Please refer to libuv doc, nodejs' underlying runtime
|
|
142
143
|
* for its default behavior and performance tuning tricks.
|
|
@@ -158,7 +159,7 @@ export namespace ts {
|
|
|
158
159
|
export function parse(src: string): SgRoot
|
|
159
160
|
/**
|
|
160
161
|
* Parse a string to an ast-grep instance asynchronously in threads.
|
|
161
|
-
* It
|
|
162
|
+
* It utilize multiple CPU cores when **concurrent processing sources**.
|
|
162
163
|
* However, spawning excessive many threads may backfire.
|
|
163
164
|
* Please refer to libuv doc, nodejs' underlying runtime
|
|
164
165
|
* for its default behavior and performance tuning tricks.
|
|
@@ -180,7 +181,7 @@ export namespace tsx {
|
|
|
180
181
|
export function parse(src: string): SgRoot
|
|
181
182
|
/**
|
|
182
183
|
* Parse a string to an ast-grep instance asynchronously in threads.
|
|
183
|
-
* It
|
|
184
|
+
* It utilize multiple CPU cores when **concurrent processing sources**.
|
|
184
185
|
* However, spawning excessive many threads may backfire.
|
|
185
186
|
* Please refer to libuv doc, nodejs' underlying runtime
|
|
186
187
|
* for its default behavior and performance tuning tricks.
|
|
@@ -202,7 +203,7 @@ export namespace css {
|
|
|
202
203
|
export function parse(src: string): SgRoot
|
|
203
204
|
/**
|
|
204
205
|
* Parse a string to an ast-grep instance asynchronously in threads.
|
|
205
|
-
* It
|
|
206
|
+
* It utilize multiple CPU cores when **concurrent processing sources**.
|
|
206
207
|
* However, spawning excessive many threads may backfire.
|
|
207
208
|
* Please refer to libuv doc, nodejs' underlying runtime
|
|
208
209
|
* for its default behavior and performance tuning tricks.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ast-grep/napi",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.4",
|
|
4
4
|
"description": "Search and Rewrite code at large scale using precise AST pattern",
|
|
5
5
|
"homepage": "https://ast-grep.github.io",
|
|
6
6
|
"main": "index.js",
|
|
@@ -44,11 +44,11 @@
|
|
|
44
44
|
"version": "napi version"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@napi-rs/cli": "2.
|
|
48
|
-
"ava": "
|
|
47
|
+
"@napi-rs/cli": "2.17.0",
|
|
48
|
+
"ava": "6.0.1",
|
|
49
49
|
"chalk": "5.3.0",
|
|
50
|
-
"ts-node": "10.9.
|
|
51
|
-
"typescript": "5.3.
|
|
50
|
+
"ts-node": "10.9.2",
|
|
51
|
+
"typescript": "5.3.3"
|
|
52
52
|
},
|
|
53
53
|
"ava": {
|
|
54
54
|
"require": [
|
|
@@ -64,11 +64,11 @@
|
|
|
64
64
|
}
|
|
65
65
|
},
|
|
66
66
|
"optionalDependencies": {
|
|
67
|
-
"@ast-grep/napi-win32-x64-msvc": "0.14.
|
|
68
|
-
"@ast-grep/napi-darwin-x64": "0.14.
|
|
69
|
-
"@ast-grep/napi-linux-x64-gnu": "0.14.
|
|
70
|
-
"@ast-grep/napi-win32-ia32-msvc": "0.14.
|
|
71
|
-
"@ast-grep/napi-darwin-arm64": "0.14.
|
|
72
|
-
"@ast-grep/napi-win32-arm64-msvc": "0.14.
|
|
67
|
+
"@ast-grep/napi-win32-x64-msvc": "0.14.4",
|
|
68
|
+
"@ast-grep/napi-darwin-x64": "0.14.4",
|
|
69
|
+
"@ast-grep/napi-linux-x64-gnu": "0.14.4",
|
|
70
|
+
"@ast-grep/napi-win32-ia32-msvc": "0.14.4",
|
|
71
|
+
"@ast-grep/napi-darwin-arm64": "0.14.4",
|
|
72
|
+
"@ast-grep/napi-win32-arm64-msvc": "0.14.4"
|
|
73
73
|
}
|
|
74
74
|
}
|