Skip to content

Releases: a-h/templ

v0.2.648

24 Mar 19:42
80bffc6
Compare
Choose a tag to compare

Fix for regression in previous release.

Changelog

  • 80bffc6 chore: refactor comment position
  • ae52b02 fix: failure to parse empty slices (fixes #638)

v0.2.646

23 Mar 15:44
f2e5269
Compare
Choose a tag to compare

Changelog

  • f2e5269 chore: bump version [no ci]
  • 8709950 chore: bump workflow
  • 3eff9c3 feat: add option to generate to stdout (#628)
  • 1e176a0 fix: handle slice literals without named types (#635)

v0.2.639

18 Mar 09:02
862f404
Compare
Choose a tag to compare

Changelog

  • f55a23b Create FUNDING.yml
  • ee7132c chore: flake: bump Go from 1.21.4 to 1.21.8
  • 1ed8b42 chore: migrate to github actions for releases
  • f27f67f chore: pass env variables to nix develop
  • ed05347 feat(proxy): skip adding the proxy script for HTMX requests (#614)
  • ac593eb feat: Support func(...) (string, error) for string attribute expression values. (#584)
  • 15d7b92 feat: add Docker images to release outputs
  • d45ff2e feat: add --proxybind flag to generate watch mode (#615)
  • 8d48984 feat: add templ.SafeCSSProperty support (#581)
  • 22f761a feat: parse HTML element and attribute positions (#548)
  • f3417e0 feat: support unquoted CSS background-urls, fixes #578, #580
  • 5381ed0 fix: don't panic on non-existent file path (#600)
  • ee4d1dd fix: fixes issue #597 - improves performance (500x faster than previous) (#605)
  • ab29256 fix: incorrect parsing of empty js strings, fixes #468
  • 358286c refactor: document structure of templ file by demonstrating interface implementation

v0.2.598

02 Mar 08:50
@a-h a-h
2a7ab84
Compare
Choose a tag to compare

Big changes

  • Added fsnotify-based hot reload - big improvement to the --watch command - #470
  • Introduced support for CSS args - https://templ.guide/syntax-and-usage/css-style-management#css-component-arguments
  • Updated minimum Go version to 1.21 from 1.20 - 1.20 hit end of life on 06 Feb 2024.
  • Complete rewrite of Go expression parsing, Go parsing now uses go/ast which means that multiline Go expressions are now supported. This is a big change. To test it, I wrote a new fuzzing suite, and generated code for over 1000 public Github projects - #461 - so I'm confident in it, but given the variation of how people write code, there's still risk.

Changelog

  • fix: consistent whitespace around go keywords by @JonnyLoughlin in #371
  • Fixing example source to match docs by @dougbarrett in #467
  • refactor: migrate to Go parser instead of using heuristics by @a-h in #461
  • refactor: complete rewrite of the generation command, adds fsnotify hot reload by @a-h in #470
  • refactor(#456): gin example with context by @iamajoe in #466
  • docs: templ.URL sanitization for non-standard attributes by @bshore in #442
  • docs: Add missing hr render by @gngchrs in #479
  • chore: watch tests - give 5 attempts for the server to start by @joerdav in #477
  • fix: flaky test should also wait for the proxy to be available by @joerdav in #480
  • Added minimal config by @JamesTiberiusKirk in #463
  • Css args by @joerdav in #484
  • docs: add a note for tailwind config file in the related section by @msyavuz in #485
  • feat: fmt: allow formatting files and directories to stdout by @a-h in #491
  • docs: fix typo by @phenpessoa in #495
  • fix: pass function arguments through source format. by @joerdav in #502
  • docs: add list of project scaffolding tools by @joerdav in #503
  • fix: go expressions prior to templates with multiline args by @joerdav in #507
  • fix: go parser should stop at first composite literal by @joerdav in #512
  • feat: refactor diagnostics and fix legacy call warning by @joerdav in #521
  • docs: Add JSON attribute example by @MarhyCZ in #534
  • chore: create LSP test suite by @a-h in #532
  • Content-Enconding gzip support for the hot reloader proxy by @JamesTiberiusKirk in #535
  • Fix typo in variable declaration in 13-context.md by @acaloiaro in #542
  • feat: add fuzzing suite to expression parser by @a-h in #546
  • feat: debounce generate watch events by @joerdav in #555
  • feat: add tests for dependent projects by @a-h in #559
  • fix: in all go inspect functions we want to stop at first match by @joerdav in #560
  • docs: fix gin html status code overwrite and provide fallback renderer by @Foggyman in #550
  • fix: guard from index out of bounds error in function parsing by @joerdav in #568
  • fix: parse issue with templ component variables by @a-h in #572
  • Update minimum go version to 1.21 by @SpencerMalone in #573
  • chore(docs): add inline component example by @Ra0k in #565

New Contributors

Full Changelog: v0.2.542...v0.2.598

v0.2.543

25 Jan 20:34
@a-h a-h
a52176d
Compare
Choose a tag to compare

Changelog

  • docs: add emacs to editors with templ support by @danderson in #392
  • fix: allow single and double quotes in comments within script templates by @a-h in #384
  • feat: improve watch mode to reduce recompilation by @stephenafamo in #366
  • fix: report templ server info to LSP clients, not gopls info by @danderson in #404
  • chore: add tests to cover ways others are using call expressions by @joerdav in #420
  • feat: format templ element expressions by @joerdav in #435
  • docs: add Emmet config for vscode by @jonerer in #428
  • fix: only run the version check once per command, to avoid spam. by @joerdav in #438
  • fix: infinite loop if go.mod not found, warn on missing go.mod or forgotten go get by @a-h in #441
  • docs: state that a body tag is required in order for the proxy flag t… by @phenpessoa in #450

New Contributors

Full Changelog: v0.2.513...v0.2.543

v0.2.513

02 Jan 12:15
@a-h a-h
5579e47
Compare
Choose a tag to compare

Changelog

  • 44c155c chore(docs): Add Anthony GG tutorial to docs (#383)
  • d5d2dec feat: bump xc version
  • 5579e47 fix(fmt): incorrect conversion from single to double quotes, fixes #380
  • 4580762 fix(fmt): stop adding extra lines between Go comments and templates (#351)
  • e98db35 fix: apply temporary workaround for golang/go#61888
  • f0fb971 fix: templ CLI panic with --proxy option (#365)

v0.2.501

22 Dec 16:52
@a-h a-h
92557cd
Compare
Choose a tag to compare

Changelog

  • 13b1f8a Feature: delete orphaned templ files, with -keep-orphaned-files flag to disable (#325)
  • 060219c [docs] Enable templ syntax highlighting in 04-core-concepts/01-components (#336)
  • 92557cd chore: bump deps in examples
  • e127474 chore: bump version
  • 06b7157 chore: remove orphaned templ file
  • 6a3dc32 chore: run formatter after updates
  • 37f022a feat: add spread attribute feature (#237)
  • 8484597 feat: add support for rendering raw HTML, and bi-directional support for html/template (#337)
  • f7d965c feat: allow functions that return (string, error) (#299)
  • b6f0b3d feat: probe for Windows locations of gopls
  • f217754 feat: show templ CLI and go.mod version mismatch warning (#338)
  • ac11ed2 feat: warn when using legacy call syntax (#303)
  • 802881f fix(#300): multiline bool constant attributes on Windows
  • 499671c fix: 'generate -watch' stops sleeping between iterations after 15min (#309)
  • 4911b5d fix: diagnostics set to nil, which causes issues in some LSP clients (and is against spec)
  • 99fd97f fix: ensure correct response headers and status code used on template render error (#316)
  • 83497bc fix: fixed insertion of additional whitespace on format (#346)
  • 9622ae2 fix: nix documentation, CGO typo and flake overlay (#323)
  • c9f43b8 refactor: add example of allocation test for parser
  • 6c41101 refactor: reduce memory allocations during parsing and generation (#301)

v0.2.476

16 Nov 08:43
@a-h a-h
16dfaad
Compare
Choose a tag to compare

Changelog

  • 6121e6c chore: bump coverage Github action
  • fb53582 chore: bump deps hash
  • ab819d4 chore: bump golang.org/x/net
  • d941985 chore: bump htmlformat library
  • 16dfaad chore: bump version
  • 6662349 chore: bump version
  • b511005 chore: bump version
  • f0dc112 chore: bump version
  • b0d1cdb chore: bump version
  • e8f18b2 chore: conduct.md
  • ba7a09e chore: delete unused file
  • e2dff51 chore: fix error in CI pipeline YAML
  • a6888ec chore: reformat templates after changes
  • 4196f34 chore: remove missing package from flake.nix
  • 0d7a8e3 chore: remove reference to legacy template call expression (#280)
  • 941644e chore: update flake vendor hash (#276)
  • 49f8001 chore: use magic nix cache to speed up builds
  • ec577d5 ci: ensure fmt (#282)
  • 8d2651a feat(lsp): also probe common directories to look for gopls, see #127
  • abe23c6 feat: add ability to call script components inline (#285)
  • ceb6f14 feat: fmt: Go format expression attributes
  • 7a905f8 feat: remove class name sanitization, since CSS class names are already HTML attribute escaped (#284)
  • 43545f8 feat: support HTMX wildcard attribute names, fixes #271
  • 8480a71 fix: remove escaping for ConstantAttribute (#293) (#295)
  • fe52296 fix: remove incorrect document highlighting, fixes #283
  • 05248fc fix: return exit code, fixes #278 (#281)
  • 9e8a645 fix: set content type correctly on gin example (#277)
  • f18e82f refactor: change max size of element name to 128 (#297)
  • 6e36230 refactor: rename Go expressions at template level
  • cc5054c refactor: template node parser
  • a463e64 refactor: update unit test to be more descriptive
  • 79dcc11 refactor: use Nix to test, lint and build

v0.2.432

30 Oct 08:55
@a-h a-h
63bc705
Compare
Choose a tag to compare

Changelog

  • 8d6bbc2 chore: add template formatting to the code coverage
  • 1d3e08b chore: apply gofmt -s
  • d17087d chore: improve cmd unit testing
  • 716517f feat: update flake and related docs (#241)
  • 63bc705 fix: scripts not rendered when script expression is in a conditional attribute, fixes #260

v0.2.428

29 Oct 11:07
@a-h a-h
c95270e
Compare
Choose a tag to compare

Changelog

  • c95270e chore: add start of unit tests for CLI
  • cf3e180 chore: fix typo in test name
  • 1a2a2a0 chore: reformat all test templates using new formatter
  • 78a6f93 chore: update pre-commit hook
  • c0e01cf chore: use a pre-commit hook to set a .version file instead of using git
  • 623cee2 doc: command-and-tools - added helix (#247)
  • e4c85dd feat(generator): support templ.URL with form action (#238)
  • faa36c1 feat: add more html tags to snippets (#244)
  • 0b8883b feat: enable implicit context, fixes #253 (#256)
  • 68c3e90 feat: ensure that multiple files can be set to include time
  • 4115af0 feat: make version optional, and allow timestamp in generated output - fixes #123 (#257)
  • 0c8f99a feat: proxy retries with exponential backoff (#255)
  • 1929818 match prefix of Content-Type header in proxy (#254)