chore(deps): update js dev dependencies (#10051)

This commit is contained in:
Tony 2024-06-14 10:28:06 +08:00 committed by GitHub
parent 3fd84cb3c9
commit 16641723b0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
14 changed files with 793 additions and 1663 deletions

View File

@ -1,5 +1,8 @@
{ {
"singleQuote": true, "singleQuote": true,
"semi": false, "semi": false,
"trailingComma": "none" "trailingComma": "none",
"overrides": [
{ "files": [".changes/**.md"], "options": { "singleQuote": false } }
]
} }

View File

@ -11,15 +11,16 @@
}, },
"dependencies": { "dependencies": {
"@tauri-apps/api": "../../tooling/api/dist", "@tauri-apps/api": "../../tooling/api/dist",
"@zerodevx/svelte-json-view": "0.2.1" "@zerodevx/svelte-json-view": "1.0.9"
}, },
"devDependencies": { "devDependencies": {
"@iconify-json/codicon": "^1.1.10", "@iconify-json/codicon": "^1.1.49",
"@iconify-json/ph": "^1.1.1", "@iconify-json/ph": "^1.1.13",
"internal-ip": "^7.0.0", "@sveltejs/vite-plugin-svelte": "^3.1.1",
"unocss": "^0.39.3", "@unocss/extractor-svelte": "^0.61.0",
"@sveltejs/vite-plugin-svelte": "^2.4.6", "internal-ip": "^8.0.0",
"svelte": "^4.2.1", "svelte": "^4.2.18",
"vite": "^4.5.3" "unocss": "^0.61.0",
"vite": "^5.2.13"
} }
} }

View File

