Skip to content

chore(deps): update dependency html-tags to v4 #708

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/babel-plugin-jsx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@vue/babel-helper-vue-transform-on": "workspace:*",
"@vue/babel-plugin-resolve-type": "workspace:*",
"camelcase": "^6.3.0",
"html-tags": "^3.3.1",
"html-tags": "^4.0.0",
"svg-tags": "^1.0.0"
},
"devDependencies": {
Expand Down
9 changes: 3 additions & 6 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 from 'html-tags';
import htmlTags, { type 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) &&
!htmlTags.includes(tag as HtmlTags) &&
!svgTags.includes(tag)
);
};
Expand Down Expand Up @@ -99,10 +99,7 @@ export const getTag = (
const namePath = path.get('openingElement').get('name');
if (namePath.isJSXIdentifier()) {
const { name } = namePath.node;
if (
!htmlTags.includes(name as htmlTags.htmlTags) &&
!svgTags.includes(name)
) {
if (!htmlTags.includes(name as HtmlTags) && !svgTags.includes(name)) {
return name === FRAGMENT
? createIdentifier(state, FRAGMENT)
: path.scope.hasBinding(name)
Expand Down
10 changes: 8 additions & 2 deletions pnpm-lock.yaml

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

Loading