Skip to content

Updating date-fns library from 1.x to 2.x#10848

Merged
Monkeychip merged 9 commits intomasterfrom
ui/date-fns-breaking-upgrade
Feb 8, 2021
Merged

Updating date-fns library from 1.x to 2.x#10848
Monkeychip merged 9 commits intomasterfrom
ui/date-fns-breaking-upgrade

Conversation

@Monkeychip
Copy link
Contributor

We need to update this library to take advantage of the new methods available in version 2.^ for the Database Secret Engine project.

Worked through the breaking changes according to the date-fns changelog, but also issues that came up in the failed test. For example, AM/PM from A to a.

@Monkeychip Monkeychip added the ui label Feb 5, 2021
@Monkeychip Monkeychip added this to the 1.7 milestone Feb 5, 2021
Copy link
Contributor

@chelshaw chelshaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple things to double-check, but thanks for making all these updates!

// TODO: Replace with formatRFC3339 when date-fns is updated
params.start_time = format(addDays(startDate, 1), 'X');
// converts to milliseconds, divide by 1000 to get epoch
params.start_time = getTime(startDate) / 1000;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty sure we added days because there was some weirdness with UTC, but if the tests pass with this update we should be ok

Copy link
Contributor

@chelshaw chelshaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! Thanks for tackling this

assert.ok(result.includes(' ago'));
});

test('you can pass in UTC timestamp', function(assert) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏

@vercel vercel bot temporarily deployed to Preview – vault February 8, 2021 18:39 Inactive
@vercel vercel bot temporarily deployed to Preview – vault-storybook February 8, 2021 18:39 Inactive
@Monkeychip Monkeychip merged commit 0a20750 into master Feb 8, 2021
@Monkeychip Monkeychip deleted the ui/date-fns-breaking-upgrade branch February 8, 2021 20:13
@hashishaw hashishaw mentioned this pull request Aug 17, 2022
tsaarni pushed a commit to Nordix/vault that referenced this pull request Jan 8, 2026
…tener into release/1.21.x+ent (hashicorp#11079) (hashicorp#11347)

* VAULT-40506: Disable custom JSON limit parsing on ClusterListener (hashicorp#10848)

* add test for issue

* add bool to disable json limit parsing

* clean up tests

* fix godoc

* restore previous clustering setup

* add nil check for VaultNodeConfig

* add changelog

* move docker test to appropriate directory to allow testing in CI

---------



* fmt

---------

Co-authored-by: davidadeleon <56207066+davidadeleon@users.noreply.github.com>
Co-authored-by: davidadeleon <ddeleon@hashicorp.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants