Skip to content

Commit

Permalink
fix(deps): bump ical.js from 1.5.0 to v2
Browse files Browse the repository at this point in the history
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
  • Loading branch information
renovate[bot] authored and st3iny committed Jun 14, 2024
1 parent a8d5639 commit ef70705
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 37 deletions.
26 changes: 7 additions & 19 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"d3-org-chart": "^3.1.1",
"debounce": "^2.0.0",
"downloadjs": "^1.4.7",
"ical.js": "^1.5.0",
"ical.js": "^2.0.1",
"mitt": "^3.0.1",
"moment": "^2.30.1",
"p-limit": "^5.0.0",
Expand Down
4 changes: 2 additions & 2 deletions src/components/ContactDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@
<script>
import { showError } from '@nextcloud/dialogs'

import { stringify } from 'ical.js'
import ICAL from 'ical.js'
import { getSVG } from '@shortcm/qr-image/lib/svg'
import mitt from 'mitt'
import {
Expand Down Expand Up @@ -793,7 +793,7 @@ export default {
// do not encode photo
jCal[1] = jCal[1].filter(props => props[0] !== 'photo')

const data = stringify(jCal)
const data = ICAL.stringify(jCal)
if (data.length > 0) {
const svgBytes = await getSVG(data)
const svgString = new TextDecoder().decode(svgBytes)
Expand Down
6 changes: 3 additions & 3 deletions src/components/ContactDetails/ContactDetailsProperty.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</template>

<script>
import { Property } from 'ical.js'
import ICAL from 'ical.js'
import rfcProps from '../../models/rfcProps.js'
import Contact from '../../models/contact.js'

Expand All @@ -48,7 +48,7 @@ export default {

props: {
property: {
type: Property,
type: ICAL.Property,
default: true,
},

Expand Down Expand Up @@ -200,7 +200,7 @@ export default {
/**
* Return the associated X-ABLABEL if any
*
* @return {Property}
* @return {ICAL.Property}
*/
propLabel() {
return this.localContact.vCard.getFirstProperty(`${this.propGroup[0]}.x-ablabel`)
Expand Down
8 changes: 4 additions & 4 deletions src/components/Properties/PropertyDateTime.vue
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ import {
NcSelect,
} from '@nextcloud/vue'
import { getLocale } from '@nextcloud/l10n'
import { VCardTime } from 'ical.js'
import ICAL from 'ical.js'

import PropertyMixin from '../../mixins/PropertyMixin.js'
import PropertyTitle from './PropertyTitle.vue'
Expand All @@ -95,7 +95,7 @@ export default {

props: {
value: {
type: [VCardTime, String],
type: [ICAL.VCardTime, String],
default: '',
required: true,
},
Expand Down Expand Up @@ -136,7 +136,7 @@ export default {
vcardTimeLocalValue() {
if (typeof this.localValue === 'string') {
// eslint-disable-next-line new-cap
return new VCardTime.fromDateAndOrTimeString(this.localValue)
return new ICAL.VCardTime.fromDateAndOrTimeString(this.localValue)
}
return this.localValue
},
Expand Down Expand Up @@ -228,7 +228,7 @@ export default {
}

// reset the VCardTime component to the selected date/time
this.localValue = new VCardTime(dateObject, null, this.propType)
this.localValue = new ICAL.VCardTime(dateObject, null, this.propType)

// https://vuejs.org/v2/guide/components-custom-events.html#sync-Modifier
// Use moment to convert the JsDate to Object
Expand Down
8 changes: 4 additions & 4 deletions src/models/rfcProps.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import { VCardTime } from 'ical.js'
import ICAL from 'ical.js'
import { loadState } from '@nextcloud/initial-state'
import { otherContacts } from '../utils/chartUtils.js'

Expand Down Expand Up @@ -128,7 +128,7 @@ const properties = {
icon: 'icon-calendar-dark',
force: 'date', // most ppl prefer date for birthdays, time is usually irrelevant
defaultValue: {
value: new VCardTime(null, null, 'date').fromJSDate(new Date()),
value: new ICAL.VCardTime(null, null, 'date').fromJSDate(new Date()),
},
actions: [
ActionToggleYear,
Expand All @@ -140,7 +140,7 @@ const properties = {
icon: 'icon-anniversary',
force: 'date', // most ppl prefer date for birthdays, time is usually irrelevant
defaultValue: {
value: new VCardTime(null, null, 'date').fromJSDate(new Date()),
value: new ICAL.VCardTime(null, null, 'date').fromJSDate(new Date()),
},
primary: false,
},
Expand All @@ -149,7 +149,7 @@ const properties = {
icon: 'icon-death-day',
force: 'date', // most ppl prefer date for birthdays, time is usually irrelevant
defaultValue: {
value: new VCardTime(null, null, 'date').fromJSDate(new Date()),
value: new ICAL.VCardTime(null, null, 'date').fromJSDate(new Date()),
},
primary: false,
},
Expand Down
4 changes: 2 additions & 2 deletions src/services/checks/invalidREV.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

import { VCardTime } from 'ical.js'
import ICAL from 'ical.js'

// https://tools.ietf.org/html/rfc6350#section-6.7.4

Expand Down Expand Up @@ -41,7 +41,7 @@ export default {
contact.vCard.removeProperty('rev')

// creatiing new value
const rev = new VCardTime(null, null, 'date-time')
const rev = new ICAL.VCardTime(null, null, 'date-time')
rev.fromUnixTime(Date.now() / 1000)
contact.vCard.addPropertyWithValue('rev', rev)

Expand Down
4 changes: 2 additions & 2 deletions src/views/Contacts.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ import {
} from '@nextcloud/vue'

import { showError } from '@nextcloud/dialogs'
import { VCardTime } from 'ical.js'
import ICAL from 'ical.js'

import CircleContent from '../components/AppContent/CircleContent.vue'
import ChartContent from '../components/AppContent/ChartContent.vue'
Expand Down Expand Up @@ -267,7 +267,7 @@ export default {

methods: {
async newContact() {
const rev = new VCardTime()
const rev = new ICAL.VCardTime()
const contact = new Contact(`
BEGIN:VCARD
VERSION:4.0
Expand Down

0 comments on commit ef70705

Please sign in to comment.