Closed drfuzzyness closed 1 year ago
Hey @drfuzzyness. Could you try cron-schedule@4.0.0-next.2? The library is now ESM only and should support conditional exports with moduleResolution: "NodeNext"
.
The only relevant breaking change for you should be that the schedulers are no longer exposed in the default export, but need to be manually imported from cron-schedule/schedulers/interval-based.js
or cron-schedule/schedulers/timer-based.js
.
Can confirm this is resolved in "cron-schedule": "^4.0.0"
, thank you!
Using this library when Typescript is configured with
moduleResolution: "NodeNext"
, type definitions can fail to load. This is resolved by including thetype
definitions in theexports
map ofpackage.json
.https://github.com/P4sca1/cron-schedule/blob/0bff6865580b452e4fa8ea508d1e8111e7c528d7/package.json#L32-L35
The following patch fixes it: