tree-sitter-beancount 2.1.2 → 2.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,11 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: github-actions
4
+ directory: "/"
5
+ schedule:
6
+ interval: daily
7
+ open-pull-requests-limit: 10
8
+ commit-message:
9
+ prefix: "chore:"
10
+ labels:
11
+ - dependabot
@@ -12,12 +12,12 @@ jobs:
12
12
  runs-on: ubuntu-latest
13
13
  steps:
14
14
  - name: Checkout code
15
- uses: actions/checkout@v2
15
+ uses: actions/checkout@v3
16
16
 
17
17
  - name: Setup Node
18
- uses: actions/setup-node@v2-beta
18
+ uses: actions/setup-node@v3.6.0
19
19
  with:
20
- node-version: '16'
20
+ node-version: '18'
21
21
 
22
22
  - name: Display Node versions
23
23
  run: |
@@ -32,9 +32,9 @@ jobs:
32
32
  profile: minimal
33
33
  override: true
34
34
  - name: Checking out sources
35
- uses: actions/checkout@v1
35
+ uses: actions/checkout@v3
36
36
  - name: Cache Cargo
37
- uses: actions/cache@v2
37
+ uses: actions/cache@v3
38
38
  with:
39
39
  path: |
40
40
  ~/.cargo/registry
@@ -57,9 +57,9 @@ jobs:
57
57
  if: needs.release-please.outputs.release_created
58
58
  steps:
59
59
  - name: Checking out sources
60
- uses: actions/checkout@v1
60
+ uses: actions/checkout@v3
61
61
  - name: Set up Node
62
- uses: actions/setup-node@v2
62
+ uses: actions/setup-node@v3.6.0
63
63
  with:
64
64
  node-version: '16'
