From 08ab1fbc18beac06b2938495a2c6ab17b5a6abc5 Mon Sep 17 00:00:00 2001 From: ObserverOfTime Date: Tue, 30 Apr 2024 11:33:53 +0300 Subject: [PATCH] build: bump version to 0.6.1 --- Cargo.toml | 2 +- Makefile | 2 +- binding.gyp | 13 +++++++++++-- bindings/rust/build.rs | 5 ++++- package-lock.json | 36 ++++++++++-------------------------- package.json | 6 +++--- pyproject.toml | 2 +- setup.py | 2 +- 8 files changed, 32 insertions(+), 36 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 493704d..52ba959 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "tree-sitter-yaml" description = "YAML grammar for tree-sitter" -version = "0.6.0" +version = "0.6.1" license = "MIT" readme = "README.md" keywords = ["incremental", "parsing", "tree-sitter", "yaml"] diff --git a/Makefile b/Makefile index 0944cb0..372168d 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -VERSION := 0.6.0 +VERSION := 0.6.1 LANGUAGE_NAME := tree-sitter-yaml diff --git a/binding.gyp b/binding.gyp index 1fe512a..cce5929 100644 --- a/binding.gyp +++ b/binding.gyp @@ -13,8 +13,17 @@ "src/parser.c", "src/scanner.c", ], - "cflags_c": [ - "-std=c11", + "conditions": [ + ["OS!='win'", { + "cflags_c": [ + "-std=c11", + ], + }, { # OS == "win" + "cflags_c": [ + "/std:c11", + "/utf-8", + ], + }], ], } ] diff --git a/bindings/rust/build.rs b/bindings/rust/build.rs index 4f953fa..ea69a3d 100644 --- a/bindings/rust/build.rs +++ b/bindings/rust/build.rs @@ -2,11 +2,14 @@ fn main() { let src_dir = std::path::Path::new("src"); let mut c_config = cc::Build::new(); + c_config.std("c11").include(src_dir); c_config .flag_if_supported("-Wno-unused-but-set-variable") .flag_if_supported("-Wno-unused-value") .flag_if_supported("-Wno-implicit-fallthrough"); - c_config.std("c11").include(src_dir); + + #[cfg(target_env = "msvc")] + c_config.flag("-utf-8"); let parser_path = src_dir.join("parser.c"); c_config.file(&parser_path); diff --git a/package-lock.json b/package-lock.json index 8b00cf3..e7f27ed 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@tree-sitter-grammars/tree-sitter-yaml", - "version": "0.6.0", + "version": "0.6.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@tree-sitter-grammars/tree-sitter-yaml", - "version": "0.6.0", + "version": "0.6.1", "hasInstallScript": true, "license": "MIT", "dependencies": { @@ -14,8 +14,8 @@ "node-gyp-build": "^4.8.0" }, "devDependencies": { - "prebuildify": "^6.0.0", - "tree-sitter-cli": "^0.22.2" + "prebuildify": "^6.0.1", + "tree-sitter-cli": "^0.22.5" }, "peerDependencies": { "tree-sitter": "^0.21.1" @@ -96,15 +96,6 @@ "once": "^1.4.0" } }, - "node_modules/execspawn": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/execspawn/-/execspawn-1.0.1.tgz", - "integrity": "sha512-s2k06Jy9i8CUkYe0+DxRlvtkZoOkwwfhB+Xxo5HGUtrISVW2m98jO2tr67DGRFxZwkjQqloA3v/tNtjhBRBieg==", - "dev": true, - "dependencies": { - "util-extend": "^1.0.1" - } - }, "node_modules/fs-constants": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", @@ -225,12 +216,11 @@ } }, "node_modules/prebuildify": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/prebuildify/-/prebuildify-6.0.0.tgz", - "integrity": "sha512-DEvK4C3tcimIp7Pzqbs036n9i6CTKGp1XVEpMnr4wV3enKU5sBogPP+lP3KZw7993i42bXnsd5eIxAXQ566Cqw==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/prebuildify/-/prebuildify-6.0.1.tgz", + "integrity": "sha512-8Y2oOOateom/s8dNBsGIcnm6AxPmLH4/nanQzL5lQMU+sC0CMhzARZHizwr36pUPLdvBnOkCNQzxg4djuFSgIw==", "dev": true, "dependencies": { - "execspawn": "^1.0.1", "minimist": "^1.2.5", "mkdirp-classic": "^0.5.3", "node-abi": "^3.3.0", @@ -350,9 +340,9 @@ } }, "node_modules/tree-sitter-cli": { - "version": "0.22.2", - "resolved": "https://registry.npmjs.org/tree-sitter-cli/-/tree-sitter-cli-0.22.2.tgz", - "integrity": "sha512-ecqccEp27XMFXgjLMEEU71vK9JCWAC7fqSTTxcs5P1tnEnaaf4GkHz/wfo4lJ9l3rfxcTDPxN84tHAoitIQqdA==", + "version": "0.22.5", + "resolved": "https://registry.npmjs.org/tree-sitter-cli/-/tree-sitter-cli-0.22.5.tgz", + "integrity": "sha512-c3VT46Bc3a6pEd0JAwufbqEw9Q2FRLDp5E230hGvnr+Hivw+Y6jyeP+3T89KDptvn48MOPVmbgaLm69xYgLVTw==", "dev": true, "hasInstallScript": true, "bin": { @@ -365,12 +355,6 @@ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", "dev": true }, - "node_modules/util-extend": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/util-extend/-/util-extend-1.0.3.tgz", - "integrity": "sha512-mLs5zAK+ctllYBj+iAQvlDCwoxU/WDOUaJkcFudeiAX6OajC6BKXJUa9a+tbtkC11dz2Ufb7h0lyvIOVn4LADA==", - "dev": true - }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", diff --git a/package.json b/package.json index 1a61e84..f2d34a2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@tree-sitter-grammars/tree-sitter-yaml", - "version": "0.6.0", + "version": "0.6.1", "license": "MIT", "description": "YAML grammar for tree-sitter", "repository": "github:tree-sitter-grammars/tree-sitter-yaml", @@ -37,8 +37,8 @@ "node-gyp-build": "^4.8.0" }, "devDependencies": { - "prebuildify": "^6.0.0", - "tree-sitter-cli": "^0.22.2" + "prebuildify": "^6.0.1", + "tree-sitter-cli": "^0.22.5" }, "peerDependencies": { "tree-sitter": "^0.21.1" diff --git a/pyproject.toml b/pyproject.toml index 7fda8ad..e8af5d1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta" [project] name = "tree-sitter-yaml" description = "YAML grammar for tree-sitter" -version = "0.6.0" +version = "0.6.1" keywords = ["incremental", "parsing", "tree-sitter", "yaml"] classifiers = [ "Intended Audience :: Developers", diff --git a/setup.py b/setup.py index c88b5ac..09a3b9f 100644 --- a/setup.py +++ b/setup.py @@ -39,7 +39,7 @@ def get_tag(self): "src/scanner.c", ], extra_compile_args=( - ["-std=c11"] if system() != "Windows" else [] + ["-std=c11"] if system() != "Windows" else ["/std:c11"] ), define_macros=[ ("Py_LIMITED_API", "0x03080000"),