update dependencies (#764)

* update dependencies
* fix linter issues
master
JFH 2022-05-16 09:38:45 +02:00 committed by GitHub
parent dbc9ed7124
commit 7cbcb6989c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 5551 additions and 2352 deletions

3701
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -79,39 +79,37 @@
]
},
"dependencies": {
"@babel/polyfill": "7.12.1",
"browser-fs-access": "0.25.0",
"core-js": "3.21.1",
"browser-fs-access": "0.29.5",
"core-js": "3.22.5",
"elix": "15.0.1",
"html2canvas": "1.4.1",
"i18next": "21.6.14",
"i18next": "21.8.2",
"jspdf": "2.5.1",
"pathseg": "1.2.1",
"regenerator-runtime": "0.13.9",
"rollup-plugin-polyfill-node": "0.8.0",
"svg2pdf.js": "2.2.0"
},
"devDependencies": {
"@babel/core": "7.17.5",
"@babel/preset-env": "7.16.11",
"@babel/register": "7.17.0",
"@babel/runtime-corejs3": "7.17.2",
"@babel/core": "7.17.10",
"@babel/preset-env": "7.17.10",
"@babel/register": "7.17.7",
"@babel/runtime-corejs3": "7.17.9",
"@cypress/code-coverage": "3.9.12",
"@cypress/fiddle": "1.19.3",
"@rollup/plugin-babel": "5.3.1",
"@rollup/plugin-commonjs": "^18",
"@rollup/plugin-dynamic-import-vars": "1.4.2",
"@rollup/plugin-node-resolve": "13.1.3",
"@rollup/plugin-dynamic-import-vars": "1.4.3",
"@rollup/plugin-node-resolve": "13.3.0",
"@rollup/plugin-replace": "4.0.0",
"@rollup/plugin-url": "6.1.0",
"@web/dev-server": "0.1.30",
"@web/dev-server-rollup": "0.3.15",
"@rollup/plugin-url": "7.0.0",
"@web/dev-server": "0.1.31",
"@web/dev-server-rollup": "0.3.17",
"babel-plugin-transform-object-rest-spread": "7.0.0-beta.3",
"copyfiles": "2.4.1",
"core-js-bundle": "3.21.1",
"core-js-bundle": "3.22.5",
"cp-cli": "2.0.0",
"cypress": "9.5.1",
"cypress-multi-reporters": "1.5.0",
"cypress": "9.6.1",
"cypress-multi-reporters": "1.6.0",
"cypress-plugin-snapshots": "1.4.4",
"jamilih": "0.54.0",
"jsdoc": "3.6.10",
@ -125,15 +123,14 @@
"remark-cli": "10.0.1",
"remark-lint-ordered-list-marker-value": "3.1.1",
"rimraf": "3.0.2",
"rollup": "2.70.0",
"rollup": "2.73.0",
"rollup-plugin-copy": "3.4.0",
"rollup-plugin-filesize": "9.1.2",
"rollup-plugin-html": "0.2.1",
"rollup-plugin-node-polyfills": "0.2.1",
"rollup-plugin-progress": "1.1.2",
"rollup-plugin-re": "1.0.7",
"rollup-plugin-terser": "7.0.2",
"standard": "16.0.4",
"standard": "17.0.0",
"start-server-and-test": "1.14.0"
}
}

View File

