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 a problem where masquerading as esm #210

Merged

Conversation

himanoa
Copy link
Contributor

@himanoa himanoa commented Feb 19, 2024

Related: #191

Fix a problem Masquerading as ESM.

Changed to use tsup to generate index.d.cts. Accordingly, Created a tsup config.

Operability confirmed

  1. Exec yarn workspace @rimbu/core run build
  2. Change directory to packages/core
  3. Exec npm pack
  4. Upload a generated tgz file to https://arethetypeswrong.github.io
  5. Fixed masquerading as ESM problem

image

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

New Feature Submissions:

  1. Does your submission pass tests?
  2. Have you lint and formatted your code locally prior to submission?

Changes to Core Features:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully ran tests with your changes locally?

@himanoa
Copy link
Contributor Author

himanoa commented Feb 19, 2024

Once combined into a single bundle, the default export issue was also fixed.

Copy link

codecov bot commented Feb 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (4e6bedc) 96.91% compared to head (017c6b1) 97.30%.
Report is 10 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #210      +/-   ##
==========================================
+ Coverage   96.91%   97.30%   +0.38%     
==========================================
  Files         321      321              
  Lines       56319    57636    +1317     
  Branches     6587     6807     +220     
==========================================
+ Hits        54583    56083    +1500     
+ Misses       1724     1541     -183     
  Partials       12       12              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@himanoa himanoa marked this pull request as ready for review February 19, 2024 13:29
Restore bump for debugging
@vitoke
Copy link
Contributor

vitoke commented Feb 19, 2024

Impressive, nice work! So tsup is now used both for cjs and esm build right? Do you think this approach can be copied to all the other packages?

"bundle:deno-prepare": "node ../../config/prepare-denoify.mjs",
"bundle:deno-convert": "denoify --src _deno_prepare/src",
"bundle:deno-move": "rimraf ../../deno_dist/core && mv deno_dist ../../deno_dist/core",
"bundle:deno-clean": "rimraf _deno_prepare",
"bundle:esm": "tsc --p tsconfig.esm.json",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to keep things clean, I think these json files can be removed too

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll fixed it.

@himanoa
Copy link
Contributor Author

himanoa commented Feb 20, 2024

@vitoke

Impressive, nice work!

Thank you. ⭐

So tsup is now used both for cjs and esm build right? Do you think this approach can be copied to all the other packages?

Those two are correct. 👍
Only the core is a little different from the other packages. so I think to change it in another Pull-Request. Is that OK?

@himanoa himanoa requested a review from vitoke February 20, 2024 01:53
Copy link
Contributor

@vitoke vitoke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great improvement!

@vitoke vitoke merged commit 27b5b0b into rimbu-org:main Feb 20, 2024
5 checks passed
@himanoa himanoa deleted the fix-a-problem-where-masquerading-as-esm branch February 20, 2024 07:26
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.

tsc 5.3 fails when using @rimbu/core in a project targeting common js output
2 participants