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 <sxzz@sxzz.moe>
This commit is contained in:
renovate[bot] 2024-05-25 14:39:09 +08:00 committed by GitHub
parent 3852069f00
commit 217b9229d6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 12 additions and 9 deletions

View File

@ -32,7 +32,7 @@
"@vue/babel-helper-vue-transform-on": "workspace:*", "@vue/babel-helper-vue-transform-on": "workspace:*",
"@vue/babel-plugin-resolve-type": "workspace:*", "@vue/babel-plugin-resolve-type": "workspace:*",
"camelcase": "^6.3.0", "camelcase": "^6.3.0",
"html-tags": "^3.3.1", "html-tags": "^4.0.0",
"svg-tags": "^1.0.0" "svg-tags": "^1.0.0"
}, },
"devDependencies": { "devDependencies": {

View File

@ -1,5 +1,5 @@
import * as t from '@babel/types'; import * as t from '@babel/types';
import htmlTags from 'html-tags'; import htmlTags, { type HtmlTags } from 'html-tags';
import svgTags from 'svg-tags'; import svgTags from 'svg-tags';
import { type NodePath } from '@babel/traverse'; import { type NodePath } from '@babel/traverse';
import type { State } from './interface'; import type { State } from './interface';
@ -60,7 +60,7 @@ export const checkIsComponent = (
return ( return (
!state.opts.isCustomElement?.(tag) && !state.opts.isCustomElement?.(tag) &&
shouldTransformedToSlots(tag) && shouldTransformedToSlots(tag) &&
!htmlTags.includes(tag as htmlTags.htmlTags) && !htmlTags.includes(tag as HtmlTags) &&
!svgTags.includes(tag) !svgTags.includes(tag)
); );
}; };
@ -99,10 +99,7 @@ export const getTag = (
const namePath = path.get('openingElement').get('name'); const namePath = path.get('openingElement').get('name');
if (namePath.isJSXIdentifier()) { if (namePath.isJSXIdentifier()) {
const { name } = namePath.node; const { name } = namePath.node;
if ( if (!htmlTags.includes(name as HtmlTags) && !svgTags.includes(name)) {
!htmlTags.includes(name as htmlTags.htmlTags) &&
!svgTags.includes(name)
) {
return name === FRAGMENT return name === FRAGMENT
? createIdentifier(state, FRAGMENT) ? createIdentifier(state, FRAGMENT)
: path.scope.hasBinding(name) : path.scope.hasBinding(name)

View File

@ -104,8 +104,8 @@ importers:
specifier: ^6.3.0 specifier: ^6.3.0
version: 6.3.0 version: 6.3.0
html-tags: html-tags:
specifier: ^3.3.1 specifier: ^4.0.0
version: 3.3.1 version: 4.0.0
svg-tags: svg-tags:
specifier: ^1.0.0 specifier: ^1.0.0
version: 1.0.0 version: 1.0.0
@ -2118,6 +2118,10 @@ packages:
resolution: {integrity: sha512-ztqyC3kLto0e9WbNp0aeP+M3kTt+nbaIveGmUxAtZa+8iFgKLUOD4YKM5j+f3QD89bra7UeumolZHKuOXnTmeQ==} resolution: {integrity: sha512-ztqyC3kLto0e9WbNp0aeP+M3kTt+nbaIveGmUxAtZa+8iFgKLUOD4YKM5j+f3QD89bra7UeumolZHKuOXnTmeQ==}
engines: {node: '>=8'} engines: {node: '>=8'}
html-tags@4.0.0:
resolution: {integrity: sha512-KM1SNmemQtsD+OTInZTYKZNbyPzzVrjMR2Iz1Np+Y+bcxUh0dgKF4NtylJVkGZRLe3NklHizJ5k1Vd3ug1uTPA==}
engines: {node: '>=18.20'}
http-proxy-agent@7.0.2: http-proxy-agent@7.0.2:
resolution: {integrity: sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==} resolution: {integrity: sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==}
engines: {node: '>= 14'} engines: {node: '>= 14'}
@ -5454,6 +5458,8 @@ snapshots:
html-tags@3.3.1: {} html-tags@3.3.1: {}
html-tags@4.0.0: {}
http-proxy-agent@7.0.2: http-proxy-agent@7.0.2:
dependencies: dependencies:
agent-base: 7.1.1 agent-base: 7.1.1