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.
In moment 2.25.0 they added support for
YYYY
as a valid ISO_8601 date. This causes waterline-sqlite3 to convert 4 digit strings into Dates, which can cause unintended consequences with the way that waterline-sqlite3 works.For instance, with a string like
'1234'
, it will be stored in the database as-23225875200000
(number of milliseconds before 1970, I believe).This is inconsistent with the way that waterline-sqlite3 works with moment < 2.25, which would not consider
'1234'
to be a valid date. In order to support these newer version of moment without breaking backwards compatibility (and without introducing much larger changes) we can simply skip parsing the date for strings less than or equal to 4 characters in length.