Skip to content

Commit

Permalink
Frontend library bumps (#246)
Browse files Browse the repository at this point in the history
* Bump date-fns

* Undo Dependabot ignores and auto-merge all dependencies (#322)

* Undo Dependabot ignores

* Auto-merge all dependencies

* Remove explicit Typescript dependency (#321)

* Reset yarn.lock (#323)

* Bump dot-prop from 4.2.0 to 4.2.1 (#313)

Bumps [dot-prop](https://github.com/sindresorhus/dot-prop) from 4.2.0 to 4.2.1.
- [Release notes](https://github.com/sindresorhus/dot-prop/releases)
- [Commits](sindresorhus/dot-prop@v4.2.0...v4.2.1)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump date-fns from 2.16.1 to 2.21.3 (#317)

Bumps [date-fns](https://github.com/date-fns/date-fns) from 2.16.1 to 2.21.3.
- [Release notes](https://github.com/date-fns/date-fns/releases)
- [Changelog](https://github.com/date-fns/date-fns/blob/master/CHANGELOG.md)
- [Commits](date-fns/date-fns@v2.16.1...v2.21.3)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @types/react from 16.9.49 to 17.0.6 (#315)

Bumps [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) from 16.9.49 to 17.0.6.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @types/numeral from 0.0.28 to 2.0.1 (#324)

Bumps [@types/numeral](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/numeral) from 0.0.28 to 2.0.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/numeral)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump lodash from 4.17.20 to 4.17.21 (#309)

Bumps [lodash](https://github.com/lodash/lodash) from 4.17.20 to 4.17.21.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](lodash/lodash@4.17.20...4.17.21)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump tsdx from 0.13.3 to 0.14.1 (#325)

* Bump tsdx from 0.13.3 to 0.14.1

Bumps [tsdx](https://github.com/formium/tsdx) from 0.13.3 to 0.14.1.
- [Release notes](https://github.com/formium/tsdx/releases)
- [Commits](jaredpalmer/tsdx@v0.13.3...v0.14.1)

Signed-off-by: dependabot[bot] <[email protected]>

* Remove unnecesary polyfill

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Robert Kuykendall <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
rkuykendall and dependabot[bot] authored May 20, 2021
1 parent 0fddf70 commit 7da2285
Show file tree
Hide file tree
Showing 7 changed files with 2,948 additions and 3,578 deletions.
28 changes: 0 additions & 28 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,4 @@ updates:
open-pull-requests-limit: 10
target-branch: frontend-bumps
ignore:
- dependency-name: html-react-parser
versions:
- 1.2.3
- 1.2.4
- 1.2.5
- dependency-name: y18n
versions:
- 4.0.1
- 4.0.2
- dependency-name: "@types/jest"
versions:
- 26.0.20
- 26.0.21
- 26.0.22
- dependency-name: typescript
versions:
- 4.1.3
- 4.1.4
- 4.1.5
- 4.2.2
- 4.2.3
- dependency-name: np
versions:
- 7.2.0
- 7.3.0
- 7.4.0
- dependency-name: handlebars
versions:
- 4.7.6
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ script: echo "Running tests against $(node -v)..." && yarn test
jobs:
include:
- stage: Build
node_js: 10
node_js: node
script: yarn build
- stage: Lint
node_js: 10
node_js: node
script: yarn lint
- stage: Produce Coverage
node_js: 10
node_js: node
script: yarn test --coverage && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage
11 changes: 5 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,26 +70,25 @@
"@types/enzyme-adapter-react-16": "^1.0.6",
"@types/jest": "^26.0.13",
"@types/lodash": "^4.14.161",
"@types/numeral": "^0.0.28",
"@types/react": "16.9.49",
"@types/numeral": "^2.0.1",
"@types/react": "17.0.6",
"babel-jest": "^26.3.0",
"coveralls": "^3.1.0",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.4",
"lodash": "4.17.20",
"lodash": "4.17.21",
"mobx": "^5.13.0",
"mobx-react": "^6.1.3",
"np": "^5.1.0",
"numeral": "^2.0.6",
"react": "^16.0.0",
"react-dom": "^16.0.0",
"source-map-explorer": "^2.5.0",
"tsdx": "^0.13.3",
"typescript": "^3.0.0"
"tsdx": "^0.14.1"
},
"dependencies": {
"classnames": "^2.2.6",
"date-fns": "^1.30.1",
"date-fns": "^2.16.1",
"decimal.js": "^10.1.1",
"fast-memoize": "^2.5.2",
"html-react-parser": "0.10.0",
Expand Down
6 changes: 3 additions & 3 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import Decimal from 'decimal.js';
export const EMPTY_FIELD = '--';

export const DATE_FORMATS: { date: string; date_at_time: string; date_value: string } = {
date: 'MM/DD/YY',
date_at_time: 'MM/DD/YY @ h:mmA', // ex. 07/14/16 @ 2:24PM
date_value: 'YYYY-MM-DD',
date: 'LL/dd/yy',
date_at_time: 'LL/dd/yy @ h:mma', // ex. 07/14/16 @ 2:24PM
date_value: 'yyyy-LL-dd',
};

export const CENT_DECIMAL = new Decimal('100');
Expand Down
4 changes: 2 additions & 2 deletions src/formatting.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { parse } from 'iso8601-duration';
import { format as dateFnsFormat } from 'date-fns';
import { format as dateFnsFormat, parseISO } from 'date-fns';
import numeral from 'numeral';
import parser from 'html-react-parser';
import memoize from 'fast-memoize';
Expand Down Expand Up @@ -106,7 +106,7 @@ export function formatDate(value?: string | null, dateFormat = DATE_FORMATS.date
if (!hasStringContent(value)) {
return EMPTY_FIELD;
}
return dateFnsFormat(value, dateFormat);
return dateFnsFormat(parseISO(value), dateFormat);
}

export function formatDateTime(value?: string | null) {
Expand Down
1 change: 0 additions & 1 deletion test/setup.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import '@babel/polyfill';
import { configure } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';

Expand Down
Loading

0 comments on commit 7da2285

Please sign in to comment.