From 3358ce90f10ab9213dd883830f763893075b9b49 Mon Sep 17 00:00:00 2001 From: syfxlin Date: Sun, 27 Oct 2024 15:53:32 +0800 Subject: [PATCH] fix(modules): Fix window not defined --- .releaserc.json | 59 ------------------------------------- eslint.config.js | 7 +---- release.config.js | 37 +++++++++++++++++++++++ src/deps/jsr/ansi.ts | 2 +- src/deps/jsr/colors.ts | 2 +- src/deps/jsr/command.ts | 2 +- src/deps/jsr/dax.ts | 6 ++-- src/deps/jsr/password.ts | 2 +- src/deps/jsr/prompt.ts | 2 +- src/deps/jsr/table.ts | 2 +- src/deps/npm/ignore.ts | 2 +- src/deps/std/collections.ts | 2 +- src/deps/std/dotenv.ts | 2 +- src/deps/std/fs.ts | 8 ++--- src/deps/std/path.ts | 2 +- src/deps/std/yaml.ts | 2 +- 16 files changed, 56 insertions(+), 83 deletions(-) delete mode 100644 .releaserc.json create mode 100644 release.config.js diff --git a/.releaserc.json b/.releaserc.json deleted file mode 100644 index a7dfca1..0000000 --- a/.releaserc.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "plugins": [ - [ - "@semantic-release/commit-analyzer", - { - "preset": "angular", - "releaseRules": [ - { "type": "break", "release": "major" }, - { "type": "feature", "release": "minor" }, - { "type": "fix", "release": "patch" }, - { "type": "docs", "release": "patch" }, - { "type": "style", "release": "patch" }, - { "type": "refactor", "release": "patch" }, - { "type": "perf", "release": "patch" }, - { "type": "chore", "release": false }, - { "type": "test", "release": false }, - { "type": "build", "release": false }, - { "type": "ci", "release": false }, - { "scope": "no-release", "release": false }, - { "scope": "patch", "release": "patch" }, - { "scope": "minor", "release": "minor" }, - { "scope": "major", "release": "major" } - ] - } - ], - "@semantic-release/release-notes-generator", - [ - "semantic-release-replace-plugin", - { - "replacements": [ - { - "files": ["src/depker.ts"], - "from": "this.version = \".*\"", - "to": "this.version = \"${nextRelease.version}\"" - } - ] - } - ], - [ - "@semantic-release/git", - { - "assets": ["src/depker.ts"] - } - ], - [ - "@semantic-release/github", - { - "assets": [ - { "label": "depker.win.amd64.exe", "path": "bin/depker.win.amd64.exe" }, - { "label": "depker.win.arm64.exe", "path": "bin/depker.win.arm64.exe" }, - { "label": "depker.linux.amd64", "path": "bin/depker.linux.amd64" }, - { "label": "depker.linux.arm64", "path": "bin/depker.linux.arm64" }, - { "label": "depker.mac.amd64", "path": "bin/depker.mac.amd64" }, - { "label": "depker.mac.arm64", "path": "bin/depker.mac.arm64" } - ] - } - ] - ] -} diff --git a/eslint.config.js b/eslint.config.js index 83c00f3..f72724c 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,8 +1,3 @@ import config from "@syfxlin/eslint-config"; -export default config({ - jsx: true, - react: true, - typescript: true, - formatters: true, -}); +export default config(); diff --git a/release.config.js b/release.config.js new file mode 100644 index 0000000..eaa3051 --- /dev/null +++ b/release.config.js @@ -0,0 +1,37 @@ +export default { + plugins: [ + "@semantic-release/commit-analyzer", + "@semantic-release/release-notes-generator", + [ + "semantic-release-replace-plugin", + { + replacements: [ + { + files: ["src/depker.ts"], + from: `this.version = ".*"`, + to: `this.version = "\${nextRelease.version}"`, + }, + ], + }, + ], + [ + "@semantic-release/git", + { + assets: ["src/depker.ts"], + }, + ], + [ + "@semantic-release/github", + { + assets: [ + { label: "depker.win.amd64.exe", path: "bin/depker.win.amd64.exe" }, + { label: "depker.win.arm64.exe", path: "bin/depker.win.arm64.exe" }, + { label: "depker.linux.amd64", path: "bin/depker.linux.amd64" }, + { label: "depker.linux.arm64", path: "bin/depker.linux.arm64" }, + { label: "depker.mac.amd64", path: "bin/depker.mac.amd64" }, + { label: "depker.mac.arm64", path: "bin/depker.mac.arm64" }, + ], + }, + ], + ], +}; diff --git a/src/deps/jsr/ansi.ts b/src/deps/jsr/ansi.ts index 328d814..e0e9b92 100644 --- a/src/deps/jsr/ansi.ts +++ b/src/deps/jsr/ansi.ts @@ -1 +1 @@ -export * from "https://jsr.io/@cliffy/ansi/1.0.0-rc.5/ansi.ts"; +export * from "https://jsr.io/@cliffy/ansi/1.0.0-rc.7/ansi.ts"; diff --git a/src/deps/jsr/colors.ts b/src/deps/jsr/colors.ts index 44ca357..e3bc14c 100644 --- a/src/deps/jsr/colors.ts +++ b/src/deps/jsr/colors.ts @@ -1 +1 @@ -export * from "https://jsr.io/@cliffy/ansi/1.0.0-rc.5/colors.ts"; +export * from "https://jsr.io/@cliffy/ansi/1.0.0-rc.7/colors.ts"; diff --git a/src/deps/jsr/command.ts b/src/deps/jsr/command.ts index 22acf5c..c7aa087 100644 --- a/src/deps/jsr/command.ts +++ b/src/deps/jsr/command.ts @@ -1 +1 @@ -export * from "https://jsr.io/@cliffy/command/1.0.0-rc.5/mod.ts"; +export * from "https://jsr.io/@cliffy/command/1.0.0-rc.7/mod.ts"; diff --git a/src/deps/jsr/dax.ts b/src/deps/jsr/dax.ts index 4a7d5e8..796bf7b 100644 --- a/src/deps/jsr/dax.ts +++ b/src/deps/jsr/dax.ts @@ -1,8 +1,8 @@ -export * from "https://jsr.io/@david/dax/0.41.0/mod.ts"; +export * from "https://jsr.io/@david/dax/0.42.0/mod.ts"; -declare module "https://jsr.io/@david/dax/0.41.0/mod.ts" { +declare module "https://jsr.io/@david/dax/0.42.0/mod.ts" { // @ts-expect-error - import { CommandBuilder as CB, RequestBuilder as RB } from "https://jsr.io/@david/dax/0.41.0/mod.ts"; + import { CommandBuilder as CB, RequestBuilder as RB } from "https://jsr.io/@david/dax/0.42.0/mod.ts"; // @ts-expect-error interface CommandBuilder extends CB { diff --git a/src/deps/jsr/password.ts b/src/deps/jsr/password.ts index c7f12c3..c59fd4f 100644 --- a/src/deps/jsr/password.ts +++ b/src/deps/jsr/password.ts @@ -1,3 +1,3 @@ -import generator from "https://jsr.io/@rabbit-company/password-generator/2.1.0/src/password-generator.ts"; +import generator from "https://jsr.io/@rabbit-company/password-generator/2.2.0/src/password-generator.ts"; export default generator; diff --git a/src/deps/jsr/prompt.ts b/src/deps/jsr/prompt.ts index 239896d..e10795c 100644 --- a/src/deps/jsr/prompt.ts +++ b/src/deps/jsr/prompt.ts @@ -1 +1 @@ -export * from "https://jsr.io/@cliffy/prompt/1.0.0-rc.5/mod.ts"; +export * from "https://jsr.io/@cliffy/prompt/1.0.0-rc.7/mod.ts"; diff --git a/src/deps/jsr/table.ts b/src/deps/jsr/table.ts index c8f1f00..1348567 100644 --- a/src/deps/jsr/table.ts +++ b/src/deps/jsr/table.ts @@ -1 +1 @@ -export * from "https://jsr.io/@cliffy/table/1.0.0-rc.5/mod.ts"; +export * from "https://jsr.io/@cliffy/table/1.0.0-rc.7/mod.ts"; diff --git a/src/deps/npm/ignore.ts b/src/deps/npm/ignore.ts index 5ab7ff3..85bc4b6 100644 --- a/src/deps/npm/ignore.ts +++ b/src/deps/npm/ignore.ts @@ -1,3 +1,3 @@ -import ignore from "https://esm.sh/ignore@5.3.2"; +import ignore from "https://esm.sh/ignore@6.0.2"; export default ignore; diff --git a/src/deps/std/collections.ts b/src/deps/std/collections.ts index 4e0d28b..58149ad 100644 --- a/src/deps/std/collections.ts +++ b/src/deps/std/collections.ts @@ -1,3 +1,3 @@ -import * as collections from "https://jsr.io/@std/collections/1.0.5/mod.ts"; +import * as collections from "https://jsr.io/@std/collections/1.0.9/mod.ts"; export default collections; diff --git a/src/deps/std/dotenv.ts b/src/deps/std/dotenv.ts index 1a336f0..0a8604e 100644 --- a/src/deps/std/dotenv.ts +++ b/src/deps/std/dotenv.ts @@ -1,3 +1,3 @@ -import * as dotenv from "https://jsr.io/@std/dotenv/0.225.0/mod.ts"; +import * as dotenv from "https://jsr.io/@std/dotenv/0.225.2/mod.ts"; export default dotenv; diff --git a/src/deps/std/fs.ts b/src/deps/std/fs.ts index d5e55e4..d08e773 100644 --- a/src/deps/std/fs.ts +++ b/src/deps/std/fs.ts @@ -1,7 +1,7 @@ -import * as fs from "https://jsr.io/@std/fs/1.0.1/mod.ts"; +import * as fs from "https://jsr.io/@std/fs/1.0.5/mod.ts"; -export { isSubdir } from "https://jsr.io/@std/fs/1.0.1/_is_subdir.ts"; -export { toPathString } from "https://jsr.io/@std/fs/1.0.1/_to_path_string.ts"; -export { getFileInfoType } from "https://jsr.io/@std/fs/1.0.1/_get_file_info_type.ts"; +export { isSubdir } from "https://jsr.io/@std/fs/1.0.5/_is_subdir.ts"; +export { toPathString } from "https://jsr.io/@std/fs/1.0.5/_to_path_string.ts"; +export { getFileInfoType } from "https://jsr.io/@std/fs/1.0.5/_get_file_info_type.ts"; export default fs; diff --git a/src/deps/std/path.ts b/src/deps/std/path.ts index 0afa4e2..25b452e 100644 --- a/src/deps/std/path.ts +++ b/src/deps/std/path.ts @@ -1,3 +1,3 @@ -import * as path from "https://jsr.io/@std/path/1.0.2/mod.ts"; +import * as path from "https://jsr.io/@std/path/1.0.7/mod.ts"; export default path; diff --git a/src/deps/std/yaml.ts b/src/deps/std/yaml.ts index d982e69..18c6a24 100644 --- a/src/deps/std/yaml.ts +++ b/src/deps/std/yaml.ts @@ -1,3 +1,3 @@ -import * as yaml from "https://jsr.io/@std/yaml/1.0.2/mod.ts"; +import * as yaml from "https://jsr.io/@std/yaml/1.0.5/mod.ts"; export default yaml;