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 import errors while using TypeScript+ESM #86

Closed
wants to merge 1 commit into from

Conversation

alula
Copy link

@alula alula commented Jul 27, 2023

Should close #77

@rvagg
Copy link
Owner

rvagg commented Aug 7, 2023

@alula can you run npm run build and confirm that the package.json in build/ contains these? cborg is still using https:/mikeal/ipjs to cross-compile esm and cjs but it does its own funky things with package.json, and I suspect it's going to be stripping out these fields. We could either fix it in ipjs, or just ditch ipjs entirely and go esm-only, which is a TODO I have here anyway.

@rvagg
Copy link
Owner

rvagg commented Aug 7, 2023

ah, it even fails in CI: https:/rvagg/cborg/actions/runs/5675282092/job/15666542079?pr=86 sad

@rvagg
Copy link
Owner

rvagg commented Sep 7, 2023

I'm going to pull the trigger on #91 soon and cut a 3.0.0 that drops CJS, and in the meantime skip a compile step completely and ship the types as they are. You could help by installing [email protected] and seeing if that (a) works and (b) solves your problems.

@rvagg
Copy link
Owner

rvagg commented Sep 11, 2023

should be fixed by 3.0.0

@rvagg rvagg closed this Sep 11, 2023
@alula
Copy link
Author

alula commented Oct 1, 2023

Sorry for late response, 3.0.0 works fine for me!

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.

Typings don't work when cborg is imported in a ESM project
2 participants