@apple/tree-sitter-pkl 0.20.0 → 0.21.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/.editorconfig +3 -0
- package/.github/PklProject +26 -0
- package/.github/PklProject.deps.json +40 -0
- package/.github/dependabot.yml +18 -0
- package/.github/index.pkl +159 -0
- package/.github/workflows/__lockfile__.yml +28 -0
- package/.github/workflows/build.yml +48 -0
- package/.github/workflows/codeql.yml +28 -0
- package/.github/workflows/main.yml +46 -0
- package/.github/workflows/prb.yml +96 -0
- package/.github/workflows/release.yml +68 -0
- package/CHANGELOG.adoc +20 -0
- package/CMakeLists.txt +1 -1
- package/Cargo.lock +155 -19
- package/Cargo.toml +16 -11
- package/Makefile +1 -1
- package/{SECURITY.adoc → SECURITY.md} +3 -3
- package/gradlew +3 -6
- package/gradlew.bat +1 -2
- package/grammar.js +22 -3
- package/package.json +6 -6
- package/pyproject.toml +1 -1
- package/src/grammar.json +107 -0
- package/src/node-types.json +8 -0
- package/src/parser.c +6432 -6150
- package/src/scanner.c +3 -3
- package/src/tree_sitter/array.h +110 -71
- package/tree-sitter.json +1 -1
package/.editorconfig
CHANGED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
//===----------------------------------------------------------------------===//
|
|
2
|
+
// Copyright © 2025-2026 Apple Inc. and the Pkl project authors. All rights reserved.
|
|
3
|
+
//
|
|
4
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
// you may not use this file except in compliance with the License.
|
|
6
|
+
// You may obtain a copy of the License at
|
|
7
|
+
//
|
|
8
|
+
// https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
//
|
|
10
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
// See the License for the specific language governing permissions and
|
|
14
|
+
// limitations under the License.
|
|
15
|
+
//===----------------------------------------------------------------------===//
|
|
16
|
+
|
|
17
|
+
amends "pkl:Project"
|
|
18
|
+
|
|
19
|
+
dependencies {
|
|
20
|
+
["pkl.impl.ghactions"] {
|
|
21
|
+
uri = "package://pkg.pkl-lang.org/pkl-project-commons/pkl.impl.ghactions@1.8.1"
|
|
22
|
+
}
|
|
23
|
+
["com.github.actions"] {
|
|
24
|
+
uri = "package://pkg.pkl-lang.org/pkl-pantry/com.github.actions@1.6.0"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"resolvedDependencies": {
|
|
4
|
+
"package://pkg.pkl-lang.org/pkl-pantry/com.github.actions@1": {
|
|
5
|
+
"type": "remote",
|
|
6
|
+
"uri": "projectpackage://pkg.pkl-lang.org/pkl-pantry/com.github.actions@1.7.0",
|
|
7
|
+
"checksums": {
|
|
8
|
+
"sha256": "e3461c3f8d00a6a657f9fa4f391afdab4a53a2e528862a4d8624e545cd3cb2b1"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
"package://pkg.pkl-lang.org/pkl-project-commons/pkl.impl.ghactions@1": {
|
|
12
|
+
"type": "remote",
|
|
13
|
+
"uri": "projectpackage://pkg.pkl-lang.org/pkl-project-commons/pkl.impl.ghactions@1.8.1",
|
|
14
|
+
"checksums": {
|
|
15
|
+
"sha256": "476cd931de6868b3f5e088ac741261d7beb9f4de3305564675510fd74ffb83f3"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"package://pkg.pkl-lang.org/pkl-pantry/pkl.experimental.deepToTyped@1": {
|
|
19
|
+
"type": "remote",
|
|
20
|
+
"uri": "projectpackage://pkg.pkl-lang.org/pkl-pantry/pkl.experimental.deepToTyped@1.2.0",
|
|
21
|
+
"checksums": {
|
|
22
|
+
"sha256": "84c7feb391f4ac273a99dc89b8fd51dbcd21dbda4ce640f6908527f83acdd4d6"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"package://pkg.pkl-lang.org/pkl-pantry/pkl.github.dependabotManagedActions@1": {
|
|
26
|
+
"type": "remote",
|
|
27
|
+
"uri": "projectpackage://pkg.pkl-lang.org/pkl-pantry/pkl.github.dependabotManagedActions@1.1.6",
|
|
28
|
+
"checksums": {
|
|
29
|
+
"sha256": "85ad51d257bad4729f0b9edecade48fcad6f55bacd0fa36106782475e912919a"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"package://pkg.pkl-lang.org/pkl-pantry/com.github.dependabot@1": {
|
|
33
|
+
"type": "remote",
|
|
34
|
+
"uri": "projectpackage://pkg.pkl-lang.org/pkl-pantry/com.github.dependabot@1.0.4",
|
|
35
|
+
"checksums": {
|
|
36
|
+
"sha256": "c7391119f946d7761d0ca0cc358ed8fe2bdfc691411087ccac89637bd96fec4a"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
- package-ecosystem: npm
|
|
4
|
+
cooldown:
|
|
5
|
+
default-days: 7
|
|
6
|
+
directory: /
|
|
7
|
+
schedule:
|
|
8
|
+
interval: weekly
|
|
9
|
+
- package-ecosystem: github-actions
|
|
10
|
+
cooldown:
|
|
11
|
+
default-days: 7
|
|
12
|
+
directory: /
|
|
13
|
+
ignore:
|
|
14
|
+
- dependency-name: '*'
|
|
15
|
+
update-types:
|
|
16
|
+
- version-update:semver-major
|
|
17
|
+
schedule:
|
|
18
|
+
interval: weekly
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
//===----------------------------------------------------------------------===//
|
|
2
|
+
// Copyright © 2025-2026 Apple Inc. and the Pkl project authors. All rights reserved.
|
|
3
|
+
//
|
|
4
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
// you may not use this file except in compliance with the License.
|
|
6
|
+
// You may obtain a copy of the License at
|
|
7
|
+
//
|
|
8
|
+
// https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
//
|
|
10
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
// See the License for the specific language governing permissions and
|
|
14
|
+
// limitations under the License.
|
|
15
|
+
//===----------------------------------------------------------------------===//
|
|
16
|
+
|
|
17
|
+
amends "@pkl.impl.ghactions/PklCI.pkl"
|
|
18
|
+
|
|
19
|
+
import "@com.github.actions/catalog.pkl"
|
|
20
|
+
import "@com.github.actions/context.pkl"
|
|
21
|
+
import "@com.github.actions/Workflow.pkl"
|
|
22
|
+
import "@pkl.impl.ghactions/jobs/HawkeyeCheck.pkl"
|
|
23
|
+
|
|
24
|
+
build = buildAndTest
|
|
25
|
+
|
|
26
|
+
prb = buildAndTest
|
|
27
|
+
|
|
28
|
+
main = buildAndTest
|
|
29
|
+
|
|
30
|
+
release = new {
|
|
31
|
+
jobs {
|
|
32
|
+
["npm-publish"] = npmPublishJob
|
|
33
|
+
["github-release"] = releaseToGithubJob
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
local baseJob: Workflow.Job = new {
|
|
38
|
+
`runs-on` = "ubuntu-latest"
|
|
39
|
+
steps {
|
|
40
|
+
(catalog.`actions/checkout@v6`) {}
|
|
41
|
+
(catalog.`actions/setup-node@v6`) {
|
|
42
|
+
name = "Setup nodejs"
|
|
43
|
+
with {
|
|
44
|
+
`node-version` = "24.x"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
new {
|
|
48
|
+
name = "Build"
|
|
49
|
+
run = "npm ci"
|
|
50
|
+
}
|
|
51
|
+
new {
|
|
52
|
+
name = "Check Code Generation"
|
|
53
|
+
run =
|
|
54
|
+
"""
|
|
55
|
+
npm run generate
|
|
56
|
+
git diff --name-only --exit-code
|
|
57
|
+
"""
|
|
58
|
+
}
|
|
59
|
+
new {
|
|
60
|
+
name = "Test"
|
|
61
|
+
run = "npm test"
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
local buildAndTest: Workflow = new {
|
|
67
|
+
jobs {
|
|
68
|
+
["test-licenses"] = new HawkeyeCheck {}.job
|
|
69
|
+
["build-and-test"] = (baseJob) {
|
|
70
|
+
name = "Build and test"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
local releaseToGithubJob: Workflow.Job = new {
|
|
76
|
+
name = "Create GitHub Release"
|
|
77
|
+
`runs-on` = "ubuntu-latest"
|
|
78
|
+
permissions {
|
|
79
|
+
contents = "write"
|
|
80
|
+
}
|
|
81
|
+
steps {
|
|
82
|
+
(catalog.`actions/checkout@v6`) {}
|
|
83
|
+
new {
|
|
84
|
+
name = "Publish release to GitHub"
|
|
85
|
+
env {
|
|
86
|
+
["GH_TOKEN"] = context.github.token
|
|
87
|
+
["GH_REPO"] = context.github.repository
|
|
88
|
+
["GIT_TAG"] = context.github.refName
|
|
89
|
+
}
|
|
90
|
+
run =
|
|
91
|
+
#"""
|
|
92
|
+
# strip preceding "v"
|
|
93
|
+
VERSION="${GIT_TAG:1}"
|
|
94
|
+
EXPECTED_VERSION=$(jq -r .version package.json)
|
|
95
|
+
|
|
96
|
+
if [ "${EXPECTED_VERSION}" != "${VERSION}" ]; then
|
|
97
|
+
echo "Mismatching versions!"
|
|
98
|
+
echo "package.json has ${EXPECTED_VERSION}"
|
|
99
|
+
echo "Inferred version from Git tag is ${VERSION}"
|
|
100
|
+
echo "Use 'tree-sitter version ${VERSION}' to match the tag, and re-tag."
|
|
101
|
+
exit 1
|
|
102
|
+
fi
|
|
103
|
+
|
|
104
|
+
gh release create "${GIT_TAG}" \
|
|
105
|
+
--title "${GIT_TAG}" \
|
|
106
|
+
--verify-tag \
|
|
107
|
+
--notes ""
|
|
108
|
+
"""#
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
local npmPublishJob: Workflow.Job = new {
|
|
114
|
+
name = "Publish to npm"
|
|
115
|
+
`runs-on` = "ubuntu-latest"
|
|
116
|
+
environment = "npmjs"
|
|
117
|
+
permissions {
|
|
118
|
+
contents = "read"
|
|
119
|
+
`id-token` = "write"
|
|
120
|
+
}
|
|
121
|
+
steps {
|
|
122
|
+
(catalog.`actions/checkout@v6`) {}
|
|
123
|
+
(catalog.`actions/setup-node@v6`) {
|
|
124
|
+
name = "Setup Node.js"
|
|
125
|
+
with {
|
|
126
|
+
`node-version` = "24.x"
|
|
127
|
+
`registry-url` = "https://registry.npmjs.org"
|
|
128
|
+
`package-manager-cache` = false
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
new {
|
|
132
|
+
name = "Build"
|
|
133
|
+
run = "npm ci"
|
|
134
|
+
}
|
|
135
|
+
new {
|
|
136
|
+
name = "Test"
|
|
137
|
+
run = "npm test"
|
|
138
|
+
}
|
|
139
|
+
new {
|
|
140
|
+
name = "Publish to npm"
|
|
141
|
+
run = "npm publish --provenance"
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
dependabot {
|
|
147
|
+
updates {
|
|
148
|
+
new {
|
|
149
|
+
`package-ecosystem` = "npm"
|
|
150
|
+
directory = "/"
|
|
151
|
+
cooldown {
|
|
152
|
+
`default-days` = 7
|
|
153
|
+
}
|
|
154
|
+
schedule {
|
|
155
|
+
interval = "weekly"
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
#file: noinspection MandatoryParamsAbsent,UndefinedAction
|
|
2
|
+
# This is a fake workflow that never runs.
|
|
3
|
+
# It's used to pin actions to specific git SHAs when generating actual workflows.
|
|
4
|
+
# It also gets updated by dependabot (see .github/dependabot.yml).
|
|
5
|
+
# Generated from Workflow.pkl. DO NOT EDIT.
|
|
6
|
+
name: __lockfile__
|
|
7
|
+
'on':
|
|
8
|
+
push:
|
|
9
|
+
branches-ignore:
|
|
10
|
+
- '**'
|
|
11
|
+
tags-ignore:
|
|
12
|
+
- '**'
|
|
13
|
+
permissions: {}
|
|
14
|
+
jobs:
|
|
15
|
+
locks:
|
|
16
|
+
if: 'false'
|
|
17
|
+
runs-on: nothing
|
|
18
|
+
steps:
|
|
19
|
+
- name: actions/checkout@v6
|
|
20
|
+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
|
21
|
+
- name: actions/setup-node@v6
|
|
22
|
+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
|
|
23
|
+
- name: actions/upload-artifact@v5
|
|
24
|
+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
|
|
25
|
+
- name: github/codeql-action/analyze@v4
|
|
26
|
+
uses: github/codeql-action/analyze@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4
|
|
27
|
+
- name: github/codeql-action/init@v4
|
|
28
|
+
uses: github/codeql-action/init@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Generated from Workflow.pkl. DO NOT EDIT.
|
|
2
|
+
name: Build
|
|
3
|
+
'on':
|
|
4
|
+
push:
|
|
5
|
+
branches-ignore:
|
|
6
|
+
- main
|
|
7
|
+
- release/*
|
|
8
|
+
- dependabot/**
|
|
9
|
+
tags-ignore:
|
|
10
|
+
- '**'
|
|
11
|
+
concurrency:
|
|
12
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
13
|
+
cancel-in-progress: false
|
|
14
|
+
permissions:
|
|
15
|
+
contents: read
|
|
16
|
+
jobs:
|
|
17
|
+
test-licenses:
|
|
18
|
+
name: hawkeye-check
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
|
22
|
+
with:
|
|
23
|
+
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || '' }}
|
|
24
|
+
persist-credentials: false
|
|
25
|
+
fetch-depth: 0
|
|
26
|
+
- run: git config --global --add safe.directory $(pwd)
|
|
27
|
+
- run: hawkeye check --config licenserc.toml --fail-if-unknown
|
|
28
|
+
container:
|
|
29
|
+
image: ghcr.io/korandoru/hawkeye@sha256:e0abf8dbfaeeeba1249679d662d9fb404b1dcdb041c6093ea1f7a6edb7d89319
|
|
30
|
+
build-and-test:
|
|
31
|
+
name: Build and test
|
|
32
|
+
runs-on: ubuntu-latest
|
|
33
|
+
steps:
|
|
34
|
+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
|
35
|
+
with:
|
|
36
|
+
persist-credentials: false
|
|
37
|
+
- name: Setup nodejs
|
|
38
|
+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
|
|
39
|
+
with:
|
|
40
|
+
node-version: 24.x
|
|
41
|
+
- name: Build
|
|
42
|
+
run: npm ci
|
|
43
|
+
- name: Check Code Generation
|
|
44
|
+
run: |-
|
|
45
|
+
npm run generate
|
|
46
|
+
git diff --name-only --exit-code
|
|
47
|
+
- name: Test
|
|
48
|
+
run: npm test
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Generated from Workflow.pkl. DO NOT EDIT.
|
|
2
|
+
'on':
|
|
3
|
+
pull_request:
|
|
4
|
+
branches:
|
|
5
|
+
- main
|
|
6
|
+
push:
|
|
7
|
+
branches:
|
|
8
|
+
- main
|
|
9
|
+
schedule:
|
|
10
|
+
- cron: 29 17 * * 4
|
|
11
|
+
jobs:
|
|
12
|
+
analyze-actions:
|
|
13
|
+
name: Analyze (actions)
|
|
14
|
+
permissions:
|
|
15
|
+
security-events: write
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
|
19
|
+
with:
|
|
20
|
+
persist-credentials: false
|
|
21
|
+
- uses: github/codeql-action/init@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4
|
|
22
|
+
with:
|
|
23
|
+
languages: actions
|
|
24
|
+
build-mode: none
|
|
25
|
+
- name: Perform CodeQL Analysis
|
|
26
|
+
uses: github/codeql-action/analyze@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4
|
|
27
|
+
with:
|
|
28
|
+
category: /language:actions
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Generated from Workflow.pkl. DO NOT EDIT.
|
|
2
|
+
name: Build (main)
|
|
3
|
+
'on':
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
tags-ignore:
|
|
8
|
+
- '**'
|
|
9
|
+
concurrency:
|
|
10
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
11
|
+
cancel-in-progress: false
|
|
12
|
+
permissions:
|
|
13
|
+
contents: read
|
|
14
|
+
jobs:
|
|
15
|
+
test-licenses:
|
|
16
|
+
name: hawkeye-check
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
|
20
|
+
with:
|
|
21
|
+
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || '' }}
|
|
22
|
+
persist-credentials: false
|
|
23
|
+
fetch-depth: 0
|
|
24
|
+
- run: git config --global --add safe.directory $(pwd)
|
|
25
|
+
- run: hawkeye check --config licenserc.toml --fail-if-unknown
|
|
26
|
+
container:
|
|
27
|
+
image: ghcr.io/korandoru/hawkeye@sha256:e0abf8dbfaeeeba1249679d662d9fb404b1dcdb041c6093ea1f7a6edb7d89319
|
|
28
|
+
build-and-test:
|
|
29
|
+
name: Build and test
|
|
30
|
+
runs-on: ubuntu-latest
|
|
31
|
+
steps:
|
|
32
|
+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
|
33
|
+
with:
|
|
34
|
+
persist-credentials: false
|
|
35
|
+
- name: Setup nodejs
|
|
36
|
+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
|
|
37
|
+
with:
|
|
38
|
+
node-version: 24.x
|
|
39
|
+
- name: Build
|
|
40
|
+
run: npm ci
|
|
41
|
+
- name: Check Code Generation
|
|
42
|
+
run: |-
|
|
43
|
+
npm run generate
|
|
44
|
+
git diff --name-only --exit-code
|
|
45
|
+
- name: Test
|
|
46
|
+
run: npm test
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# Generated from Workflow.pkl. DO NOT EDIT.
|
|
2
|
+
name: Pull Request
|
|
3
|
+
'on':
|
|
4
|
+
pull_request: {}
|
|
5
|
+
concurrency:
|
|
6
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
7
|
+
cancel-in-progress: true
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
jobs:
|
|
11
|
+
test-licenses:
|
|
12
|
+
name: hawkeye-check
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
|
16
|
+
with:
|
|
17
|
+
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || '' }}
|
|
18
|
+
persist-credentials: false
|
|
19
|
+
fetch-depth: 0
|
|
20
|
+
- run: git config --global --add safe.directory $(pwd)
|
|
21
|
+
- run: hawkeye check --config licenserc.toml --fail-if-unknown
|
|
22
|
+
container:
|
|
23
|
+
image: ghcr.io/korandoru/hawkeye@sha256:e0abf8dbfaeeeba1249679d662d9fb404b1dcdb041c6093ea1f7a6edb7d89319
|
|
24
|
+
build-and-test:
|
|
25
|
+
name: Build and test
|
|
26
|
+
runs-on: ubuntu-latest
|
|
27
|
+
steps:
|
|
28
|
+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
|
29
|
+
with:
|
|
30
|
+
persist-credentials: false
|
|
31
|
+
- name: Setup nodejs
|
|
32
|
+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
|
|
33
|
+
with:
|
|
34
|
+
node-version: 24.x
|
|
35
|
+
- name: Build
|
|
36
|
+
run: npm ci
|
|
37
|
+
- name: Check Code Generation
|
|
38
|
+
run: |-
|
|
39
|
+
npm run generate
|
|
40
|
+
git diff --name-only --exit-code
|
|
41
|
+
- name: Test
|
|
42
|
+
run: npm test
|
|
43
|
+
verdict:
|
|
44
|
+
if: always()
|
|
45
|
+
needs:
|
|
46
|
+
- check-pkl-github-actions
|
|
47
|
+
- test-licenses
|
|
48
|
+
- build-and-test
|
|
49
|
+
runs-on: ubuntu-latest
|
|
50
|
+
steps:
|
|
51
|
+
- name: Failure verdict
|
|
52
|
+
if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
|
|
53
|
+
run: |-
|
|
54
|
+
echo "Some of the required jobs are either failing or were cancelled"
|
|
55
|
+
exit 1
|
|
56
|
+
upload-event-file:
|
|
57
|
+
runs-on: ubuntu-latest
|
|
58
|
+
steps:
|
|
59
|
+
- name: Upload event file
|
|
60
|
+
if: '!cancelled()'
|
|
61
|
+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
|
|
62
|
+
with:
|
|
63
|
+
name: test-results-event-file
|
|
64
|
+
path: ${{ github.event_path }}
|
|
65
|
+
check-pkl-github-actions:
|
|
66
|
+
runs-on: ubuntu-latest
|
|
67
|
+
steps:
|
|
68
|
+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
|
69
|
+
with:
|
|
70
|
+
persist-credentials: false
|
|
71
|
+
- name: Setup Pkl
|
|
72
|
+
id: setup-pkl
|
|
73
|
+
env:
|
|
74
|
+
PKL_VERSION: 0.30.0
|
|
75
|
+
PKL_FILENAME: pkl
|
|
76
|
+
PKL_DOWNLOAD_URL: https://github.com/apple/pkl/releases/download/0.30.0/pkl-linux-amd64
|
|
77
|
+
shell: bash
|
|
78
|
+
run: |-
|
|
79
|
+
DIR="$(mktemp -d /tmp/pkl-$PKL_VERSION-XXXXXX)"
|
|
80
|
+
PKL_EXEC="$DIR/$PKL_FILENAME"
|
|
81
|
+
curl -sfL -o $PKL_EXEC "$PKL_DOWNLOAD_URL"
|
|
82
|
+
chmod +x $PKL_EXEC
|
|
83
|
+
echo "$DIR" >> "$GITHUB_PATH"
|
|
84
|
+
echo "pkl_exec=$PKL_EXEC" >> "$GITHUB_OUTPUT"
|
|
85
|
+
- shell: bash
|
|
86
|
+
run: rm -rf .github/**/[a-z]*.yml
|
|
87
|
+
- shell: bash
|
|
88
|
+
run: pkl eval -m .github/ --project-dir .github/ .github/index.pkl
|
|
89
|
+
- name: check git status
|
|
90
|
+
shell: bash
|
|
91
|
+
run: |-
|
|
92
|
+
if [ -n "$(git status --porcelain)" ]; then
|
|
93
|
+
echo "Running pkl resulted in a diff! You likely need to run 'pkl eval' and commit the changes."
|
|
94
|
+
git diff --name-only
|
|
95
|
+
exit 1
|
|
96
|
+
fi
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Generated from Workflow.pkl. DO NOT EDIT.
|
|
2
|
+
name: Release
|
|
3
|
+
'on':
|
|
4
|
+
push:
|
|
5
|
+
branches-ignore:
|
|
6
|
+
- '**'
|
|
7
|
+
tags:
|
|
8
|
+
- '**'
|
|
9
|
+
concurrency:
|
|
10
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
11
|
+
cancel-in-progress: false
|
|
12
|
+
permissions:
|
|
13
|
+
contents: read
|
|
14
|
+
jobs:
|
|
15
|
+
npm-publish:
|
|
16
|
+
name: Publish to npm
|
|
17
|
+
permissions:
|
|
18
|
+
contents: read
|
|
19
|
+
id-token: write
|
|
20
|
+
runs-on: ubuntu-latest
|
|
21
|
+
environment: npmjs
|
|
22
|
+
steps:
|
|
23
|
+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
|
24
|
+
with:
|
|
25
|
+
persist-credentials: false
|
|
26
|
+
- name: Setup Node.js
|
|
27
|
+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
|
|
28
|
+
with:
|
|
29
|
+
node-version: 24.x
|
|
30
|
+
registry-url: https://registry.npmjs.org
|
|
31
|
+
package-manager-cache: false
|
|
32
|
+
- name: Build
|
|
33
|
+
run: npm ci
|
|
34
|
+
- name: Test
|
|
35
|
+
run: npm test
|
|
36
|
+
- name: Publish to npm
|
|
37
|
+
run: npm publish --provenance
|
|
38
|
+
github-release:
|
|
39
|
+
name: Create GitHub Release
|
|
40
|
+
permissions:
|
|
41
|
+
contents: write
|
|
42
|
+
runs-on: ubuntu-latest
|
|
43
|
+
steps:
|
|
44
|
+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
|
45
|
+
with:
|
|
46
|
+
persist-credentials: false
|
|
47
|
+
- name: Publish release to GitHub
|
|
48
|
+
env:
|
|
49
|
+
GH_TOKEN: ${{ github.token }}
|
|
50
|
+
GH_REPO: ${{ github.repository }}
|
|
51
|
+
GIT_TAG: ${{ github.ref_name }}
|
|
52
|
+
run: |-
|
|
53
|
+
# strip preceding "v"
|
|
54
|
+
VERSION="${GIT_TAG:1}"
|
|
55
|
+
EXPECTED_VERSION=$(jq -r .version package.json)
|
|
56
|
+
|
|
57
|
+
if [ "${EXPECTED_VERSION}" != "${VERSION}" ]; then
|
|
58
|
+
echo "Mismatching versions!"
|
|
59
|
+
echo "package.json has ${EXPECTED_VERSION}"
|
|
60
|
+
echo "Inferred version from Git tag is ${VERSION}"
|
|
61
|
+
echo "Use 'tree-sitter version ${VERSION}' to match the tag, and re-tag."
|
|
62
|
+
exit 1
|
|
63
|
+
fi
|
|
64
|
+
|
|
65
|
+
gh release create "${GIT_TAG}" \
|
|
66
|
+
--title "${GIT_TAG}" \
|
|
67
|
+
--verify-tag \
|
|
68
|
+
--notes ""
|
package/CHANGELOG.adoc
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
= Changelog
|
|
2
2
|
|
|
3
|
+
[[release-0.21.0]]
|
|
4
|
+
== 0.21.0 (2026-07-07)
|
|
5
|
+
|
|
6
|
+
=== Additions
|
|
7
|
+
|
|
8
|
+
* Add support for multi-line string line continuations (https://github.com/apple/tree-sitter-pkl/pull/69[#69]).
|
|
9
|
+
|
|
10
|
+
=== Fixes
|
|
11
|
+
|
|
12
|
+
* Fix Rust binding library (https://github.com/apple/tree-sitter-pkl/pull/52[#52]).
|
|
13
|
+
* Enable compatibility with Node 25+ and NPM 12+ (https://github.com/apple/tree-sitter-pkl/pull/87[#87]).
|
|
14
|
+
|
|
15
|
+
=== Contributors ❤️
|
|
16
|
+
|
|
17
|
+
Thanks to all the contributors for this release!
|
|
18
|
+
|
|
19
|
+
* https://github.com/bioball[@bioball]
|
|
20
|
+
* https://github.com/HT154[@HT154]
|
|
21
|
+
* https://github.com/vmeurisse[@vmeurisse]
|
|
22
|
+
|
|
3
23
|
[[release-0.20.0]]
|
|
4
24
|
== 0.20.0 (2025-11-03)
|
|
5
25
|
|