Skip to content

Commit afd9cee

Browse files
committed
chore: bump deps
1 parent dbfd965 commit afd9cee

File tree

19 files changed

+1472
-1544
lines changed

19 files changed

+1472
-1544
lines changed

apps/demo/app/components/App.vue

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
<script setup lang="ts">
2+
// import type { INSVElement } from 'nativescript-vue'
23
import { ref } from 'nativescript-vue'
3-
import type { INSVElement } from 'nativescript-vue'
4+
import { dumpViewTree } from '~/utils/dumpViewTree'
45
import HelloWorld from './HelloWorld.vue'
56
6-
const stackLayout = ref<INSVElement>()
7+
const stackLayout = ref()
78
const showThing = ref(false)
89
910
function toggleThing() {
1011
showThing.value = !showThing.value
1112
1213
console.log(stackLayout.value!.nativeView)
14+
console.log(dumpViewTree(stackLayout.value!))
1315
}
1416
</script>
1517

apps/demo/app/utils/dumpViewTree.js

-11
This file was deleted.

apps/demo/app/utils/dumpViewTree.ts

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { INSVElement, INSVNode } from 'nativescript-vue'
2+
3+
export function dumpViewTree(root: INSVNode) {
4+
const mapNode: any = (node: INSVNode | INSVElement) => {
5+
const type = 'tagName' in node ? node.tagName : node.nodeType
6+
return {
7+
id: node.nodeId,
8+
type,
9+
text: node.text,
10+
children: node.childNodes.map(mapNode),
11+
}
12+
}
13+
14+
return root.childNodes.map(mapNode)
15+
}

apps/demo/package.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@
44
"main": "app/main.ts",
55
"private": true,
66
"dependencies": {
7-
"@nativescript/core": "~8.1.5",
7+
"@nativescript/core": "~8.2.2",
88
"nativescript-vue": "3.0.0-dev.4"
99
},
1010
"devDependencies": {
1111
"@nativescript-vue/compiler": "3.0.0-dev.4",
12-
"@nativescript/android": "~8.1.1",
13-
"@nativescript/ios": "~8.1.0",
14-
"@nativescript/types": "~8.1.1",
15-
"@nativescript/webpack": "~5.0.4",
16-
"typescript": "^4.5.4",
17-
"vue": "^3.2.25",
12+
"@nativescript/android": "~8.2.2",
13+
"@nativescript/ios": "~8.2.3",
14+
"@nativescript/types": "~8.2.0",
15+
"@nativescript/webpack": "~5.0.6",
16+
"typescript": "^4.6.3",
17+
"vue": "^3.2.33",
1818
"vue-loader": "^17.0.0"
1919
}
2020
}

apps/demo/tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"module": "esnext",
66
"moduleResolution": "node",
77
"lib": ["dom", "esnext"],
8+
"jsx": "preserve",
89
"sourceMap": true,
910
"noEmitHelpers": true,
1011
"importHelpers": true,

apps/demo/webpack.config.js

+12-11
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,46 @@
11
const webpack = require('@nativescript/webpack')
22
const { VueLoaderPlugin } = require('vue-loader')
33

