Skip to content

Commit bb87a74

Browse files
authored
refactor(dotprompt-dart): rename dart handlebarrz package to handlebars_dart (#542)
1 parent fce691c commit bb87a74

33 files changed

+177
-159
lines changed

.github/labeler.yml

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,10 @@ dotprompt-dart:
8787
- any-glob-to-any-file:
8888
- "dart/dotprompt/**"
8989

90-
handlebarrz-dart:
90+
handlebars-dart:
9191
- changed-files:
9292
- any-glob-to-any-file:
93-
- "dart/handlebarrz/**"
93+
- "dart/handlebars_dart/**"
9494

9595
js:
9696
- changed-files:
@@ -177,31 +177,31 @@ npm:
177177

178178
# Automatically add labels to any PR also based on branch naming conventions.
179179
build:
180-
- head-branch: ['^.*/build/.*', 'build']
180+
- head-branch: ["^.*/build/.*", "build"]
181181

182182
chore:
183-
- head-branch: ['^.*/chore/.*', 'chore']
183+
- head-branch: ["^.*/chore/.*", "chore"]
184184

185185
ci:
186-
- head-branch: ['^.*/ci/.*', 'ci']
186+
- head-branch: ["^.*/ci/.*", "ci"]
187187

188188
feature:
189-
- head-branch: ['^.*/feat/.*', 'feature']
189+
- head-branch: ["^.*/feat/.*", "feature"]
190190

191191
fix:
192-
- head-branch: ['^.*/fix/.*', 'fix']
192+
- head-branch: ["^.*/fix/.*", "fix"]
193193

194194
perf:
195-
- head-branch: ['^.*/perf/.*', 'perf']
195+
- head-branch: ["^.*/perf/.*", "perf"]
196196

197197
refactor:
198-
- head-branch: ['^.*/refactor/.*', 'refactor']
198+
- head-branch: ["^.*/refactor/.*", "refactor"]
199199

200200
style:
201-
- head-branch: ['^.*/style/.*', 'style']
201+
- head-branch: ["^.*/style/.*", "style"]
202202

203203
test:
204-
- head-branch: ['^.*/test/.*', 'test']
204+
- head-branch: ["^.*/test/.*", "test"]
205205

206206
# ==============================================================================
207207
# RELEASE PLEASE LABELS
@@ -210,48 +210,47 @@ test:
210210
# Branch pattern: release-please--<component>--<path>
211211

212212
release:
213-
- head-branch: ['^release-please--.*']
213+
- head-branch: ["^release-please--.*"]
214214

215215
# Component-specific release labels
216216
release/dotprompt:
217-
- head-branch: ['^release-please--dotprompt.*']
217+
- head-branch: ["^release-please--dotprompt.*"]
218218

219219
release/dotpromptz:
220-
- head-branch: ['^release-please--dotpromptz--.*']
220+
- head-branch: ["^release-please--dotpromptz--.*"]
221221

222222
release/dotpromptz-handlebars:
223-
- head-branch: ['^release-please--dotpromptz-handlebars--.*']
223+
- head-branch: ["^release-please--dotpromptz-handlebars--.*"]
224224

225225
release/dotprompt-go:
226-
- head-branch: ['^release-please--dotprompt-go.*']
226+
- head-branch: ["^release-please--dotprompt-go.*"]
227227

228228
release/dotprompt-rs:
229-
- head-branch: ['^release-please--dotprompt-rs.*']
229+
- head-branch: ["^release-please--dotprompt-rs.*"]
230230

231231
release/dotprompt-java:
232-
- head-branch: ['^release-please--dotprompt-java.*']
232+
- head-branch: ["^release-please--dotprompt-java.*"]
233233

234234
release/vscode:
235-
- head-branch: ['^release-please--dotprompt-vscode.*']
235+
- head-branch: ["^release-please--dotprompt-vscode.*"]
236236

237237
release/vim:
238-
- head-branch: ['^release-please--dotprompt-vim.*']
238+
- head-branch: ["^release-please--dotprompt-vim.*"]
239239

240240
release/emacs:
241-
- head-branch: ['^release-please--dotprompt-emacs.*']
241+
- head-branch: ["^release-please--dotprompt-emacs.*"]
242242

243243
release/jetbrains:
244-
- head-branch: ['^release-please--dotprompt-jetbrains.*']
244+
- head-branch: ["^release-please--dotprompt-jetbrains.*"]
245245

246246
release/monaco:
247-
- head-branch: ['^release-please--dotprompt-monaco.*']
247+
- head-branch: ["^release-please--dotprompt-monaco.*"]
248248

249249
release/codemirror:
250-
- head-branch: ['^release-please--dotprompt-codemirror.*']
250+
- head-branch: ["^release-please--dotprompt-codemirror.*"]
251251

252252
release/treesitter:
253-
- head-branch: ['^release-please--tree-sitter-dotprompt.*']
253+
- head-branch: ["^release-please--tree-sitter-dotprompt.*"]
254254

255255
release/promptly:
256-
- head-branch: ['^release-please--promptly.*']
257-
256+
- head-branch: ["^release-please--promptly.*"]

.github/workflows/dart.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ jobs:
142142

143143
- name: Run Dart tests via Bazel
144144
run: bazel test //dart/... --test_output=errors
145-
continue-on-error: true # Tests may need network access
145+
continue-on-error: true # Tests may need network access
146146

147147
antlr-grammar:
148148
needs: check-paths
@@ -156,8 +156,8 @@ jobs:
156156
- name: Setup Java (required for ANTLR)
157157
uses: actions/setup-java@v4
158158
with:
159-
distribution: 'temurin'
160-
java-version: '17'
159+
distribution: "temurin"
160+
java-version: "17"
161161

162162
- name: Install ANTLR4
163163
run: |
@@ -180,10 +180,10 @@ jobs:
180180
181181
# Compare with committed files (excluding headers)
182182
for file in HandlebarsLexer.dart HandlebarsParser.dart HandlebarsParserVisitor.dart HandlebarsParserBaseVisitor.dart; do
183-
if [ -f "../../dart/handlebarrz/lib/src/antlr/$file" ]; then
183+
if [ -f "../../dart/handlebars_dart/lib/src/antlr/$file" ]; then
184184
# Strip header comments and compare
185185
tail -n +22 "$file" > "/tmp/generated_$file"
186-
tail -n +22 "../../dart/handlebarrz/lib/src/antlr/$file" > "/tmp/committed_$file"
186+
tail -n +22 "../../dart/handlebars_dart/lib/src/antlr/$file" > "/tmp/committed_$file"
187187
if ! diff -q "/tmp/generated_$file" "/tmp/committed_$file" > /dev/null; then
188188
echo "Warning: Generated $file differs from committed version"
189189
echo "Run './scripts/generate_handlebars_parser' to update"

bazel/dart/defs.bzl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,9 @@ chmod +x $@
134134
"//dart/dotprompt:dotprompt",
135135
"//dart/dotprompt:pubspec.yaml",
136136
"//dart/dotprompt:test/spec_test.dart",
137-
# Include handlebarrz as it's a path dependency
138-
"//dart/handlebarrz:handlebarrz",
139-
"//dart/handlebarrz:pubspec.yaml",
137+
# Include handlebars_dart as it's a path dependency
138+
"//dart/handlebars_dart:handlebars_dart",
139+
"//dart/handlebars_dart:pubspec.yaml",
140140
],
141141
tags = kwargs.pop("tags", []) + ["requires-network"],
142142
**kwargs