@ -9,9 +9,7 @@ import babel from '@rollup/plugin-babel'
import copy from 'rollup-plugin-copy'
import { nodeResolve } from '@rollup/plugin-node-resolve'
import commonjs from '@rollup/plugin-commonjs'
import nodePolyfills from 'rollup-plugin-node-polyfills'
import url from '@rollup/plugin-url' // for XML/SVG files
// eslint-disable-next-line node/no-extraneous-import
import html from 'rollup-plugin-html'
import dynamicImportVars from '@rollup/plugin-dynamic-import-vars'
@ -107,7 +105,6 @@ const config = [{
commonjs(),
dynamicImportVars({ include: 'src/editor/locale.js' }),
babel({ babelHelpers: 'bundled', exclude: [/\/core-js\//] }), // exclude core-js to avoid circular dependencies.
nodePolyfills(),
terser({ keep_fnames: true }), // keep_fnames is needed to avoid an error when calling extensions.
filesize()
]
@ -145,7 +142,6 @@ extensionDirs.forEach((extensionDir) => {
commonjs({ exclude: `src/editor/extensions/${extensionName}/${extensionName}.js` }),
dynamicImportVars({ include: `src/editor/extensions/${extensionName}/${extensionName}.js` }),
babel({ babelHelpers: 'bundled', exclude: [/\/core-js\//] }),
nodePolyfills(),
terser({ keep_fnames: true })
]
}

View File

@ -1597,10 +1597,10 @@ export function jPickerMethod (elem, options, commitCallback, liveCallback, canc
const color = {
active: (typeof settings.color.active).toString().toLowerCase() === 'string'
? new Color({
ahex: !settings.window.alphaSupport && settings.color.active
? settings.color.active.substring(0, 6) + 'ff'
: settings.color.active
})
ahex: !settings.window.alphaSupport && settings.color.active
? settings.color.active.substring(0, 6) + 'ff'
: settings.color.active
})
: new Color({
ahex: !settings.window.alphaSupport &&
settings.color.active.val('ahex')
@ -1609,10 +1609,10 @@ export function jPickerMethod (elem, options, commitCallback, liveCallback, canc
}),
current: (typeof settings.color.active).toString().toLowerCase() === 'string'
? new Color({
ahex: !settings.window.alphaSupport && settings.color.active
? settings.color.active.substring(0, 6) + 'ff'
: settings.color.active
})
ahex: !settings.window.alphaSupport && settings.color.active
? settings.color.active.substring(0, 6) + 'ff'
: settings.color.active
})
: new Color({
ahex: !settings.window.alphaSupport &&
settings.color.active.val('ahex')

File diff suppressed because it is too large Load Diff

View File

@ -9,18 +9,18 @@
"author": "OptimistikSAS",
"license": "MIT",
"dependencies": {
"react": "^17.0.2",
"react-dom": "^17.0.2",
"standardjs": "^1.0.0-alpha"
"react": "^18.1.0",
"react-dom": "^18.1.0",
"standard": "^17.0.0"
},
"devDependencies": {
"@babel/core": "^7.16.7",
"@babel/core": "^7.17.10",
"@babel/preset-react": "^7.16.7",
"@rollup/plugin-babel": "^5.3.0",
"@rollup/plugin-commonjs": "^21.0.1",
"@rollup/plugin-node-resolve": "^13.1.3",
"@rollup/plugin-replace": "^3.0.1",
"@rollup/plugin-babel": "^5.3.1",
"@rollup/plugin-commonjs": "^22.0.0",
"@rollup/plugin-node-resolve": "^13.3.0",
"@rollup/plugin-replace": "^4.0.0",
"rimraf": "^3.0.2",
"rollup": "^2.63.0"
"rollup": "^2.73.0"
}
}

View File

@ -299,7 +299,7 @@ const setBBoxZoomMethod = (val, editorW, editorH) => {
if (bb.width === 0 || bb.height === 0) {
const newzoom = bb.zoom ? bb.zoom : zoom * bb.factor
svgCanvas.setZoom(newzoom)
return { zoom: zoom, bbox: bb }
return { zoom, bbox: bb }
}
return calcZoom(bb)
}

View File

@ -590,7 +590,7 @@ const setSvgString = (xmlString, preventUndo) => {
// update root to the correct size
const width = content.getAttribute('width')
const height = content.getAttribute('height')
const changes = { width: width, height: height }
const changes = { width, height }
batchCmd.addSubCommand(
new ChangeElementCommand(svgCanvas.getSvgRoot(), changes)
)
@ -977,8 +977,8 @@ const exportPDF = async (
canvas => {
const imgData = canvas.toDataURL('image/png')
const doc = new JsPDF({
orientation: orientation,
unit: unit,
orientation,
unit,
format: [res.w, res.h]
})
const docTitle = svgCanvas.getDocumentTitle()

View File

@ -617,13 +617,13 @@ export const getPathDFromElement = function (elem) {
d = (!rx && !ry)
// Regular rect
? getPathDFromSegments([
['M', [x, y]],
['L', [x + w, y]],
['L', [x + w, y + h]],
['L', [x, y + h]],
['L', [x, y]],
['Z', []]
])
['M', [x, y]],
['L', [x + w, y]],
['L', [x + w, y + h]],
['L', [x, y + h]],
['L', [x, y]],
['Z', []]
])
: getPathDFromSegments([
['M', [x, y + ry]],
['C', [x, y + ry / num, x + rx / num, y, x + rx, y]],

View File

@ -1,8 +1,5 @@
// eslint-disable-next-line node/no-unpublished-import
import { fromRollup } from '@web/dev-server-rollup'
// eslint-disable-next-line node/no-unpublished-import
import rollupCommonjs from '@rollup/plugin-commonjs'
// eslint-disable-next-line node/no-unpublished-import
import rollupHtml from 'rollup-plugin-html'
const commonjs = fromRollup(rollupCommonjs)