-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This change updates tree-sitter and related dependencies, and accounts for the current iteration of churn in various special case details of how a tree-sitter project is supposed to work. On the bright side, it turns out things got a lot simpler this time! - The structure of the `@getodk/tree-sitter-xpath` package is now much more like the other packages. This is largely because the assumptions made by `tree-sitter-cli` are based around a special `tree-sitter.json` file, rather than overloading `package.json` with tree-sitter specific details. TODO: it’s possible we can now switch the sub-package to ESM (as all of the other sub-packages are). I would have already looked into this, but there was more than enough churn to get back to a working state. - We no longer (need to) build for Node. Since all of our downstream packages consume the parser as WASM, we benefit from a simpler and (MUCH) faster build step. Note that this may technically be a breaking change (though I’m not sure that it is, since I’m pretty sure we never published the Node bindings, even when they were built). - Many of the extraneous build artifacts are no longer produced, either because they’re excluded in `tree-sitter.json` or because we are no longer building for Node at all. This allows us to significantly scale down custom build scripting, as well as tree-sitter specific entries in .gitignore/.gitattributes. - Note: `tree-sitter.json` and the `test` directory have been moved into the Vite-default `public` directory, so they automatically get copied into the `dist` build directory. Then all `tree-sitter` commands are run from that directory. This maximizes our ability to use existing tooling and conventions for the sub-package, and ensures that all ephemeral build product is contained in one (conventional) place that gets cleaned up like any other project on rebuild.
- Loading branch information
1 parent
7ea1dc7
commit c5d5982
Showing
22 changed files
with
169 additions
and
353 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,6 +71,6 @@ | |
"vue-tsc": "^2.0.19" | ||
}, | ||
"resolutions": { | ||
"**/tree-sitter": "0.21.1" | ||
"**/tree-sitter": "0.22.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
/// <reference path="./types/tree-sitter-xpath-parser.d.ts" /> | ||
/// <reference path="./dist/tree-sitter-xpath-parser.d.ts" /> | ||
|
||
export * from '@getodk/tree-sitter-xpath/parser'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"$schema": "https://tree-sitter.github.io/tree-sitter/assets/schemas/config.schema.json", | ||
"grammars": [ | ||
{ | ||
"name": "@getodk/xpath", | ||
"camelcase": "GetODKXPath", | ||
"scope": "source.xpath", | ||
"path": ".", | ||
"file-types": null, | ||
"injection-regex": "^xpath$" | ||
} | ||
], | ||
"metadata": { | ||
"version": "0.1.2", | ||
"license": "Apache-2.0", | ||
"description": "XPath grammar for tree-sitter", | ||
"authors": [ | ||
{ | ||
"name": "getodk" | ||
} | ||
], | ||
"links": { | ||
"repository": "https://github.com/getodk/web-forms" | ||
} | ||
}, | ||
"bindings": { | ||
"c": true, | ||
"go": false, | ||
"node": true, | ||
"python": false, | ||
"rust": true, | ||
"swift": false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.