4-
module.exports = env => {
4+
module.exports = (env) => {
55
webpack.init(env)
6+
webpack.useConfig('vue')
67

78
// todo: move into @nativescript/webpack base config once ready (should be b/w compatible!)
8-
webpack.chainWebpack(config => {
9+
webpack.chainWebpack((config) => {
910
config.plugin('VueLoaderPlugin').use(VueLoaderPlugin)
1011

1112
config.module
1213
.rule('vue')
1314
.test(/\.vue$/)
1415
.use('vue-loader')
1516
.loader(require.resolve('vue-loader'))
16-
.tap(options => {
17+
.tap((options) => {
1718
return {
1819
...options,
1920
isServerBuild: false,
20-
compiler: require.resolve('@nativescript-vue/compiler')
21+
compiler: require.resolve('@nativescript-vue/compiler'),
2122
}
2223
})
2324

24-
config.plugin('DefinePlugin').tap(args => {
25+
config.plugin('DefinePlugin').tap((args) => {
2526
Object.assign(args[0], {
2627
__VUE_OPTIONS_API__: true,
27-
__VUE_PROD_DEVTOOLS__: false
28+
__VUE_PROD_DEVTOOLS__: false,
2829
})
2930

3031
return args
3132
})
3233

33-
config.plugin('ForkTsCheckerWebpackPlugin').tap(args => {
34+
config.plugin('ForkTsCheckerWebpackPlugin').tap((args) => {
3435
args[0] = webpack.merge(args[0], {
3536
typescript: {
3637
extensions: {
3738
vue: {
3839
enabled: true,
39-
compiler: '@nativescript-vue/compiler'
40-
}
41-
}
42-
}
40+
compiler: '@nativescript-vue/compiler',
41+
},
42+
},
43+
},
4344
})
4445
return args
4546
})

package.json

+17-17
Original file line numberDiff line numberDiff line change
@@ -39,32 +39,32 @@
3939
"printWidth": 80
4040
},
4141
"devDependencies": {
42-
"@microsoft/api-extractor": "^7.19.4",
43-
"@rollup/plugin-commonjs": "^21.0.1",
42+
"@microsoft/api-extractor": "^7.22.2",
43+
"@rollup/plugin-commonjs": "^21.1.0",
4444
"@rollup/plugin-json": "^4.1.0",
45-
"@rollup/plugin-replace": "^3.0.1",
46-
"@types/jest": "^27.4.0",
47-
"@vue/compiler-sfc": "^3.2.27",
45+
"@rollup/plugin-replace": "^4.0.0",
46+
"@types/jest": "^27.4.1",
47+
"@vue/compiler-sfc": "^3.2.33",
4848
"ansi-colors": "^4.1.1",
4949
"brotli": "^1.3.2",
5050
"conventional-changelog-cli": "^2.2.2",
51-
"csstype": "^3.0.10",
51+
"csstype": "^3.0.11",
5252
"del-cli": "^4.0.1",
5353
"enquirer": "^2.3.6",
54-
"execa": "^5.0.0",
55-
"fs-extra": "^10.0.0",
56-
"jest": "^27.4.7",
57-
"lint-staged": "^12.2.1",
54+
"execa": "^6.1.0",
55+
"fs-extra": "^10.0.1",
56+
"jest": "^27.5.1",
57+
"lint-staged": "^12.3.8",
5858
"make-coverage-badge": "^1.2.0",
59-
"minimist": "^1.2.5",
59+
"minimist": "^1.2.6",
6060
"npm-run-all": "^4.1.5",
61-
"prettier": "^2.5.1",
62-
"rollup": "^2.64.0",
61+
"prettier": "^2.6.2",
62+
"rollup": "^2.70.2",
6363
"rollup-plugin-terser": "^7.0.2",
64-
"rollup-plugin-typescript2": "^0.31.1",
65-
"ts-jest": "^27.1.3",
66-
"tsd": "^0.19.1",
67-
"typescript": "^4.5.4",
64+
"rollup-plugin-typescript2": "^0.31.2",
65+
"ts-jest": "^27.1.4",
66+
"tsd": "^0.20.0",
67+
"typescript": "^4.6.3",
6868
"yorkie": "^2.0.0"
6969
}
7070
}

packages/compiler/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
},
2424
"homepage": "https://github.com/nativescript-vue/nativescript-vue/tree/dev/packages/compiler#readme",
2525
"dependencies": {
26-
"@vue/compiler-core": "^3.2.27",
27-
"@vue/compiler-sfc": "^3.2.27",
28-
"@vue/shared": "^3.2.27"
26+
"@vue/compiler-core": "^3.2.33",
27+
"@vue/compiler-sfc": "^3.2.33",
28+
"@vue/shared": "^3.2.33"
2929
}
3030
}

packages/compiler/src/decodeHtml.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export const decodeHtml: ParserOptions['decodeEntities'] = (
4545
)
4646
}
4747
for (let length = maxCRNameLength; !value && length > 0; --length) {
48-
name = rawText.substr(1, length)
48+
name = rawText.slice(1, 1 + length)
4949
value = (namedCharacterReferences as Record<string, string>)[name]
5050
}
5151
if (value) {
@@ -105,7 +105,7 @@ export const decodeHtml: ParserOptions['decodeEntities'] = (
105105
}
106106

107107
// https://html.spec.whatwg.org/multipage/parsing.html#numeric-character-reference-end-state
108-
const CCR_REPLACEMENTS: { [key: number]: number | undefined } = {
108+
const CCR_REPLACEMENTS: Record<number, number | undefined> = {
109109
0x80: 0x20ac,
110110
0x82: 0x201a,
111111
0x83: 0x0192,
@@ -132,5 +132,5 @@ const CCR_REPLACEMENTS: { [key: number]: number | undefined } = {
132132
0x9b: 0x203a,
133133
0x9c: 0x0153,
134134
0x9e: 0x017e,
135-
0x9f: 0x0178
135+
0x9f: 0x0178,
136136
}

packages/compiler/src/errors.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ export const enum DOMErrorCodes {
3131
X_V_MODEL_UNNECESSARY_VALUE,
3232
X_V_SHOW_NO_EXPRESSION,
3333
X_TRANSITION_INVALID_CHILDREN,
34+
X_IGNORED_SIDE_EFFECT_TAG,
3435
__EXTEND_POINT__,
3536
}
3637

@@ -41,8 +42,9 @@ export const DOMErrorMessages: { [code: number]: string } = {
4142
[DOMErrorCodes.X_V_TEXT_WITH_CHILDREN]: `v-text will override element children.`,
4243
[DOMErrorCodes.X_V_MODEL_ON_INVALID_ELEMENT]: `v-model can only be used on <input>, <textarea> and <select> elements.`,
4344
[DOMErrorCodes.X_V_MODEL_ARG_ON_ELEMENT]: `v-model argument is not supported on plain elements.`,
44-
[DOMErrorCodes.X_V_MODEL_ON_FILE_INPUT_ELEMENT]: `v-model cannot used on file inputs since they are read-only. Use a v-on:change listener instead.`,
45+
[DOMErrorCodes.X_V_MODEL_ON_FILE_INPUT_ELEMENT]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`,
4546
[DOMErrorCodes.X_V_MODEL_UNNECESSARY_VALUE]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`,
4647
[DOMErrorCodes.X_V_SHOW_NO_EXPRESSION]: `v-show is missing expression.`,
4748
[DOMErrorCodes.X_TRANSITION_INVALID_CHILDREN]: `<Transition> expects exactly one child element or component.`,
49+
[DOMErrorCodes.X_IGNORED_SIDE_EFFECT_TAG]: `Tags with side effect (<script> and <style>) are ignored in client component templates.`,
4850
}

packages/compiler/src/transforms/transformStyle.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
// style="color: red" -> :style='{ "color": "red" }'
1414
// It is then processed by `transformElement` and included in the generated
1515
// props.
16-
export const transformStyle: NodeTransform = (node, context) => {
16+
export const transformStyle: NodeTransform = (node) => {
1717
if (node.type === NodeTypes.ELEMENT) {
1818
node.props.forEach((p, i) => {
1919
if (p.type === NodeTypes.ATTRIBUTE && p.name === 'style' && p.value) {
@@ -49,6 +49,7 @@ function parseInlineCSS(
4949
JSON.stringify(res),
5050
false,
5151
loc,
52-
ConstantTypes.CAN_HOIST // maybe ConstantTypes.CAN_STRINGIFY?
52+
ConstantTypes.CAN_STRINGIFY
53+
// ConstantTypes.CAN_HOIST // maybe ConstantTypes.CAN_STRINGIFY?
5354
)
5455
}

packages/nativescript-vue/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@
2626
"@nativescript-vue/compiler": "3.0.0-dev.4",
2727
"@nativescript-vue/runtime": "3.0.0-dev.4",
2828
"@nativescript-vue/shared": "3.0.0-dev.4",
29-
"@vue/shared": "^3.2.27"
29+
"@vue/shared": "^3.2.33"
3030
}
3131
}

packages/runtime/package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@
3232
"homepage": "https://github.com/nativescript-vue/nativescript-vue/tree/dev/packages/runtime#readme",
3333
"dependencies": {
3434
"@nativescript-vue/shared": "3.0.0-dev.4",
35-
"@nativescript/core": "^8.1.5",
36-
"@vue/reactivity": "^3.2.27",
37-
"@vue/runtime-core": "^3.2.27",
38-
"@vue/shared": "^3.2.27",
35+
"@nativescript/core": "^8.2.2",
36+
"@vue/reactivity": "^3.2.33",
37+
"@vue/runtime-core": "^3.2.33",
38+
"@vue/shared": "^3.2.33",
3939
"set-value": "^4.1.0",
40-
"unset-value": "^2.0.0"
40+
"unset-value": "^2.0.1"
4141
},
4242
"knownExternals": [
4343
"@nativescript/core/ui/core/properties",

packages/runtime/src/index.ts

+10-6
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
CreateAppFunction,
55
createRenderer,
66
Renderer,
7-
RootRenderFunction
7+
RootRenderFunction,
88
} from '@vue/runtime-core'
99
import { Application } from '@nativescript/core'
1010
import { debug } from '@nativescript-vue/shared'
@@ -25,7 +25,7 @@ type NSVRendererElement = INSVElement | NSVRoot
2525

2626
const rendererOptions = {
2727
patchProp,
28-
...nodeOps
28+
...nodeOps,
2929
}
3030

3131
let renderer: Renderer<NSVRendererElement>
@@ -44,11 +44,11 @@ function runApp(root: ComponentPublicInstance): ComponentPublicInstance {
4444
`Root Node: ${JSON.stringify({
4545
id: root.$el.nodeId,
4646
type: root.$el.nodeType,
47-
tag: root.$el.tagName
47+
tag: root.$el.tagName,
4848
})}`
4949
)
5050
return root.$el.nativeView
51-
}
51+
},
5252
})
5353

5454
return root
@@ -89,8 +89,12 @@ export * from './registry'
8989
export { resolveComponent } from './resolveAssets'
9090

9191
// Plugins
92-
export { $navigateTo, $navigateBack } from './plugins/navigation'
93-
export { $showModal } from './plugins/modals'
92+
export {
93+
$navigateTo,
94+
$navigateBack,
95+
NavigationOptions,
96+
} from './plugins/navigation'
97+
export { $showModal, ModalOptions } from './plugins/modals'
9498

9599
// runtime directive helpers
96100
export { vModel } from './directives/vModel'

packages/shared/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
},
2424
"homepage": "https://github.com/nativescript-vue/nativescript-vue/tree/dev/packages/shared#readme",
2525
"dependencies": {
26-
"@nativescript/core": "~8.1.5"
26+
"@nativescript/core": "~8.2.2"
2727
},
2828
"knownExternals": [
2929
"@nativescript/core/trace"

packages/template-blank/package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@
2525
},
2626
"homepage": "https://github.com/nativescript-vue/nativescript-vue/tree/dev/packages/template-blank#readme",
2727
"dependencies": {
28-
"@nativescript/core": "~8.1.5",
28+
"@nativescript/core": "~8.2.0",
2929
"nativescript-vue": "3.0.0-dev.4"
3030
},
3131
"devDependencies": {
3232
"@nativescript-vue/compiler": "3.0.0-dev.4",
33-
"@nativescript/android": "~8.1.1",
34-
"@nativescript/ios": "~8.1.0",
35-
"@nativescript/webpack": "~5.0.4",
36-
"vue-loader": "^16.5.0"
33+
"@nativescript/android": "~8.2.0",
34+
"@nativescript/ios": "~8.2.0",
35+
"@nativescript/webpack": "~5.0.6",
36+
"vue-loader": "^17.0.0"
3737
}
3838
}

packages/test-utils/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@
2424
},
2525
"homepage": "https://github.com/nativescript-vue/nativescript-vue/tree/dev/packages/test-utils#readme",
2626
"dependencies": {
27-
"@nativescript/core": "~8.1.5"
27+
"@nativescript/core": "~8.2.2"
2828
}
2929
}

0 commit comments

Comments
 (0)