dart.MODULE.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ dart_deps.from_file(
4242
rules_dart_label = "@rules_dart//:defs.bzl",
4343
)
4444
dart_deps.from_file(
45-
lock_file = "//dart/handlebarrz:pubspec.lock",
45+
lock_file = "//dart/handlebars_dart:pubspec.lock",
4646
rules_dart_label = "@rules_dart//:defs.bzl",
4747
)
4848
use_repo(

dart/dotprompt/BUILD.bazel

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ dart_library(
3535
"@dart_deps_meta//:meta",
3636
"@dart_deps_path//:path",
3737
"@dart_deps_yaml//:yaml",
38-
"@dotprompt//dart/handlebarrz",
38+
"@dotprompt//dart/handlebars_dart",
3939
],
4040
)
4141

@@ -51,28 +51,28 @@ exports_files(["pubspec.lock"])
5151

5252
dart_test(
5353
name = "dotprompt_test",
54-
data = ["//dart/handlebarrz"],
54+
data = ["//dart/handlebars_dart"],
5555
main = "test/dotprompt_test.dart",
5656
deps = [":dotprompt"],
5757
)
5858

5959
dart_test(
6060
name = "parse_test",
61-
data = ["//dart/handlebarrz"],
61+
data = ["//dart/handlebars_dart"],
6262
main = "test/parse_test.dart",
6363
deps = [":dotprompt"],
6464
)
6565

