Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Differences when running on code with semicolons vs without semicolons #1536

Open
niklas-wortmann opened this issue May 14, 2024 · 0 comments

Comments

@niklas-wortmann
Copy link

Describe the bug

Version: 22.0.0

I am doing code transformation with ts morph. Running sourceFile.insertVariableStatement(startLineNumber, {...} on code that uses semicolons returns vastly different results than running it on code without semicolons.

To Reproduce

The latest commit of this repository contains a failing test due to this issue. https://github.com/niklas-wortmann/nuxt/blob/useAsyncDataMigration/packages/nuxt/schematics/migrations/4_0_0/index.ts

running npm run test on this package json https://github.com/niklas-wortmann/nuxt/blob/useAsyncDataMigration/packages/nuxt/schematics/package.json will show the failing tests due to missing semicolons on the source file

Expected behavior

Semicolons shouldn't have an impact here :D

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

No branches or pull requests

1 participant