Skip to content

Conversation

@AugustinMauroy
Copy link

@AugustinMauroy AugustinMauroy commented May 8, 2025

  • Tested on 20, 22, 24 ✅
  • sadly if we don't want to break we need cjs wrapper

Note

That's an experiment so it's may not be merged

@rom1504
Copy link
Member

rom1504 commented May 8, 2025

I think we should move much less files. Otherwise it will be really bad in bigger packages.

@AugustinMauroy
Copy link
Author

AugustinMauroy commented May 8, 2025

I think we should move much less files. Otherwise it will be really bad in bigger packages.

Why not merge this pr with the proof that CJS works, then do the following which removes the CJS test

now on npmjs: unpacked size 34.3 kB
now on my branch: unpacked size 47.0 kB

@rom1504
Copy link
Member

rom1504 commented May 8, 2025

If we have to move so many files then I would say it doesn't work and we shouldn't migrate

@AugustinMauroy
Copy link
Author

If we have to move so many files then I would say it doesn't work and we shouldn't migrate

AH you mean moving to mod, src ... ?

we can do without bu IMO it's will be better in term of maintainability

@extremeheat
Copy link
Member

Most of the changes here are unnecessary. Simply changing module.export with export keyword should be all that's needed

@AugustinMauroy
Copy link
Author

Most of the changes here are unnecessary. Simply changing module.export with export keyword should be all that's needed

The idea of having main mod on ESM is to allowing JSR publish (REF discord discussion)

@extremeheat
Copy link
Member

Unless that doesn't support npm packages, I don't understand the comment

@AugustinMauroy
Copy link
Author

Unless that doesn't support npm packages, I don't understand the comment

Could you rephrase your idea because I didn't get it

@rom1504
Copy link
Member

rom1504 commented May 9, 2025

Can you change this PR so that it modifies the minimal amount of files and moves none ?

@AugustinMauroy
Copy link
Author

I can ofc

@rom1504
Copy link
Member

rom1504 commented May 10, 2025

looks like this specific module has already been supporting esm since 2021 #17

@AugustinMauroy
Copy link
Author

looks like this specific module has already been supporting esm since 2021 #17

Yes, but no, the idea here is to put the esm first. As a reminder, the ultimate goal is to publish packages on JSR in order to move forward with the JS ecosystem.

AugustinMauroy and others added 2 commits June 5, 2025 09:42
Co-authored-by: Joyee Cheung <[email protected]>
@AugustinMauroy
Copy link
Author

@rom1504 ready ?

@AugustinMauroy
Copy link
Author

cc @rom1504

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.

4 participants