Skip to content

Commit 372ec35

Browse files
committed
chore: mark reactivity transform apis as deprecated
1 parent f0691e4 commit 372ec35

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

packages/compiler-sfc/src/index.ts

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ export { compileStyle, compileStyleAsync } from './compileStyle'
77
export { compileScript } from './compileScript'
88
export { rewriteDefault, rewriteDefaultAST } from './rewriteDefault'
99
export { resolveTypeElements, inferRuntimeType } from './script/resolveType'
10+
11+
// TODO remove in 3.4
1012
export {
1113
shouldTransform as shouldTransformRef,
1214
transform as transformRef,

packages/reactivity-transform/src/reactivityTransform.ts

+9
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ const IMPORT_SOURCE = 'vue/macros'
3333
const shorthands = ['ref', 'computed', 'shallowRef', 'toRef', 'customRef']
3434
const transformCheckRE = /[^\w]\$(?:\$|ref|computed|shallowRef)?\s*(\(|\<)/
3535

36+
/**
37+
* @deprecated will be removed in 3.4
38+
*/
3639
export function shouldTransform(src: string): boolean {
3740
return transformCheckRE.test(src)
3841
}
@@ -64,6 +67,9 @@ export interface ImportBinding {
6467
specifier: ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier
6568
}
6669

70+
/**
71+
* @deprecated will be removed in 3.4
72+
*/
6773
export function transform(
6874
src: string,
6975
{
@@ -112,6 +118,9 @@ export function transform(
112118
}
113119
}
114120

121+
/**
122+
* @deprecated will be removed in 3.4
123+
*/
115124
export function transformAST(
116125
ast: Program,
117126
s: MagicString,

0 commit comments

Comments
 (0)