tree-sitter-html
Advanced tools
Comparing version
@@ -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-html.node`) | ||
: require("node-gyp-build")(root); | ||
@@ -5,0 +9,0 @@ try { |
{ | ||
"name": "tree-sitter-html", | ||
"version": "0.23.0", | ||
"version": "0.23.1", | ||
"description": "HTML grammar for tree-sitter", | ||
@@ -29,6 +29,7 @@ "repository": "github:tree-sitter/tree-sitter-html", | ||
"queries/*", | ||
"src/**" | ||
"src/**", | ||
"*.wasm" | ||
], | ||
"dependencies": { | ||
"node-addon-api": "^8.1.0", | ||
"node-addon-api": "^8.2.2", | ||
"node-gyp-build": "^4.8.2" | ||
@@ -45,5 +46,5 @@ }, | ||
"devDependencies": { | ||
"eslint": "^8.57.0", | ||
"eslint-config-google": "^0.14.0", | ||
"tree-sitter-cli": "^0.23.0", | ||
"eslint": "^9.14.0", | ||
"eslint-config-treesitter": "^1.0.2", | ||
"tree-sitter-cli": "^0.24.4", | ||
"prebuildify": "^6.0.1" | ||
@@ -57,59 +58,3 @@ }, | ||
"test": "node --test bindings/node/*_test.js" | ||
}, | ||
"tree-sitter": [ | ||
{ | ||
"scope": "source.html", | ||
"file-types": [ | ||
"html" | ||
], | ||
"injection-regex": "html", | ||
"highlights": "queries/highlights.scm", | ||
"injections": "queries/injections.scm", | ||
"external-files": [ | ||
"src/tag.h" | ||
] | ||
} | ||
], | ||
"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": [ | ||
"/" | ||
] | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |
{ | ||
"$schema": "https://tree-sitter.github.io/tree-sitter/assets/schemas/grammar.schema.json", | ||
"name": "html", | ||
@@ -3,0 +4,0 @@ "rules": { |
@@ -33,2 +33,3 @@ [ | ||
"named": true, | ||
"root": true, | ||
"fields": {}, | ||
@@ -35,0 +36,0 @@ "children": { |
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 not supported yet
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance 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
735145
51.04%26
13.04%976
0.62%2
100%7
40%Updated