Resolve "Update timeago to the latest release"
What does this MR do?
Updates timeago.js from v3.0.2 to v4.0.1. As a side effect, this drops JQuery 2.0.40 as a dev dependency.
Makes relevant API changes as the upgrade is a major breaking change, including removal of creating timeago instances, i.e. new Timeago()
, as timeago.js has moved from being constructor based (OO), to just being a set of exported functions.
For example, instead of:
import Timeago from 'timeago.js'
var timeago = new Timeago()
timeago.format(1544666010224)
The API is now just:
import { format } from 'timeago.js'
format(1544666010224)
// or
import * as timeago from 'timeago.js'
timeago.format(1544666010224)
More about the API change on the timeago.js homepage: https://timeago.org/ And on GitHub: https://github.com/hustcc/timeago.js#api
Conformity
-
Changelog entry -
Documentation created/updated or follow-up review issue created -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team
Closes #34958 (closed)
Edited by Jake Burden