Skip to content

Commit 217b922

Browse files
renovate[bot]sxzz
andauthored
chore(deps): update dependency html-tags to v4 (#708)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: 三咲智子 Kevin Deng <[email protected]>
1 parent 3852069 commit 217b922

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

packages/babel-plugin-jsx/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"@vue/babel-helper-vue-transform-on": "workspace:*",
3333
"@vue/babel-plugin-resolve-type": "workspace:*",
3434
"camelcase": "^6.3.0",
35-
"html-tags": "^3.3.1",
35+
"html-tags": "^4.0.0",
3636
"svg-tags": "^1.0.0"
3737
},
3838
"devDependencies": {

packages/babel-plugin-jsx/src/utils.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as t from '@babel/types';
2-
import htmlTags from 'html-tags';
2+
import htmlTags, { type HtmlTags } from 'html-tags';
33
import svgTags from 'svg-tags';
44
import { type NodePath } from '@babel/traverse';
55
import type { State } from './interface';
@@ -60,7 +60,7 @@ export const checkIsComponent = (
6060
return (
6161
!state.opts.isCustomElement?.(tag) &&
6262
shouldTransformedToSlots(tag) &&
63-
!htmlTags.includes(tag as htmlTags.htmlTags) &&
63+
!htmlTags.includes(tag as HtmlTags) &&
6464
!svgTags.includes(tag)
6565
);
6666
};
@@ -99,10 +99,7 @@ export const getTag = (
9999
const namePath = path.get('openingElement').get('name');
100100
if (namePath.isJSXIdentifier()) {
101101
const { name } = namePath.node;
102-
if (
103-
!htmlTags.includes(name as htmlTags.htmlTags) &&
104-
!svgTags.includes(name)
105-
) {
102+
if (!htmlTags.includes(name as HtmlTags) && !svgTags.includes(name)) {
106103
return name === FRAGMENT
107104
? createIdentifier(state, FRAGMENT)
108105
: path.scope.hasBinding(name)

pnpm-lock.yaml

Lines changed: 8 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)