Skip to content

Resolve "Update timeago to the latest release"

Jake Burden requested to merge 34958-update-timeago-to-the-latest-release into master

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

Availability and Testing

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

Merge request reports