@konomanoasa/tree-sitter-posix-awk 0.22.0 → 0.23.1

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/Cargo.toml CHANGED
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "konomanoasa-tree-sitter-posix-awk"
3
- version = "0.22.0"
3
+ version = "0.23.1"
4
4
  description = "Tree-sitter grammar for POSIX awk."
5
5
  readme = "README.md"
6
6
  license = "MIT"
@@ -33,4 +33,4 @@ tree-sitter-language = "=0.1.9"
33
33
  tree-sitter = "=0.27.1"
34
34
 
35
35
  [build-dependencies]
36
- cc = "=1.10.0"
36
+ cc = "=1.11.0"
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  [![npm](https://img.shields.io/npm/v/@konomanoasa/tree-sitter-posix-awk)](https://www.npmjs.com/package/@konomanoasa/tree-sitter-posix-awk)
6
6
 
7
7
  [Tree-sitter](https://tree-sitter.github.io/tree-sitter/) grammar for
8
- POSIX.1-2024 AWK.
8
+ POSIX.1-2024 awk.
9
9
 
10
10
  ## Installation
11
11
 
@@ -16,14 +16,13 @@ npm install @konomanoasa/tree-sitter-posix-awk
16
16
  ## Development
17
17
 
18
18
  ```sh
19
- npm install
20
- npm run build
19
+ npm ci
21
20
  npm test
22
21
  ```
23
22
 
24
23
  ## Specifications
25
24
 
26
- - [POSIX.1-2024 AWK](https://pubs.opengroup.org/onlinepubs/9799919799.2024edition/utilities/awk.html)
25
+ - [POSIX.1-2024 awk](https://pubs.opengroup.org/onlinepubs/9799919799.2024edition/utilities/awk.html)
27
26
  - [POSIX.1-2024 extended regular expressions](https://pubs.opengroup.org/onlinepubs/9799919799.2024edition/basedefs/V1_chap09.html#tag_09_04)
28
27
 
29
28
  ## License
package/binding.gyp ADDED
@@ -0,0 +1,38 @@
1
+ {
2
+ "targets": [
3
+ {
4
+ "target_name": "tree_sitter_posix_awk_binding",
5
+ "sources": [
6
+ "bindings/node/binding.cc",
7
+ "src/parser.c",
8
+ "src/scanner.c"
9
+ ],
10
+ "include_dirs": ["src"],
11
+ "dependencies": [
12
+ "<!(node -p \"require('node-addon-api').targets\"):node_addon_api_except"
13
+ ],
14
+ "cflags_c": ["-std=c17"],
15
+ "cflags_cc": ["-std=c++17"],
16
+ "msvs_settings": {
17
+ "VCCLCompilerTool": {
18
+ "AdditionalOptions": ["/utf-8"],
19
+ "AdditionalOptions!": ["-std:c++20"],
20
+ "LanguageStandard": "stdcpp17",
21
+ "LanguageStandard_C": "stdc17"
22
+ }
23
+ },
24
+ "target_conditions": [
25
+ [
26
+ "OS==\"mac\"",
27
+ {
28
+ "xcode_settings": {
29
+ "CLANG_CXX_LANGUAGE_STANDARD": "c++17",
30
+ "GCC_C_LANGUAGE_STANDARD": "c17",
31
+ "MACOSX_DEPLOYMENT_TARGET": "14.0"
32
+ }
33
+ }
34
+ ]
35
+ ]
36
+ }
37
+ ]
38
+ }
@@ -0,0 +1,25 @@
1
+ #include <napi.h>
2
+
3
+ struct TSLanguage;
4
+ extern "C" const TSLanguage *tree_sitter_posix_awk();
5
+
6
+ namespace {
7
+
8
+ constexpr napi_type_tag language_type_tag = {
9
+ 0x8AF2E5212AD58ABF,
10
+ 0xD5006CAD83ABBA16
11
+ };
12
+
13
+ Napi::Object Init(Napi::Env env, Napi::Object exports) {
14
+ auto language = Napi::External<TSLanguage>::New(
15
+ env,
16
+ const_cast<TSLanguage *>(tree_sitter_posix_awk())
17
+ );
18
+ language.TypeTag(&language_type_tag);
19
+ exports["language"] = language;
20
+ return exports;
21
+ }
22
+
23
+ }
24
+
25
+ NODE_API_MODULE(tree_sitter_posix_awk_binding, Init)
@@ -0,0 +1,7 @@
1
+ import type { Language } from "tree-sitter";
2
+
3
+ declare const binding: Language & {
4
+ HIGHLIGHTS_QUERY: string;
5
+ };
6
+
7
+ export default binding;
@@ -0,0 +1,14 @@
1
+ import { readFileSync } from "node:fs";
2
+ import { fileURLToPath } from "node:url";
3
+ import load from "node-gyp-build";
4
+
5
+ const binding = load(fileURLToPath(new URL("../..", import.meta.url)));
6
+ binding.nodeTypeInfo = JSON.parse(
7
+ readFileSync(new URL("../../src/node-types.json", import.meta.url), "utf8"),
8
+ );
9
+ binding.HIGHLIGHTS_QUERY = readFileSync(
10
+ new URL("../../queries/highlights.scm", import.meta.url),
11
+ "utf8",
12
+ );
13
+
14
+ export default binding;
@@ -1,6 +1,6 @@
1
1
  #include <Python.h>
2
2
 
3
- #include "tree_sitter/parser.h"
3
+ #include "../../src/tree_sitter/parser.h"
4
4
 
5
5
  const TSLanguage *tree_sitter_posix_awk(void);
6
6
 
package/package.json CHANGED
@@ -1,12 +1,22 @@
1
1
  {
2
2
  "name": "@konomanoasa/tree-sitter-posix-awk",
3
- "version": "0.22.0",
3
+ "version": "0.23.1",
4
4
  "description": "Tree-sitter grammar for POSIX awk.",
5
5
  "license": "MIT",
6
6
  "repository": "git+https://github.com/konomanoasa/tree-sitter-posix-awk.git",
7
7
  "type": "module",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./bindings/node/index.d.ts",
11
+ "default": "./bindings/node/index.js"
12
+ }
13
+ },
8
14
  "files": [
9
15
  "Cargo.toml",
16
+ "binding.gyp",
17
+ "bindings/node/*.cc",
18
+ "bindings/node/*.js",
19
+ "bindings/node/*.ts",
10
20
  "bindings/python/*.c",
11
21
  "bindings/python/*.py",
12
22
  "bindings/python/*.pyi",
@@ -26,24 +36,35 @@
26
36
  "access": "public"
27
37
  },
28
38
  "scripts": {
29
- "build": "npm run tree-sitter -- build-all",
39
+ "build": "node-gyp rebuild && node-gyp configure -- -f compile_commands_json",
40
+ "build:parser": "npm run tree-sitter -- build-all",
30
41
  "check": "biome check . && tsc",
31
42
  "check:queries": "npm run tree-sitter -- check-queries",
32
43
  "format": "biome format --write .",
33
44
  "generate": "npm run tree-sitter -- generate-all",
34
- "test": "npm run tree-sitter -- test-corpus --rebuild && node --test --test-concurrency=1 test/build.test.js test/cst.test.js test/highlight.test.js test/incremental.test.js test/parser.test.js && node scripts/check-c.js --test",
45
+ "install": "node-gyp-build",
46
+ "test": "npm run tree-sitter -- test-corpus --rebuild && node --test --test-concurrency=1 test/bindings.test.js test/build.test.js test/cst.test.js test/highlight.test.js test/incremental.test.js test/parser.test.js && node scripts/check-c.js --test",
35
47
  "test:fuzz": "npm run tree-sitter -- fuzz-all --iterations 100 --edits 5",
36
48
  "test:performance": "node --test test/performance.test.js",
37
49
  "test:sanitize": "node scripts/check-c.js --sanitize",
38
50
  "tree-sitter": "node scripts/tree-sitter.js"
39
51
  },
52
+ "dependencies": {
53
+ "node-addon-api": "8.9.2",
54
+ "node-gyp-build": "4.8.4"
55
+ },
56
+ "peerDependencies": {
57
+ "tree-sitter": "0.25.1"
58
+ },
40
59
  "devDependencies": {
41
- "@biomejs/biome": "2.6.2",
42
- "@types/node": "26.6.5",
60
+ "@biomejs/biome": "2.6.4",
61
+ "@types/node": "26.6.6",
62
+ "node-gyp": "13.1.0",
43
63
  "tree-sitter-cli": "0.27.1",
44
64
  "typescript": "7.0.2"
45
65
  },
46
66
  "allowScripts": {
67
+ "tree-sitter": true,
47
68
  "tree-sitter-cli": true
48
69
  }
49
70
  }
package/pyproject.toml CHANGED
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "konomanoasa-tree-sitter-posix-awk"
3
- version = "0.22.0"
3
+ version = "0.23.1"
4
4
  description = "Tree-sitter grammar for POSIX awk."
5
5
  readme = "README.md"
6
6
  license = "MIT"
@@ -16,7 +16,7 @@ dev = [
16
16
  "setuptools==84.2.1",
17
17
  "tree-sitter==0.26.0",
18
18
  "twine==7.0.0",
19
- "ty==0.0.95",
19
+ "ty==0.0.96",
20
20
  ]
21
21
 
22
22
  [build-system]
package/src/parser.c CHANGED
@@ -66049,8 +66049,8 @@ TS_PUBLIC const TSLanguage *tree_sitter_posix_awk(void) {
66049
66049
  .max_reserved_word_set_size = 19,
66050
66050
  .metadata = {
66051
66051
  .major_version = 0,
66052
- .minor_version = 22,
66053
- .patch_version = 0,
66052
+ .minor_version = 23,
66053
+ .patch_version = 1,
66054
66054
  },
66055
66055
  };
66056
66056
  return &language;
package/tree-sitter.json CHANGED
@@ -12,7 +12,7 @@
12
12
  }
13
13
  ],
14
14
  "metadata": {
15
- "version": "0.22.0",
15
+ "version": "0.23.1",
16
16
  "license": "MIT",
17
17
  "description": "Tree-sitter grammar for POSIX awk.",
18
18
  "links": {
@@ -22,7 +22,7 @@
22
22
  "bindings": {
23
23
  "c": false,
24
24
  "go": false,
25
- "node": false,
25
+ "node": true,
26
26
  "python": true,
27
27
  "rust": true,
28
28
  "swift": false