Comments (4)
Sounds, good. I should be done by the end of next weekend then do the pull request. If I have time I'm going to review all the open bug tickets and see if I can close some out with this pr.
Edit: Not sure if you are aware but you can install the updated version for testing via: yarn add https://github.com/MichaelLeeHobbs/cron-parser it's fully functional as of now and I should not break it at this point.
from cron-parser.
@harrisiirak I've added a bunch of tests for #156 see the end of https://github.com/MichaelLeeHobbs/cron-parser/blob/master/tests/CronExpression.test.ts I don't know if you had at some point fixed these or I accidentally fixed them in the refactor. They all seem to work correctly for me. The only issue I found was CronExpression.stringify
does not return the original value and that would be very difficult to impossible. So I sort of cheated and added CronExpression.toString
which return this.#expression || this.stringify(true);
As long as this was a parsed expression then this.#expression
will be the original expression.
I've also added a fix for #153 and #299.
Obviously, I still need to document and comment the code which I will do after I am done looking at issues.
Edit: Fixed #190, the refactor supports CJS and ESM.
Edit: Added a fix for #244 in the form of strict mode which defaults to false. See test should throw an error for expression missing fields when in strict mode (#244)
from cron-parser.
Hi @MichaelLeeHobbs!
Looks promising. I started with TS rewrite some time ago but haven't gotten that far. I'm more than happy to receive this as a PR. Although, reviewing this will be tedious work (but it's definitely doable) - actual TS conversion itself + some overall structural improvements.
Best regards
from cron-parser.
If I have time I'm going to review all the open bug tickets and see if I can close some out with this pr.
Solving some low-hanging bugs/issues would be a nice bonus if they don't create too much extra work. I do like what is going in your fork. However, I still prefer reviewing something rather concentrated and compact - if possible, I even consider somehow splitting this up into smaller pieces, so it makes sense while reviewing.
from cron-parser.
Related Issues (20)
- suggestion for iterator example
- Yes, I've also seen it quite frequently in the past. More fun (and actually practical) reasoning behind naming conventions: https://stackoverflow.com/a/41967120/143788 HOT 1
- cron expression does not match result HOT 2
- Add nthDayOfMonth examples
- Unexpected behavior with hours range HOT 1
- ”0 0 22 * * ? * “ parser cron expression error HOT 2
- Unexpected behavior when the step size plus the starting value is higher than the maximal expected value HOT 1
- :bug: the cron time is error HOT 1
- Incorrect next time in UTC for cron expression in America/New_York timezone HOT 9
- The crontab expression '0 0 0 12W 6' is causing a parsing error HOT 1
- [Docs]: API for Composing Cron Strings HOT 1
- Incomplete reset() when prev() was called before makes next() skip a day HOT 3
- First Monday of each month triggers every day HOT 1
- how to express 'every tow weeks on monday' HOT 1
- "0 0 1L */12 *" isn't parsed
- fieldsToExpression bug when using seconds HOT 2
- Browser
- Possible bug or a misunderstanding HOT 2
- Repeatable day of month not working when providing day of week
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cron-parser.