diff --git a/.vitepress/config.ts b/.vitepress/config.ts index f73de238cd..d5a36ccc03 100644 --- a/.vitepress/config.ts +++ b/.vitepress/config.ts @@ -17,6 +17,7 @@ const nav: ThemeConfig['nav'] = [ { text: 'Quick Start', link: '/guide/quick-start' }, // { text: 'Style Guide', link: '/style-guide/' }, { text: 'Glossary', link: '/glossary/' }, + { text: 'Error Reference', link: '/errors/' }, { text: 'Vue 2 Docs', link: 'https://v2.vuejs.org' @@ -695,7 +696,7 @@ export default defineConfigWithTheme({ markdown: { config(md) { md.use(headerPlugin) - // .use(textAdPlugin) + // .use(textAdPlugin) } }, diff --git a/package.json b/package.json index 38ef23fca2..7c2ace399a 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,8 @@ "devDependencies": { "@types/markdown-it": "^12.2.3", "@types/node": "^16.9.1", + "@vue/compiler-core": "npm:@vue/compiler-core-canary@minor", + "@vue/runtime-core": "npm:@vue/runtime-core-canary@minor", "terser": "^5.14.2" }, "pnpm": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index dbfa4c9221..553a79d16d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -31,6 +31,12 @@ devDependencies: '@types/node': specifier: ^16.9.1 version: 16.9.1 + '@vue/compiler-core': + specifier: npm:@vue/compiler-core-canary@minor + version: /@vue/compiler-core-canary@3.20231001.0-minor.0 + '@vue/runtime-core': + specifier: npm:@vue/runtime-core-canary@minor + version: /@vue/runtime-core-canary@3.20231001.0-minor.0 terser: specifier: ^5.14.2 version: 5.14.2 @@ -180,20 +186,17 @@ packages: /@babel/helper-string-parser@7.22.5: resolution: {integrity: sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==} engines: {node: '>=6.9.0'} - dev: false /@babel/helper-validator-identifier@7.22.5: resolution: {integrity: sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==} engines: {node: '>=6.9.0'} - dev: false - /@babel/parser@7.22.7: - resolution: {integrity: sha512-7NF8pOkHP5o2vpmGgNGcfAeCvOYhGLyA3Z4eBQkT1RJlWu47n63bCs93QfJ2hIAFCil7L5P2IWhs1oToVgrL0Q==} + /@babel/parser@7.23.0: + resolution: {integrity: sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==} engines: {node: '>=6.0.0'} hasBin: true dependencies: '@babel/types': 7.22.5 - dev: false /@babel/types@7.22.5: resolution: {integrity: sha512-zo3MIHGOkPOfoRXitsgHLjEXmlDaD/5KU1Uzuc9GNiZPhSqVxVRtxuPaSBZDsYZ9qV88AjtMtWW7ww98loJ9KA==} @@ -202,7 +205,6 @@ packages: '@babel/helper-string-parser': 7.22.5 '@babel/helper-validator-identifier': 7.22.5 to-fast-properties: 2.0.0 - dev: false /@docsearch/css@3.5.1: resolution: {integrity: sha512-2Pu9HDg/uP/IT10rbQ+4OrTQuxIWdKVUEdcw9/w7kZJv9NeHS6skJx1xuRiFyoGKwAzcHXnLp7csE99sj+O1YA==} @@ -513,10 +515,19 @@ packages: vue: 3.3.4 dev: false + /@vue/compiler-core-canary@3.20231001.0-minor.0: + resolution: {integrity: sha512-aZVWq/um0ZdXQeht/FLdERrQ+EaL4E0wukwzB2s5TnncMDAFHvIXJuXPUYA7RnP2NCecM2A4kmW9w8c9n26+Aw==} + dependencies: + '@babel/parser': 7.23.0 + '@vue/shared': /@vue/shared-canary@3.20231001.0-minor.0 + estree-walker: 2.0.2 + source-map-js: 1.0.2 + dev: true + /@vue/compiler-core@3.3.4: resolution: {integrity: sha512-cquyDNvZ6jTbf/+x+AgM2Arrp6G4Dzbb0R64jiG804HRMfRiFXWI6kqUVqZ6ZR0bQhIoQjB4+2bhNtVwndW15g==} dependencies: - '@babel/parser': 7.22.7 + '@babel/parser': 7.23.0 '@vue/shared': 3.3.4 estree-walker: 2.0.2 source-map-js: 1.0.2 @@ -532,15 +543,15 @@ packages: /@vue/compiler-sfc@3.3.4: resolution: {integrity: sha512-6y/d8uw+5TkCuzBkgLS0v3lSM3hJDntFEiUORM11pQ/hKvkhSKZrXW6i69UyXlJQisJxuUEJKAWEqWbWsLeNKQ==} dependencies: - '@babel/parser': 7.22.7 + '@babel/parser': 7.23.0 '@vue/compiler-core': 3.3.4 '@vue/compiler-dom': 3.3.4 '@vue/compiler-ssr': 3.3.4 '@vue/reactivity-transform': 3.3.4 '@vue/shared': 3.3.4 estree-walker: 2.0.2 - magic-string: 0.30.2 - postcss: 8.4.27 + magic-string: 0.30.3 + postcss: 8.4.30 source-map-js: 1.0.2 dev: false @@ -555,14 +566,20 @@ packages: resolution: {integrity: sha512-o9KfBeaBmCKl10usN4crU53fYtC1r7jJwdGKjPT24t348rHxgfpZ0xL3Xm/gLUYnc0oTp8LAmrxOeLyu6tbk2Q==} dev: false + /@vue/reactivity-canary@3.20231001.0-minor.0: + resolution: {integrity: sha512-OU2aKwn+JRt2X4dPS8YE+GgnO4bM1/3u1Qi9FNqbJhxb1h+D5kQZCjPhRbgpXnF7ubj/kZ1iPiR4174Addl7yg==} + dependencies: + '@vue/shared': /@vue/shared-canary@3.20231001.0-minor.0 + dev: true + /@vue/reactivity-transform@3.3.4: resolution: {integrity: sha512-MXgwjako4nu5WFLAjpBnCj/ieqcjE2aJBINUNQzkZQfzIZA4xn+0fV1tIYBJvvva3N3OvKGofRLvQIwEQPpaXw==} dependencies: - '@babel/parser': 7.22.7 + '@babel/parser': 7.23.0 '@vue/compiler-core': 3.3.4 '@vue/shared': 3.3.4 estree-walker: 2.0.2 - magic-string: 0.30.2 + magic-string: 0.30.3 dev: false /@vue/reactivity@3.3.4: @@ -579,6 +596,13 @@ packages: vue: 3.3.4 dev: false + /@vue/runtime-core-canary@3.20231001.0-minor.0: + resolution: {integrity: sha512-blMJ/1Gwkw+4oocWOHQmtrVZ6ktcVX0jSrrj6+4DpXoH/9dlV4MqDigdeKW2pvbYmMstjpw1DSC4ygJ+0wQVgQ==} + dependencies: + '@vue/reactivity': /@vue/reactivity-canary@3.20231001.0-minor.0 + '@vue/shared': /@vue/shared-canary@3.20231001.0-minor.0 + dev: true + /@vue/runtime-core@3.3.4: resolution: {integrity: sha512-R+bqxMN6pWO7zGI4OMlmvePOdP2c93GsHFM/siJI7O2nxFRzj55pLwkpCedEY+bTMgp5miZ8CxfIZo3S+gFqvA==} dependencies: @@ -604,6 +628,10 @@ packages: vue: 3.3.4 dev: false + /@vue/shared-canary@3.20231001.0-minor.0: + resolution: {integrity: sha512-dzYL5X5giyIeBzXP7jKyJ0DP9dxKX2qQAklT3fq6KO23V1+fFvUfV/9LZtIXD8dddHU55nWmSdgh429Pxgx1xQ==} + dev: true + /@vue/shared@3.3.4: resolution: {integrity: sha512-7OjdcV8vQ74eiz1TZLzZP4JwqM5fA94K6yntPS5Z25r9HDuGNzaGdgvwKYq6S+MxwF0TFRwe50fIR/MYnakdkQ==} dev: false @@ -811,7 +839,6 @@ packages: /estree-walker@2.0.2: resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} - dev: false /focus-trap@7.5.2: resolution: {integrity: sha512-p6vGNNWLDGwJCiEjkSK6oERj/hEyI9ITsSwIUICBoKLlWiTWXJRfQibCwcoi50rTZdbi87qDtUlMCmQwsGSgPw==} @@ -819,8 +846,8 @@ packages: tabbable: 6.2.0 dev: false - /fsevents@2.3.2: - resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} + /fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin] requiresBuild: true @@ -835,8 +862,8 @@ packages: resolution: {integrity: sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==} dev: false - /magic-string@0.30.2: - resolution: {integrity: sha512-lNZdu7pewtq/ZvWUp9Wpf/x7WzMTsR26TWV03BRZrXFsv+BI6dy8RAiKgm1uM/kyR0rCfUcqvOlXKG66KhIGug==} + /magic-string@0.30.3: + resolution: {integrity: sha512-B7xGbll2fG/VjP+SWg4sX3JynwIU0mjoTc6MPpKNuIvftk6u6vqhDnk1R80b8C2GBR6ywqy+1DcKBrevBg+bmw==} engines: {node: '>=12'} dependencies: '@jridgewell/sourcemap-codec': 1.4.15 @@ -864,8 +891,8 @@ packages: resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} dev: false - /postcss@8.4.27: - resolution: {integrity: sha512-gY/ACJtJPSmUFPDCHtX78+01fHa64FaU4zaaWfuh1MhGJISufJAH4cun6k/8fwsHYeK4UQmENQK+tRLCFJE8JQ==} + /postcss@8.4.30: + resolution: {integrity: sha512-7ZEao1g4kd68l97aWG/etQKPKq07us0ieSZ2TnFDk11i0ZfDW2AwKHYU8qv4MZKqN2fdBfg+7q0ES06UA73C1g==} engines: {node: ^10 || ^12 || >=14} dependencies: nanoid: 3.3.6 @@ -882,7 +909,7 @@ packages: engines: {node: '>=14.18.0', npm: '>=8.0.0'} hasBin: true optionalDependencies: - fsevents: 2.3.2 + fsevents: 2.3.3 dev: false /shiki@0.14.3: @@ -897,7 +924,6 @@ packages: /source-map-js@1.0.2: resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} engines: {node: '>=0.10.0'} - dev: false /source-map-support@0.5.21: resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} @@ -926,7 +952,6 @@ packages: /to-fast-properties@2.0.0: resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} engines: {node: '>=4'} - dev: false /vite@4.4.8(@types/node@16.9.1)(terser@5.14.2): resolution: {integrity: sha512-LONawOUUjxQridNWGQlNizfKH89qPigK36XhMI7COMGztz8KNY0JHim7/xDd71CZwGT4HtSRgI7Hy+RlhG0Gvg==} @@ -958,11 +983,11 @@ packages: dependencies: '@types/node': 16.9.1 esbuild: 0.18.17 - postcss: 8.4.27 + postcss: 8.4.30 rollup: 3.27.0 terser: 5.14.2 optionalDependencies: - fsevents: 2.3.2 + fsevents: 2.3.3 dev: false /vitepress@1.0.0-beta.7(@types/node@16.9.1)(terser@5.14.2): diff --git a/src/errors/ErrorsTable.vue b/src/errors/ErrorsTable.vue new file mode 100644 index 0000000000..b278c1a9fe --- /dev/null +++ b/src/errors/ErrorsTable.vue @@ -0,0 +1,34 @@ + + + + + diff --git a/src/errors/errors.data.ts b/src/errors/errors.data.ts new file mode 100644 index 0000000000..98eddc4421 --- /dev/null +++ b/src/errors/errors.data.ts @@ -0,0 +1,17 @@ +import { defineLoader } from 'vitepress' +import { errorMessages } from '@vue/compiler-core' +// @ts-expect-error internal api +import { ErrorTypeStrings } from '@vue/runtime-core/dist/runtime-core.cjs.js' + +function filterEmptyMsg(data: Record) { + return Object.fromEntries(Object.entries(data).filter(([_, msg]) => msg)) +} + +export default defineLoader({ + load() { + return { + compiler: filterEmptyMsg(errorMessages), + runtime: filterEmptyMsg(ErrorTypeStrings) + } + } +}) diff --git a/src/errors/index.md b/src/errors/index.md new file mode 100644 index 0000000000..cefd09c31e --- /dev/null +++ b/src/errors/index.md @@ -0,0 +1,20 @@ + + +# Error Reference {#error-reference} + +## Runtime Errors {#runtime-errors} + + + +## Compiler Errors {#compiler-errors} + +