@ -642,24 +642,24 @@ dependencies = [
] ]
[[package]] [[package]]
name = "dirs-next" name = "dirs"
version = "2.0.0" version = "5.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225"
dependencies = [ dependencies = [
"cfg-if", "dirs-sys",
"dirs-sys-next",
] ]
[[package]] [[package]]
name = "dirs-sys-next" name = "dirs-sys"
version = "0.1.2" version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c"
dependencies = [ dependencies = [
"libc", "libc",
"option-ext",
"redox_users", "redox_users",
"winapi", "windows-sys 0.48.0",
] ]
[[package]] [[package]]
@ -1638,7 +1638,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19"
dependencies = [ dependencies = [
"cfg-if", "cfg-if",
"windows-targets 0.52.5", "windows-targets 0.48.5",
] ]
[[package]] [[package]]
@ -1939,6 +1939,12 @@ version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381"
[[package]]
name = "option-ext"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d"
[[package]] [[package]]
name = "overload" name = "overload"
version = "0.1.1" version = "0.1.1"
@ -3011,7 +3017,7 @@ dependencies = [
"anyhow", "anyhow",
"bytes", "bytes",
"cocoa", "cocoa",
"dirs-next", "dirs",
"dunce", "dunce",
"embed_plist", "embed_plist",
"futures-util", "futures-util",
@ -3060,7 +3066,7 @@ version = "2.0.0-beta.17"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"cargo_toml", "cargo_toml",
"dirs-next", "dirs",
"glob", "glob",
"heck 0.5.0", "heck 0.5.0",
"json-patch", "json-patch",
@ -3509,14 +3515,14 @@ dependencies = [
[[package]] [[package]]
name = "tray-icon" name = "tray-icon"
version = "0.14.0" version = "0.14.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f79da804c7d1fd82da182b39d4fe5ac1044b08117358b23b41daf88840a3e70d" checksum = "3ad8319cca93189ea9ab1b290de0595960529750b6b8b501a399ed1ec3775d60"
dependencies = [ dependencies = [
"cocoa", "cocoa",
"core-graphics", "core-graphics",
"crossbeam-channel", "crossbeam-channel",
"dirs-next", "dirs",
"libappindicator", "libappindicator",
"muda", "muda",
"objc", "objc",

View File

@ -2,13 +2,8 @@
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
import { import { defineConfig, presetIcons, presetUno, presetWebFonts } from 'unocss'
defineConfig, import extractorSvelte from '@unocss/extractor-svelte'
presetIcons,
presetUno,
extractorSvelte,
presetWebFonts
} from 'unocss'
export default defineConfig({ export default defineConfig({
theme: { theme: {

View File

@ -18,9 +18,9 @@
"devDependencies": { "devDependencies": {
"covector": "^0.9.0", "covector": "^0.9.0",
"husky": "^6.0.0", "husky": "^6.0.0",
"prettier": "^2.5.1" "prettier": "^3.3.2"
}, },
"dependencies": { "dependencies": {
"typescript": "^4.5.4" "typescript": "^5.4.5"
} }
} }

View File

@ -1,52 +0,0 @@
{
"root": true,
"env": {
"node": true,
"jest": true
},
"parser": "@typescript-eslint/parser",
"extends": [
"plugin:@typescript-eslint/recommended-requiring-type-checking",
// TODO: make this work with typescript
// "plugin:node/recommended"
"prettier"
],
"plugins": ["@typescript-eslint", "node", "security"],
"parserOptions": {
"project": "./tsconfig.json"
},
"globals": {
"__statics": true,
"process": true
},
// add your custom rules here
"rules": {
"no-console": "error",
"no-debugger": "error",
"no-process-exit": "off",
"security/detect-non-literal-fs-filename": "warn",
"security/detect-unsafe-regex": "error",
"security/detect-buffer-noassert": "error",
"security/detect-child-process": "warn",
"security/detect-disable-mustache-escape": "error",
"security/detect-eval-with-expression": "error",
"security/detect-no-csrf-before-method-override": "error",
"security/detect-non-literal-regexp": "error",
"security/detect-non-literal-require": "warn",
"security/detect-object-injection": "warn",
"security/detect-possible-timing-attacks": "error",
"security/detect-pseudoRandomBytes": "error",
"space-before-function-paren": "off",
"@typescript-eslint/default-param-last": "off",
"@typescript-eslint/strict-boolean-expressions": 0,
"no-return-await": "warn",
"@typescript-eslint/return-await": "off"
}
}

View File

@ -0,0 +1,53 @@
// Copyright 2019-2024 Tauri Programme within The Commons Conservancy
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
import globals from 'globals'
import eslint from '@eslint/js'
import prettierConfig from 'eslint-config-prettier'
import securityPlugin from 'eslint-plugin-security'
import tseslint from 'typescript-eslint'
/** @type {import('eslint').Linter.FlatConfig[]} */
export default [
eslint.configs.recommended,
prettierConfig,
securityPlugin.configs.recommended,
...tseslint.configs.recommendedTypeChecked,
{
languageOptions: {
globals: {
...globals.node,
...globals.jest,
__statics: true,
process: true
},
parserOptions: {
project: true,
tsconfigRootDir: import.meta.dirname
}
},
rules: {
'no-console': 'error',
'no-debugger': 'error',
'no-process-exit': 'off',
'security/detect-non-literal-fs-filename': 'warn',
'security/detect-unsafe-regex': 'error',
'security/detect-buffer-noassert': 'error',
'security/detect-child-process': 'warn',
'security/detect-disable-mustache-escape': 'error',
'security/detect-eval-with-expression': 'error',
'security/detect-no-csrf-before-method-override': 'error',
'security/detect-non-literal-regexp': 'error',
'security/detect-non-literal-require': 'warn',
'security/detect-object-injection': 'warn',
'security/detect-possible-timing-attacks': 'error',
'security/detect-pseudoRandomBytes': 'error',
'space-before-function-paren': 'off',
'@typescript-eslint/default-param-last': 'off',
'@typescript-eslint/strict-boolean-expressions': 0,
'no-return-await': 'warn',
'@typescript-eslint/return-await': 'off'
}
}
]

View File

@ -39,33 +39,31 @@
"build": "rollup -c --configPlugin typescript", "build": "rollup -c --configPlugin typescript",
"npm-pack": "yarn build && cd ./dist && npm pack", "npm-pack": "yarn build && cd ./dist && npm pack",
"npm-publish": "yarn build && cd ./dist && yarn publish --access public --loglevel silly --tag next", "npm-publish": "yarn build && cd ./dist && yarn publish --access public --loglevel silly --tag next",
"ts:check": "tsc -noEmit", "ts:check": "tsc --noEmit",
"lint": "eslint --ext ts \"./src/**/*.ts\"", "lint": "eslint src/**.ts",
"lint:fix": "eslint --fix --ext ts \"./src/**/*.ts\"", "lint:fix": "eslint src/**.ts --fix",
"format": "prettier --write . --config ../../.prettierrc --ignore-path .gitignore --ignore-path ../../.prettierignore", "format": "prettier --write . --config ../../.prettierrc --ignore-path .gitignore --ignore-path ../../.prettierignore",
"format:check": "prettier --check . --config ../../.prettierrc --ignore-path .gitignore --ignore-path ../../.prettierignore" "format:check": "prettier --check . --config ../../.prettierrc --ignore-path .gitignore --ignore-path ../../.prettierignore"
}, },
"devDependencies": { "devDependencies": {
"@eslint/js": "^9.4.0",
"@rollup/plugin-terser": "0.4.4", "@rollup/plugin-terser": "0.4.4",
"@rollup/plugin-typescript": "11.1.6", "@rollup/plugin-typescript": "11.1.6",
"@types/node": "20.11.24", "@types/eslint": "^8.56.10",
"@typescript-eslint/eslint-plugin": "6.21.0", "@types/node": "20.14.2",
"@typescript-eslint/parser": "6.21.0", "eslint": "^9.4.0",
"eslint": "8.57.0",
"eslint-config-prettier": "9.1.0", "eslint-config-prettier": "9.1.0",
"eslint-plugin-import": "2.29.1", "eslint-plugin-security": "3.0.0",
"eslint-plugin-n": "16.6.2",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-promise": "6.1.1",
"eslint-plugin-security": "2.1.1",
"fast-glob": "3.3.2", "fast-glob": "3.3.2",
"prettier": "3.2.5", "globals": "^15.4.0",
"rollup": "4.12.1", "prettier": "3.3.2",
"tslib": "2.6.2", "rollup": "4.18.0",
"typescript": "5.3.3" "tslib": "^2.6.3",
"typescript": "^5.4.5",
"typescript-eslint": "rc-v8"
}, },
"engines": { "engines": {
"node": ">= 18", "node": ">= 18.18",
"npm": ">= 6.6.0", "npm": ">= 6.6.0",
"yarn": ">= 1.19.1" "yarn": ">= 1.19.1"
} }

View File

@ -22,7 +22,6 @@ import type { EventName, EventCallback, UnlistenFn } from './event'
import { import {
TauriEvent, TauriEvent,
// imported for documentation purposes // imported for documentation purposes
// eslint-disable-next-line
type EventTarget, type EventTarget,
emit, emit,
emitTo, emitTo,
@ -73,7 +72,6 @@ function getCurrent(): Webview {
function getAll(): Webview[] { function getAll(): Webview[] {
return window.__TAURI_INTERNALS__.metadata.webviews.map( return window.__TAURI_INTERNALS__.metadata.webviews.map(
(w) => (w) =>
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
new Webview(Window.getByLabel(w.windowLabel)!, w.label, { new Webview(Window.getByLabel(w.windowLabel)!, w.label, {
// @ts-expect-error `skip` is not defined in the public API but it is handled by the constructor // @ts-expect-error `skip` is not defined in the public API but it is handled by the constructor
skip: true skip: true
@ -228,7 +226,7 @@ class Webview {
): Promise<UnlistenFn> { ): Promise<UnlistenFn> {
if (this._handleTauriEvent(event, handler)) { if (this._handleTauriEvent(event, handler)) {
return Promise.resolve(() => { return Promise.resolve(() => {
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, security/detect-object-injection // eslint-disable-next-line security/detect-object-injection
const listeners = this.listeners[event] const listeners = this.listeners[event]
listeners.splice(listeners.indexOf(handler), 1) listeners.splice(listeners.indexOf(handler), 1)
}) })

View File

@ -34,7 +34,6 @@ function getCurrent(): WebviewWindow {
function getAll(): WebviewWindow[] { function getAll(): WebviewWindow[] {
return window.__TAURI_INTERNALS__.metadata.webviews.map( return window.__TAURI_INTERNALS__.metadata.webviews.map(
(w) => (w) =>
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
new WebviewWindow(w.label, { new WebviewWindow(w.label, {
// @ts-expect-error `skip` is not defined in the public API but it is handled by the constructor // @ts-expect-error `skip` is not defined in the public API but it is handled by the constructor
skip: true skip: true
@ -157,7 +156,7 @@ class WebviewWindow {
): Promise<UnlistenFn> { ): Promise<UnlistenFn> {
if (this._handleTauriEvent(event, handler)) { if (this._handleTauriEvent(event, handler)) {
return Promise.resolve(() => { return Promise.resolve(() => {
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, security/detect-object-injection // eslint-disable-next-line security/detect-object-injection
const listeners = this.listeners[event] const listeners = this.listeners[event]
listeners.splice(listeners.indexOf(handler), 1) listeners.splice(listeners.indexOf(handler), 1)
}) })

View File

@ -26,7 +26,6 @@ import type { Event, EventName, EventCallback, UnlistenFn } from './event'
import { import {
TauriEvent, TauriEvent,
// imported for documentation purposes // imported for documentation purposes
// eslint-disable-next-line
type EventTarget, type EventTarget,
emit, emit,
emitTo, emitTo,
@ -375,7 +374,7 @@ class Window {
): Promise<UnlistenFn> { ): Promise<UnlistenFn> {
if (this._handleTauriEvent(event, handler)) { if (this._handleTauriEvent(event, handler)) {
return Promise.resolve(() => { return Promise.resolve(() => {
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, security/detect-object-injection // eslint-disable-next-line security/detect-object-injection
const listeners = this.listeners[event] const listeners = this.listeners[event]
listeners.splice(listeners.indexOf(handler), 1) listeners.splice(listeners.indexOf(handler), 1)
}) })
@ -1696,7 +1695,6 @@ class Window {
* @returns A promise resolving to a function to unlisten to the event. * @returns A promise resolving to a function to unlisten to the event.
* Note that removing the listener is required if your listener goes out of scope e.g. the component is unmounted. * Note that removing the listener is required if your listener goes out of scope e.g. the component is unmounted.
*/ */
/* eslint-disable @typescript-eslint/promise-function-async */
async onCloseRequested( async onCloseRequested(
handler: (event: CloseRequestedEvent) => void | Promise<void> handler: (event: CloseRequestedEvent) => void | Promise<void>
): Promise<UnlistenFn> { ): Promise<UnlistenFn> {
@ -1709,7 +1707,6 @@ class Window {
}) })
}) })
} }
/* eslint-enable */
/** /**
* Listen to a file drop event. * Listen to a file drop event.

File diff suppressed because it is too large Load Diff

View File

@ -38,13 +38,13 @@
} }
}, },
"devDependencies": { "devDependencies": {
"@napi-rs/cli": "2.16.1", "@napi-rs/cli": "2.18.3",
"cross-env": "7.0.3", "cross-env": "7.0.3",
"cross-spawn": "7.0.3", "cross-spawn": "7.0.3",
"fs-extra": "11.1.1", "fs-extra": "11.2.0",
"jest": "29.7.0", "jest": "29.7.0",
"jest-transform-toml": "1.0.0", "jest-transform-toml": "1.0.0",
"prettier": "2.8.8" "prettier": "3.3.2"
}, },
"resolutions": { "resolutions": {
"json5": "2.2.3" "json5": "2.2.3"

File diff suppressed because it is too large Load Diff