From aa8359939d4cc06775eb1e618eb35ce467ba6b09 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 25 Jun 2025 17:12:22 +0000 Subject: [PATCH 1/2] Chore(deps-dev): Bump @nextcloud/prettier-config from 1.1.0 to 1.2.0 Bumps [@nextcloud/prettier-config](https://github.com/nextcloud-libraries/nextcloud-prettier-config) from 1.1.0 to 1.2.0. - [Release notes](https://github.com/nextcloud-libraries/nextcloud-prettier-config/releases) - [Changelog](https://github.com/nextcloud-libraries/nextcloud-prettier-config/blob/main/CHANGELOG.md) - [Commits](https://github.com/nextcloud-libraries/nextcloud-prettier-config/compare/v1.1.0...v1.2.0) --- updated-dependencies: - dependency-name: "@nextcloud/prettier-config" dependency-version: 1.2.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 81 +++++++++++++++++++---------------------------- package.json | 2 +- 2 files changed, 34 insertions(+), 49 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7d00c2c11..919464792 100644 --- a/package-lock.json +++ b/package-lock.json @@ -37,7 +37,7 @@ "@nextcloud/browserslist-config": "^3.0.1", "@nextcloud/e2e-test-server": "^0.2.1", "@nextcloud/eslint-config": "^8.4.2", - "@nextcloud/prettier-config": "^1.1.0", + "@nextcloud/prettier-config": "^1.2.0", "@nextcloud/stylelint-config": "^3.1.0", "@nextcloud/vite-config": "^1.5.3", "@playwright/test": "^1.53.1", @@ -1752,16 +1752,16 @@ } }, "node_modules/@nextcloud/prettier-config": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@nextcloud/prettier-config/-/prettier-config-1.1.0.tgz", - "integrity": "sha512-mhgDTSAn2YqSi6kw7Ooy5IVxQKmOr+iUtOlI26LLH3pGrI1ARc0CvGs7l9UD59MaUql+F5uVutHROPo9imsqOQ==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@nextcloud/prettier-config/-/prettier-config-1.2.0.tgz", + "integrity": "sha512-6XPGOy3X0ZHw5Yho7ti7F8TguI68/uq55UtwhRbTRMmdO/uGLAHn9BA0nzwlGPbs0xFPwUoYPSuPJDA6rcAXlA==", "dev": true, "license": "MIT", "dependencies": { - "prettier-plugin-packagejson": "^2.5.0" + "prettier-plugin-packagejson": "^2.5.10" }, "peerDependencies": { - "prettier": ">=3.0.0" + "prettier": ">=3.5.0" } }, "node_modules/@nextcloud/router": { @@ -2323,16 +2323,16 @@ } }, "node_modules/@pkgr/core": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.1.1.tgz", - "integrity": "sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==", + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.2.7.tgz", + "integrity": "sha512-YLT9Zo3oNPJoBjBc4q8G2mjU4tqIbf5CEOORbUUr48dCD9q3umJ3IPlVqOqDakPfd2HuwccBaqlGhN4Gmr5OWg==", "dev": true, "license": "MIT", "engines": { "node": "^12.20.0 || ^14.18.0 || >=16.0.0" }, "funding": { - "url": "https://opencollective.com/unts" + "url": "https://opencollective.com/pkgr" } }, "node_modules/@playwright/test": { @@ -7067,19 +7067,6 @@ "node": ">= 0.4" } }, - "node_modules/get-stdin": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-9.0.0.tgz", - "integrity": "sha512-dVKBjfWisLAicarI2Sf+JuBE/DghV4UzNAVe9yhEJuzeREd3JhOTE9cUaJTeSa77fsbQUK3pcOpJfM59+VKZaA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/get-symbol-description": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.1.0.tgz", @@ -7114,9 +7101,9 @@ } }, "node_modules/git-hooks-list": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/git-hooks-list/-/git-hooks-list-3.1.0.tgz", - "integrity": "sha512-LF8VeHeR7v+wAbXqfgRlTSX/1BJR9Q1vEMR8JAz1cEg6GX07+zyj3sAdDvYjj/xnlIfVuGgj4qBei1K3hKH+PA==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/git-hooks-list/-/git-hooks-list-4.1.1.tgz", + "integrity": "sha512-cmP497iLq54AZnv4YRAEMnEyQ1eIn4tGKbmswqwmFV4GBnAqE8NLtWxxdXa++AalfgL5EBH4IxTPyquEuGY/jA==", "dev": true, "license": "MIT", "funding": { @@ -10293,14 +10280,14 @@ } }, "node_modules/prettier-plugin-packagejson": { - "version": "2.5.8", - "resolved": "https://registry.npmjs.org/prettier-plugin-packagejson/-/prettier-plugin-packagejson-2.5.8.tgz", - "integrity": "sha512-BaGOF63I0IJZoudxpuQe17naV93BRtK8b3byWktkJReKEMX9CC4qdGUzThPDVO/AUhPzlqDiAXbp18U6X8wLKA==", + "version": "2.5.15", + "resolved": "https://registry.npmjs.org/prettier-plugin-packagejson/-/prettier-plugin-packagejson-2.5.15.tgz", + "integrity": "sha512-2QSx6y4IT6LTwXtCvXAopENW5IP/aujC8fobEM2pDbs0IGkiVjW/ipPuYAHuXigbNe64aGWF7vIetukuzM3CBw==", "dev": true, "license": "MIT", "dependencies": { - "sort-package-json": "2.14.0", - "synckit": "0.9.2" + "sort-package-json": "3.2.1", + "synckit": "0.11.8" }, "peerDependencies": { "prettier": ">= 1.16.0" @@ -11552,29 +11539,28 @@ "license": "MIT" }, "node_modules/sort-package-json": { - "version": "2.14.0", - "resolved": "https://registry.npmjs.org/sort-package-json/-/sort-package-json-2.14.0.tgz", - "integrity": "sha512-xBRdmMjFB/KW3l51mP31dhlaiFmqkHLfWTfZAno8prb/wbDxwBPWFpxB16GZbiPbYr3wL41H8Kx22QIDWRe8WQ==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/sort-package-json/-/sort-package-json-3.2.1.tgz", + "integrity": "sha512-rTfRdb20vuoAn7LDlEtCqOkYfl2X+Qze6cLbNOzcDpbmKEhJI30tTN44d5shbKJnXsvz24QQhlCm81Bag7EOKg==", "dev": true, "license": "MIT", "dependencies": { "detect-indent": "^7.0.1", - "detect-newline": "^4.0.0", - "get-stdin": "^9.0.0", - "git-hooks-list": "^3.0.0", + "detect-newline": "^4.0.1", + "git-hooks-list": "^4.0.0", "is-plain-obj": "^4.1.0", - "semver": "^7.6.0", + "semver": "^7.7.1", "sort-object-keys": "^1.1.3", - "tinyglobby": "^0.2.9" + "tinyglobby": "^0.2.12" }, "bin": { "sort-package-json": "cli.js" } }, "node_modules/sort-package-json/node_modules/semver": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", - "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", "dev": true, "license": "ISC", "bin": { @@ -12409,20 +12395,19 @@ "peer": true }, "node_modules/synckit": { - "version": "0.9.2", - "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.9.2.tgz", - "integrity": "sha512-vrozgXDQwYO72vHjUb/HnFbQx1exDjoKzqx23aXEg2a9VIg2TSFZ8FmeZpTjUCFMYw7mpX4BE2SFu8wI7asYsw==", + "version": "0.11.8", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.11.8.tgz", + "integrity": "sha512-+XZ+r1XGIJGeQk3VvXhT6xx/VpbHsRzsTkGgF6E5RX9TTXD0118l87puaEBZ566FhqblC6U0d4XnubznJDm30A==", "dev": true, "license": "MIT", "dependencies": { - "@pkgr/core": "^0.1.0", - "tslib": "^2.6.2" + "@pkgr/core": "^0.2.4" }, "engines": { "node": "^14.18.0 || >=16.0.0" }, "funding": { - "url": "https://opencollective.com/unts" + "url": "https://opencollective.com/synckit" } }, "node_modules/tabbable": { diff --git a/package.json b/package.json index 6975b7385..84187922c 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "@nextcloud/browserslist-config": "^3.0.1", "@nextcloud/e2e-test-server": "^0.2.1", "@nextcloud/eslint-config": "^8.4.2", - "@nextcloud/prettier-config": "^1.1.0", + "@nextcloud/prettier-config": "^1.2.0", "@nextcloud/stylelint-config": "^3.1.0", "@nextcloud/vite-config": "^1.5.3", "@playwright/test": "^1.53.1", From 9b3aa0ee593f46de876a203a7217232f175fe9bc Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Wed, 25 Jun 2025 19:11:31 +0200 Subject: [PATCH 2/2] chore: adjust code style Signed-off-by: Ferdinand Thiessen --- playwright/support/sections/FormSection.ts | 4 ++-- src/components/Questions/QuestionDate.vue | 4 ++-- src/components/Questions/QuestionFile.vue | 8 +++---- src/components/Questions/QuestionMultiple.vue | 4 ++-- src/components/Questions/QuestionShort.vue | 12 +++++----- src/components/Results/ResultsSummary.vue | 10 ++++---- .../SidebarTabs/SettingsSidebarTab.vue | 4 ++-- .../SidebarTabs/SharingSearchDiv.vue | 8 +++---- src/components/TopBar.vue | 8 +++---- src/mixins/ShareLinkMixin.js | 14 ++++++----- src/mixins/UserSearchMixin.js | 10 ++++---- src/mixins/ViewsMixin.js | 8 +++---- src/views/Create.vue | 4 ++-- src/views/Results.vue | 16 ++++++------- src/views/Submit.vue | 24 +++++++++---------- 15 files changed, 70 insertions(+), 68 deletions(-) diff --git a/playwright/support/sections/FormSection.ts b/playwright/support/sections/FormSection.ts index 1fe2b235c..5e98785a9 100644 --- a/playwright/support/sections/FormSection.ts +++ b/playwright/support/sections/FormSection.ts @@ -56,8 +56,8 @@ export class FormSection { private getFormUpdatedPromise(): Promise { return this.page.waitForResponse( (response) => - response.request().method() === 'PATCH' && - response + response.request().method() === 'PATCH' + && response .request() .url() .includes('/ocs/v2.php/apps/forms/api/v3/forms/'), diff --git a/src/components/Questions/QuestionDate.vue b/src/components/Questions/QuestionDate.vue index 8f799157f..44e0cf118 100644 --- a/src/components/Questions/QuestionDate.vue +++ b/src/components/Questions/QuestionDate.vue @@ -242,8 +242,8 @@ export default { */ disabledDates(date) { return ( - (this.dateMin && date < this.dateMin) || - (this.dateMax && date > this.dateMax) + (this.dateMin && date < this.dateMin) + || (this.dateMax && date > this.dateMax) ) }, diff --git a/src/components/Questions/QuestionFile.vue b/src/components/Questions/QuestionFile.vue index f31453d09..85ab9c07a 100644 --- a/src/components/Questions/QuestionFile.vue +++ b/src/components/Questions/QuestionFile.vue @@ -240,8 +240,8 @@ export default { }) this.maxFileSizeValue = - this.extraSettings.maxFileSize / - FILE_SIZE_UNITS[this.maxFileSizeUnit] + this.extraSettings.maxFileSize + / FILE_SIZE_UNITS[this.maxFileSizeUnit] } }, @@ -259,8 +259,8 @@ export default { formData.append('files[]', file) if ( - this.extraSettings.maxFileSize > 0 && - file.size > this.extraSettings.maxFileSize + this.extraSettings.maxFileSize > 0 + && file.size > this.extraSettings.maxFileSize ) { showError( t( diff --git a/src/components/Questions/QuestionMultiple.vue b/src/components/Questions/QuestionMultiple.vue index ea4b1cb8f..44286c518 100644 --- a/src/components/Questions/QuestionMultiple.vue +++ b/src/components/Questions/QuestionMultiple.vue @@ -436,8 +436,8 @@ export default { this.onExtraSettingsChange({ optionsLimitMin: undefined }) } else if (min) { if ( - this.extraSettings.optionsLimitMax && - min > this.extraSettings.optionsLimitMax + this.extraSettings.optionsLimitMax + && min > this.extraSettings.optionsLimitMax ) { showError( t( diff --git a/src/components/Questions/QuestionShort.vue b/src/components/Questions/QuestionShort.vue index d07a42b20..7c8a35416 100644 --- a/src/components/Questions/QuestionShort.vue +++ b/src/components/Questions/QuestionShort.vue @@ -107,13 +107,13 @@ export default { submissionInputPlaceholder() { if (!this.readOnly) { return ( - this.validationObject.createPlaceholder || - this.answerType.createPlaceholder + this.validationObject.createPlaceholder + || this.answerType.createPlaceholder ) } return ( - this.validationObject.submitPlaceholder || - this.answerType.submitPlaceholder + this.validationObject.submitPlaceholder + || this.answerType.submitPlaceholder ) }, /** @@ -157,8 +157,8 @@ export default { // If the browsers validation succeeds either the browser does not implement a validation // or it is valid, so we double check by running our custom validation. if ( - !input.checkValidity() || - !this.validationObject.validate( + !input.checkValidity() + || !this.validationObject.validate( value, splitRegex(this.validationRegex), ) diff --git a/src/components/Results/ResultsSummary.vue b/src/components/Results/ResultsSummary.vue index 0bd619cb2..1ced107e7 100644 --- a/src/components/Results/ResultsSummary.vue +++ b/src/components/Results/ResultsSummary.vue @@ -212,11 +212,11 @@ export default { answersModels.unshift({ id: 0, text: - noResponseCount + - ' (' + - noResponsePercentage + - '%): ' + - t('forms', 'No response'), + noResponseCount + + ' (' + + noResponsePercentage + + '%): ' + + t('forms', 'No response'), }) return answersModels diff --git a/src/components/SidebarTabs/SettingsSidebarTab.vue b/src/components/SidebarTabs/SettingsSidebarTab.vue index 0eeee951c..82bec00e6 100644 --- a/src/components/SidebarTabs/SettingsSidebarTab.vue +++ b/src/components/SidebarTabs/SettingsSidebarTab.vue @@ -180,8 +180,8 @@ export default { */ hasCustomSubmissionMessage() { return ( - this.form?.submissionMessage !== undefined && - this.form?.submissionMessage !== null + this.form?.submissionMessage !== undefined + && this.form?.submissionMessage !== null ) }, diff --git a/src/components/SidebarTabs/SharingSearchDiv.vue b/src/components/SidebarTabs/SharingSearchDiv.vue index 23224f3d9..b885259df 100644 --- a/src/components/SidebarTabs/SharingSearchDiv.vue +++ b/src/components/SidebarTabs/SharingSearchDiv.vue @@ -61,8 +61,8 @@ export default { (item) => !this.currentShares.find( (share) => - share.shareWith === item.shareWith && - share.shareType === item.shareType, + share.shareWith === item.shareWith + && share.shareType === item.shareType, ), ) } @@ -71,8 +71,8 @@ export default { (item) => !this.currentShares.find( (share) => - share.shareWith === item.shareWith && - share.shareType === item.shareType, + share.shareWith === item.shareWith + && share.shareType === item.shareType, ), ) }, diff --git a/src/components/TopBar.vue b/src/components/TopBar.vue index f7526766d..5bb3de7a9 100644 --- a/src/components/TopBar.vue +++ b/src/components/TopBar.vue @@ -119,8 +119,8 @@ export default { }, canEdit() { return ( - this.permissions.includes(this.PERMISSION_TYPES.PERMISSION_EDIT) && - !this.archived + this.permissions.includes(this.PERMISSION_TYPES.PERMISSION_EDIT) + && !this.archived ) }, canSeeResults() { @@ -134,8 +134,8 @@ export default { }, canOnlySubmit() { return ( - this.permissions.length === 1 && - this.permissions.includes(this.PERMISSION_TYPES.PERMISSION_SUBMIT) + this.permissions.length === 1 + && this.permissions.includes(this.PERMISSION_TYPES.PERMISSION_SUBMIT) ) }, }, diff --git a/src/mixins/ShareLinkMixin.js b/src/mixins/ShareLinkMixin.js index 745ca4ac9..b0ef6da78 100644 --- a/src/mixins/ShareLinkMixin.js +++ b/src/mixins/ShareLinkMixin.js @@ -16,10 +16,10 @@ export default { */ getInternalShareLink(formHash) { return ( - window.location.protocol + - '//' + - window.location.host + - generateUrl(`/apps/forms/${this.form.hash}`) + window.location.protocol + + '//' + + window.location.host + + generateUrl(`/apps/forms/${this.form.hash}`) ) }, @@ -45,8 +45,10 @@ export default { */ isEmbeddingAllowed(share) { return ( - share.shareType === this.SHARE_TYPES.SHARE_TYPE_LINK && - share.permissions?.includes(this.PERMISSION_TYPES.PERMISSION_EMBED) + share.shareType === this.SHARE_TYPES.SHARE_TYPE_LINK + && share.permissions?.includes( + this.PERMISSION_TYPES.PERMISSION_EMBED, + ) ) }, diff --git a/src/mixins/UserSearchMixin.js b/src/mixins/UserSearchMixin.js index af4450501..35fb89064 100644 --- a/src/mixins/UserSearchMixin.js +++ b/src/mixins/UserSearchMixin.js @@ -36,9 +36,9 @@ export default { */ isValidQuery() { return ( - this.query && - this.query.trim() !== '' && - this.query.length > this.minSearchStringLength + this.query + && this.query.trim() !== '' + && this.query.length > this.minSearchStringLength ) }, /** @@ -186,8 +186,8 @@ export default { try { // filter out current user if ( - share.value.shareType === this.SHARE_TYPES.SHARE_TYPE_USER && - share.value.shareWith === getCurrentUser().uid + share.value.shareType === this.SHARE_TYPES.SHARE_TYPE_USER + && share.value.shareWith === getCurrentUser().uid ) { return false } diff --git a/src/mixins/ViewsMixin.js b/src/mixins/ViewsMixin.js index 018dec407..9b4bd69e5 100644 --- a/src/mixins/ViewsMixin.js +++ b/src/mixins/ViewsMixin.js @@ -68,8 +68,8 @@ export default { formDescription() { // Remember the old renderer if overridden, or proxy to the default renderer. const defaultRender = - this.markdownit.renderer.rules.link_open || - function (tokens, idx, options, env, self) { + this.markdownit.renderer.rules.link_open + || function (tokens, idx, options, env, self) { return self.renderToken(tokens, idx, options) } @@ -88,8 +88,8 @@ export default { } return ( - this.markdownit.render(this.form.description) || - this.form.description + this.markdownit.render(this.form.description) + || this.form.description ) }, }, diff --git a/src/views/Create.vue b/src/views/Create.vue index 734067ffa..6e45b78b9 100644 --- a/src/views/Create.vue +++ b/src/views/Create.vue @@ -257,8 +257,8 @@ export default { if (this.isRequiredUsed) { message += - ' ' + - t('forms', 'An asterisk (*) indicates mandatory questions.') + ' ' + + t('forms', 'An asterisk (*) indicates mandatory questions.') } return message diff --git a/src/views/Results.vue b/src/views/Results.vue index d3e128972..b737c12c3 100644 --- a/src/views/Results.vue +++ b/src/views/Results.vue @@ -503,11 +503,11 @@ export default { const exportUrl = generateOcsUrl('apps/forms/api/v3/forms/{id}/submissions', { id: this.form.id, - }) + - '?requesttoken=' + - encodeURIComponent(getRequestToken()) + - '&fileFormat=' + - fileFormat + }) + + '?requesttoken=' + + encodeURIComponent(getRequestToken()) + + '&fileFormat=' + + fileFormat window.open(exportUrl, '_self') }, @@ -686,9 +686,9 @@ export default { questions .filter( (question) => - (question.type === 'date') | - (question.type === 'datetime') | - (question.type === 'time'), + (question.type === 'date') + | (question.type === 'datetime') + | (question.type === 'time'), ) .map((question) => [question.id, question.type]), ) diff --git a/src/views/Submit.vue b/src/views/Submit.vue index 5006d2802..c313ee730 100644 --- a/src/views/Submit.vue +++ b/src/views/Submit.vue @@ -369,8 +369,8 @@ export default { } if (this.isRequiredUsed) { message += - ' ' + - t('forms', 'An asterisk (*) indicates mandatory questions.') + ' ' + + t('forms', 'An asterisk (*) indicates mandatory questions.') } return message @@ -381,8 +381,8 @@ export default { */ submissionMessageHTML() { if ( - this.form.submissionMessage && - (this.success || !this.form.canSubmit) + this.form.submissionMessage + && (this.success || !this.form.canSubmit) ) { return this.markdownit.render(this.form.submissionMessage) } @@ -610,9 +610,9 @@ export default { */ beforeWindowUnload(e) { if ( - this.isActive && - !this.submitForm && - Object.keys(this.answers).length !== 0 + this.isActive + && !this.submitForm + && Object.keys(this.answers).length !== 0 ) { // Cancel the window unload event e.preventDefault() @@ -637,9 +637,9 @@ export default { */ confirmLeaveForm() { if ( - this.isActive && - !this.submitForm && - Object.keys(this.answers).length !== 0 + this.isActive + && !this.submitForm + && Object.keys(this.answers).length !== 0 ) { this.showConfirmLeaveDialog = true return new Promise((resolve) => { @@ -670,8 +670,8 @@ export default { // in case no answer is set or all are empty show the confirmation dialog if ( - Object.keys(this.answers).length === 0 || - Object.values(this.answers).every( + Object.keys(this.answers).length === 0 + || Object.values(this.answers).every( (answers) => answers.length === 0, ) ) {