@xberg-io/tree-sitter-language-pack 1.12.1 → 1.12.2

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.js CHANGED
@@ -10,16 +10,9 @@ const isMusl = () => {
10
10
  // "is musl" positive. Fall through to the filesystem heuristic instead: on
11
11
  // glibc systems `/lib64/ld-musl-x86_64.so.1` does not exist; on musl systems
12
12
  // it always does. statSync errors → not musl.
13
- if (
14
- typeof process.report === "object" &&
15
- typeof process.report.getReport === "function"
16
- ) {
13
+ if (typeof process.report === "object" && typeof process.report.getReport === "function") {
17
14
  const report = process.report.getReport();
18
- if (
19
- report &&
20
- report.header &&
21
- typeof report.header.glibcVersion === "string"
22
- ) {
15
+ if (report && report.header && typeof report.header.glibcVersion === "string") {
23
16
  return false;
24
17
  }
25
18
  }
@@ -48,14 +41,56 @@ const tryLoadBinding = () => {
48
41
  // Optional-dep packages are named after `napi.packageName` (npm subpackage names),
49
42
  // which inherits any scope prefix from the parent package.
50
43
  const targets = [
51
- ["linux", "x64", "gnu", "./ts-pack-core-node.linux-x64-gnu.node", "@xberg-io/tree-sitter-language-pack-linux-x64-gnu"],
52
- ["linux", "arm64", "gnu", "./ts-pack-core-node.linux-arm64-gnu.node", "@xberg-io/tree-sitter-language-pack-linux-arm64-gnu"],
53
- ["linux", "x64", "musl", "./ts-pack-core-node.linux-x64-musl.node", "@xberg-io/tree-sitter-language-pack-linux-x64-musl"],
54
- ["linux", "arm64", "musl", "./ts-pack-core-node.linux-arm64-musl.node", "@xberg-io/tree-sitter-language-pack-linux-arm64-musl"],
44
+ [
45
+ "linux",
46
+ "x64",
47
+ "gnu",
48
+ "./ts-pack-core-node.linux-x64-gnu.node",
49
+ "@xberg-io/tree-sitter-language-pack-linux-x64-gnu",
50
+ ],
51
+ [
52
+ "linux",
53
+ "arm64",
54
+ "gnu",
55
+ "./ts-pack-core-node.linux-arm64-gnu.node",
56
+ "@xberg-io/tree-sitter-language-pack-linux-arm64-gnu",
57
+ ],
58
+ [
59
+ "linux",
60
+ "x64",
61
+ "musl",
62
+ "./ts-pack-core-node.linux-x64-musl.node",
63
+ "@xberg-io/tree-sitter-language-pack-linux-x64-musl",
64
+ ],
65
+ [
66
+ "linux",
67
+ "arm64",
68
+ "musl",
69
+ "./ts-pack-core-node.linux-arm64-musl.node",
70
+ "@xberg-io/tree-sitter-language-pack-linux-arm64-musl",
71
+ ],
55
72
  ["darwin", "x64", null, "./ts-pack-core-node.darwin-x64.node", "@xberg-io/tree-sitter-language-pack-darwin-x64"],
56
- ["darwin", "arm64", null, "./ts-pack-core-node.darwin-arm64.node", "@xberg-io/tree-sitter-language-pack-darwin-arm64"],
57
- ["win32", "x64", null, "./ts-pack-core-node.win32-x64-msvc.node", "@xberg-io/tree-sitter-language-pack-win32-x64-msvc"],
58
- ["win32", "arm64", null, "./ts-pack-core-node.win32-arm64-msvc.node", "@xberg-io/tree-sitter-language-pack-win32-arm64-msvc"],
73
+ [
74
+ "darwin",
75
+ "arm64",
76
+ null,
77
+ "./ts-pack-core-node.darwin-arm64.node",
78
+ "@xberg-io/tree-sitter-language-pack-darwin-arm64",
79
+ ],
80
+ [
81
+ "win32",
82
+ "x64",
83
+ null,
84
+ "./ts-pack-core-node.win32-x64-msvc.node",
85
+ "@xberg-io/tree-sitter-language-pack-win32-x64-msvc",
86
+ ],
87
+ [
88
+ "win32",
89
+ "arm64",
90
+ null,
91
+ "./ts-pack-core-node.win32-arm64-msvc.node",
92
+ "@xberg-io/tree-sitter-language-pack-win32-arm64-msvc",
93
+ ],
59
94
  ];
60
95
 
61
96
  for (const [plat, a, abi, localPath, optionalDep] of targets) {
@@ -94,9 +129,7 @@ const tryLoadBinding = () => {
94
129
  tryLoadBinding();
95
130
 
96
131
  if (!nativeBinding) {
97
- throw new Error(
98
- `Failed to load native binding for ${platform}-${arch}. Errors: ${loadErrors.join(", ")}`
99
- );
132
+ throw new Error(`Failed to load native binding for ${platform}-${arch}. Errors: ${loadErrors.join(", ")}`);
100
133
  }
101
134
 
102
135
  module.exports = nativeBinding;
package/package.json CHANGED
@@ -1,62 +1,52 @@
1
1
  {
2
- "name": "@xberg-io/tree-sitter-language-pack",
3
- "version": "1.12.1",
4
- "description": "Pre-compiled tree-sitter grammars for 306 programming languages",
5
- "license": "MIT",
6
- "repository": {
7
- "type": "git",
8
- "url": "git+https://github.com/xberg-io/tree-sitter-language-pack.git"
9
- },
10
- "files": [
11
- "index.js",
12
- "index.d.ts",
13
- "*.node"
14
- ],
15
- "main": "index.js",
16
- "types": "index.d.ts",
17
- "exports": {
18
- ".": {
19
- "types": "./index.d.ts",
20
- "require": "./index.js",
21
- "default": "./index.js"
22
- }
23
- },
24
- "publishConfig": {
25
- "access": "public"
26
- },
27
- "scripts": {
28
- "build": "npx --yes -p @napi-rs/cli@^3.6.2 napi build --platform --release",
29
- "artifacts": "npx --yes -p @napi-rs/cli@^3.6.2 napi artifacts",
30
- "prepublishOnly": "npx --yes -p @napi-rs/cli@^3.6.2 napi prepublish -t npm --skip-optional-publish"
31
- },
32
- "devDependencies": {
33
- "@napi-rs/cli": "^3.7.2"
34
- },
35
- "optionalDependencies": {
36
- "@xberg-io/tree-sitter-language-pack-darwin-arm64": "1.12.1",
37
- "@xberg-io/tree-sitter-language-pack-darwin-x64": "1.12.1",
38
- "@xberg-io/tree-sitter-language-pack-linux-arm64-gnu": "1.12.1",
39
- "@xberg-io/tree-sitter-language-pack-linux-arm64-musl": "1.12.1",
40
- "@xberg-io/tree-sitter-language-pack-linux-x64-gnu": "1.12.1",
41
- "@xberg-io/tree-sitter-language-pack-linux-x64-musl": "1.12.1",
42
- "@xberg-io/tree-sitter-language-pack-win32-arm64-msvc": "1.12.1",
43
- "@xberg-io/tree-sitter-language-pack-win32-x64-msvc": "1.12.1"
44
- },
45
- "napi": {
46
- "binaryName": "ts-pack-core-node",
47
- "packageName": "@xberg-io/tree-sitter-language-pack",
48
- "targets": [
49
- "x86_64-unknown-linux-gnu",
50
- "aarch64-unknown-linux-gnu",
51
- "x86_64-unknown-linux-musl",
52
- "aarch64-unknown-linux-musl",
53
- "x86_64-apple-darwin",
54
- "aarch64-apple-darwin",
55
- "x86_64-pc-windows-msvc",
56
- "aarch64-pc-windows-msvc"
57
- ]
58
- },
59
- "engines": {
60
- "node": ">= 22"
61
- }
2
+ "name": "@xberg-io/tree-sitter-language-pack",
3
+ "version": "1.12.2",
4
+ "description": "Pre-compiled tree-sitter grammars for 306 programming languages",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/xberg-io/tree-sitter-language-pack.git"
9
+ },
10
+ "main": "index.js",
11
+ "types": "index.d.ts",
12
+ "exports": {
13
+ ".": {
14
+ "types": "./index.d.ts",
15
+ "require": "./index.js",
16
+ "default": "./index.js"
17
+ }
18
+ },
19
+ "files": ["index.js", "index.d.ts", "*.node"],
20
+ "optionalDependencies": {
21
+ "@xberg-io/tree-sitter-language-pack-linux-x64-gnu": "1.12.2",
22
+ "@xberg-io/tree-sitter-language-pack-linux-arm64-gnu": "1.12.2",
23
+ "@xberg-io/tree-sitter-language-pack-linux-x64-musl": "1.12.2",
24
+ "@xberg-io/tree-sitter-language-pack-linux-arm64-musl": "1.12.2",
25
+ "@xberg-io/tree-sitter-language-pack-darwin-x64": "1.12.2",
26
+ "@xberg-io/tree-sitter-language-pack-darwin-arm64": "1.12.2",
27
+ "@xberg-io/tree-sitter-language-pack-win32-x64-msvc": "1.12.2",
28
+ "@xberg-io/tree-sitter-language-pack-win32-arm64-msvc": "1.12.2"
29
+ },
30
+ "napi": {
31
+ "packageName": "@xberg-io/tree-sitter-language-pack",
32
+ "binaryName": "ts-pack-core-node",
33
+ "targets": [
34
+ "x86_64-unknown-linux-gnu",
35
+ "aarch64-unknown-linux-gnu",
36
+ "x86_64-unknown-linux-musl",
37
+ "aarch64-unknown-linux-musl",
38
+ "x86_64-apple-darwin",
39
+ "aarch64-apple-darwin",
40
+ "x86_64-pc-windows-msvc",
41
+ "aarch64-pc-windows-msvc"
42
+ ]
43
+ },
44
+ "scripts": {
45
+ "build": "npx --yes -p @napi-rs/cli@^3.6.2 napi build --platform --release",
46
+ "artifacts": "npx --yes -p @napi-rs/cli@^3.6.2 napi artifacts",
47
+ "prepublishOnly": "npx --yes -p @napi-rs/cli@^3.6.2 napi prepublish -t npm --skip-optional-publish"
48
+ },
49
+ "engines": { "node": ">= 22" },
50
+ "publishConfig": { "access": "public" },
51
+ "devDependencies": { "@napi-rs/cli": "^3.6.2" }
62
52
  }
Binary file
Binary file