tree-sitter.tree-sitter/docs/src/cli/version.md
Amaan Qureshi 043969ef18
Some checks failed
CI / checks (push) Waiting to run
Deploy Docs / deploy-docs (push) Waiting to run
CI / sanitize (push) Failing after 14s
CI / build (push) Failing after 15s
Check Bindgen Output / check-bindgen (push) Has been cancelled
docs: migrate to mdbook
2024-12-24 20:54:59 -05:00

683 B

tree-sitter version

The version command upgrades the version of your grammar.

tree-sitter version <VERSION> # Aliases: publish

This will update the version in several files, if they exist:

  • tree-sitter.json
  • Cargo.toml
  • Cargo.lock
  • package.json
  • package-lock.json
  • Makefile
  • CMakeLists.txt
  • pyproject.toml

As a grammar author, you should keep the version of your grammar in sync across different bindings. However, doing so manually is error-prone and tedious, so this command takes care of the burden. If you are using a version control system, it is recommended to commit the changes made by this command, and to tag the commit with the new version.