Skip to content
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

Fix slice TypeScript 5.5.2 #161

Merged
merged 1 commit into from
Jun 26, 2024
Merged

Fix slice TypeScript 5.5.2 #161

merged 1 commit into from
Jun 26, 2024

Conversation

osyrisrblx
Copy link
Contributor

@osyrisrblx osyrisrblx commented Jun 20, 2024

ts-patch currently doesn't work with TypeScript 5.5.2 because the ending of lib/typescript.js has changed slightly.

5.5.1-rc

// ...
});
})(typeof module !== "undefined" && module.exports ? module : { exports: ts });
if (typeof module !== "undefined" && module.exports) { ts = module.exports; }
//# sourceMappingURL=typescript.js.map

5.5.2

// ...
});
})({ get exports() { return ts; }, set exports(v) { ts = v; if (typeof module !== "undefined" && module.exports) { module.exports = v; } } })
//# sourceMappingURL=typescript.js.map

I copied ts55.ts to create ts552.ts, and then made the appropriate fix.

Diff

image

Fixes #159

@samchon
Copy link
Contributor

samchon commented Jun 25, 2024

@nonara Hope TS 5.2.2 supporting.

@zhfnjust
Copy link

@nonara can you fix this.

@nonara
Copy link
Owner

nonara commented Jun 26, 2024

Looks good. Thanks @osyrisrblx !

@nonara nonara merged commit 31eb80f into nonara:master Jun 26, 2024
osyrisrblx added a commit to roblox-ts/roblox-ts that referenced this pull request Jul 1, 2024
- Upgraded `typescript` to 5.5.2
- Required one small change in `getSourceFileFromModuleSpecifier.ts`
(see diff)

### TODO
- [x] `ts-patch` is broken with 5.5.2, so this is blocked by
nonara/ts-patch#161
- [x] `ts-expose-internals` doesn't have a 5.5.2 release yet, but the
5.5.1-rc release seems to work fine for our purposes
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.

Not working on TypeScript 5.5.2
4 participants