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

🐛 BUG: Refactoring astro.config.mjs file name is wrong #896

Open
openscript opened this issue Jul 9, 2024 · 1 comment
Open

🐛 BUG: Refactoring astro.config.mjs file name is wrong #896

openscript opened this issue Jul 9, 2024 · 1 comment
Labels
needs investigation The cause of the issue is unknown and a deeper investigation is needed to fix it

Comments

@openscript
Copy link

openscript commented Jul 9, 2024

Describe the Bug

When I refactor astro.config.mjs to astro.config.ts the imports are updated and become invalid.

image

After the plugin is done with refactoring the native file name change refactoring is chiming in:

image

This will break the imports (missing '):

image

Steps to Reproduce

  1. Clone https://github.com/openscript/astro-i18n-demo/tree/repro/refactor-astro-config-file-name
  2. Open VSCode with Astro Extension 2.11.0
  3. Refactor astro.config.mjs to astro.config.ts
Version: 1.91.0
Commit: ea1445cc7016315d0f5728f8e8b12a45dc0a7286
Date: 2024-07-01T18:52:41.959Z
Electron: 29.4.0
ElectronBuildId: 9728852
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Linux x64 6.9.7-arch1-1
@github-actions github-actions bot added the needs triage Issue needs to be triaged label Jul 9, 2024
@Princesseuh
Copy link
Member

The first refactor looks correct to me, .ts files are to be imported with .js extensions. Doing both renames at the same time will kinda never work, as they cannot know that it already happened or not, but perhaps there's a way to untangle it so that both extensions don't try to do it.

(The "native renaming" as you put it isn't native, it's TypeScript and our TS plugin doing it)

@Princesseuh Princesseuh added needs investigation The cause of the issue is unknown and a deeper investigation is needed to fix it and removed needs triage Issue needs to be triaged labels Jul 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs investigation The cause of the issue is unknown and a deeper investigation is needed to fix it
Projects
None yet
Development

No branches or pull requests

2 participants