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

Modern node support #70

Merged
merged 3 commits into from
Dec 6, 2024
Merged

Modern node support #70

merged 3 commits into from
Dec 6, 2024

Conversation

dpobel
Copy link
Contributor

@dpobel dpobel commented Nov 16, 2024

This fixes #69 by using https://nodejs.org/docs/latest/api/module.html#modulecreaterequirefilename to be able to require package.json without having to worry about node version.

Also this is fixing the tests for node > 16 (they work locally at least) and while at it, I also remove the useless import (already done in the vite test config)

@arthurremy
Copy link

Hello,
Could you please approve this MR to fix the assert issue with Node 22?

Copy link

codecov bot commented Dec 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.01%. Comparing base (404ac04) to head (9c6e1bd).
Report is 7 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #70      +/-   ##
==========================================
- Coverage   95.44%   87.01%   -8.44%     
==========================================
  Files           5        1       -4     
  Lines         483       77     -406     
  Branches       49       16      -33     
==========================================
- Hits          461       67     -394     
+ Misses         22       10      -12     

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

@bokub
Copy link
Owner

bokub commented Dec 5, 2024

Hello ! I'm really sorry about the delay to answer 🙏

I'm trying to test your code before merging it, but I can't make it work on my machine.

This is the command I'm running (I tried on node 16 and 22):

rm -fr node_modules && npm i && npm run build && node dist/bin/index.cjs daily

And this is the error I have on both node 16 and node 22:

image

Do you have any idea what's going on? Did I miss something?

@bokub
Copy link
Owner

bokub commented Dec 5, 2024

Hello @dpobel

I fixed the problem described in #69 with the following PR: #71

However, my node 18 tests are still failing, and your PR seem to solve the issue!

Do you think you could rebase your branch on master ? If not, no big deal, i'll do it myself

Thanks a lot for your help 🫡

@dpobel dpobel force-pushed the modern-node-support branch from a44e191 to 2470e84 Compare December 5, 2024 20:02
@dpobel dpobel force-pushed the modern-node-support branch from 2470e84 to 25c3e97 Compare December 5, 2024 20:21
@dpobel
Copy link
Contributor Author

dpobel commented Dec 5, 2024

Hi @bokub

I rebased the branch and removed the commit about JSON imports, 🤞 for the CI

@dpobel
Copy link
Contributor Author

dpobel commented Dec 6, 2024

unsure if I can do anything about codecov failing ?

@bokub
Copy link
Owner

bokub commented Dec 6, 2024

Don't worry about codecov, it's just saying that the code coverage dropped, but that's normal because the coverage hasn't been computed since the tests started to fail in CI

@bokub bokub merged commit fd8527c into bokub:master Dec 6, 2024
7 of 8 checks passed
@bokub
Copy link
Owner

bokub commented Dec 6, 2024

I've merged your PR!

Thanks a lot for your work, I couldn't find the free time to fix this failing test 🙏

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.

SyntaxError: Unexpected identifier 'assert'
3 participants