-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Updated the entire codebase to Typescript
BREAKING CHANGES: - **General**: Constructors can no longer be used with JSON string. Parse the JSON before passing it to the constructor - **General**: A very few type checks have been removed as they became obsolete with Typescript - **General**: Passing Millisenconds is not supported as a valid date anymore, use one of the supported date formats - **General**: Some default values changed from undefined to null - **General**: supported environment set to node >= 10 - **General**: Some error messages were updated, so if your code relies on error message strings, please double check these - **Calendar**: `domain()` was removed - **Calendar**: `clear()` method was removed - **Event**: `repeating.excludeTimezone` was removed and uses the time zone of the event or calendar instead - **Event**: `repeating.wkst` is now `repeating.startOfWeek` - **Event**: `geo()` unsupports string parameter, only `{lat: number, lon: number}` objects are now allowed - **Category**: `Category::name(null)` is not allowed anymore - **Attendee**: `rsvp()` uses booleans now, invalid arguments are casted to boolean
- Loading branch information
Showing
57 changed files
with
27,593 additions
and
11,354 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -1,37 +1,54 @@ | ||
{ | ||
"env": { | ||
"node": true, | ||
"browser": true, | ||
"commonjs": true, | ||
"es6": true, | ||
"node": true, | ||
"mocha": true | ||
}, | ||
"extends": "eslint:recommended", | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/eslint-recommended", | ||
"plugin:@typescript-eslint/recommended" | ||
], | ||
"globals": { | ||
"Atomics": "readonly", | ||
"SharedArrayBuffer": "readonly" | ||
}, | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"sourceType": "module" | ||
"ecmaVersion": 2018 | ||
}, | ||
"plugins": [ | ||
"@typescript-eslint" | ||
], | ||
"rules": { | ||
"indent": [ | ||
"error", | ||
4 | ||
], | ||
"linebreak-style": [ | ||
"error", | ||
"unix" | ||
], | ||
"semi": "error", | ||
"quotes": [ | ||
"error", | ||
"single" | ||
], | ||
"semi": [ | ||
"error", | ||
"always" | ||
], | ||
"no-console": [ | ||
"indent": [ | ||
"error", | ||
{ | ||
"allow": ["log"] | ||
} | ||
4 | ||
] | ||
} | ||
} | ||
}, | ||
"overrides": [ | ||
{ | ||
"files": [ | ||
"src/**/*.ts" | ||
], | ||
"rules": { | ||
"@typescript-eslint/ban-ts-comment": "warn" | ||
} | ||
}, | ||
{ | ||
"files": [ | ||
"test/**/*.ts" | ||
], | ||
"rules": { | ||
"@typescript-eslint/ban-ts-ignore": "off", | ||
"@typescript-eslint/ban-ts-comment": "off" | ||
} | ||
} | ||
] | ||
} |
This file contains 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,6 @@ | ||
require: | ||
- ts-node/register | ||
- source-map-support/register | ||
full-trace: true | ||
extension: | ||
- ts |
This file was deleted.
Oops, something went wrong.
This file contains 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,30 @@ | ||
{ | ||
"cache": false, | ||
"check-coverage": true, | ||
"extension": [ | ||
".ts" | ||
], | ||
"include": [ | ||
"src/**/*.ts" | ||
], | ||
"exclude": [ | ||
"coverage/**", | ||
"node_modules/**" | ||
], | ||
"report-dir": "./doc/coverage/", | ||
"temp-directory": "./.nyc_output", | ||
"sourceMap": true, | ||
"reporter": [ | ||
"text", | ||
"text-summary", | ||
"cobertura", | ||
"html" | ||
], | ||
"all": true, | ||
"instrument": true, | ||
"branches": 80, | ||
"lines": 92, | ||
"functions": 90, | ||
"statements": 92, | ||
"per-file": true | ||
} |
This file contains 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,24 @@ | ||
#!/usr/bin/env bash | ||
|
||
echo "########################" | ||
echo "# build.sh" | ||
echo "# Branch = ${BRANCH}" | ||
echo "########################" | ||
|
||
npx tsc | ||
|
||
if [ "$BRANCH" != "develop" ] && [ "$BRANCH" != "main" ] && [ "$BRANCH" != "" ]; then | ||
echo "Skip documentation as branch is not develop and not main (is: ${BRANCH})."; | ||
exit 0; | ||
fi; | ||
|
||
|
||
rm -rf ./doc | ||
npx typedoc | ||
|
||
npx mocha --reporter mochawesome | ||
mv ./mochawesome-report/mochawesome.html ./mochawesome-report/index.html | ||
mkdir -p ./doc | ||
mv ./mochawesome-report ./doc/tests | ||
|
||
npm run coverage |
This file contains 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 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 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 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 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 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 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 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
Oops, something went wrong.