You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Update all dependencies to latest and support ESM #69
I'd like to clarify my interpretation of the intent of the issue. The way I understand it, we'd like to convert the (currently) CommonJS title package into a pure ESM project. That would imply a breaking change for CommonJS consumers of the title package that would force them to pursue one of the 3 options presented at the beginning of the linked gist.
i.e., the "support" for CJS would come from the following point made in the gist:
If the package [e.g., title] is used in an async context, you could use await import(…) from CommonJS instead of require(…).
So that document shows how to make a pure ESM package. There are pros to that. If possible, it would be great to support both CJS and ESM for best backwards compat. I'm not an expert here, but ms recently made this change.
Activity
bryan-hoang commentedon Feb 14, 2022
I'd like to clarify my interpretation of the intent of the issue. The way I understand it, we'd like to convert the (currently) CommonJS
titlepackage into a pure ESM project. That would imply a breaking change for CommonJS consumers of thetitlepackage that would force them to pursue one of the 3 options presented at the beginning of the linked gist.i.e., the "support" for CJS would come from the following point made in the gist:
Would that interpretation be correct?
leerob commentedon Feb 16, 2022
So that document shows how to make a pure ESM package. There are pros to that. If possible, it would be great to support both CJS and ESM for best backwards compat. I'm not an expert here, but
msrecently made this change.vercel/ms#163