Skip to content

Conversation

@Teages
Copy link
Collaborator

@Teages Teages commented May 7, 2025

No description provided.

@pkg-pr-new
Copy link

pkg-pr-new bot commented May 7, 2025

Open in StackBlitz

npm i https://pkg.pr.new/vue-sfc-transformer@46

commit: ebd6d5a

@mattmess1221
Copy link

Does it have to be a number or could you get away with using a string? That wouldn't get mangled by the minifier.

@Teages
Copy link
Collaborator Author

Teages commented May 7, 2025

In earlier versions, using string might interfere with determining the original quotes.

Let me check if string works now


I think we can use random string now and there is no need to use uuid

@Teages Teages changed the title fix: avoid scientific notation in handling snippet fix: use random string as batch snippet splitter May 7, 2025
@Teages Teages marked this pull request as ready for review May 7, 2025 15:36
@Teages Teages requested a review from Copilot May 7, 2025 15:37
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR replaces the inline random batch splitter generation with a dedicated function, generateSnippetSplitter, to improve code modularity and reusability.

  • Introduces generateSnippetSplitter to encapsulate random splitter generation.
  • Replaces inline random splitter code with a call to generateSnippetSplitter in transformJsSnippets.
Comments suppressed due to low confidence (1)

src/utils/template.ts:345

  • [nitpick] Consider renaming the variable 'identify' to 'identifier' for improved clarity and consistency with common naming conventions.
const identify = Math.random().toString(36).substring(2, 15)

@Teages Teages merged commit b9c96d3 into main May 7, 2025
4 checks passed
@Teages Teages deleted the fix/avoid-scientific-notation branch May 7, 2025 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants