diff --git a/CHANGELOG.md b/CHANGELOG.md index 4459128d..0f176415 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +## [2.8.2](https://github.com/nativescript-vue/nativescript-vue/compare/v2.8.1...v2.8.2) (2020-11-21) + + +### Bug Fixes + +* once event modifier ([#752](https://github.com/nativescript-vue/nativescript-vue/issues/752)) ([2a1b06f](https://github.com/nativescript-vue/nativescript-vue/commit/2a1b06fc29f1289dae33170c5b706f94c96da328)), closes [#748](https://github.com/nativescript-vue/nativescript-vue/issues/748) +* wrong import for getCssFileName ([#738](https://github.com/nativescript-vue/nativescript-vue/issues/738)) ([f1110f1](https://github.com/nativescript-vue/nativescript-vue/commit/f1110f14f3dca664c6789e4d2cbb61dbaba3ea5d)) + + + ## [2.8.1](https://github.com/nativescript-vue/nativescript-vue/compare/v2.8.0...v2.8.1) (2020-09-03) diff --git a/package.json b/package.json index 93b45652..38a288ec 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nativescript-vue", - "version": "2.8.2", + "version": "2.8.3", "description": "NativeScript and Vue integration", "main": "dist/index.js", "files": [ @@ -12,6 +12,7 @@ ], "typings": "index.d.ts", "scripts": { + "prepare": "patch-package", "test": "jest", "tdd": "jest --watch", "dev": "npm run dev:core -- -w & npm run dev:compiler -- -w", @@ -73,6 +74,7 @@ "jest": "26.6.3", "jest-junit": "12.0.0", "lint-staged": "10.5.1", + "patch-package": "^6.2.2", "prettier": "2.2.0", "rollup": "^2.33.3", "rollup-plugin-flow-no-whitespace": "1.0.0", diff --git a/packages/nativescript-vue-template-compiler/package.json b/packages/nativescript-vue-template-compiler/package.json index c24c2807..fdb95690 100644 --- a/packages/nativescript-vue-template-compiler/package.json +++ b/packages/nativescript-vue-template-compiler/package.json @@ -1,6 +1,6 @@ { "name": "nativescript-vue-template-compiler", - "version": "2.8.2", + "version": "2.8.3", "description": "template compiler for nativescript-vue", "main": "index.js", "repository": { diff --git a/patches/vue+2.6.12.patch b/patches/vue+2.6.12.patch new file mode 100644 index 00000000..4271c76f --- /dev/null +++ b/patches/vue+2.6.12.patch @@ -0,0 +1,13 @@ +diff --git a/node_modules/vue/src/core/util/next-tick.js b/node_modules/vue/src/core/util/next-tick.js +index 2efb9a9..a0dea42 100644 +--- a/node_modules/vue/src/core/util/next-tick.js ++++ b/node_modules/vue/src/core/util/next-tick.js +@@ -10,7 +10,7 @@ export let isUsingMicroTask = false + const callbacks = [] + let pending = false + +-function flushCallbacks () { ++export function flushCallbacks () { + pending = false + const copies = callbacks.slice(0) + callbacks.length = 0 diff --git a/platform/nativescript/runtime/components/v-template.js b/platform/nativescript/runtime/components/v-template.js index 17be38f6..23f5b294 100644 --- a/platform/nativescript/runtime/components/v-template.js +++ b/platform/nativescript/runtime/components/v-template.js @@ -1,4 +1,5 @@ import { patch } from '../patch' +import { flushCallbacks } from 'core/util/next-tick' export const VUE_VIEW = '__vueVNodeRef__' @@ -78,6 +79,10 @@ export class TemplateBag { const nativeView = patch(oldVnode, vnode).nativeView nativeView[VUE_VIEW] = vnode + // force flush Vue callbacks so all changes are applied immediately + // rather than on next tick + flushCallbacks() + return nativeView } diff --git a/platform/nativescript/runtime/index.js b/platform/nativescript/runtime/index.js index b74faa39..abc00149 100644 --- a/platform/nativescript/runtime/index.js +++ b/platform/nativescript/runtime/index.js @@ -1,6 +1,7 @@ import { Application } from '@nativescript/core' import { warn } from 'core/util/index' import { patch } from './patch' +import { flushCallbacks } from 'core/util/next-tick' import { mountComponent } from 'core/instance/lifecycle' import { compileToFunctions } from '../compiler/index' import { mustUseProp, isReservedTag, isUnknownElement } from '../util/index' @@ -16,6 +17,9 @@ Vue.config.isUnknownElement = isUnknownElement Vue.$document = Vue.prototype.$document = new DocumentNode() +// Exposed for advanced uses only, not public API +Vue.__flushCallbacks__ = flushCallbacks + Vue.compile = compileToFunctions Vue.registerElement = registerElement diff --git a/samples/yarn.lock b/samples/yarn.lock index 22c1b417..16ac0dc2 100644 --- a/samples/yarn.lock +++ b/samples/yarn.lock @@ -2577,9 +2577,9 @@ electron@^7.0.0: extract-zip "^1.0.3" elliptic@^6.0.0, elliptic@^6.5.2: - version "6.5.2" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.2.tgz#05c5678d7173c049d8ca433552224a495d0e3762" - integrity sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw== + version "6.5.3" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.3.tgz#cb59eb2efdaf73a0bd78ccd7015a62ad6e0f93d6" + integrity sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw== dependencies: bn.js "^4.4.0" brorand "^1.0.1" diff --git a/yarn.lock b/yarn.lock index 11cdf392..b0e90ff6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1429,7 +1429,7 @@ reduce-css-calc "^2.1.7" tslib "~2.0.0" -"@nativescript/hook@2.0.0", "@nativescript/hook@~2.0.0": +"@nativescript/hook@~2.0.0": version "2.0.0" resolved "https://registry.yarnpkg.com/@nativescript/hook/-/hook-2.0.0.tgz#dbc17777d08c657efc77e263dc1ba1896d9c77b5" integrity sha512-v3Hj3Zpd69sQJfFpDNXonV0EjO1a2OL4l48wlo1Ycsqk4r7RY822d/irFTjt0LllRG0OcdEGgfG6wKb0YgPyHw== @@ -1666,6 +1666,11 @@ dependencies: "@types/yargs-parser" "*" +"@yarnpkg/lockfile@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz#e77a97fbd345b76d83245edcd17d393b1b41fb31" + integrity sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ== + JSONStream@^1.0.4: version "1.3.5" resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0" @@ -2663,7 +2668,7 @@ cosmiconfig@^7.0.0: path-type "^4.0.0" yaml "^1.10.0" -cross-spawn@^6.0.0: +cross-spawn@^6.0.0, cross-spawn@^6.0.5: version "6.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== @@ -3258,6 +3263,14 @@ find-versions@^3.2.0: dependencies: semver-regex "^2.0.0" +find-yarn-workspace-root@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/find-yarn-workspace-root/-/find-yarn-workspace-root-1.2.1.tgz#40eb8e6e7c2502ddfaa2577c176f221422f860db" + integrity sha512-dVtfb0WuQG+8Ag2uWkbG79hOUzEsRrhBzgfn86g2sJPkzmcpGdghbNTfUKGTxymFrY/tLIodDzLoW9nOJ4FY8Q== + dependencies: + fs-extra "^4.0.3" + micromatch "^3.1.4" + findup-sync@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-3.0.0.tgz#17b108f9ee512dfb7a5c7f3c8b27ea9e1a9c08d1" @@ -3311,6 +3324,24 @@ fs-extra@8.1.0: jsonfile "^4.0.0" universalify "^0.1.0" +fs-extra@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.3.tgz#0d852122e5bc5beb453fb028e9c0c9bf36340c94" + integrity sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg== + dependencies: + graceful-fs "^4.1.2" + jsonfile "^4.0.0" + universalify "^0.1.0" + +fs-extra@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" + integrity sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw== + dependencies: + graceful-fs "^4.1.2" + jsonfile "^4.0.0" + universalify "^0.1.0" + fs-extra@^9.0.0: version "9.0.1" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.0.1.tgz#910da0062437ba4c39fedd863f1675ccfefcb9fc" @@ -3499,7 +3530,7 @@ globals@^11.1.0: resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== -graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4: +graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4: version "4.2.4" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== @@ -4603,6 +4634,13 @@ kind-of@^6.0.0, kind-of@^6.0.2, kind-of@^6.0.3: resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== +klaw-sync@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/klaw-sync/-/klaw-sync-6.0.0.tgz#1fd2cfd56ebb6250181114f0a581167099c2b28c" + integrity sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ== + dependencies: + graceful-fs "^4.1.11" + kleur@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" @@ -5376,6 +5414,24 @@ pascalcase@^0.1.1: resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= +patch-package@^6.2.2: + version "6.2.2" + resolved "https://registry.yarnpkg.com/patch-package/-/patch-package-6.2.2.tgz#71d170d650c65c26556f0d0fbbb48d92b6cc5f39" + integrity sha512-YqScVYkVcClUY0v8fF0kWOjDYopzIM8e3bj/RU1DPeEF14+dCGm6UeOYm4jvCyxqIEQ5/eJzmbWfDWnUleFNMg== + dependencies: + "@yarnpkg/lockfile" "^1.1.0" + chalk "^2.4.2" + cross-spawn "^6.0.5" + find-yarn-workspace-root "^1.2.1" + fs-extra "^7.0.1" + is-ci "^2.0.0" + klaw-sync "^6.0.0" + minimist "^1.2.0" + rimraf "^2.6.3" + semver "^5.6.0" + slash "^2.0.0" + tmp "^0.0.33" + path-exists@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" @@ -5930,6 +5986,13 @@ ret@~0.1.10: resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== +rimraf@^2.6.3: + version "2.7.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" + integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== + dependencies: + glob "^7.1.3" + rimraf@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" @@ -6052,7 +6115,7 @@ semver-regex@^2.0.0: resolved "https://registry.yarnpkg.com/semver-regex/-/semver-regex-2.0.0.tgz#a93c2c5844539a770233379107b38c7b4ac9d338" integrity sha512-mUdIBBvdn0PLOeP3TEkMH7HHeUP3GjsXCwKarjv/kGmUFOYg1VqEemKhoQpWMu6X2I8kHeuVdGibLGkVK+/5Qw== -"semver@2 || 3 || 4 || 5", semver@^5.4.1, semver@^5.5.0: +"semver@2 || 3 || 4 || 5", semver@^5.4.1, semver@^5.5.0, semver@^5.6.0: version "5.7.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== @@ -6142,6 +6205,11 @@ sisteransi@^1.0.4: resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed" integrity sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg== +slash@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-2.0.0.tgz#de552851a1759df3a8f206535442f5ec4ddeab44" + integrity sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A== + slash@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634"