Socket
Socket
Sign inDemoInstall

vue

Package Overview
Dependencies
8
Maintainers
2
Versions
499
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.7.14 to 2.7.15

14

package.json
{
"name": "vue",
"version": "2.7.14",
"packageManager": "pnpm@7.1.0",
"version": "2.7.15",
"packageManager": "pnpm@8.9.2",
"description": "Reactive, component-oriented view layer for modern web interfaces.",

@@ -63,4 +63,4 @@ "main": "dist/vue.runtime.common.js",

"dependencies": {
"@vue/compiler-sfc": "2.7.14",
"csstype": "^3.1.0"
"csstype": "^3.1.0",
"@vue/compiler-sfc": "2.7.15"
},

@@ -80,3 +80,3 @@ "devDependencies": {

"enquirer": "^2.3.6",
"esbuild": "^0.14.43",
"esbuild": "^0.16.0",
"execa": "^4.1.0",

@@ -89,3 +89,3 @@ "he": "^1.2.0",

"karma-cli": "^2.0.0",
"karma-esbuild": "^2.2.4",
"karma-esbuild": "^2.2.5",
"karma-jasmine": "^5.0.1",

@@ -109,3 +109,3 @@ "lint-staged": "^12.5.0",

"typescript": "^4.8.4",
"vitest": "^0.12.10",
"vitest": "^0.34.6",
"yorkie": "^2.0.0"

@@ -112,0 +112,0 @@ },

{
"name": "@vue/compiler-sfc",
"version": "2.7.14",
"version": "2.7.15",
"description": "compiler-sfc for Vue 2",

@@ -5,0 +5,0 @@ "main": "dist/compiler-sfc.js",

@@ -417,3 +417,6 @@ import MagicString from 'magic-string'

if (declId) {
emitIdentifier = scriptSetup!.content.slice(declId.start!, declId.end!)
emitIdentifier =
declId.type === 'Identifier'
? declId.name
: scriptSetup!.content.slice(declId.start!, declId.end!)
}

@@ -911,7 +914,7 @@

let end = decl.end! + startOffset
if (i < total - 1) {
// not the last one, locate the start of the next
if (i === 0) {
// first one, locate the start of the next
end = node.declarations[i + 1].start! + startOffset
} else {
// last one, locate the end of the prev
// not first one, locate the end of the prev
start = node.declarations[i - 1].end! + startOffset

@@ -1127,3 +1130,3 @@ }

propsTypeDecl ? ` as ${genSetupPropsType(propsTypeDecl)}` : ``
}\n`
};\n`
)

@@ -1136,3 +1139,3 @@ }

`createPropsRestProxy`
)}(__props, ${JSON.stringify(Object.keys(propsDestructuredBindings))})\n`
)}(__props, ${JSON.stringify(Object.keys(propsDestructuredBindings))});\n`
)

