@yarn-tool/pkg-entry-util 3.0.33 → 3.0.34

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,20 @@
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.34](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/pkg-entry-util@3.0.33...@yarn-tool/pkg-entry-util@3.0.34) (2026-11-20)
7
+
8
+
9
+
10
+ ### 📦 Code Refactoring
11
+
12
+ * **@yarn-tool/pkg-entry-util:** 註解掉預設的 dummy scripts 列表 ([05ba8aa](https://github.com/bluelovers/ws-yarn-workspaces/commit/05ba8aad2dc4d258e28ab765941bf77cff3039d3))
13
+
14
+
15
+ ### 🛠 Build System
16
+
17
+ * update build ([c1caad5](https://github.com/bluelovers/ws-yarn-workspaces/commit/c1caad5305f852eb0f8b544da6f88e862d89c72a))
18
+
19
+
6
20
  ## [3.0.33](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/pkg-entry-util@3.0.32...@yarn-tool/pkg-entry-util@3.0.33) (2026-11-17)
7
21
 
8
22
 
@@ -87,19 +87,19 @@ function _fillDummyScriptsCore(scripts, prefix, fields) {
87
87
  */
88
88
  function fillDummyScripts(scripts, prefix) {
89
89
  return _fillDummyScriptsCore(scripts, prefix, [
90
- 'preversion',
91
- 'version',
92
- 'prepublishOnly',
90
+ // 'preversion',
91
+ // 'version',
92
+ // 'prepublishOnly',
93
93
  // 'postversion',
94
- 'publish',
94
+ // 'publish',
95
95
  // 'prepublish',
96
96
  // 'postpublish',
97
- 'postpublishOnly',
97
+ // 'postpublishOnly',
98
98
  // 'prepare',
99
99
  // 'prepack',
100
100
  // 'pack',
101
101
  // 'postpack',
102
- 'pretest',
102
+ // 'pretest',
103
103
  'ci:build',
104
104
  'ci:install',
105
105
  ]);
@@ -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,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"]}
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,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;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"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yarn-tool/pkg-entry-util",
3
- "version": "3.0.33",
3
+ "version": "3.0.34",
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",
@@ -84,5 +84,5 @@
84
84
  "publishConfig": {
85
85
  "access": "public"
86
86
  },
87
- "gitHead": "e884ae0b8eb03078ff3fddeceb639d830b354d6e"
87
+ "gitHead": "41f1871da90bdfa9582271c56fe024a94108eda3"
88
88
  }