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

Is this project dead from community?? #180

Open
JounQin opened this issue Jul 6, 2022 · 1 comment
Open

Is this project dead from community?? #180

JounQin opened this issue Jul 6, 2022 · 1 comment

Comments

@JounQin
Copy link

JounQin commented Jul 6, 2022

Node native ESM spec is not applied and this is causing a lot of compatibility issues, when I use pure ESM, I have to enable importHelpers: false because tslib's configuration is invalid.

#170

#173

#161

Why you maintainers can't see these?? What the resistance stopping you from fixing them?

There are a few PRs fixing those issues but received no feedback, it's just disappointing.

cc @DanielRosenwasser @orta @rbuckton @ExE-Boss

@weswigham
Copy link
Member

What the resistance stopping you from fixing them?

Most tools have very bespoke behavior, and we care about backwards comparability a lot.

  • tslib.es6.js can't be renamed or moved (and probably should remain standalone with all the implementations within it) because it's a direct file people have referenced/included in builds for a long time, long predating any kind of native esm support, and to change any of that would break those users.
  • Likewise, for tslib.js.
  • modules/index.js was added and exists for modern node so someone can import {__helper} from "tslib" in native esm in node and have it actually work, since node can't detect tslib.js's bespoke export assignment factory for named export hoisting.
  • The module condition was provided for webpack so it knows it can just use the esm-syntax tslib.es6.js everywhere in the build, and not bother with the dual-format chicanery node needs.
  • Browsers also don't read package.json type fields, so tslib.es6.js has always worked for browsers directly, too.

So that only leaves bespoke other runtimes/bundlers whose behavior don't match anything I've already listed, which we don't really explicitly support, and definitely don't want to break other users to support. So we take proposed changes to help those runtimes, sure; but not at the expense of existing support.

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

No branches or pull requests

2 participants