From 516f13e89e547618ef7c577633b010cf4e7d2cb3 Mon Sep 17 00:00:00 2001 From: Amaan Qureshi Date: Tue, 12 Mar 2024 01:12:24 -0400 Subject: [PATCH] docs: update changelog --- CHANGELOG.md | 241 +++++++++++++++++++++++++++++++++------------- script/cliff.toml | 26 ++--- 2 files changed, 189 insertions(+), 78 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 834c6201..430820e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,119 @@ # Changelog -## [0.21.0] - 2024-02-21 +## [0.22.1] — 2024-03-10 + +### Bug Fixes + +- Cli build script behavior on release + +## [0.22.0] — 2024-03-10 ### Breaking + +- Remove top-level `corpus` dir for tests + The cli will now only look in `test/corpus` for tests +- Remove redundant escape regex & curly brace regex preprocessing () +- **bindings**: Convert node bindings to NAPI () +- **wasm**: Make `current*`, `is*`, and `has*` methods properties () +- **wasm**: Keep API in-line with upstream and start aligning with node () + +### Features + +- Add xtasks to assist with bumping crates () +- Improve language bindings () +- Expose the allocator and array header files for external scanners () +- Add typings for the node bindings +- Replace `nan` with `node-addon-api` and conditionally print logs +- **bindings**: Add more make targets +- **bindings**: Add peerDependencies for npm +- **bindings**: Add prebuildify to node +- **bindings**: Remove dsl types file () +- **node**: Type tag the language () +- **test**: Add attributes for corpus tests + +### Bug Fixes + +- Apply some `scan-build` suggestions (unused assignment/garbage access) () +- Wrap `||` comparison in parentheses when `&&` is used () +- Ignore unused variables in the array macros () +- `binding.cc` overwrite should replace `PARSER_NAME` () +- Don't use `__declspec(dllexport)` on windows () +- Parsers should export the language function on windows +- Allow the regex `v` flag () +- **assertions**: Case shouldn't matter for comment node detection +- **bindings**: Editorconfig and setup.py fixes () +- **bindings**: Insert `types` after `main` if it exists () +- **bindings**: Fix template oversights () +- **cli**: Only output the sources with `--no-bindings` () +- **generate**: Add `.npmignore`, populate Swift's exclude list () +- **generate**: Extern allocator functions for the template don't need to be "exported" () +- **generate**: Camel case name in `Cargo.toml` description () +- **lib**: Include `api.h` so `ts_set_allocator` is visible () + +### Documentation + +- Add GitHub user and PR info to the changelog +- Add css for inline code () +- Document test attributes +- Add `Ohm` language parser +- Remove duplicate `the`'s () +- Add discord and matrix badges () + +### Refactor + +- Rename TS_REUSE_ALLOCATOR flag () +- Remove extern/const where possible +- **array**: Use pragma GCC in clang too +- **bindings**: Remove npmignore () + +### Testing + +- Don't use TS_REUSE_ALLOCATOR on Darwin systems () +- Add test case for parse stack merging with incorrect error cost bug () + +### Build System and CI + +- Improve changelog settings () +- Unify crate versions via workspace () +- Update `cc` to remove annoying debug output () +- Adjust dependabot settings () +- Use c11 everywhere +- Add uninstall command +- Don't skip tests on failing lint () +- Remove unused deps, bump deps, and bump MSRV to 1.74.1 () +- **bindings**: Metadata improvements +- **bindings**: Make everything c11 () +- **dependabot**: Update weekly instead of daily () +- **deps**: Bump the cargo group with 1 update () +- **deps**: Bump the cargo group with 1 update () +- **deps**: Bump deps & lockfile () +- **deps**: Bump the cargo group with 4 updates () +- **lint**: Detect if `Cargo.lock` needs to be updated () +- **lint**: Make lockfile check quiet () +- **swift**: Move 'cLanguageStandard' behind 'targets' () + +### Other + +- Make Node.js language bindings context aware () + They don't have any dynamic global data, so all it takes is just declaring them as such +- Fix crash when attempting to load ancient languages via wasm () +- Use workspace dependencies for internal crates like Tree-sitter () +- Remove vendored wasmtime headers (https://github.com/tree-sitter/tree-sitter/pull/3084) + When building rust binding, use wasmtime headers provided via cargo + by the wasmtime-c-api crate. +- Fix invalid parse stack recursive merging with mismatched error cost () + Allowing this invalid merge caused an invariant to be violated + later on during parsing, when handling a later error. +- Fix regression in `subtree_compare` () +- docs: Add `Ohm` language parser () +- Delete `binding_files.rs` () +- **bindings**: Consistent wording () +- **bindings**: Ignore more artifacts () + +## [0.21.0] — 2024-02-21 + +### Breaking + - Remove the apply-all-captures flag, make last-wins precedence the default **NOTE**: This change might cause breakage in your grammar's highlight tests. @@ -10,98 +121,98 @@ last query that matches will win. ### Features + - Use lockfiles to dedup recompilation -- Improve error message for files with an unknown grammar path (https://github.com/tree-sitter/tree-sitter/pull/2475) -- Implement first-line-regex (https://github.com/tree-sitter/tree-sitter/pull/2479) +- Improve error message for files with an unknown grammar path () +- Implement first-line-regex () - Error out if an empty string is in the `extras` array -- Allow specifying an external scanner's files (https://github.com/tree-sitter/tree-sitter/pull/3031) +- Allow specifying an external scanner's files () - Better error info when a scanner is missing required symbols -- **cli**: Add an optional `grammar-path` argument for the playground (https://github.com/tree-sitter/tree-sitter/pull/3014) -- **cli**: Add optional `config-path` argument (https://github.com/tree-sitter/tree-sitter/pull/3050) +- **cli**: Add an optional `grammar-path` argument for the playground () +- **cli**: Add optional `config-path` argument () - **loader**: Add more commonly used default parser directories - ### Bug Fixes -- Prettify xml output and add node position info (https://github.com/tree-sitter/tree-sitter/pull/2970) + +- Prettify xml output and add node position info () - Inherited grammar generation - Properly error out when the word property is an invalid rule -- Update schema for regex flags (https://github.com/tree-sitter/tree-sitter/pull/3006) -- Properly handle Query.matches when filtering out results (https://github.com/tree-sitter/tree-sitter/pull/3013) -- Sexp format edge case with quoted closed parenthesis (https://github.com/tree-sitter/tree-sitter/pull/3016) +- Update schema for regex flags () +- Properly handle `Query.matches` when filtering out results () +- Sexp format edge case with quoted closed parenthesis () - Always push the default files if there's no `externals` -- Don't log NUL characters (https://github.com/tree-sitter/tree-sitter/pull/3037) -- Don't throw an error if the user uses `map` in the grammar (https://github.com/tree-sitter/tree-sitter/pull/3041) -- Remove redundant imports (https://github.com/tree-sitter/tree-sitter/pull/3047) -- **cli**: Installation via a HTTP tunnel proxy (https://github.com/tree-sitter/tree-sitter/pull/2824) -- **cli**: Don't update tests automatically if parse errors are detected (https://github.com/tree-sitter/tree-sitter/pull/3033) +- Don't log NUL characters () +- Don't throw an error if the user uses `map` in the grammar () +- Remove redundant imports () +- **cli**: Installation via a HTTP tunnel proxy () +- **cli**: Don't update tests automatically if parse errors are detected () - **cli**: Don't use `long` for `grammar_path` - **test**: Allow writing updates to tests without erroneous nodes instead of denying all of them if a single error is found - **test**: Edge case when parsing `UNEXPECTED`/`MISSING` nodes with an indentation level greater than 0 -- **wasm**: Remove C++ mangled symbols (https://github.com/tree-sitter/tree-sitter/pull/2971) - +- **wasm**: Remove C++ mangled symbols () ### Documentation -- Create issue template (https://github.com/tree-sitter/tree-sitter/pull/2978) + +- Create issue template () - Document regex limitations - Mention that `token($.foo)` is illegal -- Explicitly mention behavior of walking outside the given "root" node for a `TSTreeCursor` (https://github.com/tree-sitter/tree-sitter/pull/3021) -- Small fixes (https://github.com/tree-sitter/tree-sitter/pull/2987) -- Add `Tact` language parser (https://github.com/tree-sitter/tree-sitter/pull/3030) -- **web**: Provide deno usage information (https://github.com/tree-sitter/tree-sitter/pull/2498) - +- Explicitly mention behavior of walking outside the given "root" node for a `TSTreeCursor` () +- Small fixes () +- Add `Tact` language parser () +- **web**: Provide deno usage information () ### Refactor -- Extract regex check into a function and lower its precedence -- `&PathBuf` -> `&Path` (https://github.com/tree-sitter/tree-sitter/pull/3035) -- Name anonymous types in api.h (https://github.com/tree-sitter/tree-sitter/pull/1659) +- Extract regex check into a function and lower its precedence +- `&PathBuf` -> `&Path` () +- Name anonymous types in api.h () ### Testing -- Add quotes around bash variables (https://github.com/tree-sitter/tree-sitter/pull/3023) + +- Add quotes around bash variables () - Update html tests - ### Build System and CI -- Only create release for normal semver tags (https://github.com/tree-sitter/tree-sitter/pull/2973) -- Add useful development targets to makefile (https://github.com/tree-sitter/tree-sitter/pull/2979) -- Remove minimum glibc information in summary page (https://github.com/tree-sitter/tree-sitter/pull/2988) -- Use the native m1 mac runner (https://github.com/tree-sitter/tree-sitter/pull/2995) -- Add editorconfig (https://github.com/tree-sitter/tree-sitter/pull/2998) -- Remove symbolic links from repository (https://github.com/tree-sitter/tree-sitter/pull/2997) -- Move common Cargo.toml keys into the workspace and inherit them (https://github.com/tree-sitter/tree-sitter/pull/3019) -- Remove reviewers when drafting or closing a PR (https://github.com/tree-sitter/tree-sitter/pull/2963) -- Enable creating changelogs with git-cliff (https://github.com/tree-sitter/tree-sitter/pull/3040) -- Cache fixtures (https://github.com/tree-sitter/tree-sitter/pull/3038) -- Don't cancel jobs on master (https://github.com/tree-sitter/tree-sitter/pull/3052) -- Relax caching requirements (https://github.com/tree-sitter/tree-sitter/pull/3051) -- **deps**: Bump clap from 4.4.18 to 4.5.0 (https://github.com/tree-sitter/tree-sitter/pull/3007) -- **deps**: Bump wasmtime from v16.0.0 to v17.0.1 (https://github.com/tree-sitter/tree-sitter/pull/3008) -- **deps**: Bump wasmtime to v18.0.1 (https://github.com/tree-sitter/tree-sitter/pull/3057) -- **sanitize**: Add a timeout of 60 minutes (https://github.com/tree-sitter/tree-sitter/pull/3017) -- **sanitize**: Reduce timeout to 20 minutes (https://github.com/tree-sitter/tree-sitter/pull/3054) +- Only create release for normal semver tags () +- Add useful development targets to makefile () +- Remove minimum glibc information in summary page () +- Use the native m1 mac runner () +- Add editorconfig () +- Remove symbolic links from repository () +- Move common Cargo.toml keys into the workspace and inherit them () +- Remove reviewers when drafting or closing a PR () +- Enable creating changelogs with git-cliff () +- Cache fixtures () +- Don't cancel jobs on master () +- Relax caching requirements () +- **deps**: Bump clap from 4.4.18 to 4.5.0 () +- **deps**: Bump wasmtime from v16.0.0 to v17.0.1 () +- **deps**: Bump wasmtime to v18.0.1 () +- **sanitize**: Add a timeout of 60 minutes () +- **sanitize**: Reduce timeout to 20 minutes () ### Other -- Document preferred language for scanner (https://github.com/tree-sitter/tree-sitter/pull/2972) -- Add java and tsx to corpus tests (https://github.com/tree-sitter/tree-sitter/pull/2992) -- Provide a CLI flag to open `log.html` (https://github.com/tree-sitter/tree-sitter/pull/2996) -- Some more clippy lints (https://github.com/tree-sitter/tree-sitter/pull/3010) -- Remove deprecated query parsing mechanism (https://github.com/tree-sitter/tree-sitter/pull/3011) -- Print out full compiler arguments ran when it fails (https://github.com/tree-sitter/tree-sitter/pull/3018) -- Deprecate C++ scanners (https://github.com/tree-sitter/tree-sitter/pull/3020) -- Add some documentation to the playground page (https://github.com/tree-sitter/tree-sitter/pull/1495) -- Update relevant rust tests (https://github.com/tree-sitter/tree-sitter/pull/2947) -- Clippy lints (https://github.com/tree-sitter/tree-sitter/pull/3032) -- Error out when multiple arguments are passed to `token`/`token.immediate` (https://github.com/tree-sitter/tree-sitter/pull/3036) + +- Document preferred language for scanner () +- Add java and tsx to corpus tests () +- Provide a CLI flag to open `log.html` () +- Some more clippy lints () +- Remove deprecated query parsing mechanism () +- Print out full compiler arguments ran when it fails () +- Deprecate C++ scanners () +- Add some documentation to the playground page () +- Update relevant rust tests () +- Clippy lints () +- Error out when multiple arguments are passed to `token`/`token.immediate` () - Tidying -- Prefer turbofish syntax where possible (https://github.com/tree-sitter/tree-sitter/pull/3048) +- Prefer turbofish syntax where possible () - Use published wasmtime crates - Cleaner cast -- Update Cargo.lock -- Get rid of `github_issue_test` file (https://github.com/tree-sitter/tree-sitter/pull/3055) -- **cli**: Use spawn to display `emcc`'s stdout and stderr (https://github.com/tree-sitter/tree-sitter/pull/2494) +- Update `Cargo.lock` +- Get rid of `github_issue_test` file () +- **cli**: Use spawn to display `emcc`'s stdout and stderr () - **cli**: Warn users when a query path needed for a subcommand isn't specified in a grammar's package.json -- **generate**: Dedup and warn about duplicate or invalid rules (https://github.com/tree-sitter/tree-sitter/pull/2994) -- **test**: Use different languages for async tests (https://github.com/tree-sitter/tree-sitter/pull/2953) -- **wasm**: Use `SIDE_MODULE=2` to silence warning (https://github.com/tree-sitter/tree-sitter/pull/3003) - +- **generate**: Dedup and warn about duplicate or invalid rules () +- **test**: Use different languages for async tests () +- **wasm**: Use `SIDE_MODULE=2` to silence warning () diff --git a/script/cliff.toml b/script/cliff.toml index 7de06cda..95204113 100644 --- a/script/cliff.toml +++ b/script/cliff.toml @@ -16,13 +16,13 @@ body = """ {% for commit in commits%}\ {% if not commit.scope %}\ - {{ commit.message | upper_first }}\ - {% if commit.github.pr_number %} (https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}/pull/{{ commit.github.pr_number }}){%- endif %} + {% if commit.github.pr_number %} (){%- endif %} {% endif %}\ {% endfor %}\ {% for group, commits in commits | group_by(attribute="scope") %}\ {% for commit in commits %}\ - **{{commit.scope}}**: {{ commit.message | upper_first }}\ - {% if commit.github.pr_number %} (https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}/pull/{{ commit.github.pr_number }}){%- endif %} + {% if commit.github.pr_number %} (){%- endif %} {% endfor %}\ {% endfor %} {% endfor %} @@ -39,20 +39,20 @@ filter_unconventional = false split_commits = false # regex for preprocessing the commit messages commit_preprocessors = [ -# { pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](https://github.com/neovim/neovim/issues/${2}))"}, + # { pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](https://github.com/neovim/neovim/issues/${2}))"}, ] # regex for parsing and grouping commits commit_parsers = [ - { message = "!:", group = "Breaking"}, - { message = "^feat", group = "Features"}, - { message = "^fix", group = "Bug Fixes"}, - { message = "^perf", group = "Performance"}, - { message = "^doc", group = "Documentation"}, - { message = "^refactor", group = "Refactor"}, - { message = "^test", group = "Testing"}, - { message = "^build", group = "Build System and CI"}, - { message = "^ci", group = "Build System and CI"}, - { message = ".*", group = "Other"}, + { message = "!:", group = "Breaking" }, + { message = "^feat", group = "Features" }, + { message = "^fix", group = "Bug Fixes" }, + { message = "^perf", group = "Performance" }, + { message = "^doc", group = "Documentation" }, + { message = "^refactor", group = "Refactor" }, + { message = "^test", group = "Testing" }, + { message = "^build", group = "Build System and CI" }, + { message = "^ci", group = "Build System and CI" }, + { message = ".*", group = "Other" }, ] # filter out the commits that are not matched by commit parsers filter_commits = false