Skip to content

Commit

Permalink
chore: merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
Alfred-Skyblue committed Nov 13, 2023
1 parent 2cbed21 commit 42a7069
Show file tree
Hide file tree
Showing 15 changed files with 184 additions and 169 deletions.
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"version": "3.3.8",
"packageManager": "[email protected].2",
"packageManager": "[email protected].3",
"type": "module",
"scripts": {
"dev": "node scripts/dev.js",
Expand All @@ -27,9 +27,9 @@
"dev-esm": "node scripts/dev.js -if esm-bundler-runtime",
"dev-compiler": "run-p \"dev template-explorer\" serve",
"dev-sfc": "run-s dev-sfc-prepare dev-sfc-run",
"dev-sfc-prepare": "node scripts/pre-dev-sfc.js || npm run build-compiler-cjs",
"dev-sfc-prepare": "node scripts/pre-dev-sfc.js || npm run build-all-cjs",
"dev-sfc-serve": "vite packages/sfc-playground --host",
"dev-sfc-run": "run-p \"dev compiler-sfc -f esm-browser\" \"dev vue -if esm-bundler-runtime\" \"dev server-renderer -if esm-bundler\" dev-sfc-serve",
"dev-sfc-run": "run-p \"dev compiler-sfc -f esm-browser\" \"dev vue -if esm-bundler-runtime\" \"dev vue -ipf esm-browser-runtime\" \"dev server-renderer -if esm-bundler\" dev-sfc-serve",
"serve": "serve",
"open": "open http://localhost:3000/packages/template-explorer/local.html",
"build-sfc-playground": "run-s build-all-cjs build-runtime-esm build-ssr-esm build-sfc-playground-self",
Expand Down Expand Up @@ -57,8 +57,8 @@
"node": ">=18.12.0"
},
"devDependencies": {
"@babel/parser": "^7.23.0",
"@babel/types": "^7.23.0",
"@babel/parser": "^7.23.3",
"@babel/types": "^7.23.3",
"@rollup/plugin-alias": "^5.0.1",
"@rollup/plugin-commonjs": "^25.0.7",
"@rollup/plugin-json": "^6.0.1",
Expand All @@ -67,14 +67,14 @@
"@rollup/plugin-terser": "^0.4.4",
"@types/hash-sum": "^1.0.2",
"@types/node": "^20.9.0",
"@typescript-eslint/parser": "^6.9.1",
"@typescript-eslint/parser": "^6.10.0",
"@vitest/coverage-istanbul": "^0.34.6",
"@vue/consolidate": "0.17.3",
"conventional-changelog-cli": "^4.1.0",
"enquirer": "^2.4.1",
"esbuild": "^0.19.5",
"esbuild-plugin-polyfill-node": "^0.3.0",
"eslint": "^8.52.0",
"eslint": "^8.53.0",
"eslint-plugin-jest": "^27.6.0",
"estree-walker": "^2.0.2",
"execa": "^8.0.1",
Expand All @@ -83,14 +83,14 @@
"lodash": "^4.17.21",
"magic-string": "^0.30.5",
"markdown-table": "^3.0.3",
"marked": "^9.1.5",
"marked": "^9.1.6",
"minimist": "^1.2.8",
"npm-run-all": "^4.1.5",
"picocolors": "^1.0.0",
"prettier": "^3.0.3",
"pretty-bytes": "^6.1.1",
"pug": "^3.0.2",
"puppeteer": "~21.4.1",
"puppeteer": "~21.5.1",
"rimraf": "^5.0.5",
"rollup": "^4.1.4",
"rollup-plugin-dts": "^6.1.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/compiler-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@
},
"homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-core#readme",
"dependencies": {
"@babel/parser": "^7.23.0",
"@babel/parser": "^7.23.3",
"@vue/shared": "3.3.8",
"estree-walker": "^2.0.2",
"source-map-js": "^1.0.2"
},
"devDependencies": {
"@babel/types": "^7.23.0"
"@babel/types": "^7.23.3"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -481,25 +481,28 @@ describe('resolveType', () => {

test.runIf(process.platform === 'win32')('relative ts on Windows', () => {
const files = {
'C:\\Test\\foo.ts': 'export type P = { foo: number }',
'C:\\Test\\bar.d.ts':
'C:\\Test\\FolderA\\foo.ts': 'export type P = { foo: number }',
'C:\\Test\\FolderA\\bar.d.ts':
'type X = { bar: string }; export { X as Y };' +
// verify that we can parse syntax that is only valid in d.ts
'export const baz: boolean'
'export const baz: boolean',
'C:\\Test\\FolderB\\buz.ts': 'export type Z = { buz: string }'
}
const { props, deps } = resolve(
`
import { P } from './foo'
import { Y as PP } from './bar'
defineProps<P & PP>()
import { Z as PPP } from '../FolderB/buz'
defineProps<P & PP & PPP>()
`,
files,
{},
'C:\\Test\\Test.vue'
'C:\\Test\\FolderA\\Test.vue'
)
expect(props).toStrictEqual({
foo: ['Number'],
bar: ['String']
bar: ['String'],
buz: ['String']
})
expect(deps && [...deps].map(normalize)).toStrictEqual(
Object.keys(files).map(normalize)
Expand Down
6 changes: 3 additions & 3 deletions packages/compiler-sfc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
},
"homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-sfc#readme",
"dependencies": {
"@babel/parser": "^7.23.0",
"@babel/parser": "^7.23.3",
"@vue/compiler-core": "3.3.8",
"@vue/compiler-dom": "3.3.8",
"@vue/compiler-ssr": "3.3.8",
Expand All @@ -44,10 +44,10 @@
"source-map-js": "^1.0.2"
},
"devDependencies": {
"@babel/types": "^7.23.0",
"@babel/types": "^7.23.3",
"@vue/consolidate": "^0.17.3",
"hash-sum": "^2.0.0",
"lru-cache": "^10.0.1",
"lru-cache": "^10.0.2",
"merge-source-map": "^1.1.0",
"minimatch": "^9.0.3",
"postcss-modules": "^4.3.1",
Expand Down
10 changes: 8 additions & 2 deletions packages/compiler-sfc/src/script/resolveType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ import { parse as babelParse } from '@babel/parser'
import { parse } from '../parse'
import { createCache } from '../cache'
import type TS from 'typescript'
import { extname, dirname } from 'path'
import { extname, dirname, join } from 'path'
import { minimatch as isMatch } from 'minimatch'
import * as process from 'process'

/**
* TypeResolveContext is compatible with ScriptCompileContext
Expand Down Expand Up @@ -779,7 +780,12 @@ function importSourceToScope(

let resolved: string | undefined = scope.resolvedImportSources[source]
if (!resolved) {
if (source.startsWith('.')) {
if (source.startsWith('..')) {
const osSpecificJoinFn = process.platform === 'win32' ? join : joinPaths

const filename = osSpecificJoinFn(dirname(scope.filename), source)
resolved = resolveExt(filename, fs)
} else if (source.startsWith('.')) {
// relative import - fast path
const filename = joinPaths(dirname(scope.filename), source)
resolved = resolveExt(filename, fs)
Expand Down
6 changes: 3 additions & 3 deletions packages/reactivity-transform/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@
},
"homepage": "https://github.com/vuejs/core/tree/dev/packages/reactivity-transform#readme",
"dependencies": {
"@babel/parser": "^7.23.0",
"@babel/parser": "^7.23.3",
"@vue/compiler-core": "3.3.8",
"@vue/shared": "3.3.8",
"estree-walker": "^2.0.2",
"magic-string": "^0.30.5"
},
"devDependencies": {
"@babel/core": "^7.23.2",
"@babel/types": "^7.23.0"
"@babel/core": "^7.23.3",
"@babel/types": "^7.23.3"
}
}
5 changes: 3 additions & 2 deletions packages/reactivity/src/ref.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { ComputedRef } from './computed'
import {
activeEffect,
getDepFromReactive,
Expand Down Expand Up @@ -210,7 +211,7 @@ export type MaybeRefOrGetter<T = any> = MaybeRef<T> | (() => T)
* @param ref - Ref or plain value to be converted into the plain value.
* @see {@link https://vuejs.org/api/reactivity-utilities.html#unref}
*/
export function unref<T>(ref: MaybeRef<T>): T {
export function unref<T>(ref: MaybeRef<T> | ComputedRef<T>): T {
return isRef(ref) ? ref.value : ref
}

Expand All @@ -230,7 +231,7 @@ export function unref<T>(ref: MaybeRef<T>): T {
* @param source - A getter, an existing ref, or a non-function value.
* @see {@link https://vuejs.org/api/reactivity-utilities.html#tovalue}
*/
export function toValue<T>(source: MaybeRefOrGetter<T>): T {
export function toValue<T>(source: MaybeRefOrGetter<T> | ComputedRef<T>): T {
return isFunction(source) ? source() : unref(source)
}

Expand Down
8 changes: 1 addition & 7 deletions packages/runtime-dom/src/jsx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,16 +252,10 @@ export type StyleValue =
| CSSProperties
| Array<StyleValue>

export type ClassValue =
| undefined
| string
| Record<string | number, any>
| Array<ClassValue>

export interface HTMLAttributes extends AriaAttributes, EventHandlers<Events> {
innerHTML?: string

class?: ClassValue
class?: any
style?: StyleValue

// Standard HTML Attributes
Expand Down
2 changes: 1 addition & 1 deletion packages/sfc-playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"vite": "^4.5.0"
},
"dependencies": {
"@vue/repl": "^2.6.3",
"@vue/repl": "^2.7.0",
"file-saver": "^2.0.5",
"jszip": "^3.10.1",
"vue": "workspace:*"
Expand Down
8 changes: 6 additions & 2 deletions packages/sfc-playground/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,13 @@ if (hash.startsWith('__SSR__')) {
const store = new ReplStore({
serializedState: hash,
productionMode: !useDevMode.value,
defaultVueRuntimeURL: import.meta.env.PROD
? `${location.origin}/vue.runtime.esm-browser.js`
: `${location.origin}/src/vue-dev-proxy`,
defaultVueRuntimeProdURL: import.meta.env.PROD
? `${location.origin}/vue.runtime.esm-browser.prod.js`
: `${location.origin}/src/vue-dev-proxy-prod`,
defaultVueServerRendererURL: import.meta.env.PROD
? `${location.origin}/server-renderer.esm-browser.js`
: `${location.origin}/src/vue-server-renderer-dev-proxy`
Expand Down Expand Up @@ -68,9 +72,9 @@ function toggleDevMode() {
sfcOptions.template!.isProd =
sfcOptions.style!.isProd =
!dev
sfcOptions.template.compilerOptions.comments = dev
store.setFiles(store.getFiles())
store.toggleProduction()
}
function toggleSSR() {
Expand Down
3 changes: 3 additions & 0 deletions packages/sfc-playground/src/vue-dev-proxy-prod.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// serve vue to the iframe sandbox during dev.
// @ts-ignore
export * from 'vue/dist/vue.runtime.esm-browser.prod.js'
1 change: 1 addition & 0 deletions packages/sfc-playground/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ function copyVuePlugin(): Plugin {
}

copyFile(`../vue/dist/vue.runtime.esm-browser.js`)
copyFile(`../vue/dist/vue.runtime.esm-browser.prod.js`)
copyFile(`../server-renderer/dist/server-renderer.esm-browser.js`)
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/vue-compat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
},
"homepage": "https://github.com/vuejs/core/tree/main/packages/vue-compat#readme",
"dependencies": {
"@babel/parser": "^7.23.0",
"@babel/parser": "^7.23.3",
"estree-walker": "^2.0.2",
"source-map-js": "^1.0.2"
},
Expand Down
Loading

0 comments on commit 42a7069

Please sign in to comment.