diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 304b824..567c3ba 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,7 +3,7 @@ name: CI on: pull_request: types: ['opened', 'synchronize'] - branches: [main] + branches: [master, main] jobs: automated-test: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c1f4912..e404122 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -39,8 +39,8 @@ jobs: - name: check types run: pnpm typecheck - # - name: lint - # run: pnpm lint + - name: lint + run: pnpm lint - name: test run: pnpm test diff --git a/.husky/pre-commit b/.husky/pre-commit index 3ddca96..e422277 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,6 +1,3 @@ -#!/usr/bin/env sh -. "$(dirname -- "$0")/_/husky.sh" - echo "🔍 Running pre-commit checks..." # Get list of staged files diff --git a/dist/index.d.ts b/dist/index.d.ts index f95c9d1..e1e9925 100644 --- a/dist/index.d.ts +++ b/dist/index.d.ts @@ -9,7 +9,7 @@ export { davRequest, propfind, createObject, updateObject, deleteObject } from ' export { collectionQuery, supportedReportSet, isCollectionDirty, syncCollection, smartCollectionSync, } from './collection'; export { calendarQuery, calendarMultiGet, makeCalendar, fetchCalendars, fetchCalendarUserAddresses, fetchCalendarObjects, createCalendarObject, updateCalendarObject, deleteCalendarObject, syncCalendars, freeBusyQuery, } from './calendar'; export { addressBookQuery, addressBookMultiGet, fetchAddressBooks, fetchVCards, createVCard, updateVCard, deleteVCard, makeAddressBook, } from './addressBook'; -export { todoQuery, todoMultiGet, fetchTodos, createTodo, updateTodo, deleteTodo, } from './todo'; +export { todoQuery, todoMultiGet, fetchTodos, createTodo, updateTodo, deleteTodo } from './todo'; export { getBasicAuthHeaders, getBearerAuthHeaders, getOauthHeaders, fetchOauthTokens, refreshAccessToken, } from './util/authHelpers'; export { urlContains, urlEquals, getDAVAttribute, cleanupFalsy } from './util/requestHelpers'; export { DAVNamespace, DAVAttributeMap, DAVNamespaceShort } from './consts'; diff --git a/dist/package.json b/dist/package.json index 8c867c3..77fd697 100644 --- a/dist/package.json +++ b/dist/package.json @@ -1,6 +1,6 @@ { "name": "tsdav", - "version": "2.3.3", + "version": "2.3.4", "description": "WebDAV, CALDAV, and CARDDAV client for Nodejs and the Browser", "keywords": [ "dav", diff --git a/dist/tsdav.cjs b/dist/tsdav.cjs index 3eab137..2ac7391 100644 --- a/dist/tsdav.cjs +++ b/dist/tsdav.cjs @@ -823,10 +823,7 @@ const makeAddressBook = async (params) => { body: props ? { mkcol: { - _attributes: getDAVAttribute([ - exports.DAVNamespace.DAV, - exports.DAVNamespace.CARDDAV, - ]), + _attributes: getDAVAttribute([exports.DAVNamespace.DAV, exports.DAVNamespace.CARDDAV]), set: { prop: props, }, diff --git a/dist/tsdav.cjs.js b/dist/tsdav.cjs.js index 3eab137..2ac7391 100644 --- a/dist/tsdav.cjs.js +++ b/dist/tsdav.cjs.js @@ -823,10 +823,7 @@ const makeAddressBook = async (params) => { body: props ? { mkcol: { - _attributes: getDAVAttribute([ - exports.DAVNamespace.DAV, - exports.DAVNamespace.CARDDAV, - ]), + _attributes: getDAVAttribute([exports.DAVNamespace.DAV, exports.DAVNamespace.CARDDAV]), set: { prop: props, }, diff --git a/dist/tsdav.esm.js b/dist/tsdav.esm.js index fe4cb9e..448aeed 100644 --- a/dist/tsdav.esm.js +++ b/dist/tsdav.esm.js @@ -819,10 +819,7 @@ const makeAddressBook = async (params) => { body: props ? { mkcol: { - _attributes: getDAVAttribute([ - DAVNamespace.DAV, - DAVNamespace.CARDDAV, - ]), + _attributes: getDAVAttribute([DAVNamespace.DAV, DAVNamespace.CARDDAV]), set: { prop: props, }, diff --git a/dist/tsdav.js b/dist/tsdav.js index 71331e3..c7df9c3 100644 --- a/dist/tsdav.js +++ b/dist/tsdav.js @@ -10013,10 +10013,7 @@ const makeAddressBook = async (params) => { body: props ? { mkcol: { - _attributes: getDAVAttribute([ - DAVNamespace.DAV, - DAVNamespace.CARDDAV, - ]), + _attributes: getDAVAttribute([DAVNamespace.DAV, DAVNamespace.CARDDAV]), set: { prop: props, }, diff --git a/dist/tsdav.mjs b/dist/tsdav.mjs index fe4cb9e..448aeed 100644 --- a/dist/tsdav.mjs +++ b/dist/tsdav.mjs @@ -819,10 +819,7 @@ const makeAddressBook = async (params) => { body: props ? { mkcol: { - _attributes: getDAVAttribute([ - DAVNamespace.DAV, - DAVNamespace.CARDDAV, - ]), + _attributes: getDAVAttribute([DAVNamespace.DAV, DAVNamespace.CARDDAV]), set: { prop: props, }, diff --git a/package.json b/package.json index 8c867c3..77fd697 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tsdav", - "version": "2.3.3", + "version": "2.3.4", "description": "WebDAV, CALDAV, and CARDDAV client for Nodejs and the Browser", "keywords": [ "dav", diff --git a/src/addressBook.ts b/src/addressBook.ts index de1524a..d37a45e 100644 --- a/src/addressBook.ts +++ b/src/addressBook.ts @@ -352,10 +352,7 @@ export const makeAddressBook = async (params: { body: props ? { mkcol: { - _attributes: getDAVAttribute([ - DAVNamespace.DAV, - DAVNamespace.CARDDAV, - ]), + _attributes: getDAVAttribute([DAVNamespace.DAV, DAVNamespace.CARDDAV]), set: { prop: props, }, diff --git a/src/client.ts b/src/client.ts index 6cec229..d46e8a4 100644 --- a/src/client.ts +++ b/src/client.ts @@ -706,9 +706,7 @@ export class DAVClient { })(params[0]); } - async makeAddressBook( - ...params: Parameters - ): Promise { + async makeAddressBook(...params: Parameters): Promise { return defaultParam(rawMakeAddressBook, { headers: this.authHeaders, fetchOptions: this.fetchOptions, diff --git a/src/index.ts b/src/index.ts index 2259177..98e3736 100644 --- a/src/index.ts +++ b/src/index.ts @@ -60,14 +60,7 @@ export { makeAddressBook, } from './addressBook'; -export { - todoQuery, - todoMultiGet, - fetchTodos, - createTodo, - updateTodo, - deleteTodo, -} from './todo'; +export { todoQuery, todoMultiGet, fetchTodos, createTodo, updateTodo, deleteTodo } from './todo'; export { getBasicAuthHeaders, diff --git a/src/todo.ts b/src/todo.ts index b1c9e41..ba56fe4 100644 --- a/src/todo.ts +++ b/src/todo.ts @@ -202,10 +202,7 @@ export const fetchTodos = async (params: { throw new Error('cannot fetchTodos for undefined calendar'); } throw new Error( - `calendar must have ${findMissingFieldNames( - calendar, - requiredFields, - )} before fetchTodos`, + `calendar must have ${findMissingFieldNames(calendar, requiredFields)} before fetchTodos`, ); }