Modernize to v0.6.0: Node 18+, VS Code 1.85, TS 5.6, ESLint, CI - #52
Open
ComfyChloe wants to merge 1 commit into
Open
Modernize to v0.6.0: Node 18+, VS Code 1.85, TS 5.6, ESLint, CI#52ComfyChloe wants to merge 1 commit into
ComfyChloe wants to merge 1 commit into
Conversation
- Bump engines.vscode ^1.23.0 to ^1.85.0 and require node >= 18 - Bump typescript 4.1 -> 5.6, compile target es6 -> es2022 - Replace deprecated tslint with eslint + @typescript-eslint + prettier - Switch test runner from vscode-test to @vscode/test-cli - Drop axios (CVE-2021-3749, CVE-2023-45857); new aw-client-js uses fetch - Update aw-client-js and media submodules to latest master - Tighten activationEvents from ['*'] to ['onStartupFinished'] - Add settings: enabled, serverUrl - Fix heartbeat catch handler for new aw-client error shape - Add GitHub Actions CI workflow (lint, compile, test, package) - Add npm run package script using @vscode/vsce
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR modernizes
aw-watcher-vscodeto current toolchains, addresses long-standing security debt, and adds CI. It is the first release in roughly six years (the last release,0.5.0, was never even tagged in git).Heads-up: because
aw-watcher-vscodehas no git tags on upstream, theversionis bumped0.5.0 → 0.6.0. If reviewers prefer a different line (e.g. patch bump), it's trivial to change before merge.Breaking changes
Requires Node 18+ at runtime — the new
aw-client-jsuses globalfetch.engines.vscodeis now^1.85.0(was^1.23.0, ~2018). The extension will refuse to install on older VS Code.aw-client-jsAPI change — the new submodule (6093fbb) dropsaxiosin favor of nativefetch. TheAWClientconstructor signature is unchanged, but:heartbeat()now returnsPromise<void>(no wrapped response object).FetchErroris now thrown on non-2xx responses instead of an object with{ err, httpResponse, data }.The extension was already using
catch ({ err })against the new shape, which would have crashed at the first failed heartbeat. Fixed.What's new
Manifest
version:0.5.0→0.6.0engines.vscode:^1.23.0→^1.85.0engines.node: added>=18activationEvents:["*"]→["onStartupFinished"](no longer activates on every VS Code start)aw-watcher-vscode.enabled,aw-watcher-vscode.serverUrlDependencies
typescript^4.1.3→^5.6.0tslint(deprecated) →eslint ^8.57.0+@typescript-eslint ^8+prettier ^3.3.0vscode-test(deprecated) →@vscode/test-cli+@vscode/test-electronaxios ^0.21.1(CVE-2021-3749, CVE-2023-45857) → removed@vscode/vscefornpm run packagemocha^8.2.1→^10.7.0,@types/mocha^2.2.42→^10.0.0,@types/node^7.10.11→^22.0.0Source
src/extension.ts:catchhandler no longer destructures{ err }; usesinstanceof Errorand reads.message.initGit()is null-safe when the built-in Git extension isn't installed.enabledandserverUrlsettings.try/catch (err: any)in favor oferr: unknown.src/test/extension.test.ts: replaced the fully-commented-out sample test with a real smoke test that verifies the compiled entry point exists.tsconfig.json: targetes6→es2022, addednoUnusedParameters,noImplicitReturns,noFallthroughCasesInSwitch,forceConsistentCasingInFileNames,esModuleInterop. Added apathsmapping soaw-clientresolves to the submodule source (aw-client-jsis not published to npm).Tooling
tslint.jsonremoved..eslintrc.json,.eslintignore,.prettierrc.json..vscode-test.jsconfig for the new test runner..github/workflows/ci.yml(lint + compile + test +.vsixartifact on Ubuntu).Submodules
aw-client-js:11a7f066(Jan 2021) →6093fbb(latest master, includes Bearer-token auth support).media:cb597f7c(Apr 2020) →a45151(latest master).Docs
CHANGELOG.md: added a full 0.6.0 section in Keep-a-Changelog format.README.md: documented new settings, added a "Development" section with the build/test commands, added the 0.6.0 release notes entry.Verification
All run locally on Windows with Node 20:
npm installnpm run lintnpm run compilenpm run test:mochanpm run packageaw-watcher-vscode-0.6.0.vsix(622 KB)Risk assessment
aw-watcher-vscode_<hostname>), the event schema is unchanged ({ language, project, file, branch }), and the only setting change is additive (newenabled/serverUrlsettings default to existing behavior).aw-client-jsbuilds work against the currentaw-serverAPI. If you have an olderaw-serverrunning, theFetchErrorwill surface as a toast on every heartbeat — setaw-watcher-vscode.enabled: falseto silence it.axiosremoval is the single biggest win.npm auditstill flags transitive issues in devDeps (mostlyeslint's deprecation); those are dev-only and don't ship to users.Checklist
package.jsonCHANGELOG.mdupdated.vsixbuildsv0.6.0after merge (nov0.5.0tag exists upstream — adding the tag retroactively is a separate decision)