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
fix: Fix TypeScript plugin compatibility with TS 5.0 #532
Conversation
🦋 Changeset detectedLatest commit: b5bc090 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
| @@ -10,19 +10,46 @@ import { decorateGetImplementation } from './implementation.js'; | |||
| import { decorateLineColumnOffset } from './line-column-offset.js'; | |||
| import { decorateRename } from './rename.js'; | |||
|
|
|||
| const astroPluginPatchSymbol = Symbol('astroPluginPatchSymbol'); | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved on the spot.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately not my code, copied that part from Svelte's TS plugin, sorry to disappoint
|
Unfortunately, the error persists. Export and import statments in |
Do you have a project I can look at? |
For example an actual repo (https://github.com/prismaticweb/mmw-webpage/blob/main/src/components/PerkCollection/index.ts). I tried to install the ts-plugin and add it manually, without the plugin, switching pre-release, etc. |
|
Thank you, I'll take a look! |
|
Found the issue, will send out a fix as soon as possible. The plugin actually does work, I think there's just a packaging error |
Uh, perfect! Thank you for the quick replay and fix. |
|
This PR should fix the issue: #538. Sorry for the inconvenience! |
Changes
Our plugin was broken in TS 5.0+ due to internal changes to TS. This PR fixes this by using the recommended method for patching language services inside TypeScript plugins and patching the right method for resolving modules
Fix #519
Testing
Tests should pass!
Docs
N/A