Skip to content

Commit

Permalink
Merge branch 'release/v0.13.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
holtwick committed May 13, 2024
2 parents 6a2d669 + 97a82b9 commit fb99763
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 16 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 Dirk Holtwick
Copyright (c) 2021-2024 Dirk Holtwick

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ const React = {

But more common is the use of `h` as the factory function. Here is how you can set up this behavior for various environments:

> In case of error messages on JSX in your Typescript project, try to add `npm install -D @types/react`.
### Babel.js

Add required plugins:
Expand Down
25 changes: 13 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "zeed-dom",
"type": "module",
"version": "0.12.10",
"version": "0.13.0",
"description": "🌱 Lightweight offline DOM",
"author": {
"name": "Dirk Holtwick",
Expand Down Expand Up @@ -66,19 +66,20 @@
"watch": "npm run build:tsup -- --watch"
},
"dependencies": {
"css-what": "^6.1.0"
"css-what": "^6.1.0",
"entities": "^4.5.0"
},
"devDependencies": {
"@antfu/eslint-config": "^2.4.6",
"@antfu/eslint-config": "^2.17.0",
"@antfu/ni": "^0.21.12",
"@types/node": "^20.10.4",
"@vitest/coverage-v8": "^1.0.4",
"c8": "^8.0.1",
"eslint": "^8.56.0",
"tsup": "^8.0.1",
"typedoc": "^0.25.4",
"typescript": "^5.3.3",
"vite": "^5.0.10",
"vitest": "^1.0.4"
"@types/node": "^20.12.11",
"@vitest/coverage-v8": "^1.6.0",
"c8": "^9.1.0",
"eslint": "^9.2.0",
"tsup": "^8.0.2",
"typedoc": "^0.25.13",
"typescript": "^5.4.5",
"vite": "^5.2.11",
"vitest": "^1.6.0"
}
}
File renamed without changes.
8 changes: 6 additions & 2 deletions src/encoding.spec.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import { escapeHTML } from './encoding'
import { escapeHTML, unescapeHTML } from './encoding'

describe('encoding', () => {
it('should encoding', () => {
it('should encode', () => {
expect(escapeHTML('</')).toEqual('&lt;/')
expect(escapeHTML('<and> &')).toEqual('&lt;and&gt; &amp;')
})

it("should decode", () => {
expect(unescapeHTML('&amp; &#x3A; &copy;')).toEqual('& : ©')
})
})
3 changes: 2 additions & 1 deletion src/encoding.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { decode } from './encoding-he'
// import { decode } from './encoding-he'
import { decodeHTML as decode} from 'entities'

export function escapeHTML(text: string) {
return text
Expand Down

0 comments on commit fb99763

Please sign in to comment.