@ast-grep/napi 0.2.6 → 0.3.3

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.
Files changed (2) hide show
  1. package/index.d.ts +2 -0
  2. package/package.json +10 -10
package/index.d.ts CHANGED
@@ -26,6 +26,7 @@ export interface NapiConfig {
26
26
  rule: any
27
27
  constraints?: any
28
28
  language?: FrontEndLanguage
29
+ utils?: any
29
30
  }
30
31
  export function parseFiles(paths: string[], callback: (err: null | Error, result: SgRoot) => void): Promise<number>
31
32
  export interface FindConfig {
@@ -35,6 +36,7 @@ export interface FindConfig {
35
36
  export class SgNode {
36
37
  range(): Range
37
38
  isLeaf(): boolean
39
+ isNamedLeaf(): boolean
38
40
  kind(): string
39
41
  text(): string
40
42
  matches(m: string): boolean
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ast-grep/napi",
3
- "version": "0.2.6",
3
+ "version": "0.3.3",
4
4
  "description": "Search and Rewrite code at large scale using precise AST pattern",
5
5
  "main": "index.js",
6
6
  "repository": "https://github.com/ast-grep/ast-grep",
@@ -43,11 +43,11 @@
43
43
  "version": "napi version"
44
44
  },
45
45
  "devDependencies": {
46
- "@napi-rs/cli": "2.14.6",
47
- "ava": "5.1.1",
46
+ "@napi-rs/cli": "2.15.2",
47
+ "ava": "5.2.0",
48
48
  "chalk": "5.2.0",
49
49
  "ts-node": "10.9.1",
50
- "typescript": "4.9.5"
50
+ "typescript": "5.0.3"
51
51
  },
52
52
  "ava": {
53
53
  "require": [
@@ -64,11 +64,11 @@
64
64
  },
65
65
  "packageManager": "yarn@3.2.3",
66
66
  "optionalDependencies": {
67
- "@ast-grep/napi-win32-x64-msvc": "0.2.6",
68
- "@ast-grep/napi-darwin-x64": "0.2.6",
69
- "@ast-grep/napi-linux-x64-gnu": "0.2.6",
70
- "@ast-grep/napi-win32-ia32-msvc": "0.2.6",
71
- "@ast-grep/napi-darwin-arm64": "0.2.6",
72
- "@ast-grep/napi-win32-arm64-msvc": "0.2.6"
67
+ "@ast-grep/napi-win32-x64-msvc": "0.3.3",
68
+ "@ast-grep/napi-darwin-x64": "0.3.3",
69
+ "@ast-grep/napi-linux-x64-gnu": "0.3.3",
70
+ "@ast-grep/napi-win32-ia32-msvc": "0.3.3",
71
+ "@ast-grep/napi-darwin-arm64": "0.3.3",
72
+ "@ast-grep/napi-win32-arm64-msvc": "0.3.3"
73
73
  }
74
74
  }