6666
dart_test(
6767
name = "picoschema_test",
68-
data = ["//dart/handlebarrz"],
68+
data = ["//dart/handlebars_dart"],
6969
main = "test/picoschema_test.dart",
7070
deps = [":dotprompt"],
7171
)
7272

7373
dart_test(
7474
name = "types_test",
75-
data = ["//dart/handlebarrz"],
75+
data = ["//dart/handlebars_dart"],
7676
main = "test/types_test.dart",
7777
deps = [":dotprompt"],
7878
)
@@ -143,7 +143,7 @@ dart_test(
143143
name = "spec_test",
144144
data = [
145145
"//:MODULE.bazel",
146-
"//dart/handlebarrz",
146+
"//dart/handlebars_dart",
147147
"//spec",
148148
],
149149
main = "test/spec_test.dart",

dart/dotprompt/lib/src/dotprompt.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ library;
5353
import "dart:async";
5454
import "dart:convert";
5555

56-
import "package:handlebarrz/handlebarrz.dart";
56+
import "package:handlebars_dart/handlebars_dart.dart";
5757

5858
import "error.dart";
5959
import "helpers/media_helper.dart";

dart/dotprompt/pubspec.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,10 +201,10 @@ packages:
201201
url: "https://pub.dev"
202202
source: hosted
203203
version: "2.3.2"
204-
handlebarrz:
204+
handlebars_dart:
205205
dependency: "direct main"
206206
description:
207-
path: "../handlebarrz"
207+
path: "../handlebars_dart"
208208
relative: true
209209
source: path
210210
version: "0.0.1"

dart/dotprompt/pubspec.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ dependencies:
3434
# Crypto for hashing
3535
crypto: ^3.0.6
3636
# Handlebars templating (our pure Dart implementation)
37-
handlebarrz: ^0.0.1
37+
handlebars_dart: ^0.0.1
3838
# JSON schema support
3939
json_schema: ^5.2.2
4040
# Meta annotations
@@ -46,8 +46,8 @@ dependencies:
4646

4747
# Local development overrides (not included in published package).
4848
dependency_overrides:
49-
handlebarrz:
50-
path: ../handlebarrz
49+
handlebars_dart:
50+
path: ../handlebars_dart
5151

5252
dev_dependencies:
5353
build_runner: ^2.4.13
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414
#
1515
# SPDX-License-Identifier: Apache-2.0
1616

17-
"""Handlebarrz - A pure Dart implementation of Handlebars template engine."""
17+
"""handlebars_dart - A pure Dart implementation of Handlebars template engine."""
1818

1919
load("@rules_dart//:defs.bzl", "dart_library", "dart_pub_get", "dart_pub_publish", "dart_test")
2020

2121
package(default_visibility = ["//visibility:public"])
2222

23-
# Core handlebarrz library
23+
# Core handlebars_dart library
2424
dart_library(
25-
name = "handlebarrz",
25+
name = "handlebars_dart",
2626
srcs = glob(["lib/**/*.dart"]) + ["pubspec.yaml"],
2727
pubspec = "pubspec.yaml",
2828
deps = ["@dart_deps_antlr4//:antlr4"],
@@ -38,13 +38,13 @@ exports_files(["pubspec.lock"])
3838
dart_test(
3939
name = "antlr_parser_test",
4040
main = "test/antlr_parser_test.dart",
41-
deps = [":handlebarrz"],
41+
deps = [":handlebars_dart"],
4242
)
4343

4444
dart_test(
4545
name = "handlebars_test",
4646
main = "test/handlebars_test.dart",
47-
deps = [":handlebarrz"],
47+
deps = [":handlebars_dart"],
4848
)
4949

5050
dart_pub_get(

0 commit comments

Comments
 (0)