65
65
  registry-url: 'https://registry.npmjs.org'
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.1.3](https://github.com/polarmutex/tree-sitter-beancount/compare/v2.1.2...v2.1.3) (2023-07-02)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * detect in error recovery and exit scan ([f3c05c6](https://github.com/polarmutex/tree-sitter-beancount/commit/f3c05c68aa03631fb4b9f0f7592bfec48376e65a))
9
+
3
10
  ## [2.1.2](https://github.com/polarmutex/tree-sitter-beancount/compare/v2.1.1...v2.1.2) (2023-01-28)
4
11
 
5
12
 
package/Cargo.toml CHANGED
@@ -1,7 +1,7 @@
1
1
  [package]
2
2
  name = "tree-sitter-beancount"
3
3
  description = "beancount grammar for the tree-sitter parsing library"
4
- version = "2.1.2" # {x-release-please-version}
4
+ version = "2.1.3" # {x-release-please-version}
5
5
  keywords = ["incremental", "parsing", "beancount", "tree-sitter"]
6
6
  categories = ["parsing", "text-editors"]
7
7
  repository = "https://github.com/polarmutex/tree-sitter-beancount"
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 PolarMutex
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/flake.lock CHANGED
@@ -1,12 +1,31 @@
1
1
  {
2
2
  "nodes": {
3
+ "flake-compat": {
4
+ "flake": false,
5
+ "locked": {
6
+ "lastModified": 1673956053,
7
+ "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
8
+ "owner": "edolstra",
9
+ "repo": "flake-compat",
10
+ "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
11
+ "type": "github"
12
+ },
13
+ "original": {
14
+ "owner": "edolstra",
15
+ "repo": "flake-compat",
16
+ "type": "github"
17
+ }
18
+ },
3
19
  "flake-utils": {
20
+ "inputs": {
21
+ "systems": "systems"
22
+ },
4
23
  "locked": {
5
- "lastModified": 1656065134,
6
- "narHash": "sha256-oc6E6ByIw3oJaIyc67maaFcnjYOz1mMcOtHxbEf9NwQ=",
24
+ "lastModified": 1687709756,
25
+ "narHash": "sha256-Y5wKlQSkgEK2weWdOu4J3riRd+kV/VCgHsqLNTTWQ/0=",
7
26
  "owner": "numtide",
8
27
  "repo": "flake-utils",
9
- "rev": "bee6a7250dd1b01844a2de7e02e4df7d8a0a206c",
28
+ "rev": "dbabf0ca0c0c4bce6ea5eaf65af5cb694d2082c7",
10
29
  "type": "github"
11
30
  },
12
31
  "original": {
@@ -15,13 +34,34 @@
15
34
  "type": "github"
16
35
  }
17
36
  },
37
+ "gitignore": {
38
+ "inputs": {
39
+ "nixpkgs": [
40
+ "pre-commit-hooks",
41
+ "nixpkgs"
42
+ ]
43
+ },
44
+ "locked": {
45
+ "lastModified": 1660459072,
46
+ "narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=",
47
+ "owner": "hercules-ci",
48
+ "repo": "gitignore.nix",
49
+ "rev": "a20de23b925fd8264fd7fad6454652e142fd7f73",
50
+ "type": "github"
51
+ },
52
+ "original": {
53
+ "owner": "hercules-ci",
54
+ "repo": "gitignore.nix",
55
+ "type": "github"
56
+ }
57
+ },
18
58
  "nixpkgs": {
19
59
  "locked": {
20
- "lastModified": 1656239181,
21
- "narHash": "sha256-wW1xRFBn376yGloXZ4QzBE4hjipMawpV18Lshd9QSPw=",
60
+ "lastModified": 1688231357,
61
+ "narHash": "sha256-ZOn16X5jZ6X5ror58gOJAxPfFLAQhZJ6nOUeS4tfFwo=",
22
62
  "owner": "NixOS",
23
63
  "repo": "nixpkgs",
24
- "rev": "f2537a505d45c31fe5d9c27ea9829b6f4c4e6ac5",
64
+ "rev": "645ff62e09d294a30de823cb568e9c6d68e92606",
25
65
  "type": "github"
26
66
  },
27
67
  "original": {
@@ -31,21 +71,40 @@
31
71
  "type": "github"
32
72
  }
33
73
  },
74
+ "nixpkgs-stable": {
75
+ "locked": {
76
+ "lastModified": 1685801374,
77
+ "narHash": "sha256-otaSUoFEMM+LjBI1XL/xGB5ao6IwnZOXc47qhIgJe8U=",
78
+ "owner": "NixOS",
79
+ "repo": "nixpkgs",
80
+ "rev": "c37ca420157f4abc31e26f436c1145f8951ff373",
81
+ "type": "github"
82
+ },
83
+ "original": {
84
+ "owner": "NixOS",
85
+ "ref": "nixos-23.05",
86
+ "repo": "nixpkgs",
87
+ "type": "github"
88
+ }
89
+ },
34
90
  "pre-commit-hooks": {
35
91
  "inputs": {
92
+ "flake-compat": "flake-compat",
36
93
  "flake-utils": [
37
94
  "flake-utils"
38
95
  ],
96
+ "gitignore": "gitignore",
39
97
  "nixpkgs": [
40
98
  "nixpkgs"
41
- ]
99
+ ],
100
+ "nixpkgs-stable": "nixpkgs-stable"
42
101
  },
43
102
  "locked": {
44
- "lastModified": 1656169028,
45
- "narHash": "sha256-y9DRauokIeVHM7d29lwT8A+0YoGUBXV3H0VErxQeA8s=",
103
+ "lastModified": 1688137124,
104
+ "narHash": "sha256-ramG4s/+A5+t/QG2MplTNPP/lmBWDtbW6ilpwb9sKVo=",
46
105
  "owner": "cachix",
47
106
  "repo": "pre-commit-hooks.nix",
48
- "rev": "db3bd555d3a3ceab208bed48f983ccaa6a71a25e",
107
+ "rev": "522fd47af79b66cdd04b92618e65c7a11504650a",
49
108
  "type": "github"
50
109
  },
51
110
  "original": {
@@ -60,6 +119,21 @@
60
119
  "nixpkgs": "nixpkgs",
61
120
  "pre-commit-hooks": "pre-commit-hooks"
62
121
  }
122
+ },
123
+ "systems": {
124
+ "locked": {
125
+ "lastModified": 1681028828,
126
+ "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
127
+ "owner": "nix-systems",
128
+ "repo": "default",
129
+ "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
130
+ "type": "github"
131
+ },
132
+ "original": {
133
+ "owner": "nix-systems",
134
+ "repo": "default",
135
+ "type": "github"
136
+ }
63
137
  }
64
138
  },
65
139
  "root": "root",
package/flake.nix CHANGED
@@ -13,101 +13,98 @@
13
13
  };
14
14
  };
15
15
 
