Skip to content

Commit 9951831

Browse files
committed
0.23.0
1 parent 8833511 commit 9951831

File tree

7 files changed

+35
-30
lines changed

7 files changed

+35
-30
lines changed

.github/workflows/ci.yml

+1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ jobs:
4545
uses: tree-sitter/parser-test-action@v2
4646
with:
4747
test-rust: ${{runner.os == 'Linux'}}
48+
test-swift: ${{runner.os == 'macOS'}}
4849
- name: Parse examples
4950
id: test
5051
uses: tree-sitter/parse-action@v4

Cargo.lock

+7-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "tree-sitter-typescript"
33
description = "TypeScript and TSX grammars for tree-sitter"
4-
version = "0.21.2"
4+
version = "0.23.0"
55
authors = [
66
"Max Brunsfeld <[email protected]>",
77
"Amaan Qureshi <[email protected]>",

common/common.mak

+22-18
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
VERSION := 0.21.2
1+
ifeq ($(OS),Windows_NT)
2+
$(error Windows is not supported)
3+
endif
4+
5+
VERSION := 0.23.0
6+
7+
LANGUAGE_NAME := tree-sitter-typescript
28

39
# repository
410
SRC_DIR := src
@@ -15,10 +21,6 @@ endif
1521

1622
TS ?= tree-sitter
1723

18-
# ABI versioning
19-
SONAME_MAJOR := $(word 1,$(subst ., ,$(VERSION)))
20-
SONAME_MINOR := $(word 2,$(subst ., ,$(VERSION)))
21-
2224
# install directory layout
2325
PREFIX ?= /usr/local
2426
INCLUDEDIR ?= $(PREFIX)/include
@@ -34,27 +36,29 @@ OBJS := $(patsubst %.c,%.o,$(PARSER) $(EXTRAS))
3436
ARFLAGS ?= rcs
3537
override CFLAGS += -I$(SRC_DIR) -std=c11 -fPIC
3638

39+
# ABI versioning
40+
SONAME_MAJOR := $(word 1,$(subst ., ,$(VERSION)))
41+
SONAME_MINOR := $(shell sed -n 's/#define LANGUAGE_VERSION //p' $(PARSER))
42+
3743
# OS-specific bits
38-
ifeq ($(OS),Windows_NT)
39-
$(error "Windows is not supported")
40-
else ifeq ($(shell uname),Darwin)
44+
ifeq ($(shell uname),Darwin)
4145
SOEXT = dylib
42-
SOEXTVER_MAJOR = $(SONAME_MAJOR).dylib
43-
SOEXTVER = $(SONAME_MAJOR).$(SONAME_MINOR).dylib
46+
SOEXTVER_MAJOR = $(SONAME_MAJOR).$(SOEXT)
47+
SOEXTVER = $(SONAME_MAJOR).$(SONAME_MINOR).$(SOEXT)
4448
LINKSHARED := $(LINKSHARED)-dynamiclib -Wl,
4549
ifneq ($(ADDITIONAL_LIBS),)
4650
LINKSHARED := $(LINKSHARED)$(ADDITIONAL_LIBS),
4751
endif
48-
LINKSHARED := $(LINKSHARED)-install_name,$(LIBDIR)/lib$(LANGUAGE_NAME).$(SONAME_MAJOR).dylib,-rpath,@executable_path/../Frameworks
52+
LINKSHARED := $(LINKSHARED)-install_name,$(LIBDIR)/lib$(LANGUAGE_NAME).$(SOEXTVER),-rpath,@executable_path/../Frameworks
4953
else
5054
SOEXT = so
51-
SOEXTVER_MAJOR = so.$(SONAME_MAJOR)
52-
SOEXTVER = so.$(SONAME_MAJOR).$(SONAME_MINOR)
55+
SOEXTVER_MAJOR = $(SOEXT).$(SONAME_MAJOR)
56+
SOEXTVER = $(SOEXT).$(SONAME_MAJOR).$(SONAME_MINOR)
5357
LINKSHARED := $(LINKSHARED)-shared -Wl,
5458
ifneq ($(ADDITIONAL_LIBS),)
5559
LINKSHARED := $(LINKSHARED)$(ADDITIONAL_LIBS)
5660
endif
57-
LINKSHARED := $(LINKSHARED)-soname,lib$(LANGUAGE_NAME).so.$(SONAME_MAJOR)
61+
LINKSHARED := $(LINKSHARED)-soname,lib$(LANGUAGE_NAME).$(SOEXTVER)
5862
endif
5963
ifneq ($(filter $(shell uname),FreeBSD NetBSD DragonFly),)
6064
PCLIBDIR := $(PREFIX)/libdata/pkgconfig
@@ -81,14 +85,14 @@ $(LANGUAGE_NAME).pc: ../bindings/c/$(LANGUAGE_NAME).pc.in
8185
-e 's|=$(PREFIX)|=$${prefix}|' \
8286
-e 's|@PREFIX@|$(PREFIX)|' $< > $@
8387

84-
$(PARSER): grammar.js
85-
$(TS) generate --no-bindings
88+
$(PARSER): $(SRC_DIR)/grammar.json
89+
$(TS) generate --no-bindings $^
8690

8791
install: all
8892
install -d '$(DESTDIR)$(INCLUDEDIR)'/tree_sitter '$(DESTDIR)$(PCLIBDIR)' '$(DESTDIR)$(LIBDIR)'
89-
install -m644 ../bindings/c/$(LANGUAGE_NAME).h '$(DESTDIR)$(INCLUDEDIR)'/tree_sitter/$(LANGUAGE_NAME).h
93+
install -m644 bindings/c/$(LANGUAGE_NAME).h '$(DESTDIR)$(INCLUDEDIR)'/tree_sitter/$(LANGUAGE_NAME).h
9094
install -m644 $(LANGUAGE_NAME).pc '$(DESTDIR)$(PCLIBDIR)'/$(LANGUAGE_NAME).pc
91-
install -m755 lib$(LANGUAGE_NAME).a '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).a
95+
install -m644 lib$(LANGUAGE_NAME).a '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).a
9296
install -m755 lib$(LANGUAGE_NAME).$(SOEXT) '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).$(SOEXTVER)
9397
ln -sf lib$(LANGUAGE_NAME).$(SOEXTVER) '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).$(SOEXTVER_MAJOR)
9498
ln -sf lib$(LANGUAGE_NAME).$(SOEXTVER_MAJOR) '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).$(SOEXT)

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "tree-sitter-typescript",
3-
"version": "0.21.2",
3+
"version": "0.23.0",
44
"description": "TypeScript and TSX grammars for tree-sitter",
55
"repository": "github:tree-sitter/tree-sitter-typescript",
66
"license": "MIT",

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
55
[project]
66
name = "tree-sitter-typescript"
77
description = "TypeScript and TSX grammars for tree-sitter"
8-
version = "0.21.2"
8+
version = "0.23.0"
99
keywords = ["incremental", "parsing", "tree-sitter", "typescript", "tsx"]
1010
classifiers = [
1111
"Intended Audience :: Developers",

0 commit comments

Comments
 (0)