-
Notifications
You must be signed in to change notification settings - Fork 161
Complete Refactor to TypeScript, Improved Test Coverage, and Bug Fixes #323
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
Closed
Closed
Changes from 98 commits
Commits
Show all changes
111 commits
Select commit
Hold shift + click to select a range
000f595
WIP - Phase 1 of converting to TypeScript is mostly complete
MichaelLeeHobbs 4d1e56b
WIP - Phase 1 of converting to TypeScript is mostly complete
MichaelLeeHobbs 5a69ad9
WIP - refactored compactField into CronFields. Clean up on other files
MichaelLeeHobbs 078fe83
WIP: cleanup types
MichaelLeeHobbs 36271a6
WIP: cleanup types
MichaelLeeHobbs 036fca9
WIP: refactored findSchedule in to multiple smaller functions
MichaelLeeHobbs b9e6bac
WIP: refactored findSchedule in to multiple smaller functions
MichaelLeeHobbs a332968
WIP: refactored shiftTimezone on to CronDate
MichaelLeeHobbs 6d8a85f
WIP: refactored file names. Testing install from github
MichaelLeeHobbs 281efe9
added prepare script
MichaelLeeHobbs 81a8800
updated library packaging
MichaelLeeHobbs 14a40ef
updated the default export to match the current library
MichaelLeeHobbs d0cb09f
updated exports for compatible with CommonJS-style require
MichaelLeeHobbs 391e9e7
attempt 2 at cjs combability
MichaelLeeHobbs 805a27b
attempt 3 at cjs compatability
MichaelLeeHobbs 0cc6b80
some clean up
MichaelLeeHobbs 2795eed
wip - cleaner support for CJS and ESM
MichaelLeeHobbs 730921a
wip - looks like we still need the index.cjs.js to support cjs even w…
MichaelLeeHobbs 1feeabc
wip - added notes, and general cleanup
MichaelLeeHobbs 2231615
wip - added note
MichaelLeeHobbs d16bc5d
wip - init jest setup/work
MichaelLeeHobbs 6eea54b
WIP - testing precommit lint
MichaelLeeHobbs b6794a1
WIP - testing precommit lint
MichaelLeeHobbs 1a90deb
wip - testing pre-commit hook
MichaelLeeHobbs 2710da0
wip - formatted code
MichaelLeeHobbs 7743b58
wip - refactoring test...
MichaelLeeHobbs 184744a
wip - refactoring test...
MichaelLeeHobbs 060bab9
wip - refactored CronParser stringify test
MichaelLeeHobbs d338492
wip - Test conversion complete. Overall coverage is at 91%. Lost lots…
MichaelLeeHobbs 7ef341a
wip - types cleanup
MichaelLeeHobbs 94a0add
wip - cleanup
MichaelLeeHobbs 722df4b
wip - simplified code
MichaelLeeHobbs c12e6e4
wip - simplified code
MichaelLeeHobbs 3184fdc
wip - fixes #153 and #299. Adds test for #156
MichaelLeeHobbs b073cfe
wip - Adds fix for #156 in the form of toString vs stringify as it'd …
MichaelLeeHobbs fa910fa
wip - Adds fix for #244 in the form of strict mode which defaults to …
MichaelLeeHobbs 7fc1773
wip - working on a fix for 284
MichaelLeeHobbs 61ee67a
wip - working on a fix for 284
MichaelLeeHobbs 672df08
wip - fixed 284, major cleanup
MichaelLeeHobbs eca418a
wip - 99.5% code coverage and mostly documented
MichaelLeeHobbs 75eba12
wip - code analysis clean up
MichaelLeeHobbs 24d0d1d
wip - add documentation
MichaelLeeHobbs 2eb4fc2
wip - updated notes
MichaelLeeHobbs a7ecb58
wip - basically done
MichaelLeeHobbs e717cef
Done for now
MichaelLeeHobbs 5ad2f4f
fixed typos
MichaelLeeHobbs 095916e
removed tsx
MichaelLeeHobbs 3ca6ef3
removed npx from scripts calling jest
MichaelLeeHobbs 9c5762f
removed old_typesVersions
MichaelLeeHobbs 204ffbd
update requires node version
MichaelLeeHobbs fd78774
Remove .run folder from repository
MichaelLeeHobbs 04d3071
Remove GPT4 PROMPTS from repository
MichaelLeeHobbs b780f77
cleaned up .gitignore
MichaelLeeHobbs 71db6bb
cleaned up .npmignore
MichaelLeeHobbs 330ec94
cleaned up .eslintrc.cjs
MichaelLeeHobbs 3a06e5b
Update src/CronDate.ts
MichaelLeeHobbs 9b6f51f
renamed applyDateOperation and made hoursLength optional
MichaelLeeHobbs 10eef40
renamed handleMathOp to invokeDateOperation
MichaelLeeHobbs 4849100
cleaned up predefined expressions
MichaelLeeHobbs a721e08
cleaned up Predefined Expressions
MichaelLeeHobbs ad81072
removed pointless defensive code
MichaelLeeHobbs 29f2b65
added types RawCronFields and SerializedCronFields
MichaelLeeHobbs 5f9d8ac
cleaned up asserts on getRawFields
MichaelLeeHobbs 33443c3
fixed test
MichaelLeeHobbs 67a4c2b
cleaned up parse options
MichaelLeeHobbs 2cc95e2
cleaned up handleSingleRange, handleMultipleRanges
MichaelLeeHobbs 6ec7d1a
commented compactField
MichaelLeeHobbs f393744
changed output dir to dist
MichaelLeeHobbs 09c57f4
cleaned up PredefinedExpressionsEnum
MichaelLeeHobbs d9b67fa
cleaned up assert
MichaelLeeHobbs 2925327
Merge remote-tracking branch 'origin/master'
MichaelLeeHobbs d0352a1
removed collect coverage from .js
MichaelLeeHobbs 6e4607b
added prettier as a dev dependencies and added object-curly-spacing t…
MichaelLeeHobbs 172641c
Renamed enums using PascalCase
MichaelLeeHobbs 3ec3ddc
removed prettier, having eslint and prettier at the same time was a b…
MichaelLeeHobbs 6a4fa5d
refactored out CronConstants.ts and refactored constraints into the f…
MichaelLeeHobbs 2d96b49
disabled failing test that are allowed by current behavior. It's upto…
MichaelLeeHobbs c315950
fixed comment
MichaelLeeHobbs 9681153
Fixed bugs for dual builds which broke the tests. Fixed the tests
MichaelLeeHobbs e0e909e
refactored casing on enums
MichaelLeeHobbs de8d623
removed debug
MichaelLeeHobbs 59566a0
renamed interfaces and cleaned up some code
MichaelLeeHobbs 467fdef
freeze instead of cloning to prevent mutation
MichaelLeeHobbs 91a1e2c
optimized applyDateOperation
MichaelLeeHobbs 5cc4170
renamed CronFields to CronFieldCollection
MichaelLeeHobbs 484e302
removed archive
MichaelLeeHobbs ce0048a
fixed github build based on suggestion from harrisiirak
MichaelLeeHobbs b2cfbff
this commit is to capture DaysInMonth changes before removing it so w…
MichaelLeeHobbs e6835fa
refactored out DaysInMonth enum, we had to do silly things to make it…
MichaelLeeHobbs c3ebd04
cleaned up enum names
MichaelLeeHobbs 6f91fb5
cleaned up unneeded mutation protection
MichaelLeeHobbs b0c1a68
cleaned up tests
MichaelLeeHobbs 6f0129f
cleaned up var naming
MichaelLeeHobbs c1812c8
clean up old todos
MichaelLeeHobbs 05d4f6c
cleaned up unneeded mutation protection
MichaelLeeHobbs d0ee50c
added documentation for strict mode
MichaelLeeHobbs 72c3e36
cleaned up the project, 100% coverage, fixed broken test, replaced sp…
MichaelLeeHobbs 0ea8af3
clean up
MichaelLeeHobbs 6e8a8c4
remove unsupported Node.js versions from the build matrix.
MichaelLeeHobbs 76827ec
removed notes
MichaelLeeHobbs b0ed594
removed redundant utc option
MichaelLeeHobbs 4f6593a
cleaned up comments
MichaelLeeHobbs aa36aae
renamed DayOfTheMonthRange to DayOfMonthRange
MichaelLeeHobbs e9c43f5
renamed DayOfTheWeekRange to DayOfWeekRange
MichaelLeeHobbs ff10ea8
renamed CronFieldTypes to CronFieldType
MichaelLeeHobbs 650d7d9
Update src/wrapper-index.cjs
MichaelLeeHobbs 25c4653
removed ESM support and updated documentation
MichaelLeeHobbs b3b5f11
Update src/fields/CronMonth.ts
MichaelLeeHobbs e950926
Update src/fields/CronMonth.ts
MichaelLeeHobbs d728f36
fixed bug where luxon represents sunday as 7 but the cron expression …
MichaelLeeHobbs 68654a3
Merge remote-tracking branch 'origin/master'
MichaelLeeHobbs File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# .editorconfig | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
max_line_length = 160 | ||
|
||
[*.{js,ts}] | ||
ij_typescript_spaces_within_imports = true | ||
harrisiirak marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
module.exports = { | ||
MichaelLeeHobbs marked this conversation as resolved.
Show resolved
Hide resolved
|
||
root: true, | ||
env: { | ||
browser: false, | ||
es6: true, | ||
node: true, | ||
jest: true, | ||
}, | ||
extends: [ | ||
'eslint:recommended' | ||
], | ||
ignorePatterns: [ | ||
'dist/**', | ||
'**/*.json', | ||
'coverage/**', | ||
'docs/**', | ||
'src/index.cjs.js', | ||
], | ||
parserOptions: { | ||
ecmaVersion: 2022, | ||
sourceType: 'module', | ||
}, | ||
overrides: [ | ||
{ | ||
files: ['**/*.ts'], | ||
env: { 'browser': false, 'es6': true, 'node': true }, | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/eslint-recommended', | ||
'plugin:@typescript-eslint/recommended' | ||
], | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
ecmaVersion: 2022, | ||
sourceType: 'module', | ||
}, | ||
plugins: ['@typescript-eslint'], | ||
rules: { | ||
indent: ['error', 2, { SwitchCase: 1 }], | ||
quotes: ['error', 'single'], | ||
semi: ['error', 'always'], | ||
'comma-dangle': ['error', 'always-multiline'], | ||
'@typescript-eslint/no-explicit-any': 0, | ||
'object-curly-spacing': ['warn', 'always'], | ||
'max-len': ['error', { code: 160 }], | ||
harrisiirak marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
} | ||
] | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,4 +22,5 @@ jobs: | |
with: | ||
node-version: ${{ matrix.node-version }} | ||
- run: npm ci | ||
- run: npm run build | ||
- run: npm test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npm run precommit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
:root { | ||
--light-code-background: #FFFFFF; | ||
--dark-code-background: #1E1E1E; | ||
} | ||
|
||
@media (prefers-color-scheme: light) { :root { | ||
--code-background: var(--light-code-background); | ||
} } | ||
|
||
@media (prefers-color-scheme: dark) { :root { | ||
--code-background: var(--dark-code-background); | ||
} } | ||
|
||
:root[data-theme='light'] { | ||
--code-background: var(--light-code-background); | ||
} | ||
|
||
:root[data-theme='dark'] { | ||
--code-background: var(--dark-code-background); | ||
} | ||
|
||
pre, code { background: var(--code-background); } |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.