Skip to content

Commit

Permalink
build: update bindings and manifests
Browse files Browse the repository at this point in the history
  • Loading branch information
amaanq committed May 6, 2024
1 parent b00b8eb commit f836f66
Show file tree
Hide file tree
Showing 50 changed files with 2,206 additions and 307 deletions.
39 changes: 39 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -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
20 changes: 0 additions & 20 deletions .eslintrc.js

This file was deleted.

27 changes: 9 additions & 18 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,20 +1,11 @@
typescript/src/** linguist-vendored
tsx/src/** linguist-vendored
* text eol=lf

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

typescript/src/grammar.json linguist-generated
typescript/src/node-types.json linguist-generated
typescript/src/parser.c linguist-generated

tsx/src/grammar.json linguist-generated
tsx/src/node-types.json linguist-generated
tsx/src/parser.c linguist-generated

typescript/src/grammar.json -diff
typescript/src/node-types.json -diff
typescript/src/parser.c -diff

tsx/src/grammar.json -diff
tsx/src/node-types.json -diff
tsx/src/parser.c -diff
bindings/** linguist-generated
binding.gyp linguist-generated
setup.py linguist-generated
Makefile linguist-generated
Package.swift linguist-generated
58 changes: 36 additions & 22 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,24 +1,38 @@
# Rust artifacts
Cargo.lock
node_modules
.node-version
target
build
/.build
*.log
Cargo.lock
package-lock.json
/test.ts
examples/desktop
examples/redux
examples/vscode
log.html
yarn.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/*/

# These files would be generated by 'tree-sitter generate' with the default
# settings. We don't want them because there's already a copy at the root.
/tsx/Cargo.toml
/tsx/binding.gyp
/tsx/bindings
/typescript/Cargo.toml
/typescript/binding.gyp
/typescript/bindings
# Grammar volatiles
*.wasm
*.obj
*.o
6 changes: 0 additions & 6 deletions .npmignore

This file was deleted.

28 changes: 15 additions & 13 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,32 +1,34 @@
[package]
name = "tree-sitter-typescript"
description = "Typescript grammar for tree-sitter"
description = "TypeScript and TSX grammars for tree-sitter"
version = "0.20.6"
authors = ["Max Brunsfeld <[email protected]>"]
authors = [
"Max Brunsfeld <[email protected]>",
"Amaan Qureshi <[email protected]>",
]
license = "MIT"
readme = "bindings/rust/README.md"
keywords = ["incremental", "parsing", "typescript", "tsx"]
keywords = ["incremental", "parsing", "tree-sitter", "typescript", "tsx"]
categories = ["parsing", "text-editors"]
repository = "https://github.com/tree-sitter/tree-sitter-typescript"
edition = "2021"
autoexamples = false

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

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

[dependencies]
tree-sitter = "~0.20.10"
tree-sitter = ">=0.21.0"

[build-dependencies]
cc = "~1.0.90"
cc = "1.0.96"
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2017 GitHub
Copyright (c) 2017 Max Brunsfeld

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
9 changes: 9 additions & 0 deletions Makefile

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

4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
[![matrix][matrix]](https://matrix.to/#/#tree-sitter-chat:matrix.org)
[![crates][crates]](https://crates.io/crates/tree-sitter-typescript)
[![npm][npm]](https://www.npmjs.com/package/tree-sitter-typescript)
[![pypi][pypi]](https://pypi.org/project/tree-sitter-typescript)

TypeScript and TSX grammars for [tree-sitter][].

Expand All @@ -15,7 +16,7 @@ require("tree-sitter-typescript").typescript; // TypeScript grammar
require("tree-sitter-typescript").tsx; // TSX grammar
```

For Javascript files with [flow] type annotations you can use the the `tsx` parser.
For Javascript files with [flow] type annotations you can use the `tsx` parser.

[tree-sitter]: https://github.com/tree-sitter/tree-sitter
[flow]: https://flow.org/en/
Expand All @@ -29,3 +30,4 @@ References
[matrix]: https://img.shields.io/matrix/tree-sitter-chat%3Amatrix.org?logo=matrix&label=matrix
[npm]: https://img.shields.io/npm/v/tree-sitter-typescript?logo=npm
[crates]: https://img.shields.io/crates/v/tree-sitter-typescript?logo=rust
[pypi]: https://img.shields.io/pypi/v/tree-sitter-typescript?logo=pypi&logoColor=ffd242
22 changes: 0 additions & 22 deletions appveyor.yml

This file was deleted.

13 changes: 8 additions & 5 deletions binding.gyp

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

16 changes: 16 additions & 0 deletions bindings/c/tree-sitter-tsx.h

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

11 changes: 11 additions & 0 deletions bindings/c/tree-sitter-tsx.pc.in

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

16 changes: 16 additions & 0 deletions bindings/c/tree-sitter-typescript.h

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

11 changes: 11 additions & 0 deletions bindings/c/tree-sitter-typescript.pc.in

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

22 changes: 22 additions & 0 deletions bindings/go/binding_test.go

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

5 changes: 5 additions & 0 deletions bindings/go/go.mod

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

Loading

0 comments on commit f836f66

Please sign in to comment.