Skip to content

Commit

Permalink
Merge pull request #6842 from nextcloud/dependachristoph/npm_and_yarn…
Browse files Browse the repository at this point in the history
…/webpack-5

Bump webpack from v4 to v5
  • Loading branch information
st3iny authored Jul 21, 2022
2 parents 29b147e + e36faf5 commit db1966f
Show file tree
Hide file tree
Showing 46 changed files with 12,401 additions and 21,047 deletions.
5 changes: 4 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,8 @@ module.exports = {
t: true,
__webpack_public_path__: true,
__webpack_nonce__: true,
}
},
rules: {
'jsdoc/require-jsdoc': 'off',
},
}
33,240 changes: 12,282 additions & 20,958 deletions package-lock.json

Large diffs are not rendered by default.

8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"@nextcloud/vue-dashboard": "^2",
"@riophae/vue-treeselect": "^0.4.0",
"@vue/babel-preset-app": "^5.0.6",
"buffer": "^6.0.3",
"color-convert": "^2.0.1",
"core-js": "^3.23.3",
"debounce-promise": "^3.1.2",
Expand All @@ -61,7 +62,9 @@
"printscout": "2.0.3",
"ramda": "^0.28.0",
"raw-loader": "^4.0.2",
"stream-browserify": "^3.0.0",
"stylelint": "^14.9.1",
"util": "^0.12.4",
"uuid": "^8.3.2",
"v-tooltip": "^2.1.3",
"vue": "^2.6.14",
Expand Down Expand Up @@ -92,7 +95,7 @@
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/preset-env": "^7.18.2",
"@nextcloud/browserslist-config": "^2.2.0",
"@nextcloud/eslint-config": "^4.0.0",
"@nextcloud/eslint-config": "^6.1.0",
"@nextcloud/eslint-plugin": "^2.0.0",
"@types/jest": "^28.1.4",
"@vue/test-utils": "^1.3.0",
Expand All @@ -107,7 +110,6 @@
"eslint-loader": "^4.0.2",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.3.1",
"eslint-plugin-standard": "^4.1.0",
"eslint-plugin-vue": "^7.20.0",
"file-loader": "^6.2.0",
Expand All @@ -126,7 +128,7 @@
"vue-loader": "^15.9.7",
"vue-server-renderer": "^2.7.3",
"vue-template-compiler": "^2.6.14",
"webpack": "^4.46.0",
"webpack": "^5.73.0",
"webpack-cli": "^4.10.0",
"webpack-merge": "^5.8.0"
}
Expand Down
2 changes: 1 addition & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default {
},
methods: {
sync() {
setTimeout(async() => {
setTimeout(async () => {
try {
await this.$store.dispatch('syncInboxes')
Expand Down
4 changes: 2 additions & 2 deletions src/ReplyBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ import { html } from './util/text'
/**
* @param {Text} original original
* @param {object} from from
* @param {Number} date date
* @param {number} date date
* @param {boolean} replyOnTop put reply on top?
* @returns {Text}
* @return {Text}
*/
export const buildReplyBody = (original, from, date, replyOnTop = true) => {
const startEnd = '<p></p><p></p>'
Expand Down
2 changes: 1 addition & 1 deletion src/ckeditor/signature/InsertSignatureCommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export default class InsertSignatureCommand extends Command {
*
* @param {*} editor the editor instance
* @param {*} writer the writer instance
* @returns {*} the position above the quoted text; position 1 if no quote found
* @return {*} the position above the quoted text; position 1 if no quote found
*/
findPositionAboveQuote(editor, writer) {
// Create a range spanning over the entire root content:
Expand Down
2 changes: 1 addition & 1 deletion src/components/AccountForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ export default {
port,
}))
})
const results = await Promise.all(imapAndSmtpHosts.map(async({ host, port }) => {
const results = await Promise.all(imapAndSmtpHosts.map(async ({ host, port }) => {
return {
host,
port,
Expand Down
15 changes: 8 additions & 7 deletions src/components/Composer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,7 @@ export default {
this.mailvelope.keysMissing = recipients.filter((r) => keysValid[r] === false)
},
initBody() {
/** @var {Text} body **/
/** @member {Text} body */
let body
if (this.replyTo) {
body = buildReplyBody(
Expand Down Expand Up @@ -915,7 +915,7 @@ export default {
return uid
})
.catch(async(error) => {
.catch(async (error) => {
await matchError(error, {
[NoDraftsMailboxConfiguredError.getName()]() {
return false
Expand Down Expand Up @@ -1056,7 +1056,7 @@ export default {
.then((data) => this.send({ ...data, force }))
.then(() => logger.info('message sent'))
.then(() => (this.state = STATES.FINISHED))
.catch(async(error) => {
.catch(async (error) => {
logger.error('could not send message', { error });
[this.errorText, this.state] = await matchError(error, {
[NoSentMailboxConfiguredError.getName()]() {
Expand Down Expand Up @@ -1116,8 +1116,9 @@ export default {
},
/**
* Format aliases for the Multiselect
* @param {Object} alias the alias to format
* @returns {string}
*
* @param {object} alias the alias to format
* @return {string}
*/
formatAliases(alias) {
if (!alias.name) {
Expand All @@ -1134,7 +1135,7 @@ export default {
* Whether the date is acceptable
*
* @param {Date} date The date to compare to
* @returns {boolean}
* @return {boolean}
*/
disabledDatetimepickerDate(date) {
const minimumDate = new Date()
Expand All @@ -1149,7 +1150,7 @@ export default {
* Whether the time for date is acceptable
*
* @param {Date} date The date to compare to
* @returns {boolean}
* @return {boolean}
*/
disabledDatetimepickerTime(date) {
const now = new Date()
Expand Down
4 changes: 2 additions & 2 deletions src/components/Dashboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export default {
},
},
async mounted() {
const accountInboxes = await Promise.all(this.accounts.map(async(account) => {
const accountInboxes = await Promise.all(this.accounts.map(async (account) => {
logger.debug('account', {
account,
})
Expand All @@ -122,7 +122,7 @@ export default {
inboxes,
})
await Promise.all(inboxes.map(async(mailbox) => {
await Promise.all(inboxes.map(async (mailbox) => {
const messages = await fetchEnvelopes(mailbox.accountId, mailbox.databaseId, this.query, undefined, 10)
this.messages = this.messages !== null ? [...this.messages, ...messages] : messages
this.fetchedAccounts++
Expand Down
3 changes: 2 additions & 1 deletion src/components/Envelope.vue
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,8 @@ export default {
},
/**
* Subject of envelope or "No Subject".
* @returns {string}
*
* @return {string}
*/
subjectForSubtitle() {
// We have to use || here (instead of ??) because the subject might be '', null
Expand Down
2 changes: 1 addition & 1 deletion src/components/EnvelopeList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ export default {
}
}
await Promise.all(this.selectedEnvelopes.map(async(envelope) => {
await Promise.all(this.selectedEnvelopes.map(async (envelope) => {
logger.info(`deleting thread ${envelope.threadRootId}`)
await this.$store.dispatch('deleteThread', {
envelope,
Expand Down
4 changes: 2 additions & 2 deletions src/components/Mailbox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -250,14 +250,14 @@ export default {
}
} catch (error) {
await matchError(error, {
[MailboxLockedError.getName()]: async(error) => {
[MailboxLockedError.getName()]: async (error) => {
logger.info(`Mailbox ${this.mailbox.databaseId} (${this.searchQuery}) is locked`, { error })
await wait(15 * 1000)
// Keep trying
await this.loadEnvelopes()
},
[MailboxNotCachedError.getName()]: async(error) => {
[MailboxNotCachedError.getName()]: async (error) => {
logger.info(`Mailbox ${this.mailbox.databaseId} (${this.searchQuery}) not cached. Triggering initialization`, { error })
this.loadingEnvelopes = false
Expand Down
6 changes: 4 additions & 2 deletions src/components/NavigationMailbox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -386,15 +386,17 @@ export default {
methods: {
/**
* Generate unique key id for a specific mailbox
* @param {Object} mailbox the mailbox to gen id for
* @returns {string}
*
* @param {object} mailbox the mailbox to gen id for
* @return {string}
*/
genId(mailbox) {
return 'mailbox-' + mailbox.databaseId
},
/**
* On menu toggle, fetch stats
*
* @param {boolean} open menu opened state
*/
onMenuToggle(open) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Outbox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export default {
},
created() {
// Reload outbox contents every 60 seconds
this.refreshInterval = setInterval(async() => {
this.refreshInterval = setInterval(async () => {
await this.fetchMessages()
}, 60000)
},
Expand Down
3 changes: 2 additions & 1 deletion src/components/OutboxMessageListItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ export default {
},
/**
* Subject of message or "No Subject".
* @returns {string}
*
* @return {string}
*/
subjectForSubtitle() {
// We have to use || here (instead of ??) because the subject might be '', null
Expand Down
2 changes: 1 addition & 1 deletion src/crypto/mailvelope.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const loadMailvelopeDynamically = () =>
window.addEventListener('mailvelope', () => resolve(window.mailvelope), false)
})

export const getMailvelope = async() => {
export const getMailvelope = async () => {
if (mailvelope) {
return mailvelope
}
Expand Down
3 changes: 2 additions & 1 deletion src/crypto/pgp.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/

/**
* @param {Text} message the message
* @returns {boolean|*}
* @return {boolean|*}
*/
export const isPgpgMessage = (message) =>
message.format === 'plain' && message.value.startsWith('-----BEGIN PGP MESSAGE-----')
1 change: 1 addition & 0 deletions src/errors/MailboxLockedError.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/

export default class MailboxLockedError extends Error {
Expand Down
1 change: 1 addition & 0 deletions src/errors/ManyRecipientsError.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/

export default class ManyRecipientsError extends Error {
Expand Down
1 change: 1 addition & 0 deletions src/errors/NoDraftsMailboxConfiguredError.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/

export default class NoDraftsMailboxConfiguredError extends Error {
Expand Down
1 change: 1 addition & 0 deletions src/errors/NoSentMailboxConfiguredError.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/

export default class NoSentMailboxConfiguredError extends Error {
Expand Down
1 change: 1 addition & 0 deletions src/errors/NoTrashMailboxConfiguredError.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/

export default class NoTrashMailboxConfiguredError extends Error {
Expand Down
5 changes: 3 additions & 2 deletions src/errors/convert.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/

import MailboxLockedError from './MailboxLockedError'
Expand All @@ -40,8 +41,8 @@ const map = {
}

/**
* @param {Object} axiosError the axios Error
* @returns {Error}
* @param {object} axiosError the axios Error
* @return {Error}
*/
export const convertAxiosError = (axiosError) => {
if (!('response' in axiosError)) {
Expand Down
3 changes: 2 additions & 1 deletion src/errors/match.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/

/**
* @param {Error} error error
* @param {object} matches matches
*/
export const matchError = async(error, matches) => {
export const matchError = async (error, matches) => {
if (error.name in matches) {
return await Promise.resolve(matches[error.name](error))
}
Expand Down
1 change: 1 addition & 0 deletions src/html-response.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/

// injected styles
Expand Down
1 change: 1 addition & 0 deletions src/main-settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/

import { generateFilePath } from '@nextcloud/router'
Expand Down
4 changes: 2 additions & 2 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { generateFilePath } from '@nextcloud/router'
import '@nextcloud/dialogs/styles/toast.scss'
import './directives/drag-and-drop/styles/drag-and-drop.scss'
import VueShortKey from 'vue-shortkey'
import VTooltip from 'v-tooltip'
import vToolTip from 'v-tooltip'
import VueClipboard from 'vue-clipboard2'

import App from './App'
Expand All @@ -47,7 +47,7 @@ sync(store, router)
Vue.mixin(Nextcloud)

Vue.use(VueShortKey, { prevent: ['input', 'div'] })
Vue.use(VTooltip)
Vue.use(vToolTip)
Vue.use(VueClipboard)

const getPreferenceFromPage = (key) => {
Expand Down
2 changes: 1 addition & 1 deletion src/service/AccountService.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export const fetch = (id) => {
return axios.get(url).then((resp) => fixAccountId(resp.data))
}

export const fetchQuota = async(id) => {
export const fetchQuota = async (id) => {
const url = generateUrl('/apps/mail/api/accounts/{id}/quota', {
id,
})
Expand Down
Loading

0 comments on commit db1966f

Please sign in to comment.