@anjianshi/utils 3.0.2 → 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';
@@ -4,6 +4,7 @@
4
4
  *
5
5
  * 使用前提:
6
6
  * 1. 只支持浏览器渲染
7
+ * 2. 安装 @emotion/serialize、@emotion/utils
7
8
  * 2. 用 EmotionCacheProvider 包裹 App 根元素
8
9
  *
9
10
  * 来自:
@@ -4,6 +4,7 @@
4
4
  *
5
5
  * 使用前提:
6
6
  * 1. 只支持浏览器渲染
7
+ * 2. 安装 @emotion/serialize、@emotion/utils
7
8
  * 2. 用 EmotionCacheProvider 包裹 App 根元素
8
9
  *
9
10
  * 来自:
@@ -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.2",
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,12 +31,12 @@
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
- "@anjianshi/presets-prettier": "3.0.5",
39
- "@anjianshi/presets-typescript": "3.2.5"
38
+ "@anjianshi/presets-typescript": "3.2.5",
39
+ "@anjianshi/presets-prettier": "3.0.5"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "@emotion/react": "^11.14.0",
@@ -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';