Skip to content

Commit

Permalink
revert: chore(deps): update dependency html-tags to v4 (#708)
Browse files Browse the repository at this point in the history
This reverts commit 217b922.
  • Loading branch information
sxzz committed Sep 6, 2024
1 parent 9ae4ecc commit 33305d0
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
1 change: 1 addition & 0 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@
enabled: false,
},
],
ignoreDeps: ['html-tags'],
}
2 changes: 1 addition & 1 deletion packages/babel-plugin-jsx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"@babel/types": "^7.25.6",
"@vue/babel-helper-vue-transform-on": "workspace:*",
"@vue/babel-plugin-resolve-type": "workspace:*",
"html-tags": "^4.0.0",
"html-tags": "^3.3.1",
"svg-tags": "^1.0.0"
},
"devDependencies": {
Expand Down
9 changes: 6 additions & 3 deletions packages/babel-plugin-jsx/src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as t from '@babel/types';
import htmlTags, { type HtmlTags } from 'html-tags';
import htmlTags from 'html-tags';
import svgTags from 'svg-tags';
import { type NodePath } from '@babel/traverse';
import type { State } from './interface';
Expand Down Expand Up @@ -60,7 +60,7 @@ export const checkIsComponent = (
return (
!state.opts.isCustomElement?.(tag) &&
shouldTransformedToSlots(tag) &&
!htmlTags.includes(tag as HtmlTags) &&
!htmlTags.includes(tag as htmlTags.htmlTags) &&
!svgTags.includes(tag)
);
};
Expand Down Expand Up @@ -99,7 +99,10 @@ export const getTag = (
const namePath = path.get('openingElement').get('name');
if (namePath.isJSXIdentifier()) {
const { name } = namePath.node;
if (!htmlTags.includes(name as HtmlTags) && !svgTags.includes(name)) {
if (
!htmlTags.includes(name as htmlTags.htmlTags) &&
!svgTags.includes(name)
) {
return name === FRAGMENT
? createIdentifier(state, FRAGMENT)
: path.scope.hasBinding(name)
Expand Down
10 changes: 2 additions & 8 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 33305d0

Please sign in to comment.