Skip to content

Commit

Permalink
chore(language-core): import toString from muggle-string
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed Jun 18, 2024
1 parent e38a673 commit 3e6e45c
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions packages/language-core/lib/codegen/template/elementProps.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import * as CompilerDOM from '@vue/compiler-dom';
import { camelize } from '@vue/shared';
import { minimatch } from 'minimatch';
import { toString } from 'muggle-string';
import type { Code, VueCodeInformation, VueCompilerOptions } from '../../types';
import { hyphenateAttr, hyphenateTag } from '../../utils/shared';
import { conditionWrapWith, variableNameRegex, wrapWith } from '../common';
import { generateCamelized } from './camelized';
import type { TemplateCodegenContext } from './context';
import { generateEventArg, generateEventExpression } from './elementEvents';
import type { TemplateCodegenOptions } from './index';
import { generateInterpolation } from './interpolation';
import { generateObjectProperty } from './objectProperty';
import { toString } from '@volar/language-core';
import { generateEventArg, generateEventExpression } from './elementEvents';

export function* generateElementProps(
options: TemplateCodegenOptions,
Expand Down
2 changes: 1 addition & 1 deletion packages/language-core/lib/codegen/template/vIf.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { toString } from '@volar/language-core';
import * as CompilerDOM from '@vue/compiler-dom';
import { toString } from 'muggle-string';
import type { Code } from '../../types';
import { newLine } from '../common';
import type { TemplateCodegenContext } from './context';
Expand Down
4 changes: 2 additions & 2 deletions packages/language-core/lib/plugins/file-md.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { SourceMap, toString } from '@volar/language-core';
import { SourceMap } from '@volar/language-core';
import type { SFCBlock } from '@vue/compiler-sfc';
import type { Segment } from 'muggle-string';
import { Segment, toString } from 'muggle-string';
import type { VueLanguagePlugin } from '../types';
import { buildMappings } from '../utils/buildMappings';
import { parse } from '../utils/parseSfc';
Expand Down
3 changes: 2 additions & 1 deletion packages/language-core/lib/types.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import type { CodeInformation } from '@volar/language-core';
import type * as CompilerDOM from '@vue/compiler-dom';
import type { SFCParseResult } from '@vue/compiler-sfc';
import type { Segment } from 'muggle-string';
import type * as ts from 'typescript';
import type { VueEmbeddedCode } from './virtualFile/embeddedFile';
import type { CodeInformation, Segment } from '@volar/language-core';

export type { SFCParseResult } from '@vue/compiler-sfc';

Expand Down
5 changes: 3 additions & 2 deletions packages/language-core/lib/virtualFile/computedMappings.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { CodeMapping, Segment, replaceSourceRange } from '@volar/language-core';
import type { CodeMapping } from '@volar/language-core';
import { computed } from 'computeds';
import { Segment, replaceSourceRange } from 'muggle-string';
import type * as ts from 'typescript';
import type { Sfc, VueCodeInformation } from '../types';
import { allCodeFeatures } from '../plugins/shared';
import type { Sfc, VueCodeInformation } from '../types';

export function computedMappings(
snapshot: () => ts.IScriptSnapshot,
Expand Down

0 comments on commit 3e6e45c

Please sign in to comment.