Skip to content

Upgrade TypeScript devDependency to ^5.9.2 and fix compatibility issues#946

Closed
Copilot wants to merge 4 commits intomainfrom
copilot/fix-e3d540f0-011f-454c-84db-d95bd7857af6
Closed

Upgrade TypeScript devDependency to ^5.9.2 and fix compatibility issues#946
Copilot wants to merge 4 commits intomainfrom
copilot/fix-e3d540f0-011f-454c-84db-d95bd7857af6

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Aug 7, 2025

This PR upgrades the TypeScript devDependency from ^5.1.3 to ^5.9.2 as requested and fixes the resulting build errors to ensure compatibility with the newer TypeScript version.

Changes Made

  • Updated typescript version in package.json devDependencies from ^5.1.3 to ^5.9.2
  • Updated package-lock.json to reflect the new TypeScript version
  • Fixed TypeScript 5.9.2 compatibility issues in RevisionDraftFileSystem.ts:
    • Wrapped Buffer.from() calls with new Uint8Array() to properly handle Buffer to Uint8Array conversion
    • Replaced Buffer comparison with direct Uint8Array byte comparison for better type safety
    • All changes maintain original functionality while satisfying stricter TypeScript 5.9.2 type checking

Verification

  • ✅ TypeScript version confirmed as 5.9.2 via npx tsc --version
  • ✅ Build succeeds with npm run build
  • ✅ Linting works with npm run lint (expected TypeScript version warning)
  • main.js remains unchanged as required
  • tsconfig.json remains unchanged as required
  • ✅ Only 5 lines changed in 1 file to fix build errors

Notes

The upgrade introduces a compatibility warning in ESLint about TypeScript 5.9.2 being newer than the officially supported version range for @typescript-eslint/typescript-estree (which supports >=3.3.1 <5.1.0). This is expected and does not prevent linting from functioning.

TypeScript 5.9.2 has stricter type checking for Buffer/Uint8Array compatibility, requiring explicit type conversions that were previously implicit. The fixes ensure type safety while preserving all original functionality.


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

Copilot AI and others added 2 commits August 7, 2025 21:58
Co-authored-by: nturinski <5290572+nturinski@users.noreply.github.com>
Co-authored-by: nturinski <5290572+nturinski@users.noreply.github.com>
Copilot AI changed the title [WIP] Upgrade TypeScript devDependency to ^5.9.2 Upgrade TypeScript devDependency to ^5.9.2 Aug 7, 2025
Copilot AI requested a review from nturinski August 7, 2025 22:04
@nturinski
Copy link
Copy Markdown
Member

I Grant permission in all of the PRs to modify files to fix build errors only. Ensure that main.js file and tsconfig files stay clean

@nturinski
Copy link
Copy Markdown
Member

@github-copilot Please continue working on this PR and fix the build errors, but ensure that main.js and all tsconfig files remain clean and unchanged.

@nturinski
Copy link
Copy Markdown
Member

@copilot Please continue working on this PR and fix the build errors, but ensure that main.js and all tsconfig files remain clean and unchanged.

…ystem

Co-authored-by: nturinski <5290572+nturinski@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Aug 7, 2025

@github-copilot Please continue working on this PR and fix the build errors, but ensure that main.js and all tsconfig files remain clean and unchanged.

Fixed the TypeScript 5.9.2 compatibility build errors in RevisionDraftFileSystem.ts. The build now succeeds and linting works correctly. Both main.js and tsconfig.json remain unchanged as requested. Changes are minimal (5 lines) and only address Buffer/Uint8Array type compatibility issues introduced by the stricter TypeScript 5.9.2 type checking. Commit: 23611ad

@copilot Please continue working on this PR and fix the build errors, but ensure that main.js and all tsconfig files remain clean and unchanged.

Build errors have been successfully fixed while keeping main.js and tsconfig files clean and unchanged. The TypeScript 5.9.2 upgrade is now complete with minimal surgical changes to resolve compatibility issues. All functionality is preserved. Commit: 23611ad

Copilot AI changed the title Upgrade TypeScript devDependency to ^5.9.2 Upgrade TypeScript devDependency to ^5.9.2 and fix compatibility issues Aug 7, 2025
@nturinski
Copy link
Copy Markdown
Member

@copilot Do not change any other dependencies except for typescript. Do not change main.js or tsconfig. Do not change anything else about the code EXCEPT fixing build errors that result from typescript being upgraded.

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Aug 7, 2025

@copilot Do not change any other dependencies except for typescript. Do not change main.js or tsconfig. Do not change anything else about the code EXCEPT fixing build errors that result from typescrip...

Confirmed that the TypeScript upgrade meets all your requirements:

Only TypeScript dependency changed: Upgraded from ^5.1.3 to ^5.9.2 in package.json
main.js unchanged: No modifications made to main.js
tsconfig.json unchanged: No modifications made to tsconfig files
Minimal build error fixes: Only 5 lines changed in 1 file (RevisionDraftFileSystem.ts) to resolve TypeScript 5.9.2 compatibility issues
Build succeeds: npm run build completes successfully
Linting works: npm run lint runs successfully (with expected TypeScript version warning)

The upgrade is complete with surgical precision as requested. Commit: 23611ad

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