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

TypeScript compatibility improvement #3651

Merged
merged 1 commit into from
Sep 17, 2022
Merged

TypeScript compatibility improvement #3651

merged 1 commit into from
Sep 17, 2022

Conversation

luin
Copy link
Member

@luin luin commented Sep 13, 2022

This PR reverts 1f484a2 to improve the compatibility with TypeScript by moving from exports.

TypeScript 4.7 supported exports but it requires moduleResolution set to Node16. This leads to some side effects like relative imports have to include the extename (import('../a.js') instead of import('../a')), and most importantly Node16 is not designed to be used together with bundlers in browser environments, as its name suggests and it brings some Node.js-specific requirements and behaviors.

TypeScript 4.9 may provide some moduleResolution modes that can support exports without introducing any Node.js-specific behaviors: microsoft/TypeScript#50152. However, at best it will release at the end of this year so this is not something we can rely on now.

The con of this PR is the TS outputs can clutter the dev filetree but it can be resolved with an additional build step (set the output path to /dist and when publish run npm publish ./dist) or a script to delete all outputs (seems the only case we build the TS is before publishing). Either of the workaround can be addressed in a separate PR/ticket.

@luin luin marked this pull request as ready for review September 13, 2022 16:18
@luin luin merged commit e581d1c into develop Sep 17, 2022
@luin luin deleted the zh-ts-2.7 branch September 17, 2022 05:56
@Sergiobop
Copy link

Hi @luin , i see you are "reviving" the project once again. Thanks for your work!

Any plans for a new release?

@luin
Copy link
Member Author

luin commented Sep 17, 2022

Hey @Sergiobop 👋 ,

Thanks for using Quill! We still have some TODOs before a new release. I'm working on them and will get them done ASAP, but we don't have any ETAs to share at the moment.

@gayan-scio
Copy link

@luin thanks for the continued effort! please let me know if you're interested in having additional contributors!

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.

3 participants