@apple/tree-sitter-pkl 0.18.1 → 0.19.0

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.
package/CHANGELOG.adoc CHANGED
@@ -1,5 +1,12 @@
1
1
  = Changelog
2
2
 
3
+ [[release-0.19.0]]
4
+ == 0.19.0 (2025-10-30)
5
+
6
+ === Additions
7
+
8
+ * Allow trailing commas in comma-separated syntax elements (https://github.com/apple/tree-sitter-pkl/pull/45[#45]).
9
+
3
10
  [[release-0.18.1]]
4
11
  == 0.18.1 (2025-04-07)
5
12
 
@@ -75,8 +82,7 @@ It changes the parse tree to match other Pkl parsers, and also fixes all known p
75
82
 
76
83
  === Fixes
77
84
 
78
- * Fix parsing of parenthesized expressions in object
79
- elements
85
+ * Fix parsing of parenthesized expressions in object elements
80
86
  * Fix parsing of union types with default markers
81
87
  * Add missing `else` in when generators
82
88
  * Add missing module type
@@ -93,4 +99,4 @@ Thanks to all the contributors for this release!
93
99
  [[release-0.16.0]]
94
100
  == 0.16.0 (2024-02-02)
95
101
 
96
- Initial release
102
+ Initial release
package/CMakeLists.txt CHANGED
@@ -1,7 +1,7 @@
1
1
  cmake_minimum_required(VERSION 3.13)
2
2
 
3
3
  project(tree-sitter-pkl
4
- VERSION "0.18.1"
4
+ VERSION "0.19.0"
5
5
  DESCRIPTION "Parser for Pkl programming language"
6
6
  HOMEPAGE_URL "https://github.com/apple/tree-sitter-pkl"
7
7
  LANGUAGES C)
package/Cargo.lock CHANGED
@@ -1,36 +1,42 @@
1
1
  # This file is automatically @generated by Cargo.
2
2
  # It is not intended for manual editing.
3
- version = 4
3
+ version = 3
4
4
 
5
5
  [[package]]
6
6
  name = "aho-corasick"
7
- version = "1.1.3"
7
+ version = "1.1.2"
8
8
  source = "registry+https://github.com/rust-lang/crates.io-index"
9
- checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916"
9
+ checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0"
10
10
  dependencies = [
11
11
  "memchr",
12
12
  ]
13
13
 
14
14
  [[package]]
15
15
  name = "cc"
16
- version = "1.2.14"
16
+ version = "1.0.83"
17
17
  source = "registry+https://github.com/rust-lang/crates.io-index"
18
- checksum = "0c3d1b2e905a3a7b00a6141adb0e4c0bb941d11caf55349d863942a1cc44e3c9"
18
+ checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0"
19
19
  dependencies = [
20
- "shlex",
20
+ "libc",
21
21
  ]
22
22
 
23
+ [[package]]
24
+ name = "libc"
25
+ version = "0.2.152"
26
+ source = "registry+https://github.com/rust-lang/crates.io-index"
27
+ checksum = "13e3bf6590cbc649f4d1a3eefc9d5d6eb746f5200ffb04e5e142700b8faa56e7"
28
+
23
29
  [[package]]
24
30
  name = "memchr"
25
- version = "2.7.4"
31
+ version = "2.7.1"
26
32
  source = "registry+https://github.com/rust-lang/crates.io-index"
27
- checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
33
+ checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149"
28
34
 
29
35
  [[package]]
30
36
  name = "regex"
31
- version = "1.11.1"
37
+ version = "1.10.2"
32
38
  source = "registry+https://github.com/rust-lang/crates.io-index"
33
- checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191"
39
+ checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343"
34
40
  dependencies = [
35
41
  "aho-corasick",
36
42
  "memchr",
@@ -40,9 +46,9 @@ dependencies = [
40
46
 
41
47
  [[package]]
42
48
  name = "regex-automata"
43
- version = "0.4.9"
49
+ version = "0.4.3"
44
50
  source = "registry+https://github.com/rust-lang/crates.io-index"
45
- checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908"
51
+ checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f"
46
52
  dependencies = [
47
53
  "aho-corasick",
48
54
  "memchr",
@@ -51,15 +57,9 @@ dependencies = [
51
57
 
52
58
  [[package]]
53
59
  name = "regex-syntax"
54
- version = "0.8.5"
55
- source = "registry+https://github.com/rust-lang/crates.io-index"
56
- checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
57
-
58
- [[package]]
59
- name = "shlex"
60
- version = "1.3.0"
60
+ version = "0.8.2"
61
61
  source = "registry+https://github.com/rust-lang/crates.io-index"
62
- checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
62
+ checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f"
63
63
 
64
64
  [[package]]
65
65
  name = "tree-sitter"
@@ -73,7 +73,7 @@ dependencies = [
73
73
 
74
74
  [[package]]
75
75
  name = "tree-sitter-pkl"
76
- version = "0.18.1"
76
+ version = "0.19.0"
77
77
  dependencies = [
78
78
  "cc",
79
79
  "tree-sitter",
package/Cargo.toml CHANGED
@@ -1,7 +1,7 @@
1
1
  [package]
2
2
  name = "tree-sitter-pkl"
3
3
  description = "Pkl grammar for the tree-sitter parsing library"
4
- version = "0.18.1"
4
+ version = "0.19.0"
5
5
  keywords = ["incremental", "parsing", "pkl"]
6
6
  categories = ["parsing", "text-editors"]
7
7
  repository = "https://github.com/apple/tree-sitter-pkl"
package/MAINTAINERS.adoc CHANGED
@@ -8,4 +8,5 @@ See link:CONTRIBUTING.adoc[] for general contribution guidelines.
8
8
 
9
9
  * https://github.com/bioball[Daniel Chao]
10
10
  * https://github.com/stackoverflow[Islon Scherer]
11
+ * https://github.com/HT154[Jen Basch]
11
12
  * https://github.com/holzensp[Philip Hölzenspies]
package/Makefile CHANGED
@@ -4,7 +4,7 @@ endif
4
4
 
5
5
  LANGUAGE_NAME := tree-sitter-pkl
6
6
  HOMEPAGE_URL := https://github.com/apple/tree-sitter-pkl
7
- VERSION := 0.18.1
7
+ VERSION := 0.19.0
8
8
 
9
9
  # repository
10
10
  SRC_DIR := src
package/SECURITY.adoc CHANGED
@@ -4,7 +4,7 @@ For the protection of our community, the Pkl team does not disclose, discuss, or
4
4
 
5
5
  == Reporting a security vulnerability
6
6
 
7
- If you have discovered a security vulnerability within the Pkl Pantry project, please report it to us.
7
+ If you have discovered a security vulnerability within the Tree-sitter Pkl project, please report it to us.
8
8
  We welcome reports from everyone, including security researchers, developers, and users.
9
9
 
10
10
  Security vulnerabilities may be reported on the link:https://security.apple.com/submit[Report a vulnerability] form.
package/grammar.js CHANGED
@@ -805,7 +805,7 @@ module.exports = grammar({
805
805
  logicalAndExpr: $ => prec.left(PREC.AND, seq($._expr, field('operator', "&&"), $._expr)),
806
806
 
807
807
  logicalOrExpr: $ => prec.left(PREC.OR, seq($._expr, field('operator', "||"), $._expr)),
808
-
808
+
809
809
  pipeExpr: $ => prec.left(PREC.PIPE, seq($._expr, field('operator', "|>"), $._expr)),
810
810
 
811
811
  typeTestExpr: $ => prec(PREC.IS, seq($._expr, field("operator", "is"), $._type)),
@@ -877,7 +877,7 @@ module.exports = grammar({
877
877
  });
878
878
 
879
879
  function commaSep1 (rule) {
880
- return seq(rule, repeat(seq(',', rule)));
880
+ return seq(rule, repeat(seq(',', rule)), optional(','));
881
881
  }
882
882
 
883
883
  function commaSep (rule) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apple/tree-sitter-pkl",
3
- "version": "0.18.1",
3
+ "version": "0.19.0",
4
4
  "description": "Pkl grammar for node-tree-sitter",
5
5
  "repository": {
6
6
  "type": "git",
package/pyproject.toml CHANGED
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
5
5
  [project]
6
6
  name = "tree-sitter-pkl"
7
7
  description = "Parser for Pkl programming language"
8
- version = "0.18.1"
8
+ version = "0.19.0"
9
9
  keywords = ["incremental", "parsing", "tree-sitter", "pkl"]
10
10
  classifiers = [
11
11
  "Intended Audience :: Developers",
package/src/grammar.json CHANGED
@@ -1055,6 +1055,18 @@
1055
1055
  }
1056
1056
  ]
1057
1057
  }
1058
+ },
1059
+ {
1060
+ "type": "CHOICE",
1061
+ "members": [
1062
+ {
1063
+ "type": "STRING",
1064
+ "value": ","
1065
+ },
1066
+ {
1067
+ "type": "BLANK"
1068
+ }
1069
+ ]
1058
1070
  }
1059
1071
  ]
1060
1072
  },
@@ -1245,6 +1257,18 @@
1245
1257
  }
1246
1258
  ]
1247
1259
  }
1260
+ },
1261
+ {
1262
+ "type": "CHOICE",
1263
+ "members": [
1264
+ {
1265
+ "type": "STRING",
1266
+ "value": ","
1267
+ },
1268
+ {
1269
+ "type": "BLANK"
1270
+ }
1271
+ ]
1248
1272
  }
1249
1273
  ]
