From a5b7c2a584368fcba666dccdbc392df31aebd036 Mon Sep 17 00:00:00 2001 From: Amaan Qureshi Date: Wed, 21 Feb 2024 14:50:56 -0500 Subject: [PATCH] fix: publish 0.21.0 to registries --- .github/workflows/hotfix.yml | 76 ++++++++++++++++++++++++++++++++++++ Cargo.lock | 4 +- Makefile | 2 +- cli/Cargo.toml | 10 ++--- cli/loader/Cargo.toml | 12 +----- highlight/Cargo.toml | 4 +- highlight/README.md | 4 +- lib/Cargo.toml | 3 +- lib/binding_rust/README.md | 4 +- lib/binding_web/package.json | 2 +- tags/Cargo.toml | 4 +- 11 files changed, 96 insertions(+), 29 deletions(-) create mode 100644 .github/workflows/hotfix.yml diff --git a/.github/workflows/hotfix.yml b/.github/workflows/hotfix.yml new file mode 100644 index 00000000..27805b9e --- /dev/null +++ b/.github/workflows/hotfix.yml @@ -0,0 +1,76 @@ +name: Hotfix + +on: + workflow_dispatch: + +jobs: + lib: + runs-on: ubuntu-latest + env: + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + steps: + - uses: actions/checkout@v4 + + - name: Setup Rust + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + + + - name: Publish `tree-sitter` (dry run) + run: cargo publish --dry-run -p tree-sitter + + - name: Publish `tree-sitter` + run: cargo publish -p tree-sitter + + - name: Publish `tree-sitter-loader` (dry run) + run: cargo publish --dry-run -p tree-sitter-loader + + - name: Publish `tree-sitter-loader` + run: cargo publish -p tree-sitter-loader + + - name: Publish `tree-sitter-config` (dry run) + run: cargo publish --dry-run -p tree-sitter-config + + - name: Publish `tree-sitter-config` + run: cargo publish -p tree-sitter-config + + - name: Publish `tree-sitter-highlight` (dry run) + run: cargo publish --dry-run -p tree-sitter-highlight + + - name: Publish `tree-sitter-highlight` + run: cargo publish -p tree-sitter-highlight + + - name: Publish `tree-sitter-tags` (dry run) + run: cargo publish --dry-run -p tree-sitter-tags + + - name: Publish `tree-sitter-tags` + run: cargo publish -p tree-sitter-tags + + - name: Publish `tree-sitter-cli` (dry run) + run: cargo publish --dry-run -p tree-sitter-cli + + - name: Publish `tree-sitter-cli` + run: cargo publish -p tree-sitter-cli + + - name: Re-build wasm file for `web-tree-sitter` + run: ./script/build-wasm + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 18 + registry-url: "https://registry.npmjs.org" + + - name: Publish to npmjs.com + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} + run: | + cd lib/binding_web + npm publish + cd ../../cli/npm + npm publish + diff --git a/Cargo.lock b/Cargo.lock index 05f55613..f77ddad4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1264,7 +1264,7 @@ dependencies = [ [[package]] name = "tree-sitter" -version = "0.20.10" +version = "0.20.11" dependencies = [ "bindgen", "cc", @@ -1354,8 +1354,6 @@ dependencies = [ "serde", "serde_json", "tree-sitter", - "tree-sitter-highlight", - "tree-sitter-tags", "which 6.0.0", ] diff --git a/Makefile b/Makefile index 8358cc67..35541d54 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -VERSION := 0.20.10 +VERSION := 0.21.0 # install directory layout PREFIX ?= /usr/local diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 80f58145..9dd4a68d 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -55,23 +55,23 @@ webbrowser.workspace = true which.workspace = true [dependencies.tree-sitter] -version = "0.20.10" +version = "0.21.0" path = "../lib" [dependencies.tree-sitter-config] -version = "0.19.0" +version = "0.21.0" path = "config" [dependencies.tree-sitter-highlight] -version = "0.20.2" +version = "0.21.0" path = "../highlight" [dependencies.tree-sitter-loader] -version = "0.20.0" +version = "0.21.0" path = "loader" [dependencies.tree-sitter-tags] -version = "0.20.2" +version = "0.21.0" path = "../tags" [dev-dependencies] diff --git a/cli/loader/Cargo.toml b/cli/loader/Cargo.toml index 6ae39238..ed6ac771 100644 --- a/cli/loader/Cargo.toml +++ b/cli/loader/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "tree-sitter-loader" description = "Locates, builds, and loads tree-sitter grammars at runtime" -version = "0.20.0" +version = "0.21.0" authors.workspace = true edition.workspace = true rust-version.workspace = true @@ -29,13 +29,5 @@ serde_json.workspace = true which.workspace = true [dependencies.tree-sitter] -version = "0.20.10" +version = "0.21.0" path = "../../lib" - -[dependencies.tree-sitter-highlight] -version = "0.20.2" -path = "../../highlight" - -[dependencies.tree-sitter-tags] -version = "0.20.2" -path = "../../tags" diff --git a/highlight/Cargo.toml b/highlight/Cargo.toml index 4c69e934..9f485d85 100644 --- a/highlight/Cargo.toml +++ b/highlight/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "tree-sitter-highlight" description = "Library for performing syntax highlighting with Tree-sitter" -version = "0.20.2" +version = "0.21.0" authors = [ "Max Brunsfeld ", "Tim Clem ", @@ -24,5 +24,5 @@ regex.workspace = true thiserror.workspace = true [dependencies.tree-sitter] -version = "0.20.10" +version = "0.21.0" path = "../lib" diff --git a/highlight/README.md b/highlight/README.md index e0eb298f..982e510a 100644 --- a/highlight/README.md +++ b/highlight/README.md @@ -12,8 +12,8 @@ to parse, to your `Cargo.toml`: ```toml [dependencies] -tree-sitter-highlight = "^0.20" -tree-sitter-javascript = "0.19" +tree-sitter-highlight = "^0.21.0" +tree-sitter-javascript = "0.20.3" ``` Define the list of highlight names that you will recognize: diff --git a/lib/Cargo.toml b/lib/Cargo.toml index 0a890c52..7fe4f11d 100644 --- a/lib/Cargo.toml +++ b/lib/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "tree-sitter" description = "Rust bindings to the Tree-sitter parsing library" -version = "0.20.10" +version = "0.21.0" authors.workspace = true edition.workspace = true rust-version.workspace = true @@ -21,6 +21,7 @@ include = [ "/src/*.h", "/src/*.c", "/src/unicode/*", + "/src/wasm/*", "/include/tree_sitter/api.h", ] diff --git a/lib/binding_rust/README.md b/lib/binding_rust/README.md index e03de660..35afea49 100644 --- a/lib/binding_rust/README.md +++ b/lib/binding_rust/README.md @@ -28,8 +28,8 @@ Then, add a language as a dependency: ```toml [dependencies] -tree-sitter = "0.20.10" -tree-sitter-rust = "0.20.3" +tree-sitter = "0.21.0" +tree-sitter-rust = "0.20.4" ``` To then use a language, you assign them to the parser. diff --git a/lib/binding_web/package.json b/lib/binding_web/package.json index 3d484eb8..7710dfb6 100644 --- a/lib/binding_web/package.json +++ b/lib/binding_web/package.json @@ -1,6 +1,6 @@ { "name": "web-tree-sitter", - "version": "0.20.9", + "version": "0.21.0", "description": "Tree-sitter bindings for the web", "main": "tree-sitter.js", "types": "tree-sitter-web.d.ts", diff --git a/tags/Cargo.toml b/tags/Cargo.toml index a200277b..d1f8abf4 100644 --- a/tags/Cargo.toml +++ b/tags/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "tree-sitter-tags" description = "Library for extracting tag information" -version = "0.20.2" +version = "0.21.0" authors = [ "Max Brunsfeld ", "Patrick Thomson ", @@ -24,5 +24,5 @@ memchr.workspace = true thiserror.workspace = true [dependencies.tree-sitter] -version = "0.20.10" +version = "0.21.0" path = "../lib"