Skip to content

Upgrade TypeScript to 5.9.2, @types/node to 22.17.0, and webpack to 5.101.1 #961

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Copilot
Copy link

@Copilot Copilot AI commented Aug 12, 2025

This PR upgrades key development dependencies to their latest compatible versions to improve type safety, leverage newer language features, and benefit from bug fixes and performance improvements.

Changes Made

Dependency Upgrades

  • TypeScript: 5.1.35.9.2 - Latest stable version with improved type checking and performance
  • @types/node: 16.18.3622.17.0 - Updated Node.js type definitions for better compatibility
  • webpack: 5.77.05.101.1 - Latest version with security fixes and performance improvements

Additional Type Compatibility Fixes

  • @types/gulp: 4.0.64.0.17 - Updated for better TypeScript 5.9 compatibility
  • @types/vinyl: Added explicit 2.0.12 - Resolved transitive dependency type conflicts
  • chokidar: Added explicit 4.0.3 - Fixed FSWatcher interface compatibility issues

Code Fixes Required by Upgrades

Fixed TypeScript 5.9 stricter null checking:

// Before: TypeScript 5.9 detected unreachable nullish coalescing
context.telemetry.properties.detectedFrameworks = `(${detectorResult?.frameworks.map(fi => fi.framework).join('), (')})` ?? 'N/A';

// After: Proper conditional check
context.telemetry.properties.detectedFrameworks = detectorResult?.frameworks ? `(${detectorResult.frameworks.map(fi => fi.framework).join('), (')})` : 'N/A';

Fixed regex compatibility for ES6 target:

// Before: Used ES2018+ 's' flag that wasn't available in ES6 target
data.replace(/<!-- region exclude-from-marketplace -->.*?<!-- endregion exclude-from-marketplace -->/gis, '');

// After: Compatible approach using character class
data.replace(/<!-- region exclude-from-marketplace -->[\s\S]*?<!-- endregion exclude-from-marketplace -->/gi, '');

Validation

Build: TypeScript compilation succeeds without errors
Lint: ESLint passes (minor warning about TypeScript version in plugin, but functionality works)
Webpack: Production build completes successfully
Main.js: Remains clean with no build artifacts
Type Safety: All type issues resolved without using skipLibCheck

The project now benefits from the latest TypeScript features, improved type checking, and updated security patches while maintaining full backward compatibility.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

@Copilot Copilot AI changed the title [WIP] Upgrade TypeScript to ^5.9.2, Node types to ^22.17.0, and webpack dependencies Upgrade TypeScript to 5.9.2, @types/node to 22.17.0, and webpack to 5.101.1 Aug 12, 2025
@Copilot Copilot AI requested a review from nturinski August 12, 2025 19:47
Copilot finished work on behalf of nturinski August 12, 2025 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants