Skip to content

Commit 16326ce

Browse files
[ci] release (#80)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent f0a1da3 commit 16326ce

File tree

7 files changed

+57
-61
lines changed

7 files changed

+57
-61
lines changed

.changeset/clean-pugs-learn.md

Lines changed: 0 additions & 25 deletions
This file was deleted.

.changeset/hip-clowns-retire.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/hot-beers-joke.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/lemon-stingrays-play.md

Lines changed: 0 additions & 18 deletions
This file was deleted.

.changeset/sharp-bears-cheat.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,53 @@
11
# ultrahtml
22

3+
## 1.6.0
4+
5+
### Minor Changes
6+
7+
- 124e573: Adds a new `transformSync` function, a synchronous alternative to the `transform` function. This can be used when there are no `async` transformer functions.
8+
9+
```js
10+
import { transformSync, html } from "ultrahtml";
11+
import swap from "ultrahtml/transformers/swap";
12+
13+
const output = transformSync(`<h1>Hello world!</h1>`, [
14+
swap({
15+
h1: "h2",
16+
}),
17+
]);
18+
19+
console.log(output); // <h2>Hello world!</h2>
20+
```
21+
22+
- f0a1da3: Adds a new `unblockElements` option to the `sanitize` transformer. This option makes it easier to remove all or most HTML from a string without dropping child content.
23+
24+
### Patch Changes
25+
26+
- f0a1da3: Fixes sanitization of nested elements.
27+
28+
For example, the following code:
29+
30+
```js
31+
const output = await transform("<h1>Hello <strong>world!</strong></h1>", [
32+
sanitize({ blockElements: ["h1", "strong"] }),
33+
]);
34+
```
35+
36+
produced the following output before this fix:
37+
38+
```html
39+
Hello <strong>world!</strong>
40+
```
41+
42+
and now correctly produces:
43+
44+
```html
45+
Hello world!
46+
```
47+
48+
- e8aee16: Improve parser performance for attributes
49+
- 8388fe7: Updates internal dependency on `esbuild`
50+
351
## 1.5.3
452

553
### Patch Changes

package.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "ultrahtml",
33
"type": "module",
4-
"version": "1.5.3",
4+
"version": "1.6.0",
55
"types": "./dist/index.d.ts",
66
"main": "./dist/index.js",
77
"repository": {
@@ -45,7 +45,11 @@
4545
"import": "./dist/jsx-runtime/index.js"
4646
}
4747
},
48-
"keywords": ["html", "template", "sanitize"],
48+
"keywords": [
49+
"html",
50+
"template",
51+
"sanitize"
52+
],
4953
"author": {
5054
"name": "Nate Moore",
5155
"email": "[email protected]",
@@ -56,7 +60,9 @@
5660
"node": "18.20.4"
5761
},
5862
"pnpm": {
59-
"onlyBuiltDependencies": ["esbuild"]
63+
"onlyBuiltDependencies": [
64+
"esbuild"
65+
]
6066
},
6167
"packageManager": "[email protected]",
6268
"devDependencies": {

0 commit comments

Comments
 (0)