File tree Expand file tree Collapse file tree 2 files changed +15
-11
lines changed Expand file tree Collapse file tree 2 files changed +15
-11
lines changed Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ set -euox pipefail
4
+
5
+ cd server
6
+ yarn add web-tree-sitter
7
+ yarn add --dev tree-sitter-cli https://github.com/tree-sitter/tree-sitter-bash
8
+ npx tree-sitter build-wasm node_modules/tree-sitter-bash
9
+
10
+ curl ' https://api.github.com/repos/tree-sitter/tree-sitter-bash/commits/master' | jq .commit.url > parser.info
11
+ echo " tree-sitter-cli $( cat package.json | jq ' .devDependencies["tree-sitter-cli"]' ) " >> parser.info
12
+
13
+ yarn remove tree-sitter-cli tree-sitter-bash
14
+
Original file line number Diff line number Diff line change @@ -17,17 +17,7 @@ export async function initializeParser(): Promise<Parser> {
17
17
* See https://github.com/tree-sitter/tree-sitter/tree/master/lib/binding_web#generate-wasm-language-files
18
18
*
19
19
* To compile and use a new tree-sitter-bash version:
20
- * cd server
21
- * yarn add web-tree-sitter
22
- * yarn add --dev tree-sitter-bash tree-sitter-cli
23
- * npx tree-sitter build-wasm node_modules/tree-sitter-bash
24
- *
25
- * Note down the versions (from the package.json) below and then run
26
- * yarn remove tree-sitter-bash tree-sitter-cli
27
- *
28
- * The current files was compiled with:
29
- * "tree-sitter-bash": "^0.19.0",
30
- * "tree-sitter-cli": "^0.20.0"
20
+ * sh scripts/upgrade-tree-sitter.sh
31
21
*/
32
22
const lang = await Parser . Language . load ( `${ __dirname } /../tree-sitter-bash.wasm` )
33
23
You can’t perform that action at this time.
0 commit comments