Skip to content

Commit

Permalink
Fix/reverting dayjs fixes (#546)
Browse files Browse the repository at this point in the history
* Reverting recent changes to dayjs and BaseTimer

* bumping package versions for release
  • Loading branch information
stephiescastle authored Aug 15, 2024
1 parent 70ad796 commit 7d7aeea
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"publishConfig": {
"access": "public"
},
"version": "3.2.14",
"version": "3.2.15",
"type": "module",
"description": "Monorepo for JPL's design system, Explorer 1",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion packages/vue/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@explorer-1/vue",
"version": "0.2.14",
"version": "0.2.15",
"private": false,
"publishConfig": {
"access": "public"
Expand Down
9 changes: 6 additions & 3 deletions packages/vue/src/components/BaseTimer/BaseTimer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,12 @@
<script lang="ts">
import type { PropType } from 'vue'
import { defineComponent } from 'vue'
import dayjs from './../../utils/dayjs'
import { type Dayjs } from 'dayjs'
import { type Duration } from 'dayjs/plugin/duration.js'
import dayjs, { type Dayjs } from 'dayjs'
import duration, { type Duration } from 'dayjs/plugin/duration.js'
import minMax from 'dayjs/plugin/minMax.js'
dayjs.extend(duration)
dayjs.extend(minMax)
const calculateDuration = (start: Dayjs): Duration | undefined => {
// Use round seconds so the datetime string stays valid and can be read by screen readers.
Expand Down
6 changes: 0 additions & 6 deletions packages/vue/src/utils/dayjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ import updateLocale from 'dayjs/plugin/updateLocale.js'
import localizedFormat from 'dayjs/plugin/localizedFormat.js'
import timezone from 'dayjs/plugin/timezone.js'
import advancedFormat from 'dayjs/plugin/advancedFormat.js'
// for BaseTimer
import duration from 'dayjs/plugin/duration.js'
import minMax from 'dayjs/plugin/minMax.js'

// Locales must be imported manually
// see https://github.com/iamkun/dayjs/tree/dev/src/locale
Expand All @@ -31,8 +28,5 @@ dayjs.updateLocale('en', {
})
dayjs.extend(timezone)
dayjs.extend(advancedFormat)
// for BaseTimer
dayjs.extend(duration)
dayjs.extend(minMax)

export default dayjs

0 comments on commit 7d7aeea

Please sign in to comment.