Skip to content

Commit

Permalink
chore: bump deps
Browse files Browse the repository at this point in the history
  • Loading branch information
rigor789 committed Apr 16, 2022
1 parent dbfd965 commit afd9cee
Show file tree
Hide file tree
Showing 19 changed files with 1,472 additions and 1,544 deletions.
6 changes: 4 additions & 2 deletions apps/demo/app/components/App.vue
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
<script setup lang="ts">
// import type { INSVElement } from 'nativescript-vue'
import { ref } from 'nativescript-vue'
import type { INSVElement } from 'nativescript-vue'
import { dumpViewTree } from '~/utils/dumpViewTree'
import HelloWorld from './HelloWorld.vue'
const stackLayout = ref<INSVElement>()
const stackLayout = ref()
const showThing = ref(false)
function toggleThing() {
showThing.value = !showThing.value
console.log(stackLayout.value!.nativeView)
console.log(dumpViewTree(stackLayout.value!))
}
</script>

Expand Down
11 changes: 0 additions & 11 deletions apps/demo/app/utils/dumpViewTree.js

This file was deleted.

15 changes: 15 additions & 0 deletions apps/demo/app/utils/dumpViewTree.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { INSVElement, INSVNode } from 'nativescript-vue'

export function dumpViewTree(root: INSVNode) {
const mapNode: any = (node: INSVNode | INSVElement) => {
const type = 'tagName' in node ? node.tagName : node.nodeType
return {
id: node.nodeId,
type,
text: node.text,
children: node.childNodes.map(mapNode),
}
}

return root.childNodes.map(mapNode)
}
14 changes: 7 additions & 7 deletions apps/demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
"main": "app/main.ts",
"private": true,
"dependencies": {
"@nativescript/core": "~8.1.5",
"@nativescript/core": "~8.2.2",
"nativescript-vue": "3.0.0-dev.4"
},
"devDependencies": {
"@nativescript-vue/compiler": "3.0.0-dev.4",
"@nativescript/android": "~8.1.1",
"@nativescript/ios": "~8.1.0",
"@nativescript/types": "~8.1.1",
"@nativescript/webpack": "~5.0.4",
"typescript": "^4.5.4",
"vue": "^3.2.25",
"@nativescript/android": "~8.2.2",
"@nativescript/ios": "~8.2.3",
"@nativescript/types": "~8.2.0",
"@nativescript/webpack": "~5.0.6",
"typescript": "^4.6.3",
"vue": "^3.2.33",
"vue-loader": "^17.0.0"
}
}
1 change: 1 addition & 0 deletions apps/demo/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"module": "esnext",
"moduleResolution": "node",
"lib": ["dom", "esnext"],
"jsx": "preserve",
"sourceMap": true,
"noEmitHelpers": true,
"importHelpers": true,
Expand Down
23 changes: 12 additions & 11 deletions apps/demo/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,45 +1,46 @@
const webpack = require('@nativescript/webpack')
const { VueLoaderPlugin } = require('vue-loader')

