Skip to content

Commit

Permalink
Merge branch 'main' into leon-shebang-variable
Browse files Browse the repository at this point in the history
  • Loading branch information
leon-sony committed Oct 15, 2024
2 parents c2eed3f + 3030c5d commit 92d458c
Show file tree
Hide file tree
Showing 10 changed files with 10,918 additions and 8,782 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,17 @@ jobs:
run: just --verbose ci-validate-generated-files 0
- name: Test WASM build
run: just --verbose build-wasm

success:
needs:
- codestyle
- test
runs-on: ubuntu-latest
# GitHub branch protection is exceedingly silly and treats "jobs skipped because a dependency
# failed" as success. So we have to do some contortions to ensure the job fails if any of its
# dependencies fails.
if: always() # make sure this is never "skipped"
steps:
# Manually check the status of all dependencies. `if: failure()` does not work.
- name: check if any dependency failed
run: jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'
14 changes: 8 additions & 6 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ fuzz_out := bin_dir / "fuzz.out"

ts_path := justfile_directory() / "repositories" / "tree-sitter"
ts_repo := "https://github.com/tree-sitter/tree-sitter"
ts_sha := "b40f342067a89cd6331bf4c27407588320f3c263" # v0.22.6
ts_branch := "release-0.24" # release tags aren't on `master`
ts_sha := "bdfe32402e85673bbc693216f0a6ef72c98bb665" # v0.24.3
just_path := justfile_directory() / "repositories" / "just"
just_repo := "https://github.com/casey/just.git"
just_sha := "5f91b37c82e6a92df2575babcb17a6a8e9c505f7" # 1.29.1
just_branch := "master"
just_sha := "f5bdffda344daca6c791303e4bb2006ee5a0b144" # 1.35.0
include_args := "-Isrc/ -I" + ts_path + "/lib/include -Inode_modules/nan"
general_cflags := "-Wall -Werror --pedantic -Wno-format-pedantic"
Expand Down Expand Up @@ -317,7 +319,7 @@ pre-commit-install:
EOF
# Clone or update a repo
_clone-repo url path sha:
_clone-repo url path sha branch:
#!/bin/sh
set -eaux
Expand All @@ -329,15 +331,15 @@ _clone-repo url path sha:
actual_sha=$(git -C '{{ path }}' rev-parse HEAD)
if [ "$actual_sha" != "{{ sha }}" ]; then
echo "Updating {{ url }} to {{ sha }}"
git -C '{{ path }}' fetch
git -C '{{ path }}' fetch origin {{ branch }}
git -C '{{ path }}' reset --hard '{{ sha }}'
fi
# Clone the tree-sitter repo
_clone-repo-tree-sitter: (_clone-repo ts_repo ts_path ts_sha)
_clone-repo-tree-sitter: (_clone-repo ts_repo ts_path ts_sha ts_branch)
# Clone the just repo
_clone-repo-just: (_clone-repo just_repo just_path just_sha)
_clone-repo-just: (_clone-repo just_repo just_path just_sha just_branch)
# Build a simple debug executable
debug-build: _clone-repo-tree-sitter _out-dirs
Expand Down
45 changes: 23 additions & 22 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 7 additions & 33 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@
],
"dependencies": {
"tree-sitter": "^0.21.1",
"prettier": "^3.3.2",
"node-addon-api": "^7.1.0",
"node-gyp-build": "^4.8.0"
"prettier": "^3.3.3",
"node-addon-api": "^8.2.1",
"node-gyp-build": "^4.8.2"
},
"peerDependencies": {
"tree-sitter": "^0.21.0"
"tree-sitter": "^0.21.1"
},
"peerDependenciesMeta": {
"tree_sitter": {
Expand All @@ -46,8 +46,8 @@
"eslint": ">=9.5.0",
"eslint-config-google": "^0.14.0",
"eslint-config-prettier": "^9.1.0",
"tree-sitter-cli": "^0.22.6",
"prebuildify": "^6.0.0"
"tree-sitter-cli": "^0.24.3",
"prebuildify": "^6.0.1"
},
"scripts": {
"format:check": "prettier --check .",
Expand All @@ -56,31 +56,5 @@
"lint:fix": "eslint --fix .",
"install": "node-gyp-build",
"prebuildify": "prebuildify --napi --strip"
},
"tree-sitter": [
{
"scope": "source.just",
"file-types": [
"just",
".just",
"justfile",
"JUSTFILE",
"Justfile",
".justfile",
".JUSTFILE",
".Justfile"
],
"injection-regex": "^(?i)just(file)?$",
"first-line-regex": "#!\\S*bin\\S*[/ ]just",
"highlights": [
"queries-src/highlights.scm"
],
"locals": [
"queries-src/locals.scm"
],
"injections": [
"queries-src/injections.scm"
]
}
]
}
}
1 change: 1 addition & 0 deletions src/grammar.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/node-types.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 92d458c

Please sign in to comment.