Releases: a-h/templ
Releases · a-h/templ
v0.3.856
v0.3.850
Changelog
- 73652ef chore: bump docusaurus dependencies
- fa1e467 chore: bump golang.org/x/net (CVE-2025-22870)
- 3a252e2 chore: bump golang.org/x/net in examples and supporting code
- 5077e57 chore: bump nix dependencies (later Go version, etc.)
- ed810ff chore: bump npm deps in examples/benchmarks due to esbuild CVE (#1071)
- 931cdf8 chore: bump toolchain in go.mod
- cf844fd chore: fix moved link in issue template [skip ci]
- 3823da0 chore: fix typo in issue template
- 0e8437a feat: support go expressions in script elements (#1065)
- 98f1ae2 fix: data race in errs []error pattern (#1073)
- 1cd1a92 fix: fix the wrong error return value (#1092)
- 09e79cc fix: prevent HTML4 doctypes from causing generation errors
- 486882f refactor: move versioning script out
- d9154cb refactor: remove goquery dependency (#1070)
- 0c2b7cf refactor: result of discussion in #1101
v0.3.833
Changelog
- 8565703 chore: bump dependency hash
- 725a88f chore: fix misspellings (#1040)
- 8b05ded chore: fix typos
- fb44b3e feat: add new JS handling features - templ.JSFuncCall and templ.JSUnsafeFuncCall (#1038)
- fea7372 feat: add style expression support (#1058)
- e47f4c5 feat: retain import grouping during fmt (#1037)
- 24be99e fix: delete watchmode files when shutdown is sent (#1046)
- 45f4c46 fix: ensure that user-facing line numbers are 1-based, not 0-based, closes #1051
- 6ea47ff fix: watch mode only detects Go code changes if text also changes
- 2514d89 refactor: don't generate a
type
attribute for<script>
elements, update associated docs (#1053) - 0474dd9 refactor: vendor LSP code, and reduce dependencies, fixes #1050 (#1054)
v0.3.819
This release has a couple of potentially breaking changes:
- templ now requires Go 1.23, due to an upstream dependency update (goquery). Usually, templ stays on the oldest supported version of Go (currently 1.22), but in this case, the fix upstream included a change to Go 1.23.
- A change to watch mode behaviour.
templ generate --watch
now triggers on changes to*.go
files in addition to*.templ
and other related templ files. This behaviour can be controlled by the new-watch-pattern <regexp>
argument, which defaults to(.+\.go$)|(.+\.templ$)|(.+_templ\.txt$)
. This is useful, because templ can now restart your web server if you make changes to your Go code. This change might break people's workflows, hence the bump tov0.3.xxx
.
templ generate --watch --cmd="go run ." --proxy="http://localhost:8080"
The biggest change in this release is probably #700 - which means that templ now generates the same code for dev mode and standard mode, using an environment variable to switch between. This should reduce issues where people accidentally commit dev mode code to their repos.
Important!
When you upgrade templ CLI, you will also need to upgrade templ in your project's go.mod
file by running go get -u github.com/a-h/templ
Changelog
- b919741 chore(docs): fix docs link
- b15d514 chore: bump docusaurus version to 3.6.3
- 1b58e02 chore: bump echo version in examples
- 65657de chore: bump nixpkgs version to use latest Go point release
- e54517e chore: bump version
- 2cc2884 chore: bump version of go tools, go compiler, and goquery (fixes CVE) (#1031)
- 3643c9b chore: storybook check int conversion bounds to remove lint warning
- 95a0cea chore: update generated code to return nil instead of generated value (#1025)
- b4a2274 chore: update ignore rules for text editor search to ignore go.sum and LLM help files by default
- 1d87e1a feat(docs): add llms.md (#1023)
- 4f2ce16 feat(lsp): add primitive document symbol support (#848)
- 98c4466 feat(storybook): add multiple story support for components (#971)
- a66a237 feat: generate same dev and prod code, fixes #700 (#1027)
- 3eaa56a feat: support latest version of Storybook (#1024)
- e16b2d8 feat: support unquoted HTML attributes, closes #963 (#1028)
- 6afd676 fix(breaking): trigger rebuild on changes to *.go files, fixes #646 (#1026)
- 9c8ad4d fix: increase hash size for autogenerated IDs to reduce collisions - fixes #978
- 9058914 fix: parser hangs when a bracket isn't closed (#1005) (#1029)
- c36a9e1 fix: remove repeated error messages (#1011) (#1017)
- 1f94c7b fix: stop double-processing generation in watch mode, now that the generation is identical
- 3d695f9 refactor: removed all references to github.com/a-h/pathvars (#999)
v0.2.793
Changelog
- d9eefff chore: bump version
- f5e2469 chore: fix casing of files in test
- 9b77eee chore: fix link in README.md (#931)
- 30dff50 chore: normalize filenames
- fb6a5c2 feat(lsp): add workspace folder initialization (#912)
- ff29e12 feat: Add
-fail
flag tofmt
(#923) - 88eed0f feat: promote rawgo from experiment to core feature (#905)
- 3c65b43 feat: templ.Join method renders multiple components into a single component (#929)
- bb5e41b fix: example flake syntax error (#959)
- a4638e3 fix: parser: fix memory leak in goexpression.Func (fixes #916) (#935)
v0.2.778
Changelog
- ad20522 chore: bump docs deps
- e2511cd chore: bump version
- e29dcde feat: context cancellation aborts rendering (#894)
- c7c32aa feat: support running templ generate in a symlinked directory, fixes #858 (#901)
- dcc8987 fix(lsp): update URI handling for non-templ files for references (#899)
- c813195 fix: find gopls if not in path, fixes #895
- 3ac3c9d fix: send SIGTERM signal to --cmd instead of SIGKILL (#687)
v0.2.771
Changelog
- ce14607 chore: bump Go to 1.22 in flake.nix
- aea3ae3 chore: bump version [no ci]
- 7279001 chore: fix linter errors
- c24c8e4 chore: fix stale test
- a033408 chore: switch to v0.8.4 of xc due to nix config error in xc
- f29cc7a chore: update gofiber example with new rendering (#878)
- ef4dde6 feat: add JSExpression to support passing arbitrary JS to script templates (#851)
- a98204d feat: add
templ info
command (#840) - 65c2618 feat: add support for lazy generation (#874)
- 889c833 fix: close SSE endpoint when browser page is reloaded
- 4b2219c fix: duplicate import added when import path contains hyphens (#859) (#890)
- 979cd97 fix: resolve templruntime imported and not used (#841), fixes #834
- 211912f fix: support comments at end of raw go expressions (#871)
- 15b3483 refactor: add CI checks to xc task list
- 4c14ab0 refactor: allow for in flowing text if for statement not found (#777)
- ae99146 refactor: improve void element parsing perf, fixes #886 and #857 (#887)
v0.2.747
v0.2.742
Changelog
- 6c5eeb0 chore: bump docusaurus
- 1c753f6 chore: bump version
- 8b1f399 chore: update deps in examples
- 5fb61a0 chore: update go modules in Nix setup
- 26c1d79 feat: add support for gopls v0.16.x
- bf98022 feat: update nixpkgs to release-24.05
- 01d3361 fix: LSP CodeAction sometimes results in "error: column is beyond end of line" (#817)
- 24520b8 fix: allow space after a period in go expressions (#811)
- d3033c5 fix: don't pass ranges to gopls if outside of a known Go code region, fixes #801
- bc6e65a fix: only call gopls if the source exists at the location, fixes #801
v0.2.731
Changelog
- efaf8e5 chore: add test to fmt cmd
- dc3db0f chore: bump version
- 2782591 chore: document formatting with vim (#769)
- fa5a308 feat: add nonce to reload script (#784)
- 69bfdb1 feat: organise go imports on format (#793)
- 38d9eca feat: preserve indentation of multiline go string literals (#765)
- 2dafa71 feat: query for the body tag rather than using string replacements (#766)
- 599b54f feat: support []CSSClass in class expression (#768)
- 94c1028 feat: templ.JSONScript: support setting type attribute
- df80639 feat: use buffered IO to enable streaming responses, and implement flush component (#802)
- 73474f6 fix(lsp): add missing nil check in CodeAction, fixes #771
- aaa0049 fix: format single line raw go code (#767)
- a0f5da5 fix: only write to file if content changed, fixes #794 (#797)
- 19ffb1c fix: write logs to stderr instead of stdout, fixes #753 (#759)
- 2a7278c refactor: add extra test
- 9de401c refactor: add full range of script, css, html and text templates, supports #498
- 1ea9027 refactor: add generate cmd test
- 8d27ad1 refactor: add range to text, see #498