refactor(luxon): Plugin CloudBuild - Swapped over from using moment to luxon
Signed-off-by: Harry Hogg <hhogg@spotify.com>
This commit is contained in:
@@ -38,7 +38,7 @@
|
||||
"@material-ui/core": "^4.12.2",
|
||||
"@material-ui/icons": "^4.9.1",
|
||||
"@material-ui/lab": "4.0.0-alpha.45",
|
||||
"moment": "^2.27.0",
|
||||
"luxon": "^2.0.2",
|
||||
"qs": "^6.9.4",
|
||||
"react": "^16.13.1",
|
||||
"react-dom": "^16.13.1",
|
||||
|
||||
@@ -24,7 +24,7 @@ import SyncIcon from '@material-ui/icons/Sync';
|
||||
import { useProjectName } from '../useProjectName';
|
||||
import { Entity } from '@backstage/catalog-model';
|
||||
import { buildRouteRef } from '../../routes';
|
||||
import moment from 'moment';
|
||||
import { DateTime } from 'luxon';
|
||||
import { Table, TableColumn } from '@backstage/core-components';
|
||||
|
||||
const generatedColumns: TableColumn[] = [
|
||||
@@ -84,7 +84,11 @@ const generatedColumns: TableColumn[] = [
|
||||
title: 'Created',
|
||||
render: (row: Partial<WorkflowRun>) => (
|
||||
<Typography data-testid="cell-created" variant="body2" noWrap>
|
||||
<p>{moment(row.createTime).format('DD-MM-YYYY hh:mm:ss')}</p>
|
||||
<p>
|
||||
{DateTime.fromISO(row.createTime ?? DateTime.now().toISO()).toFormat(
|
||||
'dd-MM-yyyy hh:mm:ss',
|
||||
)}
|
||||
</p>
|
||||
</Typography>
|
||||
),
|
||||
},
|
||||
|
||||
@@ -11040,9 +11040,9 @@ core-js@^3.0.4, core-js@^3.6.5, core-js@^3.8.2:
|
||||
integrity sha512-GUbtPllXMYRzIgHNZ4dTYTcUemls2cni83Q4Q/TrFONHfhcg9oEGOtaGHfb0cpzec60P96UKPvMkjX1jET8rUw==
|
||||
|
||||
core-js@^3.6.0:
|
||||
version "3.17.2"
|
||||
resolved "https://registry.npmjs.org/core-js/-/core-js-3.17.2.tgz#f960eae710dc62c29cca93d5332e3660e289db10"
|
||||
integrity sha512-XkbXqhcXeMHPRk2ItS+zQYliAMilea2euoMsnpRRdDad6b2VY6CQQcwz1K8AnWesfw4p165RzY0bTnr3UrbYiA==
|
||||
version "3.17.3"
|
||||
resolved "https://registry.npmjs.org/core-js/-/core-js-3.17.3.tgz#8e8bd20e91df9951e903cabe91f9af4a0895bc1e"
|
||||
integrity sha512-lyvajs+wd8N1hXfzob1LdOCCHFU4bGMbqqmLn1Q4QlCpDqWPpGf+p0nj+LNrvDDG33j0hZXw2nsvvVpHysxyNw==
|
||||
|
||||
core-util-is@1.0.2, core-util-is@~1.0.0:
|
||||
version "1.0.2"
|
||||
@@ -27589,9 +27589,9 @@ write-pkg@^4.0.0:
|
||||
write-json-file "^3.2.0"
|
||||
|
||||
ws@7.4.5, ws@^7.4.6:
|
||||
version "7.5.4"
|
||||
resolved "https://registry.npmjs.org/ws/-/ws-7.5.4.tgz#56bfa20b167427e138a7795de68d134fe92e21f9"
|
||||
integrity sha512-zP9z6GXm6zC27YtspwH99T3qTG7bBFv2VIkeHstMLrLlDJuzA7tQ5ls3OJ1hOGGCzTQPniNJoHXIAOS0Jljohg==
|
||||
version "7.5.5"
|
||||
resolved "https://registry.npmjs.org/ws/-/ws-7.5.5.tgz#8b4bc4af518cfabd0473ae4f99144287b33eb881"
|
||||
integrity sha512-BAkMFcAzl8as1G/hArkxOxq3G7pjUqQ3gzYbLL0/5zNkph70e+lCoxBGnm6AW1+/aiNeV4fnKqZ8m4GZewmH2w==
|
||||
|
||||
ws@^5.2.0:
|
||||
version "5.2.3"
|
||||
|
||||
Reference in New Issue
Block a user