From e92e14e8ff53318bd41f467a8a53035bc9ebc9fb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 28 Sep 2026 16:43:48 +0000 Subject: [PATCH] [ci] release --- .changeset/delete-unary-keyword.md | 5 ----- .changeset/empty-placeholder-error.md | 5 ----- .changeset/export-package-json.md | 5 ----- .../scriptlet-and-spaced-type-statements.md | 5 ----- .changeset/spread-keyword-and-bang-runs.md | 5 ----- .changeset/trailing-non-null-assertion.md | 5 ----- .changeset/type-ends-at-void.md | 5 ----- .changeset/valid-type-statement.md | 5 ----- CHANGELOG.md | 20 +++++++++++++++++++ package.json | 2 +- 10 files changed, 21 insertions(+), 41 deletions(-) delete mode 100644 .changeset/delete-unary-keyword.md delete mode 100644 .changeset/empty-placeholder-error.md delete mode 100644 .changeset/export-package-json.md delete mode 100644 .changeset/scriptlet-and-spaced-type-statements.md delete mode 100644 .changeset/spread-keyword-and-bang-runs.md delete mode 100644 .changeset/trailing-non-null-assertion.md delete mode 100644 .changeset/type-ends-at-void.md delete mode 100644 .changeset/valid-type-statement.md diff --git a/.changeset/delete-unary-keyword.md b/.changeset/delete-unary-keyword.md deleted file mode 100644 index 0e68726d..00000000 --- a/.changeset/delete-unary-keyword.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"htmljs-parser": minor ---- - -Read `delete` as a prefix operator, like `typeof` and `void`, so `
` is one attribute value and a statement ending in `delete` continues onto the next line. diff --git a/.changeset/empty-placeholder-error.md b/.changeset/empty-placeholder-error.md deleted file mode 100644 index e90cb973..00000000 --- a/.changeset/empty-placeholder-error.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"htmljs-parser": minor ---- - -An empty placeholder (`${}`) now stops at its error instead of also emitting an `onPlaceholder` whose end is past the input. diff --git a/.changeset/export-package-json.md b/.changeset/export-package-json.md deleted file mode 100644 index b87e4709..00000000 --- a/.changeset/export-package-json.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"htmljs-parser": minor ---- - -Export `./package.json`, so tools can read which parser version they run on with `require("htmljs-parser/package.json")`. diff --git a/.changeset/scriptlet-and-spaced-type-statements.md b/.changeset/scriptlet-and-spaced-type-statements.md deleted file mode 100644 index 86b3b081..00000000 --- a/.changeset/scriptlet-and-spaced-type-statements.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"htmljs-parser": minor ---- - -Read a `type`, `interface` or `declare` scriptlet as a type, as statements already are, so `$ type H = () => void` or `$ type A = B` no longer swallows the next line; `$ type = x` stays JavaScript. A statement also finds its type keyword after extra whitespace (`static type F = () => void`), and `isValidScriptlet` matches the parser. diff --git a/.changeset/spread-keyword-and-bang-runs.md b/.changeset/spread-keyword-and-bang-runs.md deleted file mode 100644 index 44319013..00000000 --- a/.changeset/spread-keyword-and-bang-runs.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"htmljs-parser": minor ---- - -A keyword operator directly after a spread's `...` is an operator, so `
` is one spread rather than `...new` plus an attribute `Attrs()`. A run of non-null assertions (`x!!`) and one after a string or template literal (`"s"!`, `` `s`! ``) now ends an unenclosed value like `x!` does. diff --git a/.changeset/trailing-non-null-assertion.md b/.changeset/trailing-non-null-assertion.md deleted file mode 100644 index c6461073..00000000 --- a/.changeset/trailing-non-null-assertion.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"htmljs-parser": minor ---- - -Treat a trailing TypeScript non-null assertion directly after an operand (`x!`, `f()!`, `a[0]!`) as postfix, so it ends an unenclosed attribute, tag variable or statement value. `
` now reports two attributes rather than one value `x! id="a"`, and `
` no longer fails as an unterminated regular expression. diff --git a/.changeset/type-ends-at-void.md b/.changeset/type-ends-at-void.md deleted file mode 100644 index 2c9a1271..00000000 --- a/.changeset/type-ends-at-void.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"htmljs-parser": minor ---- - -End a type at a line-final `void`. A type statement such as `export type H = () => void` carried on into the next line, and a `void` return type before `{` (`function foo(): void {`) read the body as a type; `void` inside a type is now always the `void` type rather than a prefix operator. diff --git a/.changeset/valid-type-statement.md b/.changeset/valid-type-statement.md deleted file mode 100644 index 07380ca6..00000000 --- a/.changeset/valid-type-statement.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"htmljs-parser": minor ---- - -`isValidStatement` now reads a statement starting with `type `, `interface ` or `declare ` as a type, as the parser does, so a multi-line type argument list is `enclosed` and a type followed by an unindented line is `invalid`. diff --git a/CHANGELOG.md b/CHANGELOG.md index 68b95a18..a54df458 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,25 @@ # htmljs-parser +## 5.18.0 + +### Minor Changes + +- [`6f82a36`](https://github.com/marko-js/htmljs-parser/commit/6f82a367c62a2dff4e01af52c72c4821db4d4b5d) Thanks [@DylanPiercey](https://github.com/DylanPiercey)! - Read `delete` as a prefix operator, like `typeof` and `void`, so `
` is one attribute value and a statement ending in `delete` continues onto the next line. + +- [`6f82a36`](https://github.com/marko-js/htmljs-parser/commit/6f82a367c62a2dff4e01af52c72c4821db4d4b5d) Thanks [@DylanPiercey](https://github.com/DylanPiercey)! - An empty placeholder (`${}`) now stops at its error instead of also emitting an `onPlaceholder` whose end is past the input. + +- [#256](https://github.com/marko-js/htmljs-parser/pull/256) [`ac8fa1c`](https://github.com/marko-js/htmljs-parser/commit/ac8fa1c8e1b24e680e4bd41e8122bcd3c792fd65) Thanks [@DylanPiercey](https://github.com/DylanPiercey)! - Export `./package.json`, so tools can read which parser version they run on with `require("htmljs-parser/package.json")`. + +- [#254](https://github.com/marko-js/htmljs-parser/pull/254) [`0602e70`](https://github.com/marko-js/htmljs-parser/commit/0602e70917b11cebd66945544958af4e6a0f150c) Thanks [@DylanPiercey](https://github.com/DylanPiercey)! - Read a `type`, `interface` or `declare` scriptlet as a type, as statements already are, so `$ type H = () => void` or `$ type A = B` no longer swallows the next line; `$ type = x` stays JavaScript. A statement also finds its type keyword after extra whitespace (`static type F = () => void`), and `isValidScriptlet` matches the parser. + +- [#255](https://github.com/marko-js/htmljs-parser/pull/255) [`278f259`](https://github.com/marko-js/htmljs-parser/commit/278f2598ffe60894618293166b907ca1af5727ca) Thanks [@DylanPiercey](https://github.com/DylanPiercey)! - A keyword operator directly after a spread's `...` is an operator, so `
` is one spread rather than `...new` plus an attribute `Attrs()`. A run of non-null assertions (`x!!`) and one after a string or template literal (`"s"!`, `` `s`! ``) now ends an unenclosed value like `x!` does. + +- [`6f82a36`](https://github.com/marko-js/htmljs-parser/commit/6f82a367c62a2dff4e01af52c72c4821db4d4b5d) Thanks [@DylanPiercey](https://github.com/DylanPiercey)! - Treat a trailing TypeScript non-null assertion directly after an operand (`x!`, `f()!`, `a[0]!`) as postfix, so it ends an unenclosed attribute, tag variable or statement value. `
` now reports two attributes rather than one value `x! id="a"`, and `
` no longer fails as an unterminated regular expression. + +- [`6f82a36`](https://github.com/marko-js/htmljs-parser/commit/6f82a367c62a2dff4e01af52c72c4821db4d4b5d) Thanks [@DylanPiercey](https://github.com/DylanPiercey)! - End a type at a line-final `void`. A type statement such as `export type H = () => void` carried on into the next line, and a `void` return type before `{` (`function foo(): void {`) read the body as a type; `void` inside a type is now always the `void` type rather than a prefix operator. + +- [`6f82a36`](https://github.com/marko-js/htmljs-parser/commit/6f82a367c62a2dff4e01af52c72c4821db4d4b5d) Thanks [@DylanPiercey](https://github.com/DylanPiercey)! - `isValidStatement` now reads a statement starting with `type `, `interface ` or `declare ` as a type, as the parser does, so a multi-line type argument list is `enclosed` and a type followed by an unindented line is `invalid`. + ## 5.17.1 ### Patch Changes diff --git a/package.json b/package.json index 82efa0ce..19b94417 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "htmljs-parser", - "version": "5.17.1", + "version": "5.18.0", "description": "An HTML parser recognizes content and string placeholders and allows JavaScript expressions as attribute values", "keywords": [ "HTML",