Skip to content

Commit 723c64d

Browse files
Tecvan-fefanwenjie
andauthored
chore: rush tsc plugin (#4)
Co-authored-by: fanwenjie <[email protected]>
1 parent 1070eab commit 723c64d

File tree

13 files changed

+115
-12
lines changed

13 files changed

+115
-12
lines changed

common/_templates/_plugins/SetDefaultAuthorPlugin.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ export default class SetDefaultAuthorPlugin implements IPlugin {
2121
return userEmail;
2222
},
2323
validate(author: string) {
24-
return /@bytedance\.com$/.test(author);
24+
const emailRegex = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
25+
return emailRegex.test(author) || '请输入有效的电子邮箱地址';
2526
}
2627
});
2728

common/autoinstallers/plugins/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
88
],
99
"dependencies": {
10+
"@coze-infra/rush-run-tsc-plugin": "../../../packages/rush-plugins/run-tsc-plugin",
1011
"json5": "^2.2.3",
1112
"rush-init-project-plugin": "^0.11.0",
1213
"typescript": "~5.7.2"

common/autoinstallers/plugins/pnpm-lock.yaml

Lines changed: 11 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"$schema": "https://developer.microsoft.com/json-schemas/rush/v5/command-line.schema.json",
3+
"commands": [
4+
{
5+
"commandKind": "bulk",
6+
"name": "ts-check",
7+
"ignoreMissingScript": false,
8+
"enableParallelism": true,
9+
"shellCommand": "npm run prets-check --if-present && NODE_OPTIONS='--max-old-space-size=16384' tsc -b tsconfig.build.json",
10+
"ignoreDependencyOrder": true,
11+
"allowWarningsInSuccessfulBuild": true,
12+
"summary": "⭐️️ Run tsc command for each package",
13+
"safeForSimultaneousRushProcesses": true
14+
// "incremental": true
15+
}
16+
],
17+
"parameters": []
18+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"$schema": "https://developer.microsoft.com/json-schemas/rush/v5/rush-plugin-manifest.schema.json",
3+
"plugins": [
4+
{
5+
"pluginName": "@coze-infra/rush-run-tsc-plugin",
6+
"description": "Rush plugin for run tsc",
7+
"commandLineJsonFilePath": "./command-line.json"
8+
}
9+
]
10+
}

common/config/rush/rush-plugins.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,15 @@
2525
// */
2626
// "autoinstallerName": "rush-plugins"
2727
// }
28+
{
29+
"packageName": "rush-init-project-plugin",
30+
"pluginName": "rush-init-project-plugin",
31+
"autoinstallerName": "plugins"
32+
},
33+
{
34+
"packageName": "@coze-infra/rush-run-tsc-plugin",
35+
"pluginName": "@coze-infra/rush-run-tsc-plugin",
36+
"autoinstallerName": "plugins"
37+
}
2838
]
29-
}
39+
}

common/config/subspaces/default/pnpm-lock.yaml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# @coze-infra/run-tsc-plugin
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"$schema": "https://developer.microsoft.com/json-schemas/rush/v5/command-line.schema.json",
3+
"commands": [
4+
{
5+
"commandKind": "bulk",
6+
"name": "ts-check",
7+
"ignoreMissingScript": false,
8+
"enableParallelism": true,
9+
"shellCommand": "npm run prets-check --if-present && NODE_OPTIONS='--max-old-space-size=16384' tsc -b tsconfig.build.json",
10+
"ignoreDependencyOrder": true,
11+
"allowWarningsInSuccessfulBuild": true,
12+
"summary": "⭐️️ Run tsc command for each package",
13+
"safeForSimultaneousRushProcesses": true
14+
// "incremental": true
15+
}
16+
],
17+
"parameters": []
18+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"name": "@coze-infra/rush-run-tsc-plugin",
3+
"version": "0.0.1",
4+
"description": "rush plugin to run tsc ",
5+
"license": "ISC",
6+
"author": "[email protected]",
7+
"maintainers": [],
8+
"devDependencies": {
9+
"@coze-infra/ts-config": "workspace:*"
10+
}
11+
}

0 commit comments

Comments
 (0)