1250
1274
  },
@@ -1328,6 +1352,18 @@
1328
1352
  }
1329
1353
  ]
1330
1354
  }
1355
+ },
1356
+ {
1357
+ "type": "CHOICE",
1358
+ "members": [
1359
+ {
1360
+ "type": "STRING",
1361
+ "value": ","
1362
+ },
1363
+ {
1364
+ "type": "BLANK"
1365
+ }
1366
+ ]
1331
1367
  }
1332
1368
  ]
1333
1369
  },
@@ -1380,6 +1416,18 @@
1380
1416
  }
1381
1417
  ]
1382
1418
  }
1419
+ },
1420
+ {
1421
+ "type": "CHOICE",
1422
+ "members": [
1423
+ {
1424
+ "type": "STRING",
1425
+ "value": ","
1426
+ },
1427
+ {
1428
+ "type": "BLANK"
1429
+ }
1430
+ ]
1383
1431
  }
1384
1432
  ]
1385
1433
  },
@@ -1418,6 +1466,18 @@
1418
1466
  }
1419
1467
  ]
1420
1468
  }
1469
+ },
1470
+ {
1471
+ "type": "CHOICE",
1472
+ "members": [
1473
+ {
1474
+ "type": "STRING",
1475
+ "value": ","
1476
+ },
1477
+ {
1478
+ "type": "BLANK"
1479
+ }
1480
+ ]
1421
1481
  }
1422
1482
  ]
1423
1483
  },
@@ -1489,6 +1549,18 @@
1489
1549
  }
1490
1550
  ]
1491
1551
  }
1552
+ },
1553
+ {
1554
+ "type": "CHOICE",
1555
+ "members": [
1556
+ {
1557
+ "type": "STRING",
1558
+ "value": ","
1559
+ },
1560
+ {
1561
+ "type": "BLANK"
1562
+ }
1563
+ ]
1492
1564
  }
1493
1565
  ]
1494
1566
  },
@@ -1578,6 +1650,18 @@
1578
1650
  }
1579
1651
  ]
1580
1652
  }
1653
+ },
1654
+ {
1655
+ "type": "CHOICE",
1656
+ "members": [
1657
+ {
1658
+ "type": "STRING",
1659
+ "value": ","
1660
+ },
1661
+ {
1662
+ "type": "BLANK"
1663
+ }
1664
+ ]
1581
1665
  }
1582
1666
  ]
1583
1667
  },