@@ -1845,3 +1848,3 @@ }

} else if (dir === 'on') {
exp = `()=>{${exp}}`
exp = `()=>{return ${exp}}`
} else if (dir === 'for') {

@@ -1848,0 +1851,0 @@ const inMatch = exp.match(forAliasRE)

@@ -144,2 +144,17 @@ import { BindingTypes } from '../src/types'

// vuejs/core #6757
test('defineProps/defineEmits in multi-variable declaration fix #6757 ', () => {
const { content } = compile(`
<script setup>
const a = 1,
props = defineProps(['item']),
emit = defineEmits(['a']);
</script>
`)
assertCode(content)
expect(content).toMatch(`const a = 1;`) // test correct removal
expect(content).toMatch(`props: ['item'],`)
expect(content).toMatch(`emits: ['a'],`)
})
test('defineProps/defineEmits in multi-variable declaration (full removal)', () => {

@@ -1085,2 +1100,15 @@ const { content } = compile(`

// https://github.com/vuejs/core/issues/5393
test('defineEmits w/ type (interface ts type)', () => {
const { content } = compile(`
<script setup lang="ts">
interface Emits { (e: 'foo'): void }
const emit: Emits = defineEmits(['foo'])
</script>
`)
assertCode(content)
expect(content).toMatch(`setup(__props, { emit }) {`)
expect(content).toMatch(`emits: ['foo']`)
})
test('runtime Enum', () => {

@@ -1087,0 +1115,0 @@ const { content, bindings } = compile(

@@ -101,3 +101,3 @@ /**

// http://en.wikipedia.org/wiki/Conditional_comment#Downlevel-revealed_conditional_comment
// https://en.wikipedia.org/wiki/Conditional_comment#Downlevel-revealed_conditional_comment
if (conditionalComment.test(html)) {

@@ -104,0 +104,0 @@ const conditionalEnd = html.indexOf(']>')

@@ -21,2 +21,3 @@ import config from '../config'

import { currentInstance, setCurrentInstance } from 'v3/currentInstance'
import { getCurrentScope } from 'v3/reactivity/effectScope'
import { syncSetupProxy } from 'v3/apiSetup'

@@ -402,3 +403,4 @@

pushTarget()
const prev = currentInstance
const prevInst = currentInstance
const prevScope = getCurrentScope()
setContext && setCurrentInstance(vm)

@@ -415,4 +417,8 @@ const handlers = vm.$options[hook]

}
setContext && setCurrentInstance(prev)
if (setContext) {
setCurrentInstance(prevInst)
prevScope && prevScope.on()
}
popTarget()
}

@@ -22,3 +22,3 @@ import Dep from './dep'

const NO_INIITIAL_VALUE = {}
const NO_INITIAL_VALUE = {}

@@ -83,3 +83,3 @@ /**

const key = keys[i]
defineReactive(value, key, NO_INIITIAL_VALUE, undefined, shallow, mock)
defineReactive(value, key, NO_INITIAL_VALUE, undefined, shallow, mock)
}

@@ -150,3 +150,3 @@ }

(!getter || setter) &&
(val === NO_INIITIAL_VALUE || arguments.length === 2)
(val === NO_INITIAL_VALUE || arguments.length === 2)
) {

@@ -153,0 +153,0 @@ val = obj[key]

@@ -881,4 +881,7 @@ /**

// start at index 1 to avoid re-invoking component mounted hook
for (let i = 1; i < insert.fns.length; i++) {
insert.fns[i]()
// clone insert hooks to avoid being mutated during iteration.
// e.g. for customed directives under transition group.
const cloned = insert.fns.slice(1)
for (let i = 0; i < cloned.length; i++) {
cloned[i]()
}

@@ -885,0 +888,0 @@ }

@@ -65,3 +65,3 @@ import { inBrowser } from 'core/util/env'

if (tag.indexOf('-') > -1) {
// http://stackoverflow.com/a/28210364/1070244
// https://stackoverflow.com/a/28210364/1070244
return (unknownElementCache[tag] =

@@ -68,0 +68,0 @@ el.constructor === window.HTMLUnknownElement ||

@@ -289,5 +289,3 @@ export const emptyObject: Record<string, any> = Object.freeze({})

return modules
.reduce((keys, m) => {
return keys.concat(m.staticKeys || [])
}, [] as string[])
.reduce<string[]>((keys, m) => keys.concat(m.staticKeys || []), [])
.join(',')

@@ -294,0 +292,0 @@ }

@@ -1,3 +0,3 @@

// If the the type T accepts type "any", output type Y, otherwise output type N.
// If the type T accepts type "any", output type Y, otherwise output type N.
// https://stackoverflow.com/questions/49927523/disallow-call-with-any/49928360#49928360
export type IfAny<T, Y, N> = 0 extends 1 & T ? Y : N

@@ -50,3 +50,3 @@ import { warn, isFunction, isObject } from 'core/util'

warn(
`The suspensiblbe option for async components is not supported in Vue2. It is ignored.`
`The suspensible option for async components is not supported in Vue2. It is ignored.`
)

@@ -53,0 +53,0 @@ }

@@ -17,3 +17,3 @@ export type Data = { [key: string]: unknown }

// If the the type T accepts type "any", output type Y, otherwise output type N.
// If the type T accepts type "any", output type Y, otherwise output type N.
// https://stackoverflow.com/questions/49927523/disallow-call-with-any/49928360#49928360

@@ -20,0 +20,0 @@ export type IfAny<T, Y, N> = 0 extends 1 & T ? Y : N

@@ -213,3 +213,3 @@ import { Vue, CreateElement, CombinedVueInstance } from './vue'

errorCaptured?(err: Error, vm: Vue, info: string): boolean | void
serverPrefetch?(this: V): Promise<void>
serverPrefetch?(): Promise<void>
renderTracked?(e: DebuggerEvent): void

@@ -216,0 +216,0 @@ renderTriggerd?(e: DebuggerEvent): void

@@ -113,3 +113,7 @@ import { EmitFn, EmitsOptions } from './v3-setup-context'

type PropsWithDefaults<Base, Defaults> = Base & {
[K in keyof Defaults]: K extends keyof Base ? NotUndefined<Base[K]> : never
[K in keyof Defaults]: K extends keyof Base
? Defaults[K] extends undefined
? Base[K]
: NotUndefined<Base[K]>
: never
}

@@ -116,0 +120,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc