hk 2.1.0: Glob-Imports in hk.pkl und neue Builtins
hk 2.1.0 unterstützt Glob-Imports per import*(...) in der hk.pkl, erkennt Änderungen an importierten Modulen im Config-Cache zuverlässig und bringt neue Builtin-Funktionen für kube-linter, dotnet format und EditorConfig sowie Fixes für typos und pre-push.
hk.pkl can now assemble steps from a glob of Pkl files with the expression form of import*, and hk's config cache finally notices when glob-matched or transitively imported modules change. Three new builtin capabilities land for Kubernetes manifests, .NET projects, and EditorConfig fixes, plus fixes for typos under custom shells and pre-push crashing on unexpected stdin.
Added
Glob imports in hk configuration (#1423, @jdx). The expression form
import*("generated/*.pkl")now evaluates; hk previously rejected it at parse time withunexpected token in expression: KwImportStar, which kept projects that generate step definitions on hk 1.x. The declaration formimport* "generated/*.pkl" as generatedcontinues to work. Support comes from upgrading hk's bundled Pkl evaluator to pklr 3.0.local generated = import*("generated/*.pkl") hooks { ["check"] { steps = new Mapping<String, Step> { for (_, mod in generated) { ...mod.STEPS } } } }Each matched file exports its own
STEPS: Mapping<String, Config.Step>. See the new "Import many files at once" section in the Pkl introduction docs. …