Skip to content
This repository was archived by the owner on Sep 9, 2025. It is now read-only.

Commit 3d7ace8

Browse files
author
Hendrik van Antwerpen
authored
Merge pull request #139 from github/bump-tsg
Fix workflows and release tree-sitter-stack-graphs v0.4.0
2 parents 4ab11d8 + c537597 commit 3d7ace8

File tree

11 files changed

+24
-55
lines changed

11 files changed

+24
-55
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -54,29 +54,3 @@ jobs:
5454
run: cargo test --all-features
5555
- name: Run test suite with all optimizations
5656
run: cargo test --release
57-
58-
test-npm:
59-
runs-on: ${{ matrix.os }}
60-
strategy:
61-
matrix:
62-
node: [16.x]
63-
os: [ubuntu-latest]
64-
rust: [stable]
65-
66-
defaults:
67-
run:
68-
working-directory: tree-sitter-stack-graphs/npm
69-
70-
steps:
71-
- name: Install Node environment
72-
uses: actions/setup-node@v3
73-
with:
74-
node-version: ${{ matrix.node }}
75-
- name: Install Rust environment
76-
uses: hecrj/setup-rust-action@v1
77-
with:
78-
rust-version: ${{ matrix.rust }}
79-
- name: Checkout code
80-
uses: actions/checkout@v2
81-
- name: Build NPM package
82-
run: npm ci

.github/workflows/publish-lsp-positions.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ jobs:
2929
path: ${{ env.CRATE_DIR }}
3030
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
3131
create-release:
32+
needs: publish-crate
3233
runs-on: ubuntu-latest
3334
permissions:
3435
contents: write

.github/workflows/publish-stack-graphs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ jobs:
2929
path: ${{ env.CRATE_DIR }}
3030
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
3131
create-release:
32+
needs: publish-crate
3233
runs-on: ubuntu-latest
3334
permissions:
3435
contents: write

.github/workflows/publish-tree-sitter-stack-graphs.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ jobs:
2929
path: ${{ env.CRATE_DIR }}
3030
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
3131
publish-npm:
32+
needs: publish-crate
3233
runs-on: ubuntu-latest
3334
env:
3435
PACKAGE_DIR: './tree-sitter-stack-graphs/npm'
@@ -41,13 +42,19 @@ jobs:
4142
- name: Checkout repository
4243
uses: actions/checkout@v3
4344
# TODO Verify the package version matches the tag
45+
- name: Install dependencies
46+
run: npm install
47+
working-directory: ${{ env.PACKAGE_DIR }}
4448
- name: Verify package
45-
run: npm publish --dry-run ${{ env.PACKAGE_DIR }}
49+
run: npm publish --dry-run
50+
working-directory: ${{ env.PACKAGE_DIR }}
4651
- name: Publish package
47-
run: npm publish ${{ env.PACKAGE_DIR }}
52+
run: npm publish
53+
working-directory: ${{ env.PACKAGE_DIR }}
4854
env:
4955
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
5056
create-release:
57+
needs: publish-crate
5158
runs-on: ubuntu-latest
5259
permissions:
5360
contents: write

tree-sitter-stack-graphs/CHANGELOG.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## Unreleased
8+
## v0.4.0 -- 2022-10-19
9+
10+
Depend on `tree-sitter-graph` version 0.7.
911

1012
### CLI
1113

@@ -23,11 +25,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2325

2426
#### Changed
2527

26-
- The `loader::Loader::from_*` functions now take two new argument, a search path for the TSG file and a search path for builtins, instead of the `loader::Reader`. The search paths are specified as a vector of `Loader::LoadPath`s, which can be either regular paths, or relative to the grammar location.
28+
- The `loader::Loader::from_*` functions now take two new arguments, a search path for the TSG file and a search path for builtins, instead of the `loader::Reader`. The search paths are specified as a vector of `Loader::LoadPath`s, which can be either regular paths, or paths relative to the grammar location.
2729

2830
#### Added
2931

30-
- Tests can specify global variables that are passed to the TSG rules using `--- global: NAME+VALUE ---` in comments.
32+
- Tests can specify global variables that are passed to the TSG rules using `--- global: NAME=VALUE ---` in comments.
3133
- `loader::Loader` can read global variables for the builtins from an optional configuration file next to the builtins file. The configuration file should have the `.cfg` extension and the same name as the builtins file. API users can call `loader::Loader::load_globals_from_config_*` methods to read configuration files.
3234

3335
## 0.3.1 -- 2022-09-07

tree-sitter-stack-graphs/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "tree-sitter-stack-graphs"
3-
version = "0.3.1"
3+
version = "0.4.0"
44
description = "Create stack graphs using tree-sitter parsers"
55
homepage = "https://github.com/github/stack-graphs/tree/main/tree-sitter-stack-graphs"
66
repository = "https://github.com/github/stack-graphs/"
@@ -42,7 +42,7 @@ stack-graphs = { version="0.10", path="../stack-graphs" }
4242
thiserror = "1.0"
4343
tree-sitter = ">= 0.19"
4444
tree-sitter-config = { version = "0.19", optional = true }
45-
tree-sitter-graph = "0.6"
45+
tree-sitter-graph = "0.7"
4646
tree-sitter-loader = "0.20"
4747
walkdir = { version = "2.3", optional = true }
4848

tree-sitter-stack-graphs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ To use this library, add the following to your `Cargo.toml`:
1515

1616
``` toml
1717
[dependencies]
18-
tree-sitter-stack-graphs = "0.3"
18+
tree-sitter-stack-graphs = "0.4"
1919
```
2020

2121
Check out our [documentation](https://docs.rs/tree-sitter-stack-graphs/*/) for
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
/.crates.toml
22
/.crates2.json
33
/bin/
4+
/package-lock.json

tree-sitter-stack-graphs/npm/package-lock.json

Lines changed: 0 additions & 17 deletions
This file was deleted.

tree-sitter-stack-graphs/npm/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "tree-sitter-stack-graphs",
3-
"version": "0.3.1",
3+
"version": "0.4.0",
44
"description": "Create stack graphs using tree-sitter parsers",
55
"homepage": "https://github.com/github/stack-graphs/tree/main/tree-sitter-stack-graphs",
66
"repository": {

0 commit comments

Comments
 (0)