소스 검색

fix(build): revert entities to 4.5 to avoid runtime resolution errors

close #11603
Evan You 1 년 전
부모
커밋
e9e08155bf
6개의 변경된 파일10개의 추가작업 그리고 12개의 파일을 삭제
  1. 4 0
      .github/renovate.json5
  2. 1 1
      packages/compiler-core/package.json
  3. 1 1
      packages/compiler-core/src/parser.ts
  4. 1 1
      packages/compiler-core/src/tokenizer.ts
  5. 2 8
      pnpm-lock.yaml
  6. 1 1
      rollup.config.js

+ 4 - 0
.github/renovate.json5

@@ -58,5 +58,9 @@
     // pinned
     // only used in example for e2e tests
     'marked',
+
+    // pinned, 5.0+ has exports issues
+    // https://github.com/vuejs/core/issues/11603
+    'entities',
   ],
 }

+ 1 - 1
packages/compiler-core/package.json

@@ -48,7 +48,7 @@
   "dependencies": {
     "@babel/parser": "catalog:",
     "@vue/shared": "workspace:*",
-    "entities": "^5.0.0",
+    "entities": "^4.5.0",
     "estree-walker": "catalog:",
     "source-map-js": "catalog:"
   },

+ 1 - 1
packages/compiler-core/src/parser.ts

@@ -44,7 +44,7 @@ import {
   isSimpleIdentifier,
   isStaticArgOf,
 } from './utils'
-import { decodeHTML } from 'entities/dist/decode.js'
+import { decodeHTML } from 'entities/lib/decode.js'
 import {
   type ParserOptions as BabelOptions,
   parse,

+ 1 - 1
packages/compiler-core/src/tokenizer.ts

@@ -36,7 +36,7 @@ import {
   EntityDecoder,
   fromCodePoint,
   htmlDecodeTree,
-} from 'entities/dist/decode.js'
+} from 'entities/lib/decode.js'
 
 export enum ParseMode {
   BASE,

+ 2 - 8
pnpm-lock.yaml

@@ -256,8 +256,8 @@ importers:
         specifier: workspace:*
         version: link:../shared
       entities:
-        specifier: ^5.0.0
-        version: 5.0.0
+        specifier: ^4.5.0
+        version: 4.5.0
       estree-walker:
         specifier: 'catalog:'
         version: 2.0.2
@@ -1773,10 +1773,6 @@ packages:
     resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==}
     engines: {node: '>=0.12'}
 
-  entities@5.0.0:
-    resolution: {integrity: sha512-BeJFvFRJddxobhvEdm5GqHzRV/X+ACeuw0/BuuxsCh1EUZcAIz8+kYmBp/LrQuloy6K1f3a0M7+IhmZ7QnkISA==}
-    engines: {node: '>=0.12'}
-
   env-paths@2.2.1:
     resolution: {integrity: sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==}
     engines: {node: '>=6'}
@@ -4700,8 +4696,6 @@ snapshots:
 
   entities@4.5.0: {}
 
-  entities@5.0.0: {}
-
   env-paths@2.2.1: {}
 
   environment@1.1.0: {}

+ 1 - 1
rollup.config.js

@@ -258,7 +258,7 @@ function createConfig(format, output, plugins = []) {
       'source-map-js',
       '@babel/parser',
       'estree-walker',
-      'entities/dist/decode.js',
+      'entities/lib/decode.js',
     ]
 
     if (isGlobalBuild || isBrowserESMBuild || isCompatPackage) {