Skip to content

Commit

Permalink
refactor(volar): replace @volar/vue-language-core with @vue/language-…
Browse files Browse the repository at this point in the history
…core
  • Loading branch information
sxzz committed Jul 9, 2023
1 parent 2d1a0c4 commit 4cd6d3a
Show file tree
Hide file tree
Showing 13 changed files with 20 additions and 47 deletions.
5 changes: 5 additions & 0 deletions .changeset/quiet-ligers-smoke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@vue-macros/volar': minor
---

replace `@volar/vue-language-core` with `@vue/language-core`
4 changes: 2 additions & 2 deletions packages/volar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@
"dependencies": {
"@rollup/pluginutils": "^5.0.2",
"@volar/language-core": "1.8.0",
"@volar/vue-language-core": "1.6.5",
"@vue-macros/common": "workspace:*",
"@vue-macros/define-props": "workspace:*",
"@vue-macros/short-vmodel": "workspace:*"
"@vue-macros/short-vmodel": "workspace:*",
"@vue/language-core": "1.8.4"
},
"devDependencies": {
"@vue/compiler-dom": "^3.3.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/volar/src/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
type VueCompilerOptions,
type VueEmbeddedFile,
replace,
} from '@volar/vue-language-core'
} from '@vue/language-core'
import { type FileRangeCapabilities } from '@volar/language-core'
import { type VolarOptions } from '..'

Expand Down
2 changes: 1 addition & 1 deletion packages/volar/src/define-models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
type Segment,
type Sfc,
type VueLanguagePlugin,
} from '@volar/vue-language-core'
} from '@vue/language-core'
import {
addEmits,
addProps,
Expand Down
2 changes: 1 addition & 1 deletion packages/volar/src/define-options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
type Sfc,
type VueLanguagePlugin,
replace,
} from '@volar/vue-language-core'
} from '@vue/language-core'

function transformDefineOptions({
codes,
Expand Down
2 changes: 1 addition & 1 deletion packages/volar/src/define-props-refs.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { FileKind } from '@volar/language-core'
import { type VueLanguagePlugin } from '@volar/vue-language-core'
import { type VueLanguagePlugin } from '@vue/language-core'
import { getImportNames, rewriteImports } from './common'

const plugin: VueLanguagePlugin = ({
Expand Down
2 changes: 1 addition & 1 deletion packages/volar/src/define-props.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type VueLanguagePlugin } from '@volar/vue-language-core'
import { type VueLanguagePlugin } from '@vue/language-core'

const plugin: VueLanguagePlugin = ({ vueCompilerOptions }) => {
vueCompilerOptions.macros.defineProps.push('$defineProps')
Expand Down
2 changes: 1 addition & 1 deletion packages/volar/src/define-slots.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
type VueLanguagePlugin,
replace,
toString,
} from '@volar/vue-language-core'
} from '@vue/language-core'

const transform = ({
embeddedFile,
Expand Down
2 changes: 1 addition & 1 deletion packages/volar/src/export-expose.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
type VueLanguagePlugin,
replace,
replaceSourceRange,
} from '@volar/vue-language-core'
} from '@vue/language-core'
import { createFilter } from '@rollup/pluginutils'
import { type VolarOptions } from '..'
import { getVolarOptions } from './common'
Expand Down
2 changes: 1 addition & 1 deletion packages/volar/src/export-props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
type VueEmbeddedFile,
type VueLanguagePlugin,
replaceSourceRange,
} from '@volar/vue-language-core'
} from '@vue/language-core'
import { createFilter } from '@rollup/pluginutils'
import { type VolarOptions } from '..'
import { addProps, getVolarOptions, getVueLibraryName } from './common'
Expand Down
2 changes: 1 addition & 1 deletion packages/volar/src/shim.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
declare module '@volar/vue-language-core' {
declare module '@vue/language-core' {
export interface VueCompilerOptions {
vueMacros?: import('..').VolarOptions
}
Expand Down
2 changes: 1 addition & 1 deletion packages/volar/src/short-vmodel.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { transformShortVmodel } from '@vue-macros/short-vmodel'
import { type VueLanguagePlugin } from '@volar/vue-language-core'
import { type VueLanguagePlugin } from '@vue/language-core'
import { getVolarOptions } from './common'

const plugin: VueLanguagePlugin = ({ vueCompilerOptions }) => {
Expand Down
38 changes: 3 additions & 35 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4cd6d3a

Please sign in to comment.