Skip to content

Commit

Permalink
Merge pull request #2 from janezpodhostnik/update_dependencies
Browse files Browse the repository at this point in the history
Update dependencies and add some tests
  • Loading branch information
bluesign committed Mar 28, 2024
2 parents 1d6a4fb + 956631d commit 9a66f19
Show file tree
Hide file tree
Showing 44 changed files with 187,502 additions and 255,563 deletions.
39 changes: 39 additions & 0 deletions .editorconfig
@@ -0,0 +1,39 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.{json,toml,yml,gyp}]
indent_style = space
indent_size = 2

[*.js]
indent_style = space
indent_size = 2

[*.rs]
indent_style = space
indent_size = 4

[*.{c,cc,h}]
indent_style = space
indent_size = 4

[*.{py,pyi}]
indent_style = space
indent_size = 4

[*.swift]
indent_style = space
indent_size = 4

[*.go]
indent_style = tab
indent_size = 8

[Makefile]
indent_style = tab
indent_size = 8
25 changes: 25 additions & 0 deletions .eslintrc.js
@@ -0,0 +1,25 @@
module.exports = {
env: {
commonjs: true,
es2021: true,
},
extends: "google",
overrides: [],
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
},
rules: {
indent: ["error", 2, { SwitchCase: 1 }],
"max-len": [
"error",
{
code: 120,
ignoreComments: true,
ignoreUrls: true,
ignoreStrings: true,
},
],
"require-jsdoc": 1,
},
};
11 changes: 11 additions & 0 deletions .gitattributes
@@ -0,0 +1,11 @@
* text eol=lf

src/*.json linguist-generated
src/parser.c linguist-generated
src/tree_sitter/* linguist-generated

bindings/** linguist-generated
binding.gyp linguist-generated
setup.py linguist-generated
Makefile linguist-generated
Package.swift linguist-generated
27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
@@ -0,0 +1,27 @@
name: CI

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [macos-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm install
- run: npm test
25 changes: 25 additions & 0 deletions .github/workflows/lint.yml
@@ -0,0 +1,25 @@
name: Lint

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Install modules
run: npm install
- name: Run ESLint
run: npm run lint
42 changes: 38 additions & 4 deletions .gitignore
@@ -1,4 +1,38 @@
node_modules
build
offline
.idea
# Rust artifacts
Cargo.lock
target/

# Node artifacts
build/
prebuilds/
node_modules/
*.tgz

# Swift artifacts
.build/

# Go artifacts
go.sum
_obj/

# Python artifacts
.venv/
dist/
*.egg-info
*.whl

# C artifacts
*.a
*.so
*.so.*
*.dylib
*.dll
*.pc

# Example dirs
/examples/*/

# Grammar volatiles
*.wasm
*.obj
*.o
25 changes: 11 additions & 14 deletions Cargo.toml
@@ -1,26 +1,23 @@
[package]
name = "tree-sitter-YOUR-LANGUAGE-NAME"
description = "YOUR-LANGUAGE-NAME grammar for the tree-sitter parsing library"
name = "tree-sitter-cadence"
description = "Cadence grammar for tree-sitter"
version = "0.0.1"
keywords = ["incremental", "parsing", "YOUR-LANGUAGE-NAME"]
categories = ["parsing", "text-editors"]
repository = "https://github.com/tree-sitter/tree-sitter-YOUR-LANGUAGE-NAME"
edition = "2018"
license = "MIT"
readme = "README.md"
keywords = ["incremental", "parsing", "tree-sitter", "cadence"]
categories = ["parsing", "text-editors"]
repository = "https://github.com/tree-sitter/tree-sitter-cadence"
edition = "2021"
autoexamples = false

build = "bindings/rust/build.rs"
include = [
"bindings/rust/*",
"grammar.js",
"queries/*",
"src/*",
]
include = ["bindings/rust/*", "grammar.js", "queries/*", "src/*"]

[lib]
path = "bindings/rust/lib.rs"

[dependencies]
tree-sitter = "~0.20.3"
tree-sitter = ">=0.22.2"

[build-dependencies]
cc = "1.0"
cc = "1.0.87"
110 changes: 110 additions & 0 deletions Makefile

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

48 changes: 48 additions & 0 deletions Package.swift

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

0 comments on commit 9a66f19

Please sign in to comment.