
Security News
npm ‘is’ Package Hijacked in Expanding Supply Chain Attack
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.
tree-sitter grammar for pact smart contract language
I will create a PR to add this to the official nvim-treesitter repo once it's ready, for now you can use it by following these steps:
Clone the repo
git clone https://github.com/kadena-community/tree-sitter-pact.git
Add those to your init.lua
vim.filetype.add({
extension = {
pact = "pact",
repl = "pact",
},
})
local parser_config = require("nvim-treesitter.parsers").get_parser_configs()
parser_config.pact = {
install_info = {
url = "~/path/to/c/tree-sitter-pact",
files = { "src/parser.c" },
},
filetype = "pact",
}
Then run :TSInstall pact
in neovim.
also you need to link the queries folder to your nvim config folder
mkdir -p ~/.config/nvim/after/queries/pact
ln ./queries/highlights.scm ~/.config/nvim/after/queries/pact/highlights.scm
ln ./queries/locals.scm ~/.config/nvim/after/queries/pact/locals.scm
ln ./queries/textobjects.scm ~/.config/nvim/after/queries/pact/textobjects.scm
ln ./queries/folds.scm ~/.config/nvim/after/queries/pact/folds.scm
ln ./queries/indents.scm ~/.config/nvim/after/queries/pact/indents.scm
To run the tests for the core grammar, you need to have tree-sitter-cli
installed. You can install it with npm:
npm install -g tree-sitter-cli
Then, run the following command from the root of the repository:
npx tree-sitter generate && npx tree-sitter build && npx tree-sitter test
To run the tests for the language bindings, you will need to have the respective toolchains installed (e.g., Python, Go, Swift, Rust).
Rust:
cargo test
Swift:
swift test
Go:
cd bindings/go
go get -t
go test -v
Python: First, create and activate a virtual environment:
python -m venv .venv
source .venv/bin/activate
Then, install the package in editable mode with its core dependencies:
pip install -e ".[core]"
Finally, run the tests:
python -m unittest discover -v -s bindings/python/tests
Nodejs
node bindings/node/binding_test.js
// or
npm run test
FAQs
Pact grammar for tree-sitter
We found that tree-sitter-pact demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.
Security News
A critical flaw in the popular npm form-data package could allow HTTP parameter pollution, affecting millions of projects until patched versions are adopted.
Security News
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.