16
- outputs = { self, nixpkgs, flake-utils, pre-commit-hooks }:
17
- { } //
18
- flake-utils.lib.eachDefaultSystem
19
- (
20
- system:
21
- let
22
- pkgs = import nixpkgs {
23
- inherit system;
24
- overlays = [ self.overlays.default ];
25
- };
26
-
27
- tree-sitter-env = pkgs.stdenv.mkDerivation {
28
- name = "tree-sitter-env";
29
-
30
- nativeBuildInputs = with pkgs; [
31
- makeWrapper
32
- ];
33
-
34
- dontUnpack = true;
35
-
36
- dontBuild = true;
37
-
38
- installPhase = ''
39
- mkdir -p $out/bin
40
- makeWrapper \
41
- ${pkgs.tree-sitter}/bin/tree-sitter \
42
- $out/bin/tree-sitter \
43
- --prefix PATH : "${with pkgs; lib.makeBinPath [stdenv.cc nodejs]}"
44
- '';
45
- };
46
-
47
- in
48
- rec {
49
- checks = {
50
- pre-commit = pre-commit-hooks.lib.${system}.run {
51
- src = ./.;
52
-
53
- hooks = {
54
- clang-format = {
55
- enable = true;
56
- name = "clang-format";
57
- entry = "${pkgs.clang-tools}/bin/clang-format -style=file -i";
58
- types = [ "text" "c" ];
59
- # I don't care for generated files' formatting
60
- excludes = [ "src/parser.c" "src/tree_sitter/parser.h" ];
61
- language = "system";
62
- };
16
+ outputs = {
17
+ self,
18
+ nixpkgs,
19
+ flake-utils,
20
+ pre-commit-hooks,
21
+ }:
22
+ {}
23
+ // flake-utils.lib.eachDefaultSystem
24
+ (
25
+ system: let
26
+ pkgs = import nixpkgs {
27
+ inherit system;
28
+ #overlays = [self.overlays.default];
29
+ };
30
+ tree-sitter-env = pkgs.stdenv.mkDerivation {
31
+ name = "tree-sitter-env";
32
+ nativeBuildInputs = with pkgs; [
33
+ makeWrapper
34
+ ];
35
+ dontUnpack = true;
36
+ dontBuild = true;
37
+ installPhase = ''
38
+ mkdir -p $out/bin
39
+ makeWrapper \
40
+ ${pkgs.tree-sitter}/bin/tree-sitter \
41
+ $out/bin/tree-sitter \
42
+ --prefix PATH : "${with pkgs; lib.makeBinPath [stdenv.cc nodejs]}"
43
+ '';
44
+ };
45
+ in rec {
46
+ checks = {
47
+ pre-commit = pre-commit-hooks.lib.${system}.run {
48
+ src = ./.;
49
+
50
+ hooks = {
51
+ clang-format = {
52
+ enable = true;
53
+ name = "clang-format";
54
+ entry = "${pkgs.clang-tools}/bin/clang-format -style=file -i";
55
+ types = ["text" "c"];
56
+ # I don't care for generated files' formatting
57
+ excludes = ["src/parser.c" "src/tree_sitter/parser.h"];
58
+ language = "system";
59
+ };
63
60
 
64
- nixpkgs-fmt = {
65
- enable = true;
66
- };
61
+ alejandra.enable = true;
67
62
 
68
- tree-sitter = {
69
- enable = true;
70
- name = "tree-sitter tests";
71
- entry = "${tree-sitter-env}/bin/tree-sitter test";
72
- pass_filenames = false;
73
- };
63
+ tree-sitter = {
64
+ enable = true;
65
+ name = "tree-sitter tests";
66
+ entry = "${tree-sitter-env}/bin/tree-sitter test";
67
+ pass_filenames = false;
68
+ };
74
69
 
75
- tree-sitter-files = {
76
- enable = true;
77
- name = "tree-sitter generated files";
78
- entry = "${tree-sitter-env}/bin/tree-sitter generate";
79
- pass_filenames = false;
80
- };
70
+ tree-sitter-files = {
71
+ enable = true;
72
+ name = "tree-sitter generated files";
73
+ entry = "${tree-sitter-env}/bin/tree-sitter generate";
74
+ pass_filenames = false;
81
75
  };
82
76
  };
83
77
  };
78
+ };
84
79
 
85
- devShells = {
86
- default = pkgs.mkShell {
87
- nativeBuildInputs = with pkgs; [
88
- nodejs-16_x
89
- python39
90
- nodePackages.typescript
91
- rustc
92
- cargo
93
- rustfmt
94
- clippy
95
- (tree-sitter.override { webUISupport = true; })
96
- ];
80
+ devShells = {
81
+ default = pkgs.mkShell {
82
+ nativeBuildInputs = with pkgs; [
83
+ nodejs
84
+ nodePackages.node-gyp
85
+ #python39
86
+ #nodePackages.typescript
87
+ #rustc
88
+ #cargo
89
+ #rustfmt
90
+ #clippy
91
+ (tree-sitter.overrideAttrs (_: {webUISupport = true;}))
92
+ ];
97
93
 
98
- inherit (checks.pre-commit) shellHook;
99
- };
94
+ inherit (checks.pre-commit) shellHook;
100
95
  };
96
+ };
101
97
 
102
- packages = {
103
- default = packages.tree-sitter-beancount;
98
+ packages = {
99
+ default = packages.tree-sitter-beancount;
104
100
 
105
- inherit (pkgs.tree-sitter.passthru.builtGrammars) tree-sitter-beancount;
101
+ inherit (pkgs.tree-sitter.passthru.builtGrammars) tree-sitter-beancount;
106
102
 
107
- inherit (pkgs) tree-sitter;
108
- };
109
- }
110
- ) // {
103
+ inherit (pkgs) tree-sitter;
104
+ };
105
+ }
106
+ )
107
+ // {
111
108
  overlays = {
112
109
  default = final: prev: {
113
110
  tree-sitter = prev.tree-sitter.override {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tree-sitter-beancount",
3
- "version": "2.1.2",
3
+ "version": "2.1.3",
4
4
  "description": "a tree-sitter parser for the beancount syntax",
5
5
  "main": "bindings/node",
6
6
  "scripts": {
@@ -25,6 +25,6 @@
25
25
  "nan": "^2.15.0"
26
26
  },
27
27
  "devDependencies": {
28
- "tree-sitter-cli": "0.20.0"
28
+ "tree-sitter-cli": "^0.20.0"
29
29
  }
30
30
  }