@brewer/dj-common 1.0.0-beta.0 → 1.0.0-beta.3

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,98 +0,0 @@
1
- #!/bin/bash
2
-
3
- # 发布脚本 - 自动化 npm 包发布流程
4
-
5
- set -e
6
-
7
- echo "🚀 开始发布流程..."
8
- echo ""
9
-
10
- # 1. 检查是否在 git 仓库中
11
- if [ ! -d ".git" ]; then
12
- echo "❌ 错误: 当前目录不是 git 仓库"
13
- exit 1
14
- fi
15
-
16
- # 2. 检查是否有未提交的更改
17
- if [[ -n $(git status -s) ]]; then
18
- echo "❌ 错误: 有未提交的更改,请先提交或暂存"
19
- git status -s
20
- exit 1
21
- fi
22
-
23
- # 3. 确保在主分支
24
- CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
25
- if [ "$CURRENT_BRANCH" != "main" ] && [ "$CURRENT_BRANCH" != "master" ]; then
26
- echo "⚠️ 警告: 当前不在 main/master 分支"
27
- read -p "是否继续? (y/N) " -n 1 -r
28
- echo
29
- if [[ ! $REPLY =~ ^[Yy]$ ]]; then
30
- exit 1
31
- fi
32
- fi
33
-
34
- # 4. 拉取最新代码
35
- echo "📥 拉取最新代码..."
36
- git pull origin $CURRENT_BRANCH || true
37
- echo ""
38
-
39
- # 5. 运行代码检查
40
- echo "🔍 运行代码检查..."
41
- npm run lint
42
- echo ""
43
-
44
- # 6. 运行构建
45
- echo "📦 构建项目..."
46
- npm run build
47
- echo ""
48
-
49
- # 7. 选择版本类型
50
- echo "请选择版本更新类型:"
51
- echo " 1) patch (bug 修复) - 1.0.0 -> 1.0.1"
52
- echo " 2) minor (新功能) - 1.0.0 -> 1.1.0"
53
- echo " 3) major (破坏性更新) - 1.0.0 -> 2.0.0"
54
- echo " 4) custom (自定义)"
55
- echo ""
56
- read -p "请输入选项 (1-4): " version_type
57
-
58
- case $version_type in
59
- 1)
60
- npm run release:patch
61
- ;;
62
- 2)
63
- npm run release:minor
64
- ;;
65
- 3)
66
- npm run release:major
67
- ;;
68
- 4)
69
- read -p "请输入版本号 (如 1.2.3): " custom_version
70
- npm run release -- --release-as $custom_version
71
- ;;
72
- *)
73
- echo "❌ 无效的选项"
74
- exit 1
75
- ;;
76
- esac
77
-
78
- echo ""
79
-
80
- # 8. 推送到远程仓库
81
- echo "📤 推送到远程仓库..."
82
- git push --follow-tags origin $CURRENT_BRANCH
83
- echo ""
84
-
85
- # 9. 发布到 npm
86
- read -p "是否发布到 npm? (y/N) " -n 1 -r
87
- echo
88
- if [[ $REPLY =~ ^[Yy]$ ]]; then
89
- echo "📦 发布到 npm..."
90
- npm publish
91
- echo ""
92
- echo "✅ 发布成功!"
93
- else
94
- echo "⏭️ 跳过 npm 发布"
95
- fi
96
-
97
- echo ""
98
- echo "🎉 发布流程完成!"
package/tsconfig.json DELETED
@@ -1,25 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2020",
4
- "module": "ESNext",
5
- "lib": ["ES2020", "DOM"],
6
- "declaration": true,
7
- "declarationMap": true,
8
- "outDir": "./dist",
9
- "rootDir": "./src",
10
- "removeComments": false,
11
- "strict": true,
12
- "esModuleInterop": true,
13
- "skipLibCheck": true,
14
- "forceConsistentCasingInFileNames": true,
15
- "moduleResolution": "node",
16
- "resolveJsonModule": true,
17
- "isolatedModules": true,
18
- "noUnusedLocals": true,
19
- "noUnusedParameters": true,
20
- "noImplicitReturns": true,
21
- "noFallthroughCasesInSwitch": true
22
- },
23
- "include": ["src/**/*"],
24
- "exclude": ["node_modules", "dist", "**/*.spec.ts"]
25
- }