vscode-azurestorage
vscode-azurestorage copied to clipboard
Upgrade TypeScript to 5.9.2, @types/node to 22.17.0, and webpack to latest with compatibility fixes
This PR upgrades critical development dependencies to their latest versions and resolves typing compatibility issues introduced by the stricter TypeScript 5.x checking.
Changes Made
Dependency Upgrades
- TypeScript: 4.9.5 → 5.9.2
- @types/node: 16.0.0 → 22.17.0
- webpack: 5.84.1 → 5.101.1
- @types/gulp: 4.0.6 → 4.0.17
- gulp: 5.0.0 → 5.0.1
TypeScript Configuration
- Updated compilation target from ES6 to ES2018 to support named capturing groups used in
BlobContainerFS.ts - Maintained
skipLibCheck: falseas required
Code Fixes
- Fixed Timer type compatibility in
AzureStorageFS.tsby changingNodeJS.TimertoNodeJS.Timeoutfor properclearTimeout()usage - All typing issues resolved without enabling
skipLibCheck
Compatibility Solutions
- Added npm package overrides for
@types/vinyl(2.0.12) andchokidar(4.0.3) to resolve version conflicts - Created compatibility shim (
types/chokidar-compat.d.ts) to bridge API changes between chokidar 3.x and 4.x for gulp integration - The compatibility shim provides the missing
WatchOptionsinterface that@types/gulpexpects
Verification
- ✅ Project builds successfully with
npm run build - ✅ All linting passes with
npm run lint - ✅ Webpack compilation works with
npm run webpack - ✅
main.jsremains clean with no build artifacts - ✅ All existing functionality preserved
Technical Notes
The main challenge was resolving compatibility between the upgraded TypeScript 5.x strict checking and older type definitions in the build toolchain. The solution involved:
- Using npm overrides to force compatible versions of transitive dependencies
- Creating a minimal compatibility shim for the chokidar API changes
- Updating the TypeScript target to support modern JavaScript features used in the codebase
This upgrade brings the project up to current standards while maintaining full backward compatibility and fixing potential typing issues.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.