@yarn-tool/pkg-entry-util 3.0.34 → 3.0.36
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/CHANGELOG.md +42 -0
- package/lib/field/scripts-auto.d.ts +175 -0
- package/lib/field/scripts-auto.js +172 -0
- package/lib/field/scripts-auto.js.map +1 -0
- package/lib/field/scripts.d.ts +23 -22
- package/lib/field/scripts.js +22 -21
- package/lib/field/scripts.js.map +1 -1
- package/lib/preset/scripts/dummy.d.ts +11 -36
- package/lib/preset/scripts/dummy.js +12 -40
- package/lib/preset/scripts/dummy.js.map +1 -1
- package/lib/preset/scripts/pkg-scripts.d.ts +4 -37
- package/lib/preset/scripts/pkg-scripts.js +4 -35
- package/lib/preset/scripts/pkg-scripts.js.map +1 -1
- package/lib/preset/scripts/root-scripts.d.ts +15 -33
- package/lib/preset/scripts/root-scripts.js +12 -30
- package/lib/preset/scripts/root-scripts.js.map +1 -1
- package/lib/preset/scripts/shared-root-scripts.d.ts +11 -32
- package/lib/preset/scripts/shared-root-scripts.js +11 -32
- package/lib/preset/scripts/shared-root-scripts.js.map +1 -1
- package/lib/preset/scripts/ws-root-scripts.d.ts +29 -71
- package/lib/preset/scripts/ws-root-scripts.js +38 -74
- package/lib/preset/scripts/ws-root-scripts.js.map +1 -1
- package/package.json +4 -4
|
@@ -1,21 +1,14 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 虛擬腳本填充工具 / Dummy Scripts Filler Utility
|
|
3
|
-
*
|
|
4
|
-
* 提供用於填充 package.json scripts 欄位中生命週期腳本佔位符的功能
|
|
5
|
-
* Provides functionality to fill lifecycle script placeholders in package.json scripts field
|
|
6
|
-
*/
|
|
7
1
|
import { ITSArrayListMaybeReadonly } from 'ts-type/lib/type/base';
|
|
8
2
|
/**
|
|
9
|
-
*
|
|
3
|
+
* dummy scripts filler function
|
|
10
4
|
*
|
|
11
5
|
* 為指定的腳本欄位填充 echo 命令作為佔位符
|
|
12
|
-
* Fills echo commands as placeholders for specified script fields
|
|
13
6
|
*
|
|
14
|
-
* @template T - 腳本物件類型
|
|
15
|
-
* @param scripts - 腳本物件
|
|
16
|
-
* @param prefix - echo 前綴文字
|
|
17
|
-
* @param fields - 要填充的腳本名稱陣列
|
|
18
|
-
* @returns 填充後的腳本物件
|
|
7
|
+
* @template T - 腳本物件類型
|
|
8
|
+
* @param scripts - 腳本物件
|
|
9
|
+
* @param prefix - echo 前綴文字
|
|
10
|
+
* @param fields - 要填充的腳本名稱陣列
|
|
11
|
+
* @returns 填充後的腳本物件
|
|
19
12
|
*
|
|
20
13
|
* @example
|
|
21
14
|
* ```typescript
|
|
@@ -25,32 +18,14 @@ import { ITSArrayListMaybeReadonly } from 'ts-type/lib/type/base';
|
|
|
25
18
|
*/
|
|
26
19
|
export declare function _fillDummyScriptsCore<T extends Record<string, string>>(scripts: T, prefix: string, fields: ITSArrayListMaybeReadonly<string>): T;
|
|
27
20
|
/**
|
|
28
|
-
*
|
|
21
|
+
* Fill dummy lifecycle scripts
|
|
29
22
|
*
|
|
30
23
|
* 為 package.json 的標準生命週期腳本填充佔位符命令
|
|
31
|
-
* Fills placeholder commands for standard lifecycle scripts in package.json
|
|
32
|
-
*
|
|
33
|
-
* 包含以下腳本 / Includes following scripts:
|
|
34
|
-
* - preversion: 版本更新前執行 / Run before version bump
|
|
35
|
-
* - version: 版本更新時執行 / Run on version bump
|
|
36
|
-
* - prepublishOnly: 發布前執行 / Run before publish
|
|
37
|
-
* - postversion: 版本更新後執行 / Run after version bump
|
|
38
|
-
* - publish: 發布時執行 / Run on publish
|
|
39
|
-
* - prepublish: 發布前執行(舊版)/ Run before publish (legacy)
|
|
40
|
-
* - postpublish: 發布後執行 / Run after publish
|
|
41
|
-
* - postpublishOnly: 發布後執行 / Run after publish only
|
|
42
|
-
* - prepare: 準備階段執行 / Run during prepare
|
|
43
|
-
* - prepack: 打包前執行 / Run before pack
|
|
44
|
-
* - pack: 打包時執行 / Run on pack
|
|
45
|
-
* - postpack: 打包後執行 / Run after pack
|
|
46
|
-
* - pretest: 測試前執行 / Run before test
|
|
47
|
-
* - ci:build: CI 建置階段 / CI build stage
|
|
48
|
-
* - ci:install: CI 安裝階段 / CI install stage
|
|
49
24
|
*
|
|
50
|
-
* @template T - 腳本物件類型
|
|
51
|
-
* @param scripts -
|
|
52
|
-
* @param prefix - echo
|
|
53
|
-
* @returns 填充後的腳本物件
|
|
25
|
+
* @template T - 腳本物件類型
|
|
26
|
+
* @param scripts - 腳本物件(可選)
|
|
27
|
+
* @param prefix - echo 前綴文字(可選)
|
|
28
|
+
* @returns 填充後的腳本物件
|
|
54
29
|
*
|
|
55
30
|
* @example
|
|
56
31
|
* ```typescript
|
|
@@ -1,25 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* 虛擬腳本填充工具 / Dummy Scripts Filler Utility
|
|
4
|
-
*
|
|
5
|
-
* 提供用於填充 package.json scripts 欄位中生命週期腳本佔位符的功能
|
|
6
|
-
* Provides functionality to fill lifecycle script placeholders in package.json scripts field
|
|
7
|
-
*/
|
|
8
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
3
|
exports._fillDummyScriptsCore = _fillDummyScriptsCore;
|
|
10
4
|
exports.fillDummyScripts = fillDummyScripts;
|
|
11
5
|
const dummy_1 = require("../../util/scripts/dummy");
|
|
12
6
|
/**
|
|
13
|
-
*
|
|
7
|
+
* dummy scripts filler function
|
|
14
8
|
*
|
|
15
9
|
* 為指定的腳本欄位填充 echo 命令作為佔位符
|
|
16
|
-
* Fills echo commands as placeholders for specified script fields
|
|
17
10
|
*
|
|
18
|
-
* @template T - 腳本物件類型
|
|
19
|
-
* @param scripts - 腳本物件
|
|
20
|
-
* @param prefix - echo 前綴文字
|
|
21
|
-
* @param fields - 要填充的腳本名稱陣列
|
|
22
|
-
* @returns 填充後的腳本物件
|
|
11
|
+
* @template T - 腳本物件類型
|
|
12
|
+
* @param scripts - 腳本物件
|
|
13
|
+
* @param prefix - echo 前綴文字
|
|
14
|
+
* @param fields - 要填充的腳本名稱陣列
|
|
15
|
+
* @returns 填充後的腳本物件
|
|
23
16
|
*
|
|
24
17
|
* @example
|
|
25
18
|
* ```typescript
|
|
@@ -31,8 +24,6 @@ function _fillDummyScriptsCore(scripts, prefix, fields) {
|
|
|
31
24
|
/**
|
|
32
25
|
* 允許不傳入 scripts 時從空物件開始累積,
|
|
33
26
|
* 讓 `fillDummyScripts()` 可直接取得一份全新預設腳本
|
|
34
|
-
* Allow starting from an empty object when no scripts is passed, so
|
|
35
|
-
* `fillDummyScripts()` can produce a fresh default script set on its own
|
|
36
27
|
*/
|
|
37
28
|
// @ts-ignore
|
|
38
29
|
scripts !== null && scripts !== void 0 ? scripts : (scripts = {});
|
|
@@ -41,8 +32,6 @@ function _fillDummyScriptsCore(scripts, prefix, fields) {
|
|
|
41
32
|
/**
|
|
42
33
|
* 僅填補尚不存在的腳本鍵(`??=`),
|
|
43
34
|
* 保留使用者已自訂的腳本不被預設佔位符覆蓋
|
|
44
|
-
* Fill only missing keys (`??=`), leaving user-defined scripts
|
|
45
|
-
* untouched instead of overwriting them with placeholders
|
|
46
35
|
*/
|
|
47
36
|
fields.forEach(k => {
|
|
48
37
|
var _a;
|
|
@@ -52,32 +41,14 @@ function _fillDummyScriptsCore(scripts, prefix, fields) {
|
|
|
52
41
|
return scripts;
|
|
53
42
|
}
|
|
54
43
|
/**
|
|
55
|
-
*
|
|
44
|
+
* Fill dummy lifecycle scripts
|
|
56
45
|
*
|
|
57
46
|
* 為 package.json 的標準生命週期腳本填充佔位符命令
|
|
58
|
-
* Fills placeholder commands for standard lifecycle scripts in package.json
|
|
59
|
-
*
|
|
60
|
-
* 包含以下腳本 / Includes following scripts:
|
|
61
|
-
* - preversion: 版本更新前執行 / Run before version bump
|
|
62
|
-
* - version: 版本更新時執行 / Run on version bump
|
|
63
|
-
* - prepublishOnly: 發布前執行 / Run before publish
|
|
64
|
-
* - postversion: 版本更新後執行 / Run after version bump
|
|
65
|
-
* - publish: 發布時執行 / Run on publish
|
|
66
|
-
* - prepublish: 發布前執行(舊版)/ Run before publish (legacy)
|
|
67
|
-
* - postpublish: 發布後執行 / Run after publish
|
|
68
|
-
* - postpublishOnly: 發布後執行 / Run after publish only
|
|
69
|
-
* - prepare: 準備階段執行 / Run during prepare
|
|
70
|
-
* - prepack: 打包前執行 / Run before pack
|
|
71
|
-
* - pack: 打包時執行 / Run on pack
|
|
72
|
-
* - postpack: 打包後執行 / Run after pack
|
|
73
|
-
* - pretest: 測試前執行 / Run before test
|
|
74
|
-
* - ci:build: CI 建置階段 / CI build stage
|
|
75
|
-
* - ci:install: CI 安裝階段 / CI install stage
|
|
76
47
|
*
|
|
77
|
-
* @template T - 腳本物件類型
|
|
78
|
-
* @param scripts -
|
|
79
|
-
* @param prefix - echo
|
|
80
|
-
* @returns 填充後的腳本物件
|
|
48
|
+
* @template T - 腳本物件類型
|
|
49
|
+
* @param scripts - 腳本物件(可選)
|
|
50
|
+
* @param prefix - echo 前綴文字(可選)
|
|
51
|
+
* @returns 填充後的腳本物件
|
|
81
52
|
*
|
|
82
53
|
* @example
|
|
83
54
|
* ```typescript
|
|
@@ -102,6 +73,7 @@ function fillDummyScripts(scripts, prefix) {
|
|
|
102
73
|
// 'pretest',
|
|
103
74
|
'ci:build',
|
|
104
75
|
'ci:install',
|
|
76
|
+
'prepublishOnly:lerna',
|
|
105
77
|
]);
|
|
106
78
|
}
|
|
107
79
|
//# sourceMappingURL=dummy.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dummy.js","sourceRoot":"","sources":["dummy.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dummy.js","sourceRoot":"","sources":["dummy.ts"],"names":[],"mappings":";;AAoBA,sDAuBC;AAkBD,4CAqBC;AAjFD,oDAA4D;AAE5D;;;;;;;;;;;;;;;;GAgBG;AACH,SAAgB,qBAAqB,CAAmC,OAAU,EAAE,MAAc,EAAE,MAAyC;IAE5I;;;OAGG;IACH,aAAa;IACb,OAAO,aAAP,OAAO,cAAP,OAAO,IAAP,OAAO,GAAK,EAAE,EAAC;IAEf,sCAAsC;IACtC,IAAI,IAAI,GAAG,IAAA,wBAAgB,EAAC,MAAM,CAAC,CAAC;IAEpC;;;OAGG;IACH,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;;QAElB,aAAa;QACb,MAAA,OAAO,CAAC,CAAC,qCAAT,OAAO,CAAC,CAAC,IAAM,GAAG,IAAI,IAAI,CAAC,EAAE,EAAA;IAC9B,CAAC,CAAC,CAAC;IAEH,OAAO,OAAO,CAAC;AAChB,CAAC;AAED;;;;;;;;;;;;;;;GAeG;AACH,SAAgB,gBAAgB,CAAmC,OAAW,EAAE,MAAe;IAE9F,OAAO,qBAAqB,CAAC,OAAO,EAAE,MAAM,EAAE;QAC7C,gBAAgB;QAChB,aAAa;QACb,oBAAoB;QACpB,iBAAiB;QACjB,aAAa;QACb,gBAAgB;QAChB,iBAAiB;QACjB,qBAAqB;QACrB,aAAa;QACb,aAAa;QACb,UAAU;QACV,cAAc;QACd,aAAa;QACb,UAAU;QACV,YAAY;QAEZ,sBAAsB;KACb,CAAC,CAAC;AACb,CAAC","sourcesContent":["import { ITSArrayListMaybeReadonly } from 'ts-type/lib/type/base';\nimport { _dummyEchoPrefix } from '../../util/scripts/dummy';\n\n/**\n * dummy scripts filler function\n *\n * 為指定的腳本欄位填充 echo 命令作為佔位符\n *\n * @template T - 腳本物件類型\n * @param scripts - 腳本物件\n * @param prefix - echo 前綴文字\n * @param fields - 要填充的腳本名稱陣列\n * @returns 填充後的腳本物件\n *\n * @example\n * ```typescript\n * _fillDummyScriptsCore({}, 'workspaces', ['preversion', 'postversion'])\n * // 返回: { preversion: 'echo workspaces preversion', postversion: 'echo workspaces postversion' }\n * ```\n */\nexport function _fillDummyScriptsCore<T extends Record<string, string>>(scripts: T, prefix: string, fields: ITSArrayListMaybeReadonly<string>)\n{\n\t/**\n\t * 允許不傳入 scripts 時從空物件開始累積,\n\t * 讓 `fillDummyScripts()` 可直接取得一份全新預設腳本\n\t */\n\t// @ts-ignore\n\tscripts ??= {};\n\n\t/** 整批腳本共用同一個 echo 前綴,確保輸出訊息可辨識來源套件 */\n\tlet text = _dummyEchoPrefix(prefix);\n\n\t/**\n\t * 僅填補尚不存在的腳本鍵(`??=`),\n\t * 保留使用者已自訂的腳本不被預設佔位符覆蓋\n\t */\n\tfields.forEach(k =>\n\t{\n\t\t// @ts-ignore\n\t\tscripts[k] ??= `${text} ${k}`\n\t});\n\n\treturn scripts;\n}\n\n/**\n * Fill dummy lifecycle scripts\n *\n * 為 package.json 的標準生命週期腳本填充佔位符命令\n *\n * @template T - 腳本物件類型\n * @param scripts - 腳本物件(可選)\n * @param prefix - echo 前綴文字(可選)\n * @returns 填充後的腳本物件\n *\n * @example\n * ```typescript\n * fillDummyScripts({}, 'my-package')\n * // 返回包含所有生命週期腳本的物件\n * ```\n */\nexport function fillDummyScripts<T extends Record<string, string>>(scripts?: T, prefix?: string)\n{\n\treturn _fillDummyScriptsCore(scripts, prefix, [\n\t\t// 'preversion',\n\t\t// 'version',\n\t\t// 'prepublishOnly',\n\t\t// 'postversion',\n\t\t// 'publish',\n\t\t// 'prepublish',\n\t\t// 'postpublish',\n\t\t// 'postpublishOnly',\n\t\t// 'prepare',\n\t\t// 'prepack',\n\t\t// 'pack',\n\t\t// 'postpack',\n\t\t// 'pretest',\n\t\t'ci:build',\n\t\t'ci:install',\n\n\t\t'prepublishOnly:lerna',\n\t] as const);\n}\n"]}
|
|
@@ -6,22 +6,9 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { EnumScriptsEntry } from '../../field/scripts';
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* Default scripts for standard packages
|
|
10
10
|
*
|
|
11
11
|
* 適用於一般套件專案的常用測試與建構腳本
|
|
12
|
-
* Common test and build scripts for general package projects
|
|
13
|
-
*
|
|
14
|
-
* @returns 包含標準腳本的物件 / Object containing standard scripts
|
|
15
|
-
*
|
|
16
|
-
* 包含腳本 / Includes scripts:
|
|
17
|
-
* - test: 執行 Jest 測試 / Run Jest tests
|
|
18
|
-
* - coverage: 執行測試並產生覆蓋率報告 / Run tests with coverage
|
|
19
|
-
* - test:jest: Jest 測試命令 / Jest test command
|
|
20
|
-
* - test:snapshot: 更新測試快照 / Update test snapshots
|
|
21
|
-
* - test:jest:snapshot: 更新 Jest 快照 / Update Jest snapshots
|
|
22
|
-
* - test:jest:coverage: Jest 測試含覆蓋率 / Jest test with coverage
|
|
23
|
-
* - test:tsd: 執行 TypeScript 型別檢查 / Run TypeScript type checking
|
|
24
|
-
* - tsc:showConfig: 顯示 TypeScript 設定 / Show TypeScript config
|
|
25
12
|
*/
|
|
26
13
|
export declare function defaultPkgScripts(): {
|
|
27
14
|
test: EnumScriptsEntry;
|
|
@@ -34,8 +21,6 @@ export declare function defaultPkgScripts(): {
|
|
|
34
21
|
"test:snapshot": string;
|
|
35
22
|
"test:node:bin": string;
|
|
36
23
|
"test:node:bin:coverage": string;
|
|
37
|
-
"test:tsd": string;
|
|
38
|
-
"tsc:showConfig": string;
|
|
39
24
|
};
|
|
40
25
|
/**
|
|
41
26
|
* 新套件預設腳本 / Default scripts for new packages
|
|
@@ -44,24 +29,6 @@ export declare function defaultPkgScripts(): {
|
|
|
44
29
|
* Complete set of scripts for initializing new packages
|
|
45
30
|
*
|
|
46
31
|
* @returns 包含完整開發腳本的物件 / Object containing complete development scripts
|
|
47
|
-
*
|
|
48
|
-
* 額外包含腳本 / Additional scripts:
|
|
49
|
-
* - test:mocha: Mocha 測試執行 / Mocha test execution
|
|
50
|
-
* - test:tsdx: TSDX 測試 / TSDX testing
|
|
51
|
-
* - build:dts:bundle: 建構型別宣告檔 / Build type declaration files
|
|
52
|
-
* - build:dts:copy: 複製型別宣告檔 / Copy type declaration files
|
|
53
|
-
* - build:dts:tsc:emit: TypeScript 型別輸出 / TypeScript type emit
|
|
54
|
-
* - build:dts:tsc: 完整型別建構 / Complete type build
|
|
55
|
-
* - build:tsdx: TSDX 建構 / TSDX build
|
|
56
|
-
* - build:microbundle: Microbundle 建構 / Microbundle build
|
|
57
|
-
* - lint: ESLint 檢查 / ESLint check
|
|
58
|
-
* - lint:eslint: ESLint 執行 / ESLint execution
|
|
59
|
-
* - review: 完整審查流程 / Complete review process
|
|
60
|
-
* - review:test: 測試審查 / Test review
|
|
61
|
-
* - review:coverage: 覆蓋率審查 / Coverage review
|
|
62
|
-
* - sort-package-json: 排序 package.json / Sort package.json
|
|
63
|
-
* - tsc:default: 預設 TypeScript 編譯 / Default TypeScript compilation
|
|
64
|
-
* - tsc:esm: ESM TypeScript 編譯 / ESM TypeScript compilation
|
|
65
32
|
*/
|
|
66
33
|
export declare function defaultPkgNotOldExists(): {
|
|
67
34
|
"test:mocha": string;
|
|
@@ -78,8 +45,10 @@ export declare function defaultPkgNotOldExists(): {
|
|
|
78
45
|
"build:dts:tsc": EnumScriptsEntry;
|
|
79
46
|
"build:tsdx": EnumScriptsEntry;
|
|
80
47
|
"build:microbundle": string;
|
|
81
|
-
"sort-package-json":
|
|
48
|
+
"sort-package-json": EnumScriptsEntry;
|
|
82
49
|
"tsc:default": string;
|
|
50
|
+
"test:tsd": string;
|
|
51
|
+
"tsc:showConfig": EnumScriptsEntry;
|
|
83
52
|
test: EnumScriptsEntry;
|
|
84
53
|
coverage: string;
|
|
85
54
|
"test:jest": EnumScriptsEntry;
|
|
@@ -90,6 +59,4 @@ export declare function defaultPkgNotOldExists(): {
|
|
|
90
59
|
"test:snapshot": string;
|
|
91
60
|
"test:node:bin": string;
|
|
92
61
|
"test:node:bin:coverage": string;
|
|
93
|
-
"test:tsd": string;
|
|
94
|
-
"tsc:showConfig": string;
|
|
95
62
|
};
|
|
@@ -9,22 +9,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
9
9
|
exports.defaultPkgScripts = defaultPkgScripts;
|
|
10
10
|
exports.defaultPkgNotOldExists = defaultPkgNotOldExists;
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* Default scripts for standard packages
|
|
13
13
|
*
|
|
14
14
|
* 適用於一般套件專案的常用測試與建構腳本
|
|
15
|
-
* Common test and build scripts for general package projects
|
|
16
|
-
*
|
|
17
|
-
* @returns 包含標準腳本的物件 / Object containing standard scripts
|
|
18
|
-
*
|
|
19
|
-
* 包含腳本 / Includes scripts:
|
|
20
|
-
* - test: 執行 Jest 測試 / Run Jest tests
|
|
21
|
-
* - coverage: 執行測試並產生覆蓋率報告 / Run tests with coverage
|
|
22
|
-
* - test:jest: Jest 測試命令 / Jest test command
|
|
23
|
-
* - test:snapshot: 更新測試快照 / Update test snapshots
|
|
24
|
-
* - test:jest:snapshot: 更新 Jest 快照 / Update Jest snapshots
|
|
25
|
-
* - test:jest:coverage: Jest 測試含覆蓋率 / Jest test with coverage
|
|
26
|
-
* - test:tsd: 執行 TypeScript 型別檢查 / Run TypeScript type checking
|
|
27
|
-
* - tsc:showConfig: 顯示 TypeScript 設定 / Show TypeScript config
|
|
28
15
|
*/
|
|
29
16
|
function defaultPkgScripts() {
|
|
30
17
|
return {
|
|
@@ -38,8 +25,6 @@ function defaultPkgScripts() {
|
|
|
38
25
|
"test:snapshot": "pnpm run test -u",
|
|
39
26
|
"test:node:bin": "tsx --test --test-update-snapshots --",
|
|
40
27
|
"test:node:bin:coverage": "node --run test:node:bin -- --experimental-test-coverage --",
|
|
41
|
-
"test:tsd": "ynpx tsd",
|
|
42
|
-
"tsc:showConfig": "ynpx get-current-tsconfig -p",
|
|
43
28
|
};
|
|
44
29
|
}
|
|
45
30
|
/**
|
|
@@ -49,24 +34,6 @@ function defaultPkgScripts() {
|
|
|
49
34
|
* Complete set of scripts for initializing new packages
|
|
50
35
|
*
|
|
51
36
|
* @returns 包含完整開發腳本的物件 / Object containing complete development scripts
|
|
52
|
-
*
|
|
53
|
-
* 額外包含腳本 / Additional scripts:
|
|
54
|
-
* - test:mocha: Mocha 測試執行 / Mocha test execution
|
|
55
|
-
* - test:tsdx: TSDX 測試 / TSDX testing
|
|
56
|
-
* - build:dts:bundle: 建構型別宣告檔 / Build type declaration files
|
|
57
|
-
* - build:dts:copy: 複製型別宣告檔 / Copy type declaration files
|
|
58
|
-
* - build:dts:tsc:emit: TypeScript 型別輸出 / TypeScript type emit
|
|
59
|
-
* - build:dts:tsc: 完整型別建構 / Complete type build
|
|
60
|
-
* - build:tsdx: TSDX 建構 / TSDX build
|
|
61
|
-
* - build:microbundle: Microbundle 建構 / Microbundle build
|
|
62
|
-
* - lint: ESLint 檢查 / ESLint check
|
|
63
|
-
* - lint:eslint: ESLint 執行 / ESLint execution
|
|
64
|
-
* - review: 完整審查流程 / Complete review process
|
|
65
|
-
* - review:test: 測試審查 / Test review
|
|
66
|
-
* - review:coverage: 覆蓋率審查 / Coverage review
|
|
67
|
-
* - sort-package-json: 排序 package.json / Sort package.json
|
|
68
|
-
* - tsc:default: 預設 TypeScript 編譯 / Default TypeScript compilation
|
|
69
|
-
* - tsc:esm: ESM TypeScript 編譯 / ESM TypeScript compilation
|
|
70
37
|
*/
|
|
71
38
|
function defaultPkgNotOldExists() {
|
|
72
39
|
return {
|
|
@@ -90,9 +57,11 @@ function defaultPkgNotOldExists() {
|
|
|
90
57
|
// "review": "node --run review:coverage",
|
|
91
58
|
// "review:test": "yarn run lint && yarn run test",
|
|
92
59
|
// "review:coverage": "yarn run lint && yarn run coverage",
|
|
93
|
-
"sort-package-json": "yarn-tool sort"
|
|
60
|
+
"sort-package-json": "yarn-tool sort" /* EnumScriptsEntry.SORT_PACKAGE_JSON */,
|
|
94
61
|
"tsc:default": "tsc -p tsconfig.json",
|
|
95
62
|
// "tsc:esm": "tsc -p tsconfig.esm.json",
|
|
63
|
+
"test:tsd": "ynpx tsd",
|
|
64
|
+
"tsc:showConfig": "ynpx get-current-tsconfig -p" /* EnumScriptsEntry.TSC_SHOW_CONFIG */,
|
|
96
65
|
};
|
|
97
66
|
}
|
|
98
67
|
//# sourceMappingURL=pkg-scripts.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pkg-scripts.js","sourceRoot":"","sources":["pkg-scripts.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;
|
|
1
|
+
{"version":3,"file":"pkg-scripts.js","sourceRoot":"","sources":["pkg-scripts.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AASH,8CAeC;AAUD,wDAkCC;AAhED;;;;GAIG;AACH,SAAgB,iBAAiB;IAEhC,OAAO;QACN,MAAM,+DAA+B;QACrC,UAAU,EAAE,0BAA0B;QACtC,WAAW,2DAA4B;QACvC,WAAW,8HAA4B;QACvC,UAAU,sFAA2B;QACrC,cAAc,kGAA4B;QAC1C,cAAc,EAAE,gDAAgD;QAChE,eAAe,EAAE,kBAAkB;QAEnC,eAAe,EAAE,uCAAuC;QACxD,wBAAwB,EAAE,6DAA6D;KACvF,CAAA;AACF,CAAC;AAED;;;;;;;GAOG;AACH,SAAgB,sBAAsB;IAErC,OAAO;QACN,GAAG,iBAAiB,EAAE;QACtB,YAAY,EAAE,oHAAoH;QAClI,oBAAoB,EAAE,4BAA4B;QAClD,oBAAoB,EAAE,oCAAoC;QAC1D,WAAW,EAAE,8CAA8C;QAE3D,oBAAoB,EAAE,oGAAoG;QAE1H,iBAAiB,EAAE,oCAAoC;QACvD,wBAAwB,EAAE,wCAAwC;QAClE,oBAAoB,EAAE,oCAAoC;QAE1D,kBAAkB,iLAAmC;QACrD,gBAAgB,sGAAiC;QACjD,oBAAoB,oGAAqC;QACzD,eAAe,kGAAgC;QAC/C,YAAY,4FAA6B;QACzC,mBAAmB,EAAE,gCAAgC;QACrD,uCAAuC;QACvC,4DAA4D;QAC5D,0CAA0C;QAC1C,mDAAmD;QACnD,2DAA2D;QAC3D,mBAAmB,2DAAoC;QACvD,aAAa,EAAE,sBAAsB;QAErC,yCAAyC;QAEzC,UAAU,EAAE,UAAU;QACtB,gBAAgB,uEAAkC;KAClD,CAAA;AACF,CAAC","sourcesContent":["/**\n * 套件腳本預設 / Package Scripts Preset\n *\n * 提供標準套件(非根目錄、非工作區根目錄)的預設 npm scripts\n * Provides default npm scripts for standard packages (non-root, non-workspace-root)\n */\n\nimport { EnumScriptsEntry } from '../../field/scripts';\n\n/**\n * Default scripts for standard packages\n *\n * 適用於一般套件專案的常用測試與建構腳本\n */\nexport function defaultPkgScripts()\n{\n\treturn {\n\t\t\"test\": EnumScriptsEntry.DEFAULT_TEST,\n\t\t\"coverage\": \"pnpm run test --coverage\",\n\t\t\"test:jest\": EnumScriptsEntry.JEST_TEST,\n\t\t\"test:node\": EnumScriptsEntry.NODE_TEST,\n\t\t\"test:tsc\": EnumScriptsEntry.TSC_TEST,\n\t\t\"test:tsc:sub\": EnumScriptsEntry.TSC_TEST2,\n\t\t\"test:tsc:all\": \"node --run test:tsc && node --run test:tsc:sub\",\n\t\t\"test:snapshot\": \"pnpm run test -u\",\n\n\t\t\"test:node:bin\": \"tsx --test --test-update-snapshots --\",\n\t\t\"test:node:bin:coverage\": \"node --run test:node:bin -- --experimental-test-coverage --\",\n\t}\n}\n\n/**\n * 新套件預設腳本 / Default scripts for new packages\n *\n * 適用於初始化新套件時的完整腳本集合\n * Complete set of scripts for initializing new packages\n *\n * @returns 包含完整開發腳本的物件 / Object containing complete development scripts\n */\nexport function defaultPkgNotOldExists()\n{\n\treturn {\n\t\t...defaultPkgScripts(),\n\t\t\"test:mocha\": \"ynpx --quiet -p ts-node -p mocha mocha -- --require ts-node/register \\\"!(node_modules)/**/*.{test,spec}.{ts,tsx}\\\"\",\n\t\t\"test:jest:snapshot\": \"node --run test:jest -- -u\",\n\t\t\"test:jest:coverage\": \"node --run test:jest -- --coverage\",\n\t\t\"test:tsdx\": \"ynpx @bluelovers/tsdx test --passWithNoTests\",\n\n\t\t\"test:node:coverage\": \"node --run test:node:bin:coverage -- **/*.node-spec.ts **/*.node-test.ts **/*.spec.ts **/*.test.ts\",\n\n\t\t\"test:playwright\": \"playwright test playwright-spec.ts\",\n\t\t\"test:playwright:headed\": \"node --run test:playwright -- --headed\",\n\t\t\"test:playwright:ui\": \"node --run test:playwright -- --ui\",\n\n\t\t\"build:dts:bundle\": EnumScriptsEntry.BUILD_DTS_BUNDLE,\n\t\t\"build:dts:copy\": EnumScriptsEntry.BUILD_DTS_COPY,\n\t\t\"build:dts:tsc:emit\": EnumScriptsEntry.BUILD_DTS_TSC_EMIT,\n\t\t\"build:dts:tsc\": EnumScriptsEntry.BUILD_DTS_TSC,\n\t\t\"build:tsdx\": EnumScriptsEntry.BUILD_TSDX,\n\t\t\"build:microbundle\": \"ynpx microbundle --target node\",\n\t\t// \"lint\": \"node --run lint:eslint --\",\n\t\t// \"lint:eslint\": \"ynpx eslint --ext .ts,.tsx,.mts,.cts ./\",\n\t\t// \"review\": \"node --run review:coverage\",\n\t\t// \"review:test\": \"yarn run lint && yarn run test\",\n\t\t// \"review:coverage\": \"yarn run lint && yarn run coverage\",\n\t\t\"sort-package-json\": EnumScriptsEntry.SORT_PACKAGE_JSON,\n\t\t\"tsc:default\": \"tsc -p tsconfig.json\",\n\n\t\t// \"tsc:esm\": \"tsc -p tsconfig.esm.json\",\n\n\t\t\"test:tsd\": \"ynpx tsd\",\n\t\t\"tsc:showConfig\": EnumScriptsEntry.TSC_SHOW_CONFIG,\n\t}\n}\n"]}
|
|
@@ -4,35 +4,19 @@
|
|
|
4
4
|
* 提供根目錄套件(非工作區)的預設 npm scripts
|
|
5
5
|
* Provides default npm scripts for root packages (non-workspace)
|
|
6
6
|
*/
|
|
7
|
+
import { EnumScriptsEntry } from '../../field/scripts';
|
|
7
8
|
/**
|
|
8
|
-
*
|
|
9
|
+
* Default scripts for root packages
|
|
9
10
|
*
|
|
10
11
|
* 適用於 monorepo 根目錄或獨立套件的發布與版本管理
|
|
11
|
-
* Suitable for monorepo root or standalone package publishing and version management
|
|
12
12
|
*
|
|
13
|
-
* @returns 包含根目錄管理腳本的物件
|
|
13
|
+
* @returns 包含根目錄管理腳本的物件
|
|
14
14
|
*
|
|
15
|
-
*
|
|
16
|
-
* - 版本號遞增與發布
|
|
17
|
-
* - npm 發布流程
|
|
18
|
-
* - 發布後自動化(changelog、git
|
|
19
|
-
* - 依賴更新與清理
|
|
20
|
-
*
|
|
21
|
-
* 包含腳本 / Includes scripts:
|
|
22
|
-
* - prepublishOnly:check-bin: 發布前檢查二進位檔 / Check binaries before publish
|
|
23
|
-
* - version:bump: 版本號遞增 / Version bump
|
|
24
|
-
* - npm:publish: npm 發布 / npm publish
|
|
25
|
-
* - npm:publish:bump: 遞增並發布 / Bump and publish
|
|
26
|
-
* - version:bump:patch|minor|major|prerelease: 特定版本遞增 / Specific version bumps
|
|
27
|
-
* - npm:publish:bump:patch|minor|major|prerelease: 特定版本發布 / Specific version publishing
|
|
28
|
-
* - postpublish:git:commit: 發布後提交 / Post-publish git commit
|
|
29
|
-
* - postpublish:git:tag: 發布後標籤 / Post-publish git tag
|
|
30
|
-
* - postpublish:changelog: 更新變更日誌 / Update changelog
|
|
31
|
-
* - postpublish:git:push: 推送標籤 / Push tags
|
|
32
|
-
* - postpublish: 完整發布後流程 / Complete post-publish workflow
|
|
33
|
-
* - ncu: 更新依賴 / Update dependencies
|
|
34
|
-
* - pnpm:dedupe: 清理重複依賴 / Deduplicate dependencies
|
|
35
|
-
* - ncu:pnpm: pnpm 更新 / pnpm update
|
|
15
|
+
* 核心功能:
|
|
16
|
+
* - 版本號遞增與發布
|
|
17
|
+
* - npm 發布流程
|
|
18
|
+
* - 發布後自動化(changelog、git 提交與標籤)
|
|
19
|
+
* - 依賴更新與清理
|
|
36
20
|
*/
|
|
37
21
|
export declare function defaultRootScripts(): {
|
|
38
22
|
"postpublish:git:commit": string;
|
|
@@ -40,10 +24,10 @@ export declare function defaultRootScripts(): {
|
|
|
40
24
|
"postpublish:changelog": string;
|
|
41
25
|
"postpublish:git:push": string;
|
|
42
26
|
postpublish: string;
|
|
43
|
-
ncu:
|
|
27
|
+
ncu: EnumScriptsEntry;
|
|
44
28
|
"pnpm:dedupe": string;
|
|
45
29
|
"ncu:pnpm": string;
|
|
46
|
-
"prepublishOnly:check-bin":
|
|
30
|
+
"prepublishOnly:check-bin": EnumScriptsEntry;
|
|
47
31
|
"version:bump": string;
|
|
48
32
|
"npm:publish": string;
|
|
49
33
|
"npm:publish:bump": string;
|
|
@@ -56,16 +40,14 @@ export declare function defaultRootScripts(): {
|
|
|
56
40
|
"ws:fix-all": string;
|
|
57
41
|
"ws:fix-all:addStaticFiles": string;
|
|
58
42
|
"ws:fix-all:resetStaticFiles": string;
|
|
59
|
-
test:
|
|
43
|
+
test: EnumScriptsEntry;
|
|
60
44
|
coverage: string;
|
|
61
|
-
"test:jest":
|
|
62
|
-
"test:node":
|
|
63
|
-
"test:tsc":
|
|
64
|
-
"test:tsc:sub":
|
|
45
|
+
"test:jest": EnumScriptsEntry;
|
|
46
|
+
"test:node": EnumScriptsEntry;
|
|
47
|
+
"test:tsc": EnumScriptsEntry;
|
|
48
|
+
"test:tsc:sub": EnumScriptsEntry;
|
|
65
49
|
"test:tsc:all": string;
|
|
66
50
|
"test:snapshot": string;
|
|
67
51
|
"test:node:bin": string;
|
|
68
52
|
"test:node:bin:coverage": string;
|
|
69
|
-
"test:tsd": string;
|
|
70
|
-
"tsc:showConfig": string;
|
|
71
53
|
};
|
|
@@ -10,41 +10,24 @@ exports.defaultRootScripts = defaultRootScripts;
|
|
|
10
10
|
const shared_root_scripts_1 = require("./shared-root-scripts");
|
|
11
11
|
const pkg_scripts_1 = require("./pkg-scripts");
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* Default scripts for root packages
|
|
14
14
|
*
|
|
15
15
|
* 適用於 monorepo 根目錄或獨立套件的發布與版本管理
|
|
16
|
-
* Suitable for monorepo root or standalone package publishing and version management
|
|
17
16
|
*
|
|
18
|
-
* @returns 包含根目錄管理腳本的物件
|
|
17
|
+
* @returns 包含根目錄管理腳本的物件
|
|
19
18
|
*
|
|
20
|
-
*
|
|
21
|
-
* - 版本號遞增與發布
|
|
22
|
-
* - npm 發布流程
|
|
23
|
-
* - 發布後自動化(changelog、git
|
|
24
|
-
* - 依賴更新與清理
|
|
25
|
-
*
|
|
26
|
-
* 包含腳本 / Includes scripts:
|
|
27
|
-
* - prepublishOnly:check-bin: 發布前檢查二進位檔 / Check binaries before publish
|
|
28
|
-
* - version:bump: 版本號遞增 / Version bump
|
|
29
|
-
* - npm:publish: npm 發布 / npm publish
|
|
30
|
-
* - npm:publish:bump: 遞增並發布 / Bump and publish
|
|
31
|
-
* - version:bump:patch|minor|major|prerelease: 特定版本遞增 / Specific version bumps
|
|
32
|
-
* - npm:publish:bump:patch|minor|major|prerelease: 特定版本發布 / Specific version publishing
|
|
33
|
-
* - postpublish:git:commit: 發布後提交 / Post-publish git commit
|
|
34
|
-
* - postpublish:git:tag: 發布後標籤 / Post-publish git tag
|
|
35
|
-
* - postpublish:changelog: 更新變更日誌 / Update changelog
|
|
36
|
-
* - postpublish:git:push: 推送標籤 / Push tags
|
|
37
|
-
* - postpublish: 完整發布後流程 / Complete post-publish workflow
|
|
38
|
-
* - ncu: 更新依賴 / Update dependencies
|
|
39
|
-
* - pnpm:dedupe: 清理重複依賴 / Deduplicate dependencies
|
|
40
|
-
* - ncu:pnpm: pnpm 更新 / pnpm update
|
|
19
|
+
* 核心功能:
|
|
20
|
+
* - 版本號遞增與發布
|
|
21
|
+
* - npm 發布流程
|
|
22
|
+
* - 發布後自動化(changelog、git 提交與標籤)
|
|
23
|
+
* - 依賴更新與清理
|
|
41
24
|
*/
|
|
42
25
|
function defaultRootScripts() {
|
|
43
26
|
/**
|
|
44
|
-
* 產生版本遞增與發布命令
|
|
27
|
+
* 產生版本遞增與發布命令
|
|
45
28
|
*
|
|
46
|
-
* @param bump - 版本遞增類型
|
|
47
|
-
* @returns 組合命令字串
|
|
29
|
+
* @param bump - 版本遞增類型
|
|
30
|
+
* @returns 組合命令字串
|
|
48
31
|
*/
|
|
49
32
|
const bumpVersion = (bump) => {
|
|
50
33
|
return [
|
|
@@ -55,13 +38,12 @@ function defaultRootScripts() {
|
|
|
55
38
|
return {
|
|
56
39
|
...(0, pkg_scripts_1.defaultPkgScripts)(),
|
|
57
40
|
...(0, shared_root_scripts_1.defaultSharedRootScripts)(),
|
|
58
|
-
"prepublishOnly:check-bin": "ynpx --quiet @yarn-tool/check-pkg-bin"
|
|
41
|
+
"prepublishOnly:check-bin": "ynpx --quiet @yarn-tool/check-pkg-bin" /* EnumScriptsEntry.PREPUBLISH_ONLY_CHECK_BIN */,
|
|
59
42
|
"version:bump": "yarn-tool version",
|
|
60
43
|
"npm:publish": "npm publish",
|
|
61
44
|
"npm:publish:bump": bumpVersion(),
|
|
62
45
|
/**
|
|
63
46
|
* 動態產生各類版本遞增腳本
|
|
64
|
-
* Dynamically generate version bump scripts
|
|
65
47
|
*/
|
|
66
48
|
...[
|
|
67
49
|
'patch',
|
|
@@ -78,7 +60,7 @@ function defaultRootScripts() {
|
|
|
78
60
|
"postpublish:changelog": `ynpx --quiet @yarn-tool/changelog && git add ./CHANGELOG.md`,
|
|
79
61
|
"postpublish:git:push": `git push --follow-tags`,
|
|
80
62
|
"postpublish": `node --run postpublish:changelog && node --run postpublish:git:commit && node --run postpublish:git:tag && node --run postpublish:git:push`,
|
|
81
|
-
"ncu": "yarn-tool ncu -u"
|
|
63
|
+
"ncu": "yarn-tool ncu -u" /* EnumScriptsEntry.NCU */,
|
|
82
64
|
"pnpm:dedupe": "pnpm dedupe",
|
|
83
65
|
"ncu:pnpm": "pnpm update",
|
|
84
66
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"root-scripts.js","sourceRoot":"","sources":["root-scripts.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;
|
|
1
|
+
{"version":3,"file":"root-scripts.js","sourceRoot":"","sources":["root-scripts.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAmBH,gDAgDC;AAjED,+DAAiE;AACjE,+CAAkD;AAGlD;;;;;;;;;;;;GAYG;AACH,SAAgB,kBAAkB;IAEjC;;;;;OAKG;IACH,MAAM,WAAW,GAAG,CAAC,IAAiD,EAAE,EAAE;QAEzE,OAAO;YACN,yBAAyB,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,cAAc,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAC9D,aAAa;SACb,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IACf,CAAC,CAAA;IAED,OAAO;QACN,GAAG,IAAA,+BAAiB,GAAE;QACtB,GAAG,IAAA,8CAAwB,GAAE;QAC7B,0BAA0B,0FAA4C;QACtE,cAAc,EAAE,mBAAmB;QACnC,aAAa,EAAE,aAAa;QAC5B,kBAAkB,EAAE,WAAW,EAAE;QAEjC;;WAEG;QACH,GAAI;YACH,OAAO;YACP,OAAO;YACP,OAAO;YACP,YAAY;SACF,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;YAEnC,CAAC,CAAC,gBAAgB,IAAI,EAAE,CAAC,GAAG,yBAAyB,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,cAAc,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;YAC3F,CAAC,CAAC,oBAAoB,IAAI,EAAE,CAAC,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;YAClD,OAAO,CAAC,CAAA;QACT,CAAC,EAAE,EAA4B,CAAC;QAEhC,wBAAwB,EAAE,yEAAyE;QACnG,qBAAqB,EAAE,6BAA6B;QACpD,uBAAuB,EAAE,6DAA6D;QACtF,sBAAsB,EAAE,wBAAwB;QAChD,aAAa,EAAE,4IAA4I;QAC3J,KAAK,+CAAsB;QAC3B,aAAa,EAAE,aAAa;QAC5B,UAAU,EAAE,aAAa;KACzB,CAAA;AACF,CAAC","sourcesContent":["/**\n * 根目錄套件腳本預設 / Root Package Scripts Preset\n *\n * 提供根目錄套件(非工作區)的預設 npm scripts\n * Provides default npm scripts for root packages (non-workspace)\n */\n\nimport { defaultSharedRootScripts } from './shared-root-scripts';\nimport { defaultPkgScripts } from './pkg-scripts';\nimport { EnumScriptsEntry } from '../../field/scripts';\n\n/**\n * Default scripts for root packages\n *\n * 適用於 monorepo 根目錄或獨立套件的發布與版本管理\n *\n * @returns 包含根目錄管理腳本的物件\n *\n * 核心功能:\n * - 版本號遞增與發布\n * - npm 發布流程\n * - 發布後自動化(changelog、git 提交與標籤)\n * - 依賴更新與清理\n */\nexport function defaultRootScripts()\n{\n\t/**\n\t * 產生版本遞增與發布命令\n\t *\n\t * @param bump - 版本遞增類型\n\t * @returns 組合命令字串\n\t */\n\tconst bumpVersion = (bump?: 'major' | 'minor' | 'patch' | 'prerelease') =>\n\t{\n\t\treturn [\n\t\t\t`node --run version:bump` + (bump ? ` -- --bump ${bump}` : ''),\n\t\t\t`npm publish`,\n\t\t].join(' && ')\n\t}\n\n\treturn {\n\t\t...defaultPkgScripts(),\n\t\t...defaultSharedRootScripts(),\n\t\t\"prepublishOnly:check-bin\": EnumScriptsEntry.PREPUBLISH_ONLY_CHECK_BIN,\n\t\t\"version:bump\": \"yarn-tool version\",\n\t\t\"npm:publish\": \"npm publish\",\n\t\t\"npm:publish:bump\": bumpVersion(),\n\n\t\t/**\n\t\t * 動態產生各類版本遞增腳本\n\t\t */\n\t\t...([\n\t\t\t'patch',\n\t\t\t'minor',\n\t\t\t'major',\n\t\t\t'prerelease',\n\t\t] as const).reduce((a, bump, idx) =>\n\t\t{\n\t\t\ta[`version:bump:${bump}`] = `node --run version:bump` + (bump ? ` -- --bump ${bump}` : '');\n\t\t\ta[`npm:publish:bump:${bump}`] = bumpVersion(bump);\n\t\t\treturn a\n\t\t}, {} as Record<string, string>),\n\n\t\t\"postpublish:git:commit\": `git commit -m \"chore(release): publish\" . & echo postpublish:git:commit`,\n\t\t\"postpublish:git:tag\": `ynpx --quiet @yarn-tool/tag`,\n\t\t\"postpublish:changelog\": `ynpx --quiet @yarn-tool/changelog && git add ./CHANGELOG.md`,\n\t\t\"postpublish:git:push\": `git push --follow-tags`,\n\t\t\"postpublish\": `node --run postpublish:changelog && node --run postpublish:git:commit && node --run postpublish:git:tag && node --run postpublish:git:push`,\n\t\t\"ncu\": EnumScriptsEntry.NCU,\n\t\t\"pnpm:dedupe\": \"pnpm dedupe\",\n\t\t\"ncu:pnpm\": \"pnpm update\",\n\t}\n}\n"]}
|
|
@@ -1,55 +1,34 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* CI environment install script
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* Provides shared npm scripts for root packages
|
|
6
|
-
*
|
|
7
|
-
* 此模組被 root-scripts 和 ws-root-scripts 共用
|
|
8
|
-
* This module is shared by root-scripts and ws-root-scripts
|
|
9
|
-
*/
|
|
10
|
-
/**
|
|
11
|
-
* CI 環境安裝腳本 / CI environment install script
|
|
12
|
-
*
|
|
13
|
-
* 安裝核心開發工具:yarn-tool、lerna、ynpx、ts-node、ts-jest、jest、typescript、jest-config、tsx、pnpm
|
|
14
|
-
* Installs core development tools
|
|
4
|
+
* Installs development dependencies
|
|
15
5
|
*/
|
|
16
6
|
export declare const _defaultCiInstallDeps: readonly ["yarn-tool", "lerna", "ynpx", "pnpm", "typescript", "ts-node", "tsx", "ts-jest", "jest", "@bluelovers/jest-config", "@bluelovers/tsconfig", "@yarn-tool/require-resolve"];
|
|
17
7
|
/**
|
|
18
|
-
*
|
|
8
|
+
* Shared root default scripts
|
|
19
9
|
*
|
|
20
10
|
* 適用於所有根目錄類型的通用管理腳本
|
|
21
|
-
* General management scripts for all root package types
|
|
22
|
-
*
|
|
23
|
-
* @returns 包含共享根目錄腳本的物件 / Object containing shared root scripts
|
|
24
|
-
*
|
|
25
|
-
* 包含腳本 / Includes scripts:
|
|
26
|
-
* - ci:install: CI 環境安裝與依賴設定 / CI environment install and dependency setup
|
|
27
|
-
* - test:jest:clearCache: 清除 Jest 快取 / Clear Jest cache
|
|
28
|
-
* - install:resetLockfile: 重置鎖定檔安裝 / Install with reset lockfile
|
|
29
|
-
* - install:frozenLockfile: 凍結鎖定檔安裝 / Install with frozen lockfile
|
|
30
|
-
* - ws:fix-all: 修復所有工作區問題 / Fix all workspace issues
|
|
31
|
-
* - ws:fix-all:resetStaticFiles: 修復並重置靜態檔 / Fix and reset static files
|
|
32
11
|
*/
|
|
33
12
|
export declare function defaultSharedRootScripts(): {
|
|
34
13
|
/**
|
|
35
|
-
* CI
|
|
14
|
+
* CI environment install script
|
|
36
15
|
*
|
|
37
|
-
*
|
|
16
|
+
* 安裝核心開發工具
|
|
38
17
|
* Installs core development tools
|
|
39
18
|
*/
|
|
40
19
|
"ci:install": string;
|
|
41
20
|
"ci:install:yarn": string;
|
|
42
21
|
"ci:install:pnpm": string;
|
|
43
|
-
/**
|
|
22
|
+
/** Clear Jest cache */
|
|
44
23
|
"test:jest:clearCache": string;
|
|
45
|
-
/**
|
|
24
|
+
/** Install with reset lockfile */
|
|
46
25
|
"install:resetLockfile": string;
|
|
47
|
-
/**
|
|
26
|
+
/** Install with frozen lockfile */
|
|
48
27
|
"install:frozenLockfile": string;
|
|
49
|
-
/**
|
|
28
|
+
/** 修復並且更新套件資訊 */
|
|
50
29
|
"ws:fix-all": string;
|
|
51
|
-
/** 修復時一併補齊靜態檔案
|
|
30
|
+
/** 修復時一併補齊靜態檔案 */
|
|
52
31
|
"ws:fix-all:addStaticFiles": string;
|
|
53
|
-
/** 修復並重置靜態檔
|
|
32
|
+
/** 修復並重置靜態檔 */
|
|
54
33
|
"ws:fix-all:resetStaticFiles": string;
|
|
55
34
|
};
|