-
Notifications
You must be signed in to change notification settings - Fork 58
Fix VSCode extension pre-release #829
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
Conversation
@@ -14,7 +14,7 @@ | |||
] | |||
}, | |||
"scripts": { | |||
"reset": " git clean -Xfd; git clean -fd; pnpm i && pnpm build", | |||
"reset": "git clean -Xfd; git clean -fd; pnpm i && pnpm build > /dev/null 2>&1; pnpm i -f; pnpm build; pnpm sync", |
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.
@NullVoxPopuli had to reinstate your original reset script (main is broken without this fix too)
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.
Hmm sus. I'll investigate
"enableForWorkspaceTypeScriptVersions": true, | ||
"languages": [ | ||
"glimmer-ts", | ||
"glimmer-js" | ||
"glimmer-js", | ||
"handlebars" |
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.
This declaration fixes the ts+hbs loose mode vscode test on main failing; I'm guessing some new VSCode bumped its inner node runtime to something that disallows monkeypatching the fs module (see other comment), so our monkey patched code to pass in handlebars
via a value read from VSCode preferences no longer works (which is where we were supplying handlebars
, so we have to provide it here).
@@ -234,6 +232,10 @@ try { | |||
|
|||
const languageIdsQuoted = config.server.includeLanguages.map((lang) => `'${lang}'`).join(','); | |||
|
|||
// TODO: as of March 23 2025 and perhaps a few days before, this fs.readFileSync hacky | |||
// is failing with "Cannot set property readFileSync of #<Object> which has only a getter". | |||
// Stay tuned for another hack from Volar... or hopefully an upstream fix from VSCode. |
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.
This is the no-longer-working hack described above.
This PR introduces a number of eslint and vsce tweaks to properly bundle the dependencies needed for pre-release Glint to work when downloaded from the VSCode marketplace.
Example of Glint in new TS Plugin mode kicking in in VSCode (.gts file):
Example of Glint in new TS Plugin mode kicking in in VSCode (.hbs file):
Version 1.4.3 available in VSCode marketplace for pre-release download.