dependfix 0.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 CaoMeiYouRen <https://github.com/CaoMeiYouRen>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,108 @@
1
+ <h1 align="center">dependfix </h1>
2
+ <p>
3
+ <a href="https://www.npmjs.com/package/dependfix" target="_blank">
4
+ <img alt="Version" src="https://img.shields.io/npm/v/dependfix.svg">
5
+ </a>
6
+ <a href="https://www.npmjs.com/package/dependfix" target="_blank">
7
+ <img alt="npm downloads" src="https://img.shields.io/npm/dt/dependfix?label=npm%20downloads&color=yellow">
8
+ </a>
9
+ <img alt="Version" src="https://img.shields.io/github/package-json/v/CaoMeiYouRen/dependfix.svg" />
10
+ <a href="https://github.com/CaoMeiYouRen/dependfix/actions?query=workflow%3ARelease" target="_blank">
11
+ <img alt="GitHub Workflow Status" src="https://img.shields.io/github/actions/workflow/status/CaoMeiYouRen/dependfix/release.yml?branch=master">
12
+ </a>
13
+ <img src="https://img.shields.io/node/v/dependfix" />
14
+ <a href="https://github.com/CaoMeiYouRen/dependfix#readme" target="_blank">
15
+ <img alt="Documentation" src="https://img.shields.io/badge/documentation-yes-brightgreen.svg" />
16
+ </a>
17
+ <a href="https://github.com/CaoMeiYouRen/dependfix/graphs/commit-activity" target="_blank">
18
+ <img alt="Maintenance" src="https://img.shields.io/badge/Maintained%3F-yes-green.svg" />
19
+ </a>
20
+ <a href="https://github.com/CaoMeiYouRen/dependfix/blob/master/LICENSE" target="_blank">
21
+ <img alt="License: MIT" src="https://img.shields.io/github/license/CaoMeiYouRen/dependfix?color=yellow" />
22
+ </a>
23
+ </p>
24
+
25
+
26
+ > 这是一个面向多项目维护者的自动化工具,旨在自动处理 Dependabot 和 Code Scanning 产生的大量简单、重复的告警修复工作,如依赖版本升级、安全漏洞修复等,从而显著提升维护效率。
27
+
28
+ ## 🏠 主页
29
+
30
+ [https://github.com/CaoMeiYouRen/dependfix#readme](https://github.com/CaoMeiYouRen/dependfix#readme)
31
+
32
+
33
+ ## 📦 依赖要求
34
+
35
+
36
+ - node >=20
37
+
38
+ ## 🚀 安装
39
+
40
+ ```sh
41
+ npm install dependfix
42
+ ```
43
+
44
+ ## 👨‍💻 使用
45
+
46
+ ```sh
47
+ npm run start
48
+ ```
49
+
50
+ ## 🛠️ 开发
51
+
52
+ ```sh
53
+ npm run dev
54
+ ```
55
+
56
+ ## 🔧 编译
57
+
58
+ ```sh
59
+ npm run build
60
+ ```
61
+
62
+ ## 🔍 Lint
63
+
64
+ ```sh
65
+ npm run lint
66
+ ```
67
+
68
+ ## 💾 Commit
69
+
70
+ ```sh
71
+ npm run commit
72
+ ```
73
+
74
+
75
+ ## 👤 作者
76
+
77
+
78
+ **CaoMeiYouRen**
79
+
80
+ * Website: [https://blog.cmyr.ltd/](https://blog.cmyr.ltd/)
81
+
82
+ * GitHub: [@CaoMeiYouRen](https://github.com/CaoMeiYouRen)
83
+
84
+
85
+ ## 🤝 贡献
86
+
87
+ 欢迎 贡献、提问或提出新功能!<br />如有问题请查看 [issues page](https://github.com/CaoMeiYouRen/dependfix/issues). <br/>贡献或提出新功能可以查看[contributing guide](https://github.com/CaoMeiYouRen/dependfix/blob/master/CONTRIBUTING.md).
88
+
89
+ ## 💰 支持
90
+
91
+ 如果觉得这个项目有用的话请给一颗⭐️,非常感谢
92
+
93
+ <a href="https://afdian.com/@CaoMeiYouRen">
94
+ <img src="https://oss.cmyr.dev/images/202306192324870.png" width="312px" height="78px" alt="在爱发电支持我">
95
+ </a>
96
+
97
+
98
+ ## 🌟 Star History
99
+
100
+ [![Star History Chart](https://api.star-history.com/svg?repos=CaoMeiYouRen/dependfix&type=Date)](https://star-history.com/#CaoMeiYouRen/dependfix&Date)
101
+
102
+ ## 📝 License
103
+
104
+ Copyright © 2026 [CaoMeiYouRen](https://github.com/CaoMeiYouRen).<br />
105
+ This project is [MIT](https://github.com/CaoMeiYouRen/dependfix/blob/master/LICENSE) licensed.
106
+
107
+ ***
108
+ _This README was generated with ❤️ by [cmyr-template-cli](https://github.com/CaoMeiYouRen/cmyr-template-cli)_
package/dist/index.cjs ADDED
@@ -0,0 +1,35 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+
3
+ //#region src/env.ts
4
+ const __PROD__ = process.env.NODE_ENV === "production";
5
+ const __DEV__ = process.env.NODE_ENV === "development";
6
+
7
+ //#endregion
8
+ //#region src/index.ts
9
+ /**
10
+ * say hello
11
+ *
12
+ * @author CaoMeiYouRen
13
+ * @date 2020-11-28
14
+ * @export
15
+ */
16
+ function hello() {
17
+ if (__PROD__) console.log("Hello production");
18
+ if (__DEV__) console.log("Hello development");
19
+ console.log("你好,世界!");
20
+ }
21
+ console.log("__dirname:", typeof __dirname !== "undefined" ? __dirname : "not defined");
22
+ console.log("__filename:", typeof __filename !== "undefined" ? __filename : "not defined");
23
+ try {
24
+ const os = require && require("node:os");
25
+ console.log("require(\"os\"):", !!os);
26
+ } catch (e) {
27
+ console.log("require is not available:", e);
28
+ }
29
+ console.log("import.meta.url:", require("url").pathToFileURL(__filename).href || "not defined");
30
+ console.log("import.meta.dirname:", __dirname || "not defined");
31
+ console.log("import.meta.filename:", __filename || "not defined");
32
+
33
+ //#endregion
34
+ exports.hello = hello;
35
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","names":[],"sources":["../src/env.ts","../src/index.ts"],"sourcesContent":["export const __PROD__ = process.env.NODE_ENV === 'production'\nexport const __DEV__ = process.env.NODE_ENV === 'development'\n","import { __PROD__, __DEV__ } from '@/env'\n/**\n * say hello\n *\n * @author CaoMeiYouRen\n * @date 2020-11-28\n * @export\n */\nexport function hello() {\n if (__PROD__) {\n console.log('Hello production')\n }\n if (__DEV__) {\n console.log('Hello development')\n }\n console.log('你好,世界!')\n}\n\n// 测试 ESM 中的 CommonJS 变量(需要 shims 支持)\nconsole.log('__dirname:', typeof __dirname !== 'undefined' ? __dirname : 'not defined')\nconsole.log('__filename:', typeof __filename !== 'undefined' ? __filename : 'not defined')\n\n// 测试 ESM 中的 require(Node.js 平台自动注入)\ntry {\n const os = require && require('os')\n console.log('require(\"os\"):', !!os)\n} catch (e) {\n console.log('require is not available:', e)\n}\n\n// 测试 CommonJS 中的 ESM 变量(始终可用)\nconsole.log('import.meta.url:', import.meta.url || 'not defined')\nconsole.log('import.meta.dirname:', import.meta.dirname || 'not defined')\nconsole.log('import.meta.filename:', import.meta.filename || 'not defined')\n"],"mappings":";;;AAAA,MAAa,WAAW,QAAQ,IAAI,aAAa;AACjD,MAAa,UAAU,QAAQ,IAAI,aAAa;;;;;;;;;;;ACOhD,SAAgB,QAAQ;CACpB,IAAI,UACA,QAAQ,IAAI,kBAAkB;CAElC,IAAI,SACA,QAAQ,IAAI,mBAAmB;CAEnC,QAAQ,IAAI,QAAQ;AACxB;AAGA,QAAQ,IAAI,cAAc,OAAO,cAAc,cAAc,YAAY,aAAa;AACtF,QAAQ,IAAI,eAAe,OAAO,eAAe,cAAc,aAAa,aAAa;AAGzF,IAAI;CACA,MAAM,KAAK,WAAW,QAAQ,SAAI;CAClC,QAAQ,IAAI,oBAAkB,CAAC,CAAC,EAAE;AACtC,SAAS,GAAG;CACR,QAAQ,IAAI,6BAA6B,CAAC;AAC9C;AAGA,QAAQ,IAAI,qEAAuC,aAAa;AAChE,QAAQ,IAAI,qCAA+C,aAAa;AACxE,QAAQ,IAAI,uCAAiD,aAAa"}
@@ -0,0 +1,12 @@
1
+ //#region src/index.d.ts
2
+ /**
3
+ * say hello
4
+ *
5
+ * @author CaoMeiYouRen
6
+ * @date 2020-11-28
7
+ * @export
8
+ */
9
+ declare function hello(): void;
10
+ //#endregion
11
+ export { hello };
12
+ //# sourceMappingURL=index.d.cts.map
@@ -0,0 +1,12 @@
1
+ //#region src/index.d.ts
2
+ /**
3
+ * say hello
4
+ *
5
+ * @author CaoMeiYouRen
6
+ * @date 2020-11-28
7
+ * @export
8
+ */
9
+ declare function hello(): void;
10
+ //#endregion
11
+ export { hello };
12
+ //# sourceMappingURL=index.d.mts.map
package/dist/index.mjs ADDED
@@ -0,0 +1,48 @@
1
+ import { createRequire } from "node:module";
2
+ import path from "node:path";
3
+ import { fileURLToPath } from "node:url";
4
+
5
+ //#region \0rolldown/runtime.js
6
+ var __require = /* #__PURE__ */ (() => createRequire(import.meta.url))();
7
+
8
+ //#endregion
9
+ //#region node_modules/.pnpm/tsdown@0.22.3_tsx@4.23.1_typescript@6.0.3/node_modules/tsdown/esm-shims.js
10
+ const getFilename = () => fileURLToPath(import.meta.url);
11
+ const getDirname = () => path.dirname(getFilename());
12
+ const __dirname = /* @__PURE__ */ getDirname();
13
+ const __filename = /* @__PURE__ */ getFilename();
14
+
15
+ //#endregion
16
+ //#region src/env.ts
17
+ const __PROD__ = process.env.NODE_ENV === "production";
18
+ const __DEV__ = process.env.NODE_ENV === "development";
19
+
20
+ //#endregion
21
+ //#region src/index.ts
22
+ /**
23
+ * say hello
24
+ *
25
+ * @author CaoMeiYouRen
26
+ * @date 2020-11-28
27
+ * @export
28
+ */
29
+ function hello() {
30
+ if (__PROD__) console.log("Hello production");
31
+ if (__DEV__) console.log("Hello development");
32
+ console.log("你好,世界!");
33
+ }
34
+ console.log("__dirname:", typeof __dirname !== "undefined" ? __dirname : "not defined");
35
+ console.log("__filename:", typeof __filename !== "undefined" ? __filename : "not defined");
36
+ try {
37
+ const os = __require && __require("node:os");
38
+ console.log("require(\"os\"):", !!os);
39
+ } catch (e) {
40
+ console.log("require is not available:", e);
41
+ }
42
+ console.log("import.meta.url:", import.meta.url || "not defined");
43
+ console.log("import.meta.dirname:", import.meta.dirname || "not defined");
44
+ console.log("import.meta.filename:", import.meta.filename || "not defined");
45
+
46
+ //#endregion
47
+ export { hello };
48
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../node_modules/.pnpm/tsdown@0.22.3_tsx@4.23.1_typescript@6.0.3/node_modules/tsdown/esm-shims.js","../src/env.ts","../src/index.ts"],"sourcesContent":["// Shim globals in esm bundle\nimport path from 'node:path'\nimport { fileURLToPath } from 'node:url'\n\nconst getFilename = () => fileURLToPath(import.meta.url)\nconst getDirname = () => path.dirname(getFilename())\n\nexport const __dirname = /* @__PURE__ */ getDirname()\nexport const __filename = /* @__PURE__ */ getFilename()\n","export const __PROD__ = process.env.NODE_ENV === 'production'\nexport const __DEV__ = process.env.NODE_ENV === 'development'\n","import { __PROD__, __DEV__ } from '@/env'\n/**\n * say hello\n *\n * @author CaoMeiYouRen\n * @date 2020-11-28\n * @export\n */\nexport function hello() {\n if (__PROD__) {\n console.log('Hello production')\n }\n if (__DEV__) {\n console.log('Hello development')\n }\n console.log('你好,世界!')\n}\n\n// 测试 ESM 中的 CommonJS 变量(需要 shims 支持)\nconsole.log('__dirname:', typeof __dirname !== 'undefined' ? __dirname : 'not defined')\nconsole.log('__filename:', typeof __filename !== 'undefined' ? __filename : 'not defined')\n\n// 测试 ESM 中的 require(Node.js 平台自动注入)\ntry {\n const os = require && require('os')\n console.log('require(\"os\"):', !!os)\n} catch (e) {\n console.log('require is not available:', e)\n}\n\n// 测试 CommonJS 中的 ESM 变量(始终可用)\nconsole.log('import.meta.url:', import.meta.url || 'not defined')\nconsole.log('import.meta.dirname:', import.meta.dirname || 'not defined')\nconsole.log('import.meta.filename:', import.meta.filename || 'not defined')\n"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;AAIA,MAAM,oBAAoB,cAAc,OAAO,KAAK,GAAG;AACvD,MAAM,mBAAmB,KAAK,QAAQ,YAAY,CAAC;AAEnD,MAAa,YAA4B,2BAAW;AACpD,MAAa,aAA6B,4BAAY;;;;ACRtD,MAAa,WAAW,QAAQ,IAAI,aAAa;AACjD,MAAa,UAAU,QAAQ,IAAI,aAAa;;;;;;;;;;;ACOhD,SAAgB,QAAQ;CACpB,IAAI,UACA,QAAQ,IAAI,kBAAkB;CAElC,IAAI,SACA,QAAQ,IAAI,mBAAmB;CAEnC,QAAQ,IAAI,QAAQ;AACxB;AAGA,QAAQ,IAAI,cAAc,OAAO,cAAc,cAAc,YAAY,aAAa;AACtF,QAAQ,IAAI,eAAe,OAAO,eAAe,cAAc,aAAa,aAAa;AAGzF,IAAI;CACA,MAAM,4BAAwB,SAAI;CAClC,QAAQ,IAAI,oBAAkB,CAAC,CAAC,EAAE;AACtC,SAAS,GAAG;CACR,QAAQ,IAAI,6BAA6B,CAAC;AAC9C;AAGA,QAAQ,IAAI,oBAAoB,OAAO,KAAK,OAAO,aAAa;AAChE,QAAQ,IAAI,wBAAwB,OAAO,KAAK,WAAW,aAAa;AACxE,QAAQ,IAAI,yBAAyB,OAAO,KAAK,YAAY,aAAa"}
package/package.json ADDED
@@ -0,0 +1,95 @@
1
+ {
2
+ "name": "dependfix",
3
+ "version": "0.0.0",
4
+ "description": "这是一个面向多项目维护者的自动化工具,旨在自动处理 Dependabot 和 Code Scanning 产生的大量简单、重复的告警修复工作,如依赖版本升级、安全漏洞修复等,从而显著提升维护效率。",
5
+ "author": "CaoMeiYouRen",
6
+ "private": false,
7
+ "license": "MIT",
8
+ "main": "./dist/index.cjs",
9
+ "module": "./dist/index.mjs",
10
+ "types": "./dist/index.d.mts",
11
+ "exports": {
12
+ ".": {
13
+ "import": "./dist/index.mjs",
14
+ "require": "./dist/index.cjs",
15
+ "types": "./dist/index.d.mts"
16
+ },
17
+ "./package.json": "./package.json"
18
+ },
19
+ "files": [
20
+ "dist"
21
+ ],
22
+ "engines": {
23
+ "node": ">=20"
24
+ },
25
+ "scripts": {
26
+ "release": "semantic-release",
27
+ "lint": "cross-env NODE_ENV=production eslint . --fix",
28
+ "prebuild": "rimraf dist",
29
+ "build": "cross-env NODE_ENV=production tsdown",
30
+ "dev": "cross-env NODE_ENV=development tsx watch src/index.ts",
31
+ "dev:tsdown": "cross-env NODE_ENV=development tsdown --watch",
32
+ "start": "node ./dist/index",
33
+ "start:tsx": "cross-env NODE_ENV=production tsx src/index.ts",
34
+ "commit": "cz",
35
+ "prepare": "husky",
36
+ "typecheck": "tsc --noEmit",
37
+ "test": "vitest run",
38
+ "test:coverage": "vitest run --coverage"
39
+ },
40
+ "devDependencies": {
41
+ "@types/debug": "^4.1.13",
42
+ "@types/node": "^26.0.1",
43
+ "commitizen": "^4.3.2",
44
+ "commitlint": "^21.2.1",
45
+ "commitlint-config-cmyr": "^1.0.1",
46
+ "cross-env": "^10.0.0",
47
+ "cz-conventional-changelog-cmyr": "^2.0.0",
48
+ "debug": "^4.4.3",
49
+ "eslint": "^9.34.0",
50
+ "eslint-config-cmyr": "^2.3.1",
51
+ "husky": "^9.1.7",
52
+ "lint-staged": "^17.2.0",
53
+ "rimraf": "^6.1.3",
54
+ "semantic-release": "^25.0.8",
55
+ "semantic-release-cmyr-config": "^1.0.2",
56
+ "tsdown": "^0.22.0",
57
+ "tsx": "^4.23.1",
58
+ "typescript": "^6.0.2",
59
+ "vite": "^7.0.5",
60
+ "vitest": "^3.2.4"
61
+ },
62
+ "config": {},
63
+ "lint-staged": {
64
+ "*.{js,ts}": [
65
+ "npm run lint",
66
+ "git add"
67
+ ]
68
+ },
69
+ "keywords": [
70
+ "dependabot",
71
+ "automation",
72
+ "security-fixes",
73
+ "dependency-management",
74
+ "github-actions",
75
+ "typescript"
76
+ ],
77
+ "homepage": "https://github.com/CaoMeiYouRen/dependfix#readme",
78
+ "repository": {
79
+ "type": "git",
80
+ "url": "git+https://github.com/CaoMeiYouRen/dependfix.git"
81
+ },
82
+ "bugs": {
83
+ "url": "https://github.com/CaoMeiYouRen/dependfix/issues"
84
+ },
85
+ "dependencies": {
86
+ "tslib": "^2.8.1"
87
+ },
88
+ "type": "module",
89
+ "publishConfig": {
90
+ "access": "public"
91
+ },
92
+ "changelog": {
93
+ "language": "zh"
94
+ }
95
+ }