8000 Fix VSCode extension pre-release by machty · Pull Request #829 · typed-ember/glint · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Merged
merged 18 commits into from
Mar 23, 2025
Merged

Fix VSCode extension pre-release #829

merged 18 commits into from
Mar 23, 2025

Conversation

machty
Copy link
Contributor
@machty machty commented Mar 23, 2025

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):

image

Example of Glint in new TS Plugin mode kicking in in VSCode (.hbs file):

image

Version 1.4.3 available in VSCode marketplace for pre-release download.

@@ -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",
Copy link
8000
Contributor Author

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)

Copy link
Contributor

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"
Copy link
Contributor Author

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.
Copy link
Contributor Author

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.

@machty machty merged commit 5f31cef into main Mar 23, 2025
3 of 4 checks passed
@machty machty deleted the tsplugin-packaging-tweaks branch March 23, 2025 15:12
@github-actions github-actions bot mentioned this pull request Mar 23, 2025
@NullVoxPopuli NullVoxPopuli added the bug Something isn't working label Mar 23, 2025
@NullVoxPopuli NullVoxPopuli changed the title Working VSCode extension pre-release Fix VSCode extension pre-release Mar 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0