From: Eduardo San Martin Morote Date: Fri, 17 Apr 2020 07:45:09 +0000 (+0200) Subject: chore: up vue X-Git-Tag: v4.0.0-alpha.6~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7636f556cd654fbdf49b494925628593e8383453;p=thirdparty%2Fvuejs%2Frouter.git chore: up vue Close #178,#179 --- diff --git a/__tests__/RouterView.spec.ts b/__tests__/RouterView.spec.ts index cc85f50f..8409fffe 100644 --- a/__tests__/RouterView.spec.ts +++ b/__tests__/RouterView.spec.ts @@ -4,7 +4,7 @@ import { View as RouterView } from '../src/components/View' import { components, RouteLocationNormalizedLoose } from './utils' import { START_LOCATION_NORMALIZED } from '../src/types' -import { markNonReactive } from 'vue' +import { markRaw } from 'vue' import { mount, createMockedRoute } from './mount' import { mockWarn } from 'jest-mock-warn' @@ -15,7 +15,7 @@ function createRoutes>( let nonReactiveRoutes: T = {} as T for (let key in routes) { - nonReactiveRoutes[key] = markNonReactive(routes[key]) + nonReactiveRoutes[key] = markRaw(routes[key]) } return nonReactiveRoutes diff --git a/__tests__/mount.ts b/__tests__/mount.ts index 2417b62e..6f8da1fc 100644 --- a/__tests__/mount.ts +++ b/__tests__/mount.ts @@ -10,7 +10,7 @@ import { ComponentObjectPropsOptions, ComputedRef, computed, - markNonReactive, + markRaw, App, ComponentOptionsWithProps, VNode, @@ -159,10 +159,10 @@ export function createMockedRoute(initialValue: RouteLocationNormalizedLoose) { > } - const routeRef = ref(markNonReactive(initialValue)) + const routeRef = ref(markRaw(initialValue)) function set(newRoute: RouteLocationNormalizedLoose) { - routeRef.value = markNonReactive(newRoute) + routeRef.value = markRaw(newRoute) return nextTick() } diff --git a/package.json b/package.json index b53f0173..429b2ff9 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ ] }, "peerDependencies": { - "vue": "^3.0.0-alpha.12" + "vue": "^3.0.0-beta.1" }, "devDependencies": { "@microsoft/api-documenter": "^7.7.18", @@ -55,10 +55,9 @@ "@rollup/plugin-replace": "^2.3.1", "@types/jest": "^25.1.3", "@types/jsdom": "^16.2.1", - "@types/node": "12", "@types/webpack": "^4.41.9", "@types/webpack-env": "^1.15.0", - "@vue/compiler-sfc": "3.0.0-alpha.13", + "@vue/compiler-sfc": "3.0.0-beta.1", "axios": "^0.19.2", "browserstack-local": "^1.4.5", "chalk": "^4.0.0", @@ -85,7 +84,7 @@ "ts-loader": "^6.2.2", "ts-node": "^8.8.1", "typescript": "^3.8.3", - "vue": "3.0.0-alpha.13", + "vue": "^3.0.0-beta.1", "vue-loader": "^16.0.0-alpha.3", "webpack": "^4.42.0", "webpack-cli": "^3.3.11", diff --git a/src/router.ts b/src/router.ts index f7f054d7..928b09ff 100644 --- a/src/router.ts +++ b/src/router.ts @@ -40,7 +40,7 @@ import { import { ref, Ref, - markNonReactive, + markRaw, nextTick, App, warn, @@ -422,7 +422,7 @@ export function createRouter({ } // accept current navigation - currentRoute.value = markNonReactive(toLocation) + currentRoute.value = markRaw(toLocation) // TODO: this doesn't work on first load. Moving it to RouterView could allow automatically handling transitions too maybe // TODO: refactor with a state getter const state = isPush || !isBrowser ? {} : window.history.state diff --git a/src/types/index.ts b/src/types/index.ts index 2d089b4d..778a9913 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -1,7 +1,7 @@ import { LocationQuery, LocationQueryRaw } from '../utils/query' import { PathParserOptions } from '../matcher/path-parser-ranker' import { - markNonReactive, + markRaw, ComponentOptions, ComponentPublicInstance, Ref, @@ -236,7 +236,7 @@ export type RouteRecordRaw = | RouteRecordMultipleViews | RouteRecordRedirectRaw -export const START_LOCATION_NORMALIZED: RouteLocationNormalizedLoaded = markNonReactive( +export const START_LOCATION_NORMALIZED: RouteLocationNormalizedLoaded = markRaw( { path: '/', name: undefined, diff --git a/yarn.lock b/yarn.lock index 4f163721..7271b99f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -736,11 +736,6 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.13.tgz#ccebcdb990bd6139cd16e84c39dc2fb1023ca90c" integrity sha512-pMCcqU2zT4TjqYFrWtYHKal7Sl30Ims6ulZ4UFXxI4xbtQqK/qqKwkDoBFCfooRqqmRu9vY3xaJRwxSh673aYg== -"@types/node@12": - version "12.12.35" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.35.tgz#1e61b226c14380f4384f70cfe49a65c2c553ad2b" - integrity sha512-ASYsaKecA7TUsDrqIGPNk3JeEox0z/0XR/WsJJ8BIX/9+SkMSImQXKWfU/yBrSyc7ZSE/NPqLu36Nur0miCFfQ== - "@types/parse-json@^4.0.0": version "4.0.0" resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0" @@ -835,34 +830,34 @@ dependencies: "@types/node" "*" -"@vue/compiler-core@3.0.0-alpha.13": - version "3.0.0-alpha.13" - resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.0.0-alpha.13.tgz#8126c92f562af047c28c4ce7f343d77f0ceea7d7" - integrity sha512-k7VTQnjQlCfsSdfwi867dUHUzqm5/2qldikWAABMlaqr4mEn+yVCla7JqQxFGZta/JF8cOv/GfqlA/vWBlYh7A== +"@vue/compiler-core@3.0.0-beta.1": + version "3.0.0-beta.1" + resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.0.0-beta.1.tgz#77017e0a98b808da3834327bcf8857e4b89363ef" + integrity sha512-mlHfX/+3qH+GAuMbGFvye0Jn2/H9IwbmX6oqbpLErM241xAVbpqniFDiJCywrfjeUDKMfDuNs1i6lGnDBH715g== dependencies: "@babel/parser" "^7.8.6" "@babel/types" "^7.8.6" - "@vue/shared" "3.0.0-alpha.13" + "@vue/shared" "3.0.0-beta.1" estree-walker "^0.8.1" source-map "^0.6.1" -"@vue/compiler-dom@3.0.0-alpha.13": - version "3.0.0-alpha.13" - resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.0.0-alpha.13.tgz#b1930ebbe770dbed543dbe7ac88f2955719051f2" - integrity sha512-g5FnVAx+HLUox3N+XHKIZTpMJeJu5Uj0JNf8X4s5Td5zFcWG+KJGUHz8qU9H0unrPc01uiT/VfhYErhFcRdVKg== +"@vue/compiler-dom@3.0.0-beta.1": + version "3.0.0-beta.1" + resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.0.0-beta.1.tgz#eabd8279e5433214e613558561f59e05a01ef450" + integrity sha512-Tp3Y2sT014B0Z3VpdWLwAv8o6kNPZOwFFMI2aAgIBmG3KWPGXUxm2LDRrNZWPoOPYPWYjRMBri1cNy3gA2MeCA== dependencies: - "@vue/compiler-core" "3.0.0-alpha.13" - "@vue/shared" "3.0.0-alpha.13" + "@vue/compiler-core" "3.0.0-beta.1" + "@vue/shared" "3.0.0-beta.1" -"@vue/compiler-sfc@3.0.0-alpha.13": - version "3.0.0-alpha.13" - resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.0.0-alpha.13.tgz#075921331a01ab483e71e3b33bf4238c0c35a449" - integrity sha512-koU+iNgyleTBRphI/XZ4V1UxveQC4ILniOXFVRNTHBCzSzfFI+Dd5lHMr3BDOABnb1EuUZeC/hAz6tc4U0qzEw== +"@vue/compiler-sfc@3.0.0-beta.1": + version "3.0.0-beta.1" + resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.0.0-beta.1.tgz#1d1ae5e2d2ba83f5234d4b2f84e4ba4bd5741c27" + integrity sha512-Dv+cKKGMwGOpDzE9UuWe/jCerIdDxwd0CAtxgF2XrXULxNeHGSedmx7m2fkPLSKqqDfHtbPZuU55jWp4axL6wA== dependencies: - "@vue/compiler-core" "3.0.0-alpha.13" - "@vue/compiler-dom" "3.0.0-alpha.13" - "@vue/compiler-ssr" "3.0.0-alpha.13" - "@vue/shared" "3.0.0-alpha.13" + "@vue/compiler-core" "3.0.0-beta.1" + "@vue/compiler-dom" "3.0.0-beta.1" + "@vue/compiler-ssr" "3.0.0-beta.1" + "@vue/shared" "3.0.0-beta.1" consolidate "^0.15.1" hash-sum "^2.0.0" lru-cache "^5.1.1" @@ -871,42 +866,42 @@ postcss-selector-parser "^6.0.2" source-map "^0.6.1" -"@vue/compiler-ssr@3.0.0-alpha.13": - version "3.0.0-alpha.13" - resolved "https://registry.yarnpkg.com/@vue/compiler-ssr/-/compiler-ssr-3.0.0-alpha.13.tgz#9d8955b1af20c819bc2e4c336d4987ce36f92f15" - integrity sha512-K3+PQKKQGQNdlqLpAah7s5jRlE5sDCkhc54PM7XK7F9yjyzWFWApaMEZjJrqYWjjYFgLkTXzgd8CdV72vMy7HQ== +"@vue/compiler-ssr@3.0.0-beta.1": + version "3.0.0-beta.1" + resolved "https://registry.yarnpkg.com/@vue/compiler-ssr/-/compiler-ssr-3.0.0-beta.1.tgz#e0cfde96de4d41809d59102e7f1f0f860e731cde" + integrity sha512-vO4r0/P3G/LfLgJGKrMh9MD1wExCajrAE5nNlqAkWduIYY+4fegF7UyO67dU+ji1YShxrPfDYJ8vcSb4XTKXxQ== dependencies: - "@vue/compiler-dom" "3.0.0-alpha.13" - "@vue/shared" "3.0.0-alpha.13" + "@vue/compiler-dom" "3.0.0-beta.1" + "@vue/shared" "3.0.0-beta.1" -"@vue/reactivity@3.0.0-alpha.13": - version "3.0.0-alpha.13" - resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.0.0-alpha.13.tgz#032fbfd1b9c50153e2f37fc99ae63b460377387a" - integrity sha512-ICzFWsxQAyPDW8O9SGJ++tYXRHOUBTh1/qKZsIEOTQEI1Rt0O9EOOXA3NGlGmSS2U0EXO0Usfcvn9EoHRwFBHw== +"@vue/reactivity@3.0.0-beta.1": + version "3.0.0-beta.1" + resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.0.0-beta.1.tgz#b4899fe95efbc8ed15343f9d67950f2a33e219dc" + integrity sha512-XbitRfUKIAgPO0IXEbi9/mq93xOL5CGRjaTPH2DvvTU0hXlAeW8aMPQe3+R+vvXppBiFERY3yjZjQc5SYkZVsg== dependencies: - "@vue/shared" "3.0.0-alpha.13" + "@vue/shared" "3.0.0-beta.1" -"@vue/runtime-core@3.0.0-alpha.13": - version "3.0.0-alpha.13" - resolved "https://registry.yarnpkg.com/@vue/runtime-core/-/runtime-core-3.0.0-alpha.13.tgz#2430fc835399924c206d113e6f6acaa921707a3f" - integrity sha512-bo6hQQN0qfo7zWaSdegTa2eU7yXEK4v3noLyHmWhCbIzrKPa0pauGU1nBnXOlTgM8bkL8i8+rvMB0YwEJkhLMw== +"@vue/runtime-core@3.0.0-beta.1": + version "3.0.0-beta.1" + resolved "https://registry.yarnpkg.com/@vue/runtime-core/-/runtime-core-3.0.0-beta.1.tgz#a3d97183dd5bc022fc02b9a86180698dc11a2e65" + integrity sha512-eNHHGT17i2dOtAQpmn8QRDAcVGS4TiCyjGW+v6GfSlHvip1fFUmawD9pLSPVdL3DngGm9SmioOVmBK2CB8JG0g== dependencies: - "@vue/reactivity" "3.0.0-alpha.13" - "@vue/shared" "3.0.0-alpha.13" + "@vue/reactivity" "3.0.0-beta.1" + "@vue/shared" "3.0.0-beta.1" -"@vue/runtime-dom@3.0.0-alpha.13": - version "3.0.0-alpha.13" - resolved "https://registry.yarnpkg.com/@vue/runtime-dom/-/runtime-dom-3.0.0-alpha.13.tgz#de33f7ae9035877ede1bee27e5c28108f1eea86a" - integrity sha512-fnz1QZhLxodrDFSvtTwP84xGo6yrzEoC1k7LFh0mnOu6Mw3r4WkVhD8xeh3A/oPJ3jM22cIe8SL5UJqLeltQyw== +"@vue/runtime-dom@3.0.0-beta.1": + version "3.0.0-beta.1" + resolved "https://registry.yarnpkg.com/@vue/runtime-dom/-/runtime-dom-3.0.0-beta.1.tgz#f93565cccdc0a1d2f419836d5468989a7a868c66" + integrity sha512-+dnJS7582V6iZLm8YqsXjabL1eXo3n8ltzxWZlI/nV1ZPSWKQJpvB6ICbdRjwOlka4lukYStca3ZsrYQI7SvVg== dependencies: - "@vue/runtime-core" "3.0.0-alpha.13" - "@vue/shared" "3.0.0-alpha.13" + "@vue/runtime-core" "3.0.0-beta.1" + "@vue/shared" "3.0.0-beta.1" csstype "^2.6.8" -"@vue/shared@3.0.0-alpha.13": - version "3.0.0-alpha.13" - resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.0.0-alpha.13.tgz#7d9bcf763c77bd9e10bbb6a27577af7f0ad853c4" - integrity sha512-j3co+5x0DNZXQzS3drvWaRwQVFltkY4fQHdegfVIofhXZc/PrHP4E+PE3U8GxeqrU6DSjO+4YpY4aVGRUjbgpw== +"@vue/shared@3.0.0-beta.1": + version "3.0.0-beta.1" + resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.0.0-beta.1.tgz#234185d345cde7e05db569e653feae87912bf218" + integrity sha512-LehYUPtykdL3ZEUto2W1n26k+opBT1gtFdESPtp4lGo9oIreLl3pJVoUPIkY/Kk/mOZGmBOsYXiLZGJvfmGEQw== "@webassemblyjs/ast@1.9.0": version "1.9.0" @@ -8985,14 +8980,14 @@ vue-loader@^16.0.0-alpha.3: merge-source-map "^1.1.0" source-map "^0.6.1" -vue@3.0.0-alpha.13: - version "3.0.0-alpha.13" - resolved "https://registry.yarnpkg.com/vue/-/vue-3.0.0-alpha.13.tgz#a0428ec5494841f2f3564b47a17c550645b8f442" - integrity sha512-U7Lq60IJojWAUqn7n43F0TqfcQdjYOgQ2OTQuz7wvcfStJ+LxNFOd8/qX5MuJCG/f/7gmOMda1+U/CEa6NEEIg== +vue@^3.0.0-beta.1: + version "3.0.0-beta.1" + resolved "https://registry.yarnpkg.com/vue/-/vue-3.0.0-beta.1.tgz#86a4b8431ab4b7523487cad4ec0d7235fead22dc" + integrity sha512-Z5SFtxSQNYwtyfMWxAiJYoumOwRnRdha6opDaRy8f4jhJAGn9tpi2muJLxE4m6QZ9UqjnHghUC3VjxzXfofQTQ== dependencies: - "@vue/compiler-dom" "3.0.0-alpha.13" - "@vue/runtime-dom" "3.0.0-alpha.13" - "@vue/shared" "3.0.0-alpha.13" + "@vue/compiler-dom" "3.0.0-beta.1" + "@vue/runtime-dom" "3.0.0-beta.1" + "@vue/shared" "3.0.0-beta.1" w3c-hr-time@^1.0.1: version "1.0.2"