tree-sitter-rust
Advanced tools
Comparing version 0.23.0 to 0.23.1
@@ -1,9 +0,9 @@ | ||
/// <reference types="node" /> | ||
const assert = require("node:assert"); | ||
const { test } = require("node:test"); | ||
const Parser = require("tree-sitter"); | ||
test("can load grammar", () => { | ||
const parser = new (require("tree-sitter"))(); | ||
const parser = new Parser(); | ||
assert.doesNotThrow(() => parser.setLanguage(require("."))); | ||
}); |
const root = require("path").join(__dirname, "..", ".."); | ||
module.exports = require("node-gyp-build")(root); | ||
module.exports = | ||
typeof process.versions.bun === "string" | ||
// Support `bun build --compile` by being statically analyzable enough to find the .node file at build-time | ||
? require(`../../prebuilds/${process.platform}-${process.arch}/tree-sitter-rust.node`) | ||
: require("node-gyp-build")(root); | ||
@@ -5,0 +9,0 @@ try { |
100
package.json
{ | ||
"name": "tree-sitter-rust", | ||
"version": "0.23.0", | ||
"version": "0.23.1", | ||
"description": "Rust grammar for tree-sitter", | ||
"repository": "github:tree-sitter/tree-sitter-rust", | ||
"repository": "https://github.com/tree-sitter/tree-sitter-rust", | ||
"license": "MIT", | ||
"author": "Maxim Sokolov <maxim0xff@gmail.com>", | ||
"author": { | ||
"name": "Maxim Sokolov", | ||
"email": "maxim0xff@gmail.com" | ||
}, | ||
"contributors": [ | ||
"Max Brunsfeld <maxbrunsfeld@gmail.com>", | ||
"Amaan Qureshi <amaanq12@gmail.com>" | ||
{ | ||
"name": "Max Brunsfeld", | ||
"email": "maxbrunsfeld@gmail.com" | ||
}, | ||
{ | ||
"name": "Amaan Qureshi", | ||
"email": "amaanq12@gmail.com" | ||
} | ||
], | ||
"maintainers": [ | ||
"Amaan Qureshi <amaanq12@gmail.com>" | ||
], | ||
"main": "bindings/node", | ||
@@ -25,2 +31,3 @@ "types": "bindings/node", | ||
"grammar.js", | ||
"tree-sitter.json", | ||
"binding.gyp", | ||
@@ -30,8 +37,15 @@ "prebuilds/**", | ||
"queries/*", | ||
"src/**" | ||
"src/**", | ||
"*.wasm" | ||
], | ||
"dependencies": { | ||
"node-addon-api": "^8.1.0", | ||
"node-addon-api": "^8.2.2", | ||
"node-gyp-build": "^4.8.2" | ||
}, | ||
"devDependencies": { | ||
"eslint": "^9.14.0", | ||
"eslint-config-treesitter": "^1.0.2", | ||
"prebuildify": "^6.0.1", | ||
"tree-sitter-cli": "^0.24.4" | ||
}, | ||
"peerDependencies": { | ||
@@ -45,8 +59,2 @@ "tree-sitter": "^0.21.1" | ||
}, | ||
"devDependencies": { | ||
"eslint": "^8.57.0", | ||
"eslint-config-google": "^0.14.0", | ||
"tree-sitter-cli": "^0.23.0", | ||
"prebuildify": "^6.0.1" | ||
}, | ||
"scripts": { | ||
@@ -58,63 +66,3 @@ "install": "node-gyp-build", | ||
"test": "node --test bindings/node/*_test.js" | ||
}, | ||
"tree-sitter": [ | ||
{ | ||
"scope": "source.rust", | ||
"injection-regex": "rust", | ||
"file-types": [ | ||
"rs" | ||
], | ||
"highlights": [ | ||
"queries/highlights.scm" | ||
], | ||
"injections": [ | ||
"queries/injections.scm" | ||
], | ||
"tags": [ | ||
"queries/tags.scm" | ||
] | ||
} | ||
], | ||
"eslintConfig": { | ||
"env": { | ||
"commonjs": true, | ||
"es2021": true | ||
}, | ||
"extends": "google", | ||
"parserOptions": { | ||
"ecmaVersion": "latest", | ||
"sourceType": "module" | ||
}, | ||
"rules": { | ||
"arrow-parens": "off", | ||
"camel-case": "off", | ||
"indent": [ | ||
"error", | ||
2, | ||
{ | ||
"SwitchCase": 1 | ||
} | ||
], | ||
"max-len": [ | ||
"error", | ||
{ | ||
"code": 160, | ||
"ignoreComments": true, | ||
"ignoreUrls": true, | ||
"ignoreStrings": true | ||
} | ||
], | ||
"spaced-comment": [ | ||
"warn", | ||
"always", | ||
{ | ||
"line": { | ||
"markers": [ | ||
"/" | ||
] | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 3 instances in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
14096588
27
16326
2
8
Updatednode-addon-api@^8.2.2