-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FIO-8541: replaced moment dependency with dayjs
- Loading branch information
1 parent
05de554
commit ac69ab8
Showing
11 changed files
with
61 additions
and
66 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
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
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 @@ | ||
import dayjs from "dayjs"; | ||
import utc from "dayjs/plugin/utc"; | ||
import timezone from "dayjs/plugin/timezone" | ||
import customParseFormat from 'dayjs/plugin/customParseFormat'; | ||
import advancedFormat from 'dayjs/plugin/advancedFormat'; | ||
import duration from 'dayjs/plugin/duration'; | ||
|
||
dayjs.extend(utc); | ||
dayjs.extend(timezone); | ||
dayjs.extend(customParseFormat); | ||
dayjs.extend(advancedFormat); | ||
dayjs.extend(duration); | ||
|
||
function moment(...args) { | ||
Check warning on line 14 in src/utils/moment-wrapper.js GitHub Actions / setup
|
||
return dayjs(...args); | ||
} | ||
Check warning on line 16 in src/utils/moment-wrapper.js GitHub Actions / setup
|
||
|
||
moment.utc = () => dayjs.utc(); | ||
moment.tz = (date, timezone) => dayjs.tz(date, timezone); | ||
|
||
|
||
moment.toISOString = () => { | ||
return dayjs.isValid() ? dayjs.toISOString() : "Invalid date"; | ||
} | ||
|
||
moment.format = (formatStr) => { | ||
return dayjs(this).format(formatStr); | ||
}; | ||
|
||
export default moment; |
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 |
---|---|---|
|
@@ -381,10 +381,10 @@ | |
fuse.js "^6.6.2" | ||
redux "^4.2.0" | ||
|
||
"@formio/[email protected].191.8c609ab": | ||
version "2.1.0-dev.191.8c609ab" | ||
resolved "https://registry.yarnpkg.com/@formio/core/-/core-2.1.0-dev.191.8c609ab.tgz#2e442888c60786268ca16edc7cd26c38cbd4b773" | ||
integrity sha512-lVj8hqddIwUJiWI6/yWF0NFl/f8QPS3ek4l6h0U1SFMPmeEdWQtcBTMLKi02gHx09kDgXhYocJIbBVVpYyqFnw== | ||
"@formio/[email protected].201.2792d73": | ||
version "2.1.0-dev.201.2792d73" | ||
resolved "https://registry.yarnpkg.com/@formio/core/-/core-2.1.0-dev.201.2792d73.tgz#2cfaabe219a823ee7687b2ec2c7ffc355a1c5301" | ||
integrity sha512-sGrWflkplGOb+y4JPQe1KtiQ9RYNvd1pClQbz0C1o9Gu7k1fjCXxIB2Y5dfpPKA2Xh39GHaDegbjPUrYHn9jew== | ||
dependencies: | ||
browser-cookies "^1.2.0" | ||
core-js "^3.38.0" | ||
|
@@ -396,7 +396,6 @@ | |
inputmask "5.0.9" | ||
json-logic-js "^2.0.5" | ||
lodash "^4.17.21" | ||
moment "^2.29.4" | ||
|
||
"@formio/text-mask-addons@^3.8.0-formio.3": | ||
version "3.8.0-formio.3" | ||
|
@@ -5524,18 +5523,6 @@ mock-local-storage@^1.1.24: | |
core-js "^3.30.2" | ||
global "^4.3.2" | ||
|
||
moment-timezone@^0.5.44: | ||
version "0.5.45" | ||
resolved "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.45.tgz#cb685acd56bac10e69d93c536366eb65aa6bcf5c" | ||
integrity sha512-HIWmqA86KcmCAhnMAN0wuDOARV/525R2+lOLotuGFzn4HO+FH+/645z2wx0Dt3iDv6/p61SIvKnDstISainhLQ== | ||
dependencies: | ||
moment "^2.29.4" | ||
|
||
moment@^2.29.4: | ||
version "2.30.1" | ||
resolved "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz#f8c91c07b7a786e30c59926df530b4eac96974ae" | ||
integrity sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how== | ||
|
||
mrmime@^2.0.0: | ||
version "2.0.0" | ||
resolved "https://registry.npmjs.org/mrmime/-/mrmime-2.0.0.tgz#151082a6e06e59a9a39b46b3e14d5cfe92b3abb4" | ||
|
@@ -7324,7 +7311,7 @@ string-replace-loader@^3.1.0: | |
loader-utils "^2.0.0" | ||
schema-utils "^3.0.0" | ||
|
||
"string-width-cjs@npm:string-width@^4.2.0": | ||
"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0: | ||
version "4.2.3" | ||
resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" | ||
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== | ||
|
@@ -7342,15 +7329,6 @@ string-width@^1.0.1, string-width@^1.0.2: | |
is-fullwidth-code-point "^1.0.0" | ||
strip-ansi "^3.0.0" | ||
|
||
string-width@^4.1.0, string-width@^4.2.0: | ||
version "4.2.3" | ||
resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" | ||
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== | ||
dependencies: | ||
emoji-regex "^8.0.0" | ||
is-fullwidth-code-point "^3.0.0" | ||
strip-ansi "^6.0.1" | ||
|
||
string-width@^5.0.1, string-width@^5.1.2: | ||
version "5.1.2" | ||
resolved "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794" | ||
|
@@ -7411,7 +7389,7 @@ stringifier@^1.3.0: | |
traverse "^0.6.6" | ||
type-name "^2.0.1" | ||
|
||
"strip-ansi-cjs@npm:strip-ansi@^6.0.1": | ||
"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: | ||
version "6.0.1" | ||
resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" | ||
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== | ||
|
@@ -7432,13 +7410,6 @@ strip-ansi@^4.0.0: | |
dependencies: | ||
ansi-regex "^3.0.0" | ||
|
||
strip-ansi@^6.0.0, strip-ansi@^6.0.1: | ||
version "6.0.1" | ||
resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" | ||
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== | ||
dependencies: | ||
ansi-regex "^5.0.1" | ||
|
||
strip-ansi@^7.0.1: | ||
version "7.1.0" | ||
resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" | ||
|
@@ -8501,7 +8472,7 @@ [email protected]: | |
resolved "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz#46fc150c17d826b86a008e5a4508656777e9c343" | ||
integrity sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw== | ||
|
||
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": | ||
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: | ||
version "7.0.0" | ||
resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" | ||
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== | ||
|
@@ -8527,15 +8498,6 @@ wrap-ansi@^6.2.0: | |
string-width "^4.1.0" | ||
strip-ansi "^6.0.0" | ||
|
||
wrap-ansi@^7.0.0: | ||
version "7.0.0" | ||
resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" | ||
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== | ||
dependencies: | ||
ansi-styles "^4.0.0" | ||
string-width "^4.1.0" | ||
strip-ansi "^6.0.0" | ||
|
||
wrap-ansi@^8.1.0: | ||
version "8.1.0" | ||
resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" | ||
|