Browse Source

chore(deps) Update Tauri JS CLI (#597)

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
renovate[bot] 5 năm trước cách đây
mục cha
commit
d6e82b4f06
4 tập tin đã thay đổi với 565 bổ sung583 xóa
  1. 14 14
      cli/tauri.js/package.json
  2. 6 2
      cli/tauri.js/src/api/tauricon.ts
  3. 0 3
      cli/tauri.js/src/runner.ts
  4. 545 564
      cli/tauri.js/yarn.lock

+ 14 - 14
cli/tauri.js/package.json

@@ -48,10 +48,10 @@
     "@tauri-apps/toml": "2.2.4",
     "chalk": "4.0.0",
     "chokidar": "3.4.0",
-    "cross-spawn": "7.0.2",
+    "cross-spawn": "7.0.3",
     "fast-glob": "3.2.2",
     "fs-extra": "9.0.0",
-    "http-proxy": "1.18.0",
+    "http-proxy": "1.18.1",
     "imagemin": "7.0.1",
     "imagemin-optipng": "8.0.0",
     "imagemin-pngquant": "8.0.0",
@@ -64,21 +64,21 @@
     "ms": "2.1.2",
     "png2icons": "2.0.1",
     "read-chunk": "3.2.0",
-    "sharp": "0.25.2",
+    "sharp": "0.25.3",
     "webpack-merge": "4.2.2",
     "webpack-shell-plugin": "0.5.0"
   },
   "devDependencies": {
-    "@babel/core": "7.9.6",
-    "@babel/preset-env": "7.9.6",
-    "@babel/preset-typescript": "7.9.0",
-    "@types/cross-spawn": "6.0.1",
+    "@babel/core": "7.10.1",
+    "@babel/preset-env": "7.10.1",
+    "@babel/preset-typescript": "7.10.1",
+    "@types/cross-spawn": "6.0.2",
     "@types/fs-extra": "9.0.1",
     "@types/http-proxy": "1.17.4",
     "@types/imagemin": "7.0.0",
     "@types/imagemin-optipng": "5.2.0",
-    "@types/jsdom": "16.2.1",
-    "@types/lodash": "4.14.150",
+    "@types/jsdom": "16.2.3",
+    "@types/lodash": "4.14.153",
     "@types/ms": "0.7.31",
     "@types/sharp": "0.25.0",
     "@types/webpack-merge": "4.1.5",
@@ -89,7 +89,7 @@
     "eslint": "7.1.0",
     "eslint-config-standard-with-typescript": "18.0.2",
     "eslint-plugin-import": "2.20.2",
-    "eslint-plugin-lodash-template": "0.16.0",
+    "eslint-plugin-lodash-template": "0.18.0",
     "eslint-plugin-node": "11.1.0",
     "eslint-plugin-promise": "4.2.1",
     "eslint-plugin-security": "1.4.0",
@@ -98,12 +98,12 @@
     "is-running": "2.1.0",
     "jest": "26.0.1",
     "jest-mock-process": "1.4.0",
-    "lint-staged": "10.2.2",
-    "lockfile-lint": "4.2.2",
+    "lint-staged": "10.2.7",
+    "lockfile-lint": "4.3.6",
     "promise": "8.1.0",
     "raw-loader": "4.0.1",
-    "ts-loader": "7.0.2",
-    "typescript": "3.8.3",
+    "ts-loader": "7.0.5",
+    "typescript": "3.9.3",
     "webpack": "4.43.0",
     "webpack-cli": "3.3.11",
     "webpack-node-externals": "1.7.2"

+ 6 - 2
cli/tauri.js/src/api/tauricon.ts

@@ -350,8 +350,6 @@ const tauricon = (exports.tauricon = {
     } else {
       throw new Error(`unknown options.splashscreen_type: ${options.splashscreen_type}`)
     }
-    // TODO: determine if this really could be undefined
-    // @ts-expect-error
     const data = await sharpSrc.toBuffer()
 
     for (const optionKey in options) {
@@ -472,10 +470,16 @@ const tauricon = (exports.tauricon = {
       const buf = await sharpSrc.toBuffer()
 
       const out = png2icons.createICNS(buf, png2icons.BICUBIC, 0)
+      if (out === null) {
+        throw new Error('Failed to create icon.icns')
+      }
       ensureFileSync(path.join(target, '/icon.icns'))
       writeFileSync(path.join(target, '/icon.icns'), out)
 
       const out2 = png2icons.createICO(buf, png2icons.BICUBIC, 0, true)
+      if (out2 === null) {
+        throw new Error('Failed to create icon.ico')
+      }
       ensureFileSync(path.join(target, '/icon.ico'))
       writeFileSync(path.join(target, '/icon.ico'), out2)
     } catch (err) {

+ 0 - 3
cli/tauri.js/src/runner.ts

@@ -153,9 +153,7 @@ class Runner {
     // eslint-disable-next-line security/detect-non-literal-fs-filename
 
     let tauriPaths: string[] = []
-    // @ts-expect-error
     if (typeof tomlContents.dependencies.tauri !== 'string' && tomlContents.dependencies.tauri.path) {
-      // @ts-expect-error
       const tauriPath = path.resolve(tauriDir, tomlContents.dependencies.tauri.path)
       tauriPaths = [
         tauriPath,
@@ -299,7 +297,6 @@ class Runner {
         }
 
         const tauriScript = document.createElement('script')
-        // @ts-expect-error
         tauriScript.text = readFileSync(path.join(tauriDir, 'tauri.js')).toString()
         document.body.insertBefore(tauriScript, document.body.firstChild)
 

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 545 - 564
cli/tauri.js/yarn.lock


Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác