Skip to content

Commit c39b816

Browse files
committed
Bump dependencies
1 parent 0b22c42 commit c39b816

File tree

9 files changed

+4885
-1903
lines changed

9 files changed

+4885
-1903
lines changed

node_modules_linked/web-tree-sitter/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ file to your `public` directory. You can do this automatically with a `postinsta
4646
You can also use this module with [deno](https://deno.land/):
4747

4848
```js
49-
import Parser from "npm:web-tree-sitter";
49+
import { Parser } from "npm:web-tree-sitter";
5050
await Parser.init();
5151
// the library is ready
5252
```
@@ -217,10 +217,10 @@ const Parser = require('web-tree-sitter');
217217

218218
`web-tree-sitter` needs to load the `tree-sitter.wasm` file. By default, it assumes that this file is available in the
219219
same path as the JavaScript code. Therefore, if the code is being served from `http://localhost:3000/bundle.js`, then
220-
the wasm file should be at `http://localhost:3000/tree-sitter.wasm`.
220+
the Wasm file should be at `http://localhost:3000/tree-sitter.wasm`.
221221

222222
For server side frameworks like NextJS, this can be tricky as pages are often served from a path such as
223-
`http://localhost:3000/_next/static/chunks/pages/index.js`. The loader will therefore look for the wasm file at
223+
`http://localhost:3000/_next/static/chunks/pages/index.js`. The loader will therefore look for the Wasm file at
224224
`http://localhost:3000/_next/static/chunks/pages/tree-sitter.wasm`. The solution is to pass a `locateFile` function in
225225
the `moduleOptions` argument to `Parser.init()`:
226226

@@ -232,8 +232,8 @@ await Parser.init({
232232
});
233233
```
234234

235-
`locateFile` takes in two parameters, `scriptName`, i.e. the wasm file name, and `scriptDirectory`, i.e. the directory
236-
where the loader expects the script to be. It returns the path where the loader will look for the wasm file. In the NextJS
235+
`locateFile` takes in two parameters, `scriptName`, i.e. the Wasm file name, and `scriptDirectory`, i.e. the directory
236+
where the loader expects the script to be. It returns the path where the loader will look for the Wasm file. In the NextJS
237237
case, we want to return just the `scriptName` so that the loader will look at `http://localhost:3000/tree-sitter.wasm`
238238
and not `http://localhost:3000/_next/static/chunks/pages/tree-sitter.wasm`.
239239

node_modules_linked/web-tree-sitter/package.json

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@
22
"name": "web-tree-sitter",
33
"version": "0.26.0",
44
"description": "Tree-sitter bindings for the web",
5-
"repository": "https://github.com/tree-sitter/tree-sitter",
6-
"homepage": "https://github.com/tree-sitter/tree-sitter/tree/master/lib/binding_web",
5+
"repository": {
6+
"type": "git",
7+
"url": "git+https://github.com/tree-sitter/tree-sitter.git",
8+
"directory": "lib/binding_web"
9+
},
710
"license": "MIT",
811
"author": {
912
"name": "Max Brunsfeld",
@@ -34,7 +37,7 @@
3437
"default": "./debug/web-tree-sitter.js"
3538
},
3639
"require": {
37-
"types": "./debug/web-tree-sitter.d.cts",
40+
"types": "./web-tree-sitter.d.cts",
3841
"default": "./debug/web-tree-sitter.cjs"
3942
}
4043
},
@@ -48,7 +51,6 @@
4851
"wasm"
4952
],
5053
"files": [
51-
"README.md",
5254
"web-tree-sitter.cjs",
5355
"web-tree-sitter.cjs.map",
5456
"web-tree-sitter.js",
@@ -64,13 +66,24 @@
6466
"web-tree-sitter.d.ts",
6567
"web-tree-sitter.d.ts.map",
6668
"web-tree-sitter.d.cts",
67-
"web-tree-sitter.d.cts.map",
68-
"src/**/*.ts",
69-
"lib/*.c",
70-
"lib/*.h"
69+
"web-tree-sitter.d.cts.map"
7170
],
71+
"devDependencies": {
72+
"@eslint/js": "^9.20.0",
73+
"@types/emscripten": "^1.40.0",
74+
"@types/node": "^24.3.0",
75+
"@vitest/coverage-v8": "^3.0.5",
76+
"dts-buddy": "^0.6.2",
77+
"esbuild": "^0.25.0",
78+
"eslint": "^9.20.0",
79+
"source-map": "^0.7.4",
80+
"tsx": "^4.19.2",
81+
"typescript": "^5.7.3",
82+
"typescript-eslint": "^8.23.0",
83+
"vitest": "^3.0.5"
84+
},
7285
"scripts": {
73-
"build:ts": "node script/build.js",
86+
"build:ts": "tsc -b . && node script/build.js",
7487
"build:wasm": "cd ../../ && cargo xtask build-wasm",
7588
"build:wasm:debug": "cd ../../ && cargo xtask build-wasm --debug",
7689
"build": "npm run build:wasm && npm run build:ts",
@@ -81,6 +94,7 @@
8194
"test": "vitest run",
8295
"test:watch": "vitest",
8396
"prepack": "cp ../../LICENSE .",
97+
"postpack": "rm LICENSE",
8498
"prepublishOnly": "tsx script/check-artifacts-fresh.ts"
8599
}
86100
}

0 commit comments

Comments
 (0)