Skip to content

Upgrade to TypeScript 6.0#1704

Merged
Perryvw merged 15 commits into
masterfrom
ts-6b
Apr 21, 2026
Merged

Upgrade to TypeScript 6.0#1704
Perryvw merged 15 commits into
masterfrom
ts-6b

Conversation

@Perryvw
Copy link
Copy Markdown
Member

@Perryvw Perryvw commented Apr 3, 2026

50 failing tests remaining, they still need some careful looking into.

Took many test fixes from #1701, all ones I'd be willing to merge. Might be more in there for remaining failing tests, but ran out of time for now.

@Perryvw Perryvw marked this pull request as ready for review April 20, 2026 20:35
@RealColdFry
Copy link
Copy Markdown
Contributor

LGTM modulo module resolution comments.

Awaiting CI but unit tests on my local branch also passed, including after resolving merge conflicts with master. SKimmed other transformer changes but test suite covers so comfortable approving.

}`
)
.setOptions({ noResolvePaths: ["ignore*"] })
.debug()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.debug()

Comment on lines 212 to +216
const resolvedPath = this.formatPathToFile(dependencyPath, requiringFile);
const fileFromPath = this.getFileFromPath(resolvedPath);
if (fileFromPath) return fileFromPath;

if (this.options.paths && this.options.baseUrl) {
if (this.options.paths) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ordering diverges from TS 6: project file lookup (like a sibling file) can win over a paths-mapped target.

Ref: https://www.typescriptlang.org/docs/handbook/modules/reference.html#paths

TypeScript offers a way to override the compiler’s module resolution for bare specifiers with the paths compiler option.


Minimal failing repro at RealColdFry/TypeScriptToLua@e43097e with CI test result

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, it's not clear to me that this is a TS 6.0 change from the release notes. I suppose paths without baseUrl now works so this might get exercised more, but can probably ignore / can be added separately.

});

test("can ignore specific files with glob pattern", () => {
test.only("can ignore specific files with glob pattern", () => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
test.only("can ignore specific files with glob pattern", () => {
test("can ignore specific files with glob pattern", () => {

@Perryvw Perryvw merged commit 591989b into master Apr 21, 2026
4 checks passed
@Perryvw Perryvw deleted the ts-6b branch April 21, 2026 20:03
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