module.exports = env => {
module.exports = (env) => {
webpack.init(env)
webpack.useConfig('vue')

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

config.module
.rule('vue')
.test(/\.vue$/)
.use('vue-loader')
.loader(require.resolve('vue-loader'))
.tap(options => {
.tap((options) => {
return {
...options,
isServerBuild: false,
compiler: require.resolve('@nativescript-vue/compiler')
compiler: require.resolve('@nativescript-vue/compiler'),
}
})

config.plugin('DefinePlugin').tap(args => {
config.plugin('DefinePlugin').tap((args) => {
Object.assign(args[0], {
__VUE_OPTIONS_API__: true,
__VUE_PROD_DEVTOOLS__: false
__VUE_PROD_DEVTOOLS__: false,
})

return args
})

config.plugin('ForkTsCheckerWebpackPlugin').tap(args => {
config.plugin('ForkTsCheckerWebpackPlugin').tap((args) => {
args[0] = webpack.merge(args[0], {
typescript: {
extensions: {
vue: {
enabled: true,
compiler: '@nativescript-vue/compiler'
}
}
}
compiler: '@nativescript-vue/compiler',
},
},
},
})
return args
})
Expand Down
34 changes: 17 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,32 +39,32 @@
"printWidth": 80
},
"devDependencies": {
"@microsoft/api-extractor": "^7.19.4",
"@rollup/plugin-commonjs": "^21.0.1",
"@microsoft/api-extractor": "^7.22.2",
"@rollup/plugin-commonjs": "^21.1.0",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-replace": "^3.0.1",
"@types/jest": "^27.4.0",
"@vue/compiler-sfc": "^3.2.27",
"@rollup/plugin-replace": "^4.0.0",
"@types/jest": "^27.4.1",
"@vue/compiler-sfc": "^3.2.33",
"ansi-colors": "^4.1.1",
"brotli": "^1.3.2",
"conventional-changelog-cli": "^2.2.2",
"csstype": "^3.0.10",
"csstype": "^3.0.11",
"del-cli": "^4.0.1",
"enquirer": "^2.3.6",
"execa": "^5.0.0",
"fs-extra": "^10.0.0",
"jest": "^27.4.7",
"lint-staged": "^12.2.1",
"execa": "^6.1.0",
"fs-extra": "^10.0.1",
"jest": "^27.5.1",
"lint-staged": "^12.3.8",
"make-coverage-badge": "^1.2.0",
"minimist": "^1.2.5",
"minimist": "^1.2.6",
"npm-run-all": "^4.1.5",
"prettier": "^2.5.1",
"rollup": "^2.64.0",
"prettier": "^2.6.2",
"rollup": "^2.70.2",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-typescript2": "^0.31.1",
"ts-jest": "^27.1.3",
"tsd": "^0.19.1",
"typescript": "^4.5.4",
"rollup-plugin-typescript2": "^0.31.2",
"ts-jest": "^27.1.4",
"tsd": "^0.20.0",
"typescript": "^4.6.3",
"yorkie": "^2.0.0"
}
}
6 changes: 3 additions & 3 deletions packages/compiler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
},
"homepage": "https://github.com/nativescript-vue/nativescript-vue/tree/dev/packages/compiler#readme",
"dependencies": {
"@vue/compiler-core": "^3.2.27",
"@vue/compiler-sfc": "^3.2.27",
"@vue/shared": "^3.2.27"
"@vue/compiler-core": "^3.2.33",
"@vue/compiler-sfc": "^3.2.33",
"@vue/shared": "^3.2.33"
}
}
6 changes: 3 additions & 3 deletions packages/compiler/src/decodeHtml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const decodeHtml: ParserOptions['decodeEntities'] = (
)
}
for (let length = maxCRNameLength; !value && length > 0; --length) {
name = rawText.substr(1, length)
name = rawText.slice(1, 1 + length)
value = (namedCharacterReferences as Record<string, string>)[name]
}
if (value) {
Expand Down Expand Up @@ -105,7 +105,7 @@ export const decodeHtml: ParserOptions['decodeEntities'] = (
}

// https://html.spec.whatwg.org/multipage/parsing.html#numeric-character-reference-end-state
const CCR_REPLACEMENTS: { [key: number]: number | undefined } = {
const CCR_REPLACEMENTS: Record<number, number | undefined> = {
0x80: 0x20ac,
0x82: 0x201a,
0x83: 0x0192,
Expand All @@ -132,5 +132,5 @@ const CCR_REPLACEMENTS: { [key: number]: number | undefined } = {
0x9b: 0x203a,
0x9c: 0x0153,
0x9e: 0x017e,
0x9f: 0x0178
0x9f: 0x0178,
}
4 changes: 3 additions & 1 deletion packages/compiler/src/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export const enum DOMErrorCodes {
X_V_MODEL_UNNECESSARY_VALUE,
X_V_SHOW_NO_EXPRESSION,
X_TRANSITION_INVALID_CHILDREN,
X_IGNORED_SIDE_EFFECT_TAG,
__EXTEND_POINT__,
}

Expand All @@ -41,8 +42,9 @@ export const DOMErrorMessages: { [code: number]: string } = {
[DOMErrorCodes.X_V_TEXT_WITH_CHILDREN]: `v-text will override element children.`,
[DOMErrorCodes.X_V_MODEL_ON_INVALID_ELEMENT]: `v-model can only be used on <input>, <textarea> and <select> elements.`,
[DOMErrorCodes.X_V_MODEL_ARG_ON_ELEMENT]: `v-model argument is not supported on plain elements.`,
[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.`,
[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.`,
[DOMErrorCodes.X_V_MODEL_UNNECESSARY_VALUE]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`,
[DOMErrorCodes.X_V_SHOW_NO_EXPRESSION]: `v-show is missing expression.`,
[DOMErrorCodes.X_TRANSITION_INVALID_CHILDREN]: `<Transition> expects exactly one child element or component.`,
[DOMErrorCodes.X_IGNORED_SIDE_EFFECT_TAG]: `Tags with side effect (<script> and <style>) are ignored in client component templates.`,
}
5 changes: 3 additions & 2 deletions packages/compiler/src/transforms/transformStyle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
// style="color: red" -> :style='{ "color": "red" }'
// It is then processed by `transformElement` and included in the generated
// props.
export const transformStyle: NodeTransform = (node, context) => {
export const transformStyle: NodeTransform = (node) => {
if (node.type === NodeTypes.ELEMENT) {
node.props.forEach((p, i) => {
if (p.type === NodeTypes.ATTRIBUTE && p.name === 'style' && p.value) {
Expand Down Expand Up @@ -49,6 +49,7 @@ function parseInlineCSS(
JSON.stringify(res),
false,
loc,
ConstantTypes.CAN_HOIST // maybe ConstantTypes.CAN_STRINGIFY?
ConstantTypes.CAN_STRINGIFY
// ConstantTypes.CAN_HOIST // maybe ConstantTypes.CAN_STRINGIFY?
)
}
2 changes: 1 addition & 1 deletion packages/nativescript-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@
"@nativescript-vue/compiler": "3.0.0-dev.4",
"@nativescript-vue/runtime": "3.0.0-dev.4",
"@nativescript-vue/shared": "3.0.0-dev.4",
"@vue/shared": "^3.2.27"
"@vue/shared": "^3.2.33"
}
}
10 changes: 5 additions & 5 deletions packages/runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@
"homepage": "https://github.com/nativescript-vue/nativescript-vue/tree/dev/packages/runtime#readme",
"dependencies": {
"@nativescript-vue/shared": "3.0.0-dev.4",
"@nativescript/core": "^8.1.5",
"@vue/reactivity": "^3.2.27",
"@vue/runtime-core": "^3.2.27",
"@vue/shared": "^3.2.27",
"@nativescript/core": "^8.2.2",
"@vue/reactivity": "^3.2.33",
"@vue/runtime-core": "^3.2.33",
"@vue/shared": "^3.2.33",
"set-value": "^4.1.0",
"unset-value": "^2.0.0"
"unset-value": "^2.0.1"
},
"knownExternals": [
"@nativescript/core/ui/core/properties",
Expand Down
16 changes: 10 additions & 6 deletions packages/runtime/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
CreateAppFunction,
createRenderer,
Renderer,
RootRenderFunction
RootRenderFunction,
} from '@vue/runtime-core'
import { Application } from '@nativescript/core'
import { debug } from '@nativescript-vue/shared'
Expand All @@ -25,7 +25,7 @@ type NSVRendererElement = INSVElement | NSVRoot

const rendererOptions = {
patchProp,
...nodeOps
...nodeOps,
}

let renderer: Renderer<NSVRendererElement>
Expand All @@ -44,11 +44,11 @@ function runApp(root: ComponentPublicInstance): ComponentPublicInstance {
`Root Node: ${JSON.stringify({
id: root.$el.nodeId,
type: root.$el.nodeType,
tag: root.$el.tagName
tag: root.$el.tagName,
})}`
)
return root.$el.nativeView
}
},
})

return root
Expand Down Expand Up @@ -89,8 +89,12 @@ export * from './registry'
export { resolveComponent } from './resolveAssets'

// Plugins
export { $navigateTo, $navigateBack } from './plugins/navigation'
export { $showModal } from './plugins/modals'
export {
$navigateTo,
$navigateBack,
NavigationOptions,
} from './plugins/navigation'
export { $showModal, ModalOptions } from './plugins/modals'

// runtime directive helpers
export { vModel } from './directives/vModel'
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
},
"homepage": "https://github.com/nativescript-vue/nativescript-vue/tree/dev/packages/shared#readme",
"dependencies": {
"@nativescript/core": "~8.1.5"
"@nativescript/core": "~8.2.2"
},
"knownExternals": [
"@nativescript/core/trace"
Expand Down
File renamed without changes.
10 changes: 5 additions & 5 deletions packages/template-blank/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@
},
"homepage": "https://github.com/nativescript-vue/nativescript-vue/tree/dev/packages/template-blank#readme",
"dependencies": {
"@nativescript/core": "~8.1.5",
"@nativescript/core": "~8.2.0",
"nativescript-vue": "3.0.0-dev.4"
},
"devDependencies": {
"@nativescript-vue/compiler": "3.0.0-dev.4",
"@nativescript/android": "~8.1.1",
"@nativescript/ios": "~8.1.0",
"@nativescript/webpack": "~5.0.4",
"vue-loader": "^16.5.0"
"@nativescript/android": "~8.2.0",
"@nativescript/ios": "~8.2.0",
"@nativescript/webpack": "~5.0.6",
"vue-loader": "^17.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/test-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@
},
"homepage": "https://github.com/nativescript-vue/nativescript-vue/tree/dev/packages/test-utils#readme",
"dependencies": {
"@nativescript/core": "~8.1.5"
"@nativescript/core": "~8.2.2"
}
}
Loading

0 comments on commit afd9cee

Please sign in to comment.