5.0.1 (2024-04-29)
- use nextTimeout variable (0a067a8)
5.0.0 (2024-04-29)
- getPrevDate: the wrong result was sometimes returned for months with less than 31 days (6537bc1), closes #313
- update dependencies, switch from eslint + prettier to biome, (43c2868)
- Support for Node.js 16 is dropped, as it is End of Life. Our code is tested against Node.js LTS release version 18 and 20.
There are a lot of changes in this commit, because of formatting changes (e.g. tabs instead of spaces).
Configured vitest to generate a junit test report, which is uploaded to CircleCI. The CI will now run biome check, which checks the code for linting and formatting issues.
Signed-off-by: Pascal Sthamer 10992664+P4sca1@users.noreply.github.com
4.0.0 (2023-03-30)
- correctly parse weekday ranges that include sunday (#283) (2fb78b5)
- specify types for legacy support (7288c13)
- drop support for node14 (d47ac6a)
- esm only build (58cbdd7)
- If your environment does not support conditional exports, you have to import the schedulers from cron-schedule/dist/schedulers instead of cron-schedule/schedulers.
Signed-off-by: Pascal Sthamer 10992664+P4sca1@users.noreply.github.com
- Support for node14 is dropped, due to its EOL in the next month and missing ESM module support
Signed-off-by: Pascal Sthamer 10992664+P4sca1@users.noreply.github.com
- The package is now ESM only. A CommonJS or IIFE build is no longer provided.
- The minimum required version of Node.js is now 14
- utils are no longer exposed
- schedulers are no longer exposed in the default entry point.
Import them from
cron-schedule/schedulers/interval-based.js
andcron-schedule/schedulers/timer-based.js
instead.
Signed-off-by: Pascal Sthamer 10992664+P4sca1@users.noreply.github.com
4.0.0-next.3 (2023-03-30)
4.0.0-next.2 (2023-03-30)
- specify types for legacy support (7288c13)
- If your environment does not support conditional exports, you have to import the schedulers from cron-schedule/dist/schedulers instead of cron-schedule/schedulers.
Signed-off-by: Pascal Sthamer 10992664+P4sca1@users.noreply.github.com
4.0.0-next.1 (2023-03-30)
- drop support for node14 (d47ac6a)
- esm only build (58cbdd7)
- Support for node14 is dropped, due to its EOL in the next month and missing ESM module support
Signed-off-by: Pascal Sthamer 10992664+P4sca1@users.noreply.github.com
- The package is now ESM only. A CommonJS or IIFE build is no longer provided.
- The minimum required version of Node.js is now 14
- utils are no longer exposed
- schedulers are no longer exposed in the default entry point.
Import them from
cron-schedule/schedulers/interval-based.js
andcron-schedule/schedulers/timer-based.js
instead.
Signed-off-by: Pascal Sthamer 10992664+P4sca1@users.noreply.github.com
3.0.6 (2022-04-27)
- cron.matchDate always returning true for day of month, when either weekday or day of month is unrestricted (#271) (8ebd6a6), closes #270 #270
3.0.5 (2022-02-25)
- relax allowed ranges to be compatible with linux spec (34466d4)
3.0.4 (2021-10-28)
3.0.3 (2021-08-17)
3.0.2 (2021-06-25)
3.0.1 (2021-02-23)
- fix files missing in npm bundle (00c173b)
3.0.0 (2021-02-23)
- The third argument to IntervalBasedScheduler.registerTask is no longer isOneTimeTask. Instead it is an object where one attribute is the old isOneTimeTask parameter.
Signed-off-by: Pascal Sthamer sthamer.pascal@gmail.com
2.2.4 (2020-11-21)
- fix package.json exports (c172cdc)
2.2.3 (2020-11-20)
- fix typo in comment (499afc2)
2.2.2 (2020-11-20)
- deps: update yarn.lock (e22b7cc)
2.2.1 (2020-11-20)
- deps: regenerate yarn.lock (ef1e3fe)
- Slightly improve performance of the interval based scheduler.
- Add methods to iterate over next and previous dates:
cron.getNextDatesIterator
andcron.getPrevdatesIterator()
- Mark library as side effect free to support tree shaking.
- Improved compatibility with bundlers like webpack.
- Renamed
Schedule
toCron
. - New
IntervalBasedCronScheduler
. - Moved
setTimeout
,setInterval
andclearTimeoutOrInterval
toTimerBasedCronScheduler
.
See README.md
for instructions on how to use the new scheduler.
Quick migration guide:
// v1.x
import { parseCronExpression } from 'cron-schedule'
const schedule = parseCronExpression('* * * * *')
schedule.setTimeout(fn)
schedule.setInterval(fn)
schedule.clearTimeoutOrInterval(id)
// v2.x
import { parseCronExpression, TimerBasedCronScheduler as scheduler } from 'cron-schedule'
const cron = parseCronExpression('* * * * *')
scheduler.setTimeout(cron, fn)
scheduler.setInterval(cron, fn)
scheduler.clearTimeoutOrInterval(id)
- Publish type declarations to npm.
- Publish source maps to npm.