@yarn-tool/pkg-entry-util 3.0.18 → 3.0.21

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 CHANGED
@@ -3,6 +3,62 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [3.0.21](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/pkg-entry-util@3.0.20...@yarn-tool/pkg-entry-util@3.0.21) (2026-11-03)
7
+
8
+
9
+
10
+ ### ✨ Features
11
+
12
+ * **pkg:** 更新測試腳本與類型定義 ([e82f671](https://github.com/bluelovers/ws-yarn-workspaces/commit/e82f671a516c744c6109375121b3bf3dfd112c4a))
13
+
14
+
15
+
16
+ ## [3.0.20](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/pkg-entry-util@3.0.18...@yarn-tool/pkg-entry-util@3.0.20) (2026-10-24)
17
+
18
+
19
+
20
+ ### 📦 Code Refactoring
21
+
22
+ * **pkg-entry-util:** 新增子目錄 TypeScript 型別檢查指令 ([6621271](https://github.com/bluelovers/ws-yarn-workspaces/commit/6621271f32246a245b43888dccc0b0821652d99c))
23
+
24
+
25
+ ### 🛠 Build System
26
+
27
+ * update build ([a369924](https://github.com/bluelovers/ws-yarn-workspaces/commit/a3699245990904a2a4dc4a3f9433d8d282baae8e))
28
+
29
+
30
+ ### ♻️ Chores
31
+
32
+ * **deps:** 更新依賴項目與調整 package.json 配置 ([e082d18](https://github.com/bluelovers/ws-yarn-workspaces/commit/e082d188bc5a1bb34fc940317b6ae9f2c2c539b0))
33
+
34
+
35
+ ### 🔖 Miscellaneous
36
+
37
+ * . ([cef8450](https://github.com/bluelovers/ws-yarn-workspaces/commit/cef8450b790e43ca29fc3d1b4d527ea3eef9ea9a))
38
+ * . ([acaa8dd](https://github.com/bluelovers/ws-yarn-workspaces/commit/acaa8ddd7415c201ed2c7cc684327528db12463f))
39
+
40
+
41
+
42
+ ## [3.0.19](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/pkg-entry-util@3.0.18...@yarn-tool/pkg-entry-util@3.0.19) (2026-10-24)
43
+
44
+
45
+
46
+ ### 📦 Code Refactoring
47
+
48
+ * **pkg-entry-util:** 新增子目錄 TypeScript 型別檢查指令 ([6621271](https://github.com/bluelovers/ws-yarn-workspaces/commit/6621271f32246a245b43888dccc0b0821652d99c))
49
+
50
+
51
+ ### 🛠 Build System
52
+
53
+ * update build ([a369924](https://github.com/bluelovers/ws-yarn-workspaces/commit/a3699245990904a2a4dc4a3f9433d8d282baae8e))
54
+
55
+
56
+ ### ♻️ Chores
57
+
58
+ * **deps:** 更新依賴項目與調整 package.json 配置 ([e082d18](https://github.com/bluelovers/ws-yarn-workspaces/commit/e082d188bc5a1bb34fc940317b6ae9f2c2c539b0))
59
+
60
+
61
+
6
62
  ## [3.0.18](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/pkg-entry-util@3.0.17...@yarn-tool/pkg-entry-util@3.0.18) (2026-10-14)
7
63
 
8
64
 
@@ -11,14 +11,15 @@ export declare const enum EnumScriptsEntry {
11
11
  /** 以 Jest 執行測試,且在沒有測試檔時仍視為成功 / Run Jest tests, passing when no test files exist */
12
12
  JEST_TEST = "jest --passWithNoTests",
13
13
  /** 以 Node.js 原生 test runner(經 tsx)執行測試並更新快照 / Run tests via Node's native runner (through tsx) and update snapshots */
14
- NODE_TEST = "tsx --test --test-update-snapshots **/*.node-spec.ts **/*.node-test.ts **/*.spec.ts **/*.test.ts",
14
+ NODE_TEST = "node --run test:node:bin -- **/*.node-spec.ts **/*.node-test.ts **/*.spec.ts **/*.test.ts",
15
15
  /** 預設測試命令 / Default test command */
16
16
  DEFAULT_TEST = "node --run test:node --",
17
17
  /**
18
18
  * TypeScript 型別檢查:以 `&` 連結 echo,讓檢查完成後仍有成功訊息
19
19
  * Type check: chained with `&` so a completion message is printed afterward
20
20
  */
21
- TSC_TEST = "tsc --noEmit & echo typescript check done",
21
+ TSC_TEST = "tsc --noEmit & echo Type checking completed (main)",
22
+ TSC_TEST2 = "cd test && tsc --noEmit & echo Type checking completed (test)",
22
23
  /** 未指定測試的預設錯誤訊息(不中斷流程)/ Default "no test specified" message (does not abort) */
23
24
  NO_TEST_SPECIFIED = "echo \"Error: no test specified\"",
24
25
  /** 同上,但以 `exit 1` 讓腳本以失敗結束 / Same as above, but exits with code 1 to fail the script */
@@ -16,14 +16,15 @@ var EnumScriptsEntry;
16
16
  /** 以 Jest 執行測試,且在沒有測試檔時仍視為成功 / Run Jest tests, passing when no test files exist */
17
17
  EnumScriptsEntry["JEST_TEST"] = "jest --passWithNoTests";
18
18
  /** 以 Node.js 原生 test runner(經 tsx)執行測試並更新快照 / Run tests via Node's native runner (through tsx) and update snapshots */
19
- EnumScriptsEntry["NODE_TEST"] = "tsx --test --test-update-snapshots **/*.node-spec.ts **/*.node-test.ts **/*.spec.ts **/*.test.ts";
19
+ EnumScriptsEntry["NODE_TEST"] = "node --run test:node:bin -- **/*.node-spec.ts **/*.node-test.ts **/*.spec.ts **/*.test.ts";
20
20
  /** 預設測試命令 / Default test command */
21
21
  EnumScriptsEntry["DEFAULT_TEST"] = "node --run test:node --";
22
22
  /**
23
23
  * TypeScript 型別檢查:以 `&` 連結 echo,讓檢查完成後仍有成功訊息
24
24
  * Type check: chained with `&` so a completion message is printed afterward
25
25
  */
26
- EnumScriptsEntry["TSC_TEST"] = "tsc --noEmit & echo typescript check done";
26
+ EnumScriptsEntry["TSC_TEST"] = "tsc --noEmit & echo Type checking completed (main)";
27
+ EnumScriptsEntry["TSC_TEST2"] = "cd test && tsc --noEmit & echo Type checking completed (test)";
27
28
  /** 未指定測試的預設錯誤訊息(不中斷流程)/ Default "no test specified" message (does not abort) */
28
29
  EnumScriptsEntry["NO_TEST_SPECIFIED"] = "echo \"Error: no test specified\"";
29
30
  /** 同上,但以 `exit 1` 讓腳本以失敗結束 / Same as above, but exits with code 1 to fail the script */
@@ -1 +1 @@
1
- {"version":3,"file":"scripts.js","sourceRoot":"","sources":["scripts.ts"],"names":[],"mappings":";;;AA6DA,sEAGC;AA/DD;;;;;;;;GAQG;AACH,IAAkB,gBAqCjB;AArCD,WAAkB,gBAAgB;IAEjC,mFAAmF;IACnF,wDAAoC,CAAA;IACpC,uHAAuH;IACvH,kIAA8G,CAAA;IAE9G,oCAAoC;IACpC,4DAAwC,CAAA;IAExC;;;OAGG;IACH,0EAAsD,CAAA;IAEtD,gFAAgF;IAChF,2EAAuD,CAAA;IACvD,wFAAwF;IACxF,0FAAsE,CAAA;IAEtE,qGAAqG;IACrG,8KAA0J,CAAA;IAC1J,2GAA2G;IAC3G,mGAA+E,CAAA;IAC/E,6CAA6C;IAC7C,iGAA6E,CAAA;IAC7E,iEAAiE;IACjE,+FAA2E,CAAA;IAE3E,0DAA0D;IAC1D,yFAAqE,CAAA;IACrE,gFAAgF;IAChF,+FAA2E,CAAA;IAE3E,oGAAoG;IACpG,gDAA4B,CAAA;AAC7B,CAAC,EArCiB,gBAAgB,gCAAhB,gBAAgB,QAqCjC;AAED;;;;;;;;;;;GAWG;AACH,SAAgB,6BAA6B,CAAC,KAAa;IAE1D,OAAO,KAAK,gGAA4C,IAAI,KAAK,iFAAuC,CAAA;AACzG,CAAC","sourcesContent":["\n/**\n * 常用腳本命令字串列舉\n * Enum of common script command strings\n *\n * 集中管理預設腳本的命令內容,讓各預設腳本模組引用同一份字串,\n * 避免命令在多處重複定義後逐漸不一致\n * Centralizes the command strings so every preset script module shares a\n * single source, preventing drift caused by duplicated definitions\n */\nexport const enum EnumScriptsEntry\n{\n\t/** 以 Jest 執行測試,且在沒有測試檔時仍視為成功 / Run Jest tests, passing when no test files exist */\n\tJEST_TEST = \"jest --passWithNoTests\",\n\t/** 以 Node.js 原生 test runner(經 tsx)執行測試並更新快照 / Run tests via Node's native runner (through tsx) and update snapshots */\n\tNODE_TEST = \"tsx --test --test-update-snapshots **/*.node-spec.ts **/*.node-test.ts **/*.spec.ts **/*.test.ts\",\n\n\t/** 預設測試命令 / Default test command */\n\tDEFAULT_TEST = \"node --run test:node --\",\n\n\t/**\n\t * TypeScript 型別檢查:以 `&` 連結 echo,讓檢查完成後仍有成功訊息\n\t * Type check: chained with `&` so a completion message is printed afterward\n\t */\n\tTSC_TEST = \"tsc --noEmit & echo typescript check done\",\n\n\t/** 未指定測試的預設錯誤訊息(不中斷流程)/ Default \"no test specified\" message (does not abort) */\n\tNO_TEST_SPECIFIED = \"echo \\\"Error: no test specified\\\"\",\n\t/** 同上,但以 `exit 1` 讓腳本以失敗結束 / Same as above, but exits with code 1 to fail the script */\n\tNO_TEST_SPECIFIED_EXIT = \"echo \\\"Error: no test specified\\\" && exit 1\",\n\n\t/** 以 dts-bundle-generator 產生打包型別檔 / Generate a bundled declaration file with dts-bundle-generator */\n\tBUILD_DTS_BUNDLE = \"ynpx @bluelovers/dts-bundle-generator -o ./dist/index.d.ts ./src/index.ts --no-banner --inline-declare-global & echo build:dts:bundle\",\n\t/** 複製已存在的型別檔到 dist(Windows copy 指令)/ Copy an existing declaration file into dist (Windows copy command) */\n\tBUILD_DTS_COPY = \"copy .\\\\src\\\\index.d.ts .\\\\dist\\\\index.d.ts & echo build:dts\",\n\t/** 僅輸出型別宣告檔 / Emit declaration files only */\n\tBUILD_DTS_TSC_EMIT = \"tsc --emitDeclarationOnly --declaration --noEmit false\",\n\t/** 完整型別建構:先 emit 再複製 / Full type build: emit first, then copy */\n\tBUILD_DTS_TSC = \"node --run build:dts:tsc:emit & node --run build:dts:copy\",\n\n\t/** 以 TSDX 建構 JS bundle / Build the JS bundle with TSDX */\n\tBUILD_TSDX = \"ynpx @bluelovers/tsdx build --target node --name index\",\n\t/** 建構 JS 與打包型別檔(兩者依序執行)/ Build JS and bundled declarations (run in sequence) */\n\tBUILD_TSDX_AND_DTS = \"node --run build:tsdx && node --run build:dts:bundle\",\n\n\t/** 版本遞增前先跑測試,避免發布未經驗證的版本 / Run tests before a version bump so unverified code is never published */\n\tpreversion = \"pnpm run test\",\n}\n\n/**\n * 判斷腳本命令是否為「未指定測試」的佔位訊息\n * Check whether a script command is the \"no test specified\" placeholder\n *\n * 同時涵蓋會中斷(`exit 1`)與不會中斷兩種變體,\n * 讓呼叫端不必自行比較兩組字串\n * Covers both the aborting (`exit 1`) and non-aborting variants so callers\n * need not compare two literals themselves\n *\n * @param value - 要檢查的腳本命令 / the script command to check\n * @returns 是否為未指定測試的佔位訊息 / whether it is the \"no test specified\" placeholder\n */\nexport function scriptsEntryIsNoTestSpecified(value: string): value is EnumScriptsEntry.NO_TEST_SPECIFIED_EXIT | EnumScriptsEntry.NO_TEST_SPECIFIED\n{\n\treturn value === EnumScriptsEntry.NO_TEST_SPECIFIED_EXIT || value === EnumScriptsEntry.NO_TEST_SPECIFIED\n}\n"]}
1
+ {"version":3,"file":"scripts.js","sourceRoot":"","sources":["scripts.ts"],"names":[],"mappings":";;;AA8DA,sEAGC;AAhED;;;;;;;;GAQG;AACH,IAAkB,gBAsCjB;AAtCD,WAAkB,gBAAgB;IAEjC,mFAAmF;IACnF,wDAAoC,CAAA;IACpC,uHAAuH;IACvH,2HAAuG,CAAA;IAEvG,oCAAoC;IACpC,4DAAwC,CAAA;IAExC;;;OAGG;IACH,mFAA+D,CAAA;IAC/D,+FAA2E,CAAA;IAE3E,gFAAgF;IAChF,2EAAuD,CAAA;IACvD,wFAAwF;IACxF,0FAAsE,CAAA;IAEtE,qGAAqG;IACrG,8KAA0J,CAAA;IAC1J,2GAA2G;IAC3G,mGAA+E,CAAA;IAC/E,6CAA6C;IAC7C,iGAA6E,CAAA;IAC7E,iEAAiE;IACjE,+FAA2E,CAAA;IAE3E,0DAA0D;IAC1D,yFAAqE,CAAA;IACrE,gFAAgF;IAChF,+FAA2E,CAAA;IAE3E,oGAAoG;IACpG,gDAA4B,CAAA;AAC7B,CAAC,EAtCiB,gBAAgB,gCAAhB,gBAAgB,QAsCjC;AAED;;;;;;;;;;;GAWG;AACH,SAAgB,6BAA6B,CAAC,KAAa;IAE1D,OAAO,KAAK,gGAA4C,IAAI,KAAK,iFAAuC,CAAA;AACzG,CAAC","sourcesContent":["\n/**\n * 常用腳本命令字串列舉\n * Enum of common script command strings\n *\n * 集中管理預設腳本的命令內容,讓各預設腳本模組引用同一份字串,\n * 避免命令在多處重複定義後逐漸不一致\n * Centralizes the command strings so every preset script module shares a\n * single source, preventing drift caused by duplicated definitions\n */\nexport const enum EnumScriptsEntry\n{\n\t/** 以 Jest 執行測試,且在沒有測試檔時仍視為成功 / Run Jest tests, passing when no test files exist */\n\tJEST_TEST = \"jest --passWithNoTests\",\n\t/** 以 Node.js 原生 test runner(經 tsx)執行測試並更新快照 / Run tests via Node's native runner (through tsx) and update snapshots */\n\tNODE_TEST = \"node --run test:node:bin -- **/*.node-spec.ts **/*.node-test.ts **/*.spec.ts **/*.test.ts\",\n\n\t/** 預設測試命令 / Default test command */\n\tDEFAULT_TEST = \"node --run test:node --\",\n\n\t/**\n\t * TypeScript 型別檢查:以 `&` 連結 echo,讓檢查完成後仍有成功訊息\n\t * Type check: chained with `&` so a completion message is printed afterward\n\t */\n\tTSC_TEST = \"tsc --noEmit & echo Type checking completed (main)\",\n\tTSC_TEST2 = \"cd test && tsc --noEmit & echo Type checking completed (test)\",\n\n\t/** 未指定測試的預設錯誤訊息(不中斷流程)/ Default \"no test specified\" message (does not abort) */\n\tNO_TEST_SPECIFIED = \"echo \\\"Error: no test specified\\\"\",\n\t/** 同上,但以 `exit 1` 讓腳本以失敗結束 / Same as above, but exits with code 1 to fail the script */\n\tNO_TEST_SPECIFIED_EXIT = \"echo \\\"Error: no test specified\\\" && exit 1\",\n\n\t/** 以 dts-bundle-generator 產生打包型別檔 / Generate a bundled declaration file with dts-bundle-generator */\n\tBUILD_DTS_BUNDLE = \"ynpx @bluelovers/dts-bundle-generator -o ./dist/index.d.ts ./src/index.ts --no-banner --inline-declare-global & echo build:dts:bundle\",\n\t/** 複製已存在的型別檔到 dist(Windows copy 指令)/ Copy an existing declaration file into dist (Windows copy command) */\n\tBUILD_DTS_COPY = \"copy .\\\\src\\\\index.d.ts .\\\\dist\\\\index.d.ts & echo build:dts\",\n\t/** 僅輸出型別宣告檔 / Emit declaration files only */\n\tBUILD_DTS_TSC_EMIT = \"tsc --emitDeclarationOnly --declaration --noEmit false\",\n\t/** 完整型別建構:先 emit 再複製 / Full type build: emit first, then copy */\n\tBUILD_DTS_TSC = \"node --run build:dts:tsc:emit & node --run build:dts:copy\",\n\n\t/** 以 TSDX 建構 JS bundle / Build the JS bundle with TSDX */\n\tBUILD_TSDX = \"ynpx @bluelovers/tsdx build --target node --name index\",\n\t/** 建構 JS 與打包型別檔(兩者依序執行)/ Build JS and bundled declarations (run in sequence) */\n\tBUILD_TSDX_AND_DTS = \"node --run build:tsdx && node --run build:dts:bundle\",\n\n\t/** 版本遞增前先跑測試,避免發布未經驗證的版本 / Run tests before a version bump so unverified code is never published */\n\tpreversion = \"pnpm run test\",\n}\n\n/**\n * 判斷腳本命令是否為「未指定測試」的佔位訊息\n * Check whether a script command is the \"no test specified\" placeholder\n *\n * 同時涵蓋會中斷(`exit 1`)與不會中斷兩種變體,\n * 讓呼叫端不必自行比較兩組字串\n * Covers both the aborting (`exit 1`) and non-aborting variants so callers\n * need not compare two literals themselves\n *\n * @param value - 要檢查的腳本命令 / the script command to check\n * @returns 是否為未指定測試的佔位訊息 / whether it is the \"no test specified\" placeholder\n */\nexport function scriptsEntryIsNoTestSpecified(value: string): value is EnumScriptsEntry.NO_TEST_SPECIFIED_EXIT | EnumScriptsEntry.NO_TEST_SPECIFIED\n{\n\treturn value === EnumScriptsEntry.NO_TEST_SPECIFIED_EXIT || value === EnumScriptsEntry.NO_TEST_SPECIFIED\n}\n"]}
@@ -92,8 +92,8 @@ function fillDummyScripts(scripts, prefix) {
92
92
  'prepublishOnly',
93
93
  // 'postversion',
94
94
  'publish',
95
- 'prepublish',
96
- 'postpublish',
95
+ // 'prepublish',
96
+ // 'postpublish',
97
97
  'postpublishOnly',
98
98
  // 'prepare',
99
99
  // 'prepack',
@@ -1 +1 @@
1
- {"version":3,"file":"dummy.js","sourceRoot":"","sources":["dummy.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAuBH,sDA2BC;AAoCD,4CAmBC;AAtGD,oDAA4D;AAE5D;;;;;;;;;;;;;;;;;GAiBG;AACH,SAAgB,qBAAqB,CAAmC,OAAU,EAAE,MAAc,EAAE,MAAyC;IAE5I;;;;;OAKG;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;;;;;OAKG;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,SAAgB,gBAAgB,CAAmC,OAAW,EAAE,MAAe;IAE9F,OAAO,qBAAqB,CAAC,OAAO,EAAE,MAAM,EAAE;QAC7C,YAAY;QACZ,SAAS;QACT,gBAAgB;QAChB,iBAAiB;QACjB,SAAS;QACT,YAAY;QACZ,aAAa;QACb,iBAAiB;QACjB,aAAa;QACb,aAAa;QACb,UAAU;QACV,cAAc;QACd,SAAS;QACT,UAAU;QACV,YAAY;KACH,CAAC,CAAC;AACb,CAAC","sourcesContent":["/**\n * 虛擬腳本填充工具 / Dummy Scripts Filler Utility\n *\n * 提供用於填充 package.json scripts 欄位中生命週期腳本佔位符的功能\n * Provides functionality to fill lifecycle script placeholders in package.json scripts field\n */\n\nimport { ITSArrayListMaybeReadonly } from 'ts-type/lib/type/base';\nimport { _dummyEchoPrefix } from '../../util/scripts/dummy';\n\n/**\n * 核心虛擬腳本填充函數 / Core dummy scripts filler function\n *\n * 為指定的腳本欄位填充 echo 命令作為佔位符\n * Fills echo commands as placeholders for specified script fields\n *\n * @template T - 腳本物件類型 / Script object type\n * @param scripts - 腳本物件 / Script object\n * @param prefix - echo 前綴文字 / Echo prefix text\n * @param fields - 要填充的腳本名稱陣列 / Array of script names to fill\n * @returns 填充後的腳本物件 / Filled script object\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 * Allow starting from an empty object when no scripts is passed, so\n\t * `fillDummyScripts()` can produce a fresh default script set on its own\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 * Fill only missing keys (`??=`), leaving user-defined scripts\n\t * untouched instead of overwriting them with placeholders\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 * Fills placeholder commands for standard lifecycle scripts in package.json\n *\n * 包含以下腳本 / Includes following scripts:\n * - preversion: 版本更新前執行 / Run before version bump\n * - version: 版本更新時執行 / Run on version bump\n * - prepublishOnly: 發布前執行 / Run before publish\n * - postversion: 版本更新後執行 / Run after version bump\n * - publish: 發布時執行 / Run on publish\n * - prepublish: 發布前執行(舊版)/ Run before publish (legacy)\n * - postpublish: 發布後執行 / Run after publish\n * - postpublishOnly: 發布後執行 / Run after publish only\n * - prepare: 準備階段執行 / Run during prepare\n * - prepack: 打包前執行 / Run before pack\n * - pack: 打包時執行 / Run on pack\n * - postpack: 打包後執行 / Run after pack\n * - pretest: 測試前執行 / Run before test\n * - ci:build: CI 建置階段 / CI build stage\n * - ci:install: CI 安裝階段 / CI install stage\n *\n * @template T - 腳本物件類型 / Script object type\n * @param scripts - 腳本物件(可選)/ Script object (optional)\n * @param prefix - echo 前綴文字(可選)/ Echo prefix text (optional)\n * @returns 填充後的腳本物件 / Filled script object\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\t] as const);\n}\n"]}
1
+ {"version":3,"file":"dummy.js","sourceRoot":"","sources":["dummy.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAuBH,sDA2BC;AAoCD,4CAmBC;AAtGD,oDAA4D;AAE5D;;;;;;;;;;;;;;;;;GAiBG;AACH,SAAgB,qBAAqB,CAAmC,OAAU,EAAE,MAAc,EAAE,MAAyC;IAE5I;;;;;OAKG;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;;;;;OAKG;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,SAAgB,gBAAgB,CAAmC,OAAW,EAAE,MAAe;IAE9F,OAAO,qBAAqB,CAAC,OAAO,EAAE,MAAM,EAAE;QAC7C,YAAY;QACZ,SAAS;QACT,gBAAgB;QAChB,iBAAiB;QACjB,SAAS;QACT,gBAAgB;QAChB,iBAAiB;QACjB,iBAAiB;QACjB,aAAa;QACb,aAAa;QACb,UAAU;QACV,cAAc;QACd,SAAS;QACT,UAAU;QACV,YAAY;KACH,CAAC,CAAC;AACb,CAAC","sourcesContent":["/**\n * 虛擬腳本填充工具 / Dummy Scripts Filler Utility\n *\n * 提供用於填充 package.json scripts 欄位中生命週期腳本佔位符的功能\n * Provides functionality to fill lifecycle script placeholders in package.json scripts field\n */\n\nimport { ITSArrayListMaybeReadonly } from 'ts-type/lib/type/base';\nimport { _dummyEchoPrefix } from '../../util/scripts/dummy';\n\n/**\n * 核心虛擬腳本填充函數 / Core dummy scripts filler function\n *\n * 為指定的腳本欄位填充 echo 命令作為佔位符\n * Fills echo commands as placeholders for specified script fields\n *\n * @template T - 腳本物件類型 / Script object type\n * @param scripts - 腳本物件 / Script object\n * @param prefix - echo 前綴文字 / Echo prefix text\n * @param fields - 要填充的腳本名稱陣列 / Array of script names to fill\n * @returns 填充後的腳本物件 / Filled script object\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 * Allow starting from an empty object when no scripts is passed, so\n\t * `fillDummyScripts()` can produce a fresh default script set on its own\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 * Fill only missing keys (`??=`), leaving user-defined scripts\n\t * untouched instead of overwriting them with placeholders\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 * Fills placeholder commands for standard lifecycle scripts in package.json\n *\n * 包含以下腳本 / Includes following scripts:\n * - preversion: 版本更新前執行 / Run before version bump\n * - version: 版本更新時執行 / Run on version bump\n * - prepublishOnly: 發布前執行 / Run before publish\n * - postversion: 版本更新後執行 / Run after version bump\n * - publish: 發布時執行 / Run on publish\n * - prepublish: 發布前執行(舊版)/ Run before publish (legacy)\n * - postpublish: 發布後執行 / Run after publish\n * - postpublishOnly: 發布後執行 / Run after publish only\n * - prepare: 準備階段執行 / Run during prepare\n * - prepack: 打包前執行 / Run before pack\n * - pack: 打包時執行 / Run on pack\n * - postpack: 打包後執行 / Run after pack\n * - pretest: 測試前執行 / Run before test\n * - ci:build: CI 建置階段 / CI build stage\n * - ci:install: CI 安裝階段 / CI install stage\n *\n * @template T - 腳本物件類型 / Script object type\n * @param scripts - 腳本物件(可選)/ Script object (optional)\n * @param prefix - echo 前綴文字(可選)/ Echo prefix text (optional)\n * @returns 填充後的腳本物件 / Filled script object\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\t] as const);\n}\n"]}
@@ -29,7 +29,11 @@ export declare function defaultPkgScripts(): {
29
29
  "test:jest": EnumScriptsEntry;
30
30
  "test:node": EnumScriptsEntry;
31
31
  "test:tsc": EnumScriptsEntry;
32
+ "test:tsc:sub": EnumScriptsEntry;
33
+ "test:tsc:all": string;
32
34
  "test:snapshot": string;
35
+ "test:node:bin": string;
36
+ "test:node:bin:coverage": string;
33
37
  "test:tsd": string;
34
38
  "tsc:showConfig": string;
35
39
  };
@@ -64,6 +68,7 @@ export declare function defaultPkgNotOldExists(): {
64
68
  "test:jest:snapshot": string;
65
69
  "test:jest:coverage": string;
66
70
  "test:tsdx": string;
71
+ "test:node:coverage": string;
67
72
  "build:dts:bundle": EnumScriptsEntry;
68
73
  "build:dts:copy": EnumScriptsEntry;
69
74
  "build:dts:tsc:emit": EnumScriptsEntry;
@@ -78,7 +83,11 @@ export declare function defaultPkgNotOldExists(): {
78
83
  "test:jest": EnumScriptsEntry;
79
84
  "test:node": EnumScriptsEntry;
80
85
  "test:tsc": EnumScriptsEntry;
86
+ "test:tsc:sub": EnumScriptsEntry;
87
+ "test:tsc:all": string;
81
88
  "test:snapshot": string;
89
+ "test:node:bin": string;
90
+ "test:node:bin:coverage": string;
82
91
  "test:tsd": string;
83
92
  "tsc:showConfig": string;
84
93
  };
@@ -31,9 +31,13 @@ function defaultPkgScripts() {
31
31
  "test": "node --run test:node --" /* EnumScriptsEntry.DEFAULT_TEST */,
32
32
  "coverage": "pnpm run test --coverage",
33
33
  "test:jest": "jest --passWithNoTests" /* EnumScriptsEntry.JEST_TEST */,
34
- "test:node": "tsx --test --test-update-snapshots **/*.node-spec.ts **/*.node-test.ts **/*.spec.ts **/*.test.ts" /* EnumScriptsEntry.NODE_TEST */,
35
- "test:tsc": "tsc --noEmit & echo typescript check done" /* EnumScriptsEntry.TSC_TEST */,
34
+ "test:node": "node --run test:node:bin -- **/*.node-spec.ts **/*.node-test.ts **/*.spec.ts **/*.test.ts" /* EnumScriptsEntry.NODE_TEST */,
35
+ "test:tsc": "tsc --noEmit & echo Type checking completed (main)" /* EnumScriptsEntry.TSC_TEST */,
36
+ "test:tsc:sub": "cd test && tsc --noEmit & echo Type checking completed (test)" /* EnumScriptsEntry.TSC_TEST2 */,
37
+ "test:tsc:all": "node --run test:tsc && node --run test:tsc:sub",
36
38
  "test:snapshot": "pnpm run test -u",
39
+ "test:node:bin": "tsx --test --test-update-snapshots --",
40
+ "test:node:bin:coverage": "node --run test:node:bin -- --experimental-test-coverage --",
37
41
  "test:tsd": "ynpx tsd",
38
42
  "tsc:showConfig": "ynpx get-current-tsconfig -p",
39
43
  };
@@ -71,6 +75,7 @@ function defaultPkgNotOldExists() {
71
75
  "test:jest:snapshot": "node --run test:jest -- -u",
72
76
  "test:jest:coverage": "node --run test:jest -- --coverage",
73
77
  "test:tsdx": "ynpx @bluelovers/tsdx test --passWithNoTests",
78
+ "test:node:coverage": "node --run test:node:bin:coverage -- **/*.node-spec.ts **/*.node-test.ts **/*.spec.ts **/*.test.ts",
74
79
  "build:dts:bundle": "ynpx @bluelovers/dts-bundle-generator -o ./dist/index.d.ts ./src/index.ts --no-banner --inline-declare-global & echo build:dts:bundle" /* EnumScriptsEntry.BUILD_DTS_BUNDLE */,
75
80
  "build:dts:copy": "copy .\\src\\index.d.ts .\\dist\\index.d.ts & echo build:dts" /* EnumScriptsEntry.BUILD_DTS_COPY */,
76
81
  "build:dts:tsc:emit": "tsc --emitDeclarationOnly --declaration --noEmit false" /* EnumScriptsEntry.BUILD_DTS_TSC_EMIT */,
@@ -1 +1 @@
1
- {"version":3,"file":"pkg-scripts.js","sourceRoot":"","sources":["pkg-scripts.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAsBH,8CAaC;AA4BD,wDAuBC;AAlFD;;;;;;;;;;;;;;;;;GAiBG;AACH,SAAgB,iBAAiB;IAEhC,OAAO;QACN,MAAM,+DAA+B;QACrC,UAAU,EAAE,0BAA0B;QACtC,WAAW,2DAA4B;QACvC,WAAW,qIAA4B;QACvC,UAAU,6EAA2B;QACrC,eAAe,EAAE,kBAAkB;QAEnC,UAAU,EAAE,UAAU;QACtB,gBAAgB,EAAE,8BAA8B;KAChD,CAAA;AACF,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;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;QAC3D,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,EAAE,gBAAgB;QACrC,aAAa,EAAE,sBAAsB;QACrC,SAAS,EAAE,0BAA0B;KACrC,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 * Common test and build scripts for general package projects\n *\n * @returns 包含標準腳本的物件 / Object containing standard scripts\n *\n * 包含腳本 / Includes scripts:\n * - test: 執行 Jest 測試 / Run Jest tests\n * - coverage: 執行測試並產生覆蓋率報告 / Run tests with coverage\n * - test:jest: Jest 測試命令 / Jest test command\n * - test:snapshot: 更新測試快照 / Update test snapshots\n * - test:jest:snapshot: 更新 Jest 快照 / Update Jest snapshots\n * - test:jest:coverage: Jest 測試含覆蓋率 / Jest test with coverage\n * - test:tsd: 執行 TypeScript 型別檢查 / Run TypeScript type checking\n * - tsc:showConfig: 顯示 TypeScript 設定 / Show TypeScript config\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:snapshot\": \"pnpm run test -u\",\n\n\t\t\"test:tsd\": \"ynpx tsd\",\n\t\t\"tsc:showConfig\": \"ynpx get-current-tsconfig -p\",\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 *\n * 額外包含腳本 / Additional scripts:\n * - test:mocha: Mocha 測試執行 / Mocha test execution\n * - test:tsdx: TSDX 測試 / TSDX testing\n * - build:dts:bundle: 建構型別宣告檔 / Build type declaration files\n * - build:dts:copy: 複製型別宣告檔 / Copy type declaration files\n * - build:dts:tsc:emit: TypeScript 型別輸出 / TypeScript type emit\n * - build:dts:tsc: 完整型別建構 / Complete type build\n * - build:tsdx: TSDX 建構 / TSDX build\n * - build:microbundle: Microbundle 建構 / Microbundle build\n * - lint: ESLint 檢查 / ESLint check\n * - lint:eslint: ESLint 執行 / ESLint execution\n * - review: 完整審查流程 / Complete review process\n * - review:test: 測試審查 / Test review\n * - review:coverage: 覆蓋率審查 / Coverage review\n * - sort-package-json: 排序 package.json / Sort package.json\n * - tsc:default: 預設 TypeScript 編譯 / Default TypeScript compilation\n * - tsc:esm: ESM TypeScript 編譯 / ESM TypeScript compilation\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\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\": \"yarn-tool sort\",\n\t\t\"tsc:default\": \"tsc -p tsconfig.json\",\n\t\t\"tsc:esm\": \"tsc -p tsconfig.esm.json\",\n\t}\n}\n"]}
1
+ {"version":3,"file":"pkg-scripts.js","sourceRoot":"","sources":["pkg-scripts.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAsBH,8CAkBC;AA4BD,wDA0BC;AA1FD;;;;;;;;;;;;;;;;;GAiBG;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;QAEvF,UAAU,EAAE,UAAU;QACtB,gBAAgB,EAAE,8BAA8B;KAChD,CAAA;AACF,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;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,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,EAAE,gBAAgB;QACrC,aAAa,EAAE,sBAAsB;QACrC,SAAS,EAAE,0BAA0B;KACrC,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 * Common test and build scripts for general package projects\n *\n * @returns 包含標準腳本的物件 / Object containing standard scripts\n *\n * 包含腳本 / Includes scripts:\n * - test: 執行 Jest 測試 / Run Jest tests\n * - coverage: 執行測試並產生覆蓋率報告 / Run tests with coverage\n * - test:jest: Jest 測試命令 / Jest test command\n * - test:snapshot: 更新測試快照 / Update test snapshots\n * - test:jest:snapshot: 更新 Jest 快照 / Update Jest snapshots\n * - test:jest:coverage: Jest 測試含覆蓋率 / Jest test with coverage\n * - test:tsd: 執行 TypeScript 型別檢查 / Run TypeScript type checking\n * - tsc:showConfig: 顯示 TypeScript 設定 / Show TypeScript config\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\n\t\t\"test:tsd\": \"ynpx tsd\",\n\t\t\"tsc:showConfig\": \"ynpx get-current-tsconfig -p\",\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 *\n * 額外包含腳本 / Additional scripts:\n * - test:mocha: Mocha 測試執行 / Mocha test execution\n * - test:tsdx: TSDX 測試 / TSDX testing\n * - build:dts:bundle: 建構型別宣告檔 / Build type declaration files\n * - build:dts:copy: 複製型別宣告檔 / Copy type declaration files\n * - build:dts:tsc:emit: TypeScript 型別輸出 / TypeScript type emit\n * - build:dts:tsc: 完整型別建構 / Complete type build\n * - build:tsdx: TSDX 建構 / TSDX build\n * - build:microbundle: Microbundle 建構 / Microbundle build\n * - lint: ESLint 檢查 / ESLint check\n * - lint:eslint: ESLint 執行 / ESLint execution\n * - review: 完整審查流程 / Complete review process\n * - review:test: 測試審查 / Test review\n * - review:coverage: 覆蓋率審查 / Coverage review\n * - sort-package-json: 排序 package.json / Sort package.json\n * - tsc:default: 預設 TypeScript 編譯 / Default TypeScript compilation\n * - tsc:esm: ESM TypeScript 編譯 / ESM TypeScript compilation\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\"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\": \"yarn-tool sort\",\n\t\t\"tsc:default\": \"tsc -p tsconfig.json\",\n\t\t\"tsc:esm\": \"tsc -p tsconfig.esm.json\",\n\t}\n}\n"]}
@@ -61,7 +61,11 @@ export declare function defaultRootScripts(): {
61
61
  "test:jest": import("../../field/scripts").EnumScriptsEntry;
62
62
  "test:node": import("../../field/scripts").EnumScriptsEntry;
63
63
  "test:tsc": import("../../field/scripts").EnumScriptsEntry;
64
+ "test:tsc:sub": import("../../field/scripts").EnumScriptsEntry;
65
+ "test:tsc:all": string;
64
66
  "test:snapshot": string;
67
+ "test:node:bin": string;
68
+ "test:node:bin:coverage": string;
65
69
  "test:tsd": string;
66
70
  "tsc:showConfig": string;
67
71
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yarn-tool/pkg-entry-util",
3
- "version": "3.0.18",
3
+ "version": "3.0.21",
4
4
  "description": "用於處理 package.json entry 相關欄位的工具庫,包含 bin、exports、publishConfig 欄位的修復與驗證功能,並提供各類套件的預設 npm scripts(工作區根目錄、一般套件、根目錄套件)/ Utility for handling package.json entry fields including bin, exports, publishConfig fix/verification, plus preset npm scripts for workspace root, regular packages, and root packages",
5
5
  "keywords": [
6
6
  "yarn",
@@ -49,8 +49,11 @@
49
49
  "test:jest:snapshot": "pnpm run test:jest -- -u",
50
50
  "test:mocha": "ynpx --quiet -p ts-node -p mocha mocha -- --require ts-node/register \"!(node_modules)/**/*.{test,spec}.{ts,tsx}\"",
51
51
  "test:node": "tsx --test --test-update-snapshots **/*.node-spec.ts **/*.node-test.ts **/*.spec.ts **/*.test.ts",
52
+ "test:node:bin": "tsx --test --test-update-snapshots --",
53
+ "test:node:bin:coverage": "node --run test:node:bin -- --experimental-test-coverage --",
52
54
  "test:snapshot": "pnpm run test -u",
53
55
  "test:tsc": "tsc --noEmit & echo typescript check done",
56
+ "test:tsc:sub": "cd test && tsc --noEmit & echo Type checking completed (test)",
54
57
  "test:tsd": "ynpx tsd",
55
58
  "test:tsdx": "ynpx @bluelovers/tsdx test --passWithNoTests",
56
59
  "build:dts": "ynpx @bluelovers/dts-bundle-generator -o ./dist/index.d.ts ./src/index.ts --no-banner & echo build:dts",
@@ -70,8 +73,9 @@
70
73
  },
71
74
  "dependencies": {
72
75
  "@ts-type/package-dts": "^3.0.14",
73
- "@yarn-tool/find-root": "^2.0.27",
74
- "@yarn-tool/require-resolve": "^4.0.12",
76
+ "@yarn-tool/find-root": "^2.0.28",
77
+ "@yarn-tool/require-resolve": "^4.0.13",
78
+ "array-hyper-unique": "^2.1.10",
75
79
  "fs-extra": "^11.4.1",
76
80
  "tslib": ">=2.8.1",
77
81
  "upath2": "^3.1.25"
@@ -79,5 +83,5 @@
79
83
  "publishConfig": {
80
84
  "access": "public"
81
85
  },
82
- "gitHead": "08b3dd65494a279aacbd7d72d5c7415ce0e15da4"
86
+ "gitHead": "d1b7807a08aefdd4072b849ded7f1c3a63418ffa"
83
87
  }