From 30fc13436d69cfc5bade11f0954e729a275130ff Mon Sep 17 00:00:00 2001 From: Johnson Chu Date: Tue, 24 Dec 2024 03:41:00 +0800 Subject: [PATCH] chore(language-core): update imports from alien-signals --- packages/language-core/lib/plugins/vue-tsx.ts | 10 +++++----- packages/language-core/lib/virtualFile/computedSfc.ts | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/language-core/lib/plugins/vue-tsx.ts b/packages/language-core/lib/plugins/vue-tsx.ts index 06afcd8b95..a378b240e8 100644 --- a/packages/language-core/lib/plugins/vue-tsx.ts +++ b/packages/language-core/lib/plugins/vue-tsx.ts @@ -1,5 +1,5 @@ import type { Mapping } from '@volar/language-core'; -import { computed, Unstable } from 'alien-signals'; +import { computed, unstable } from 'alien-signals'; import { generateScript } from '../codegen/script'; import { generateTemplate } from '../codegen/template'; import { parseScriptRanges } from '../parsers/scriptRanges'; @@ -95,7 +95,7 @@ function createTsx( ? parseScriptSetupRanges(ts, _sfc.scriptSetup.ast, vueCompilerOptions.get()) : undefined ); - const scriptSetupBindingNames = Unstable.computedSet( + const scriptSetupBindingNames = unstable.computedSet( computed(() => { const newNames = new Set(); const bindings = scriptSetupRanges.get()?.bindings; @@ -107,7 +107,7 @@ function createTsx( return newNames; }) ); - const scriptSetupImportComponentNames = Unstable.computedSet( + const scriptSetupImportComponentNames = unstable.computedSet( computed(() => { const newNames = new Set(); const bindings = scriptSetupRanges.get()?.bindings; @@ -126,7 +126,7 @@ function createTsx( return newNames; }) ); - const destructuredPropNames = Unstable.computedSet( + const destructuredPropNames = unstable.computedSet( computed(() => { const newNames = new Set(scriptSetupRanges.get()?.defineProps?.destructured); const rest = scriptSetupRanges.get()?.defineProps?.destructuredRest; @@ -136,7 +136,7 @@ function createTsx( return newNames; }) ); - const templateRefNames = Unstable.computedSet( + const templateRefNames = unstable.computedSet( computed(() => { const newNames = new Set( scriptSetupRanges.get()?.useTemplateRef diff --git a/packages/language-core/lib/virtualFile/computedSfc.ts b/packages/language-core/lib/virtualFile/computedSfc.ts index 2cd17d523c..5471dd165e 100644 --- a/packages/language-core/lib/virtualFile/computedSfc.ts +++ b/packages/language-core/lib/virtualFile/computedSfc.ts @@ -1,6 +1,6 @@ import type * as CompilerDOM from '@vue/compiler-dom'; import type { SFCBlock, SFCParseResult } from '@vue/compiler-sfc'; -import { activeSub, activeTrackId, computed, ISignal, setActiveSub, Signal, Unstable } from 'alien-signals'; +import { activeSub, activeTrackId, computed, ISignal, setActiveSub, Signal, unstable } from 'alien-signals'; import type * as ts from 'typescript'; import type { Sfc, SfcBlock, VueLanguagePluginReturn } from '../types'; import { parseCssClassNames } from '../utils/parseCssClassNames'; @@ -124,7 +124,7 @@ export function computedSfc( } return scriptSetupOriginal.get(); }); - const styles = Unstable.computedArray( + const styles = unstable.computedArray( computed(() => parsed.get()?.descriptor.styles ?? []), (block, i) => { const base = computedSfcBlock('style_' + i, 'css', block); @@ -146,7 +146,7 @@ export function computedSfc( }) satisfies Sfc['styles'][number]; } ); - const customBlocks = Unstable.computedArray( + const customBlocks = unstable.computedArray( computed(() => parsed.get()?.descriptor.customBlocks ?? []), (block, i) => { const base = computedSfcBlock('custom_block_' + i, 'txt', block);