@anjianshi/utils 3.0.3 → 3.0.4

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.
@@ -1,6 +1,8 @@
1
1
  /**
2
2
  * 针对 Node.js 环境定制 logging
3
- * 注意:使用此模块需要 chalk 依赖
3
+ *
4
+ * 使用前提:
5
+ * - 安装 chalk 依赖
4
6
  */
5
7
  import { type Logger } from '../../logging/index.js';
6
8
  export * from './handlers.js';
@@ -1,6 +1,8 @@
1
1
  /**
2
2
  * 针对 Node.js 环境定制 logging
3
- * 注意:使用此模块需要 chalk 依赖
3
+ *
4
+ * 使用前提:
5
+ * - 安装 chalk 依赖
4
6
  */
5
7
  import { logger as defaultLogger } from '../../logging/index.js';
6
8
  import { ConsoleHandler } from './handlers.js';
@@ -3,6 +3,9 @@
3
3
  *
4
4
  * 注意:Prisma 的 debugging 日志是直接输出到 console 的,没有提供处理渠道,所以无法记录进日志文件。
5
5
  * 理论上可以重写 console.log/debug... 等方法来实现捕获,但这牵扯面太广,暂不这样做。
6
+ *
7
+ * 使用前提:
8
+ * - 安装 chalk 依赖
6
9
  */
7
10
  import nodeUtil from 'node:util';
8
11
  import chalk from 'chalk';
@@ -1,3 +1,9 @@
1
+ /**
2
+ * 通用日志记录实现
3
+ *
4
+ * 使用前提:
5
+ * - 安装 dayjs 依赖
6
+ */
1
7
  import { type Dayjs } from 'dayjs';
2
8
  export { default as formatters } from './formatters.js';
3
9
  export * from './adapt.js';
package/logging/index.js CHANGED
@@ -1,3 +1,9 @@
1
+ /**
2
+ * 通用日志记录实现
3
+ *
4
+ * 使用前提:
5
+ * - 安装 dayjs 依赖
6
+ */
1
7
  import dayjs from 'dayjs';
2
8
  export { default as formatters } from './formatters.js';
3
9
  export * from './adapt.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anjianshi/utils",
3
- "version": "3.0.3",
3
+ "version": "3.0.4",
4
4
  "description": "Common JavaScript Utils",
5
5
  "homepage": "https://github.com/anjianshi/js-packages/utils",
6
6
  "bugs": {
@@ -31,15 +31,17 @@
31
31
  "redis": "^5.5.6",
32
32
  "typescript": "^5.8.3",
33
33
  "vconsole": "^3.15.1",
34
+ "@anjianshi/presets-eslint-node": "6.0.0",
34
35
  "@anjianshi/presets-eslint-base": "6.0.0",
35
36
  "@anjianshi/presets-eslint-react": "6.0.0",
36
- "@anjianshi/presets-eslint-node": "6.0.0",
37
37
  "@anjianshi/presets-eslint-typescript": "6.0.0",
38
38
  "@anjianshi/presets-typescript": "3.2.5",
39
39
  "@anjianshi/presets-prettier": "3.0.5"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "@emotion/react": "^11.14.0",
43
+ "@emotion/serialize": "^1.3.3",
44
+ "@emotion/utils": "^1.4.2",
43
45
  "@prisma/client": "^6.8.2",
44
46
  "chalk": "^5.4.1",
45
47
  "dayjs": "^1.11.13",
@@ -50,6 +52,12 @@
50
52
  "@emotion/react": {
51
53
  "optional": true
52
54
  },
55
+ "@emotion/serialize": {
56
+ "optional": true
57
+ },
58
+ "@emotion/utils": {
59
+ "optional": true
60
+ },
53
61
  "@prisma/client": {
54
62
  "optional": true
55
63
  },
@@ -1,3 +1,9 @@
1
+ /**
2
+ * 通用验证器实现
3
+ *
4
+ * 使用前提:
5
+ * - 因为涉及时间对象解析,需安装 dayjs 依赖
6
+ */
1
7
  export * from './base.js';
2
8
  export * from './boolean.js';
3
9
  export * from './number.js';
@@ -1,3 +1,9 @@
1
+ /**
2
+ * 通用验证器实现
3
+ *
4
+ * 使用前提:
5
+ * - 因为涉及时间对象解析,需安装 dayjs 依赖
6
+ */
1
7
  export * from './base.js';
2
8
  export * from './boolean.js';
3
9
  export * from './number.js';