@yarn-tool/pkg-entry-util 3.0.6 → 3.0.9

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,53 @@
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.9](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/pkg-entry-util@3.0.8...@yarn-tool/pkg-entry-util@3.0.9) (2026-03-09)
7
+
8
+
9
+
10
+ ### 🐛 Bug Fixes
11
+
12
+ * 更新 `lerna:publish:yes:force` 指令,优化参数传递逻辑并移除冗余代码 ([45148d8](https://github.com/bluelovers/ws-yarn-workspaces/commit/45148d8a93795aed9f01ad9bcbb192832bf6ef33))
13
+
14
+
15
+
16
+ ## [3.0.8](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/pkg-entry-util@3.0.6...@yarn-tool/pkg-entry-util@3.0.8) (2026-03-09)
17
+
18
+
19
+
20
+ ### ✨ Features
21
+
22
+ * **scripts:** 重構 `ci:install` 腳本並新增 pnpm 支援 ([547029b](https://github.com/bluelovers/ws-yarn-workspaces/commit/547029b2d83d86b2ef8227d06d95a824e10d0eaf))
23
+
24
+
25
+ ### ♻️ Chores
26
+
27
+ * **deps:** 更新 ts-type 和 @ts-type/package-dts 依賴版本 ([eb3e3db](https://github.com/bluelovers/ws-yarn-workspaces/commit/eb3e3dbe330398235ea99e64f3561db73d95b7fc))
28
+ * **deps:** 更新 monorepo 依賴版本 ([e44dff2](https://github.com/bluelovers/ws-yarn-workspaces/commit/e44dff29d5d6b7eb7c77acb8414e73f70feff649))
29
+
30
+
31
+ ### 🔖 Miscellaneous
32
+
33
+ * . ([cae7515](https://github.com/bluelovers/ws-yarn-workspaces/commit/cae7515d4a8befe93ca0baee8f6aeb9ae7cbad79))
34
+
35
+
36
+
37
+ ## [3.0.7](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/pkg-entry-util@3.0.6...@yarn-tool/pkg-entry-util@3.0.7) (2026-03-08)
38
+
39
+
40
+
41
+ ### ✨ Features
42
+
43
+ * **scripts:** 重構 `ci:install` 腳本並新增 pnpm 支援 ([547029b](https://github.com/bluelovers/ws-yarn-workspaces/commit/547029b2d83d86b2ef8227d06d95a824e10d0eaf))
44
+
45
+
46
+ ### ♻️ Chores
47
+
48
+ * **deps:** 更新 ts-type 和 @ts-type/package-dts 依賴版本 ([eb3e3db](https://github.com/bluelovers/ws-yarn-workspaces/commit/eb3e3dbe330398235ea99e64f3561db73d95b7fc))
49
+ * **deps:** 更新 monorepo 依賴版本 ([e44dff2](https://github.com/bluelovers/ws-yarn-workspaces/commit/e44dff29d5d6b7eb7c77acb8414e73f70feff649))
50
+
51
+
52
+
6
53
  ## [3.0.6](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/pkg-entry-util@3.0.5...@yarn-tool/pkg-entry-util@3.0.6) (2026-03-04)
7
54
 
8
55
 
@@ -48,6 +48,8 @@ export declare function defaultRootScripts(): {
48
48
  "npm:publish": string;
49
49
  "npm:publish:bump": string;
50
50
  "ci:install": string;
51
+ "ci:install:yarn": string;
52
+ "ci:install:pnpm": string;
51
53
  "test:jest:clearCache": string;
52
54
  "install:resetLockfile": string;
53
55
  "install:frozenLockfile": string;
@@ -7,6 +7,13 @@
7
7
  * 此模組被 root-scripts 和 ws-root-scripts 共用
8
8
  * This module is shared by root-scripts and ws-root-scripts
9
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
15
+ */
16
+ 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"];
10
17
  /**
11
18
  * 共享根目錄預設腳本 / Shared root default scripts
12
19
  *
@@ -31,6 +38,8 @@ export declare function defaultSharedRootScripts(): {
31
38
  * Installs core development tools
32
39
  */
33
40
  "ci:install": string;
41
+ "ci:install:yarn": string;
42
+ "ci:install:pnpm": string;
34
43
  /** 清除 Jest 快取 / Clear Jest cache */
35
44
  "test:jest:clearCache": string;
36
45
  /** 重置鎖定檔安裝 / Install with reset lockfile */
@@ -9,7 +9,28 @@
9
9
  * This module is shared by root-scripts and ws-root-scripts
10
10
  */
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports._defaultCiInstallDeps = void 0;
12
13
  exports.defaultSharedRootScripts = defaultSharedRootScripts;
14
+ /**
15
+ * CI 環境安裝腳本 / CI environment install script
16
+ *
17
+ * 安裝核心開發工具:yarn-tool、lerna、ynpx、ts-node、ts-jest、jest、typescript、jest-config、tsx、pnpm
18
+ * Installs core development tools
19
+ */
20
+ exports._defaultCiInstallDeps = [
21
+ 'yarn-tool',
22
+ 'lerna',
23
+ 'ynpx',
24
+ 'pnpm',
25
+ 'typescript',
26
+ 'ts-node',
27
+ 'tsx',
28
+ 'ts-jest',
29
+ 'jest',
30
+ '@bluelovers/jest-config',
31
+ '@bluelovers/tsconfig',
32
+ '@yarn-tool/require-resolve',
33
+ ];
13
34
  /**
14
35
  * 共享根目錄預設腳本 / Shared root default scripts
15
36
  *
@@ -34,18 +55,9 @@ function defaultSharedRootScripts() {
34
55
  * 安裝核心開發工具:yarn-tool、lerna、ynpx、ts-node、ts-jest、jest、typescript、jest-config、tsx、pnpm
35
56
  * Installs core development tools
36
57
  */
37
- "ci:install": `yarn install --frozen-lockfile && yarn add -W ${[
38
- "yarn-tool",
39
- "lerna@6",
40
- "ynpx",
41
- "ts-node",
42
- "ts-jest",
43
- "jest",
44
- "typescript@next",
45
- '@bluelovers/jest-config',
46
- 'tsx',
47
- 'pnpm',
48
- ].join(" ")}`,
58
+ "ci:install": `node --run ci:install:pnpm`,
59
+ "ci:install:yarn": `yarn install --frozen-lockfile && yarn add -W ${exports._defaultCiInstallDeps.join(" ")}`,
60
+ "ci:install:pnpm": `pnpm install --frozen-lockfile && pnpm add --workspace ${exports._defaultCiInstallDeps.join(" ")}`,
49
61
  /** 清除 Jest 快取 / Clear Jest cache */
50
62
  "test:jest:clearCache": "jest --clearCache",
51
63
  /** 重置鎖定檔安裝 / Install with reset lockfile */
@@ -53,7 +65,7 @@ function defaultSharedRootScripts() {
53
65
  /** 凍結鎖定檔安裝 / Install with frozen lockfile */
54
66
  "install:frozenLockfile": "yarn-tool install --frozen-lockfile",
55
67
  /** 修復所有工作區問題 / Fix all workspace issues */
56
- "ws:fix-all": "yarn-tool fix-all --overwriteHostedGitInfo",
68
+ "ws:fix-all": "yarn-tool fix-all --overwriteHostedGitInfo",
57
69
  /** 修復並重置靜態檔 / Fix and reset static files */
58
70
  "ws:fix-all:resetStaticFiles": "node --run ws:fix-all -- --resetStaticFiles",
59
71
  };
@@ -1 +1 @@
1
- {"version":3,"file":"shared-root-scripts.js","sourceRoot":"","sources":["shared-root-scripts.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;AAkBH,4DAqCC;AArDD;;;;;;;;;;;;;;;GAeG;AACH,SAAgB,wBAAwB;IAEvC,OAAO;QACN;;;;;WAKG;QACH,YAAY,EAAE,iDAAiD;YAC9D,WAAW;YACX,SAAS;YACT,MAAM;YACN,SAAS;YACT,SAAS;YACT,MAAM;YACN,iBAAiB;YACjB,yBAAyB;YACzB,KAAK;YACL,MAAM;SACN,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;QAEb,oCAAoC;QACpC,sBAAsB,EAAE,mBAAmB;QAE3C,4CAA4C;QAC5C,uBAAuB,EAAE,oCAAoC;QAE7D,6CAA6C;QAC7C,wBAAwB,EAAE,qCAAqC;QAE/D,2CAA2C;QAC3C,YAAY,EAAE,6CAA6C;QAE3D,4CAA4C;QAC5C,6BAA6B,EAAE,6CAA6C;KAC5E,CAAA;AACF,CAAC","sourcesContent":["/**\n * 共享根目錄腳本預設 / Shared Root Scripts Preset\n *\n * 提供根目錄套件共用的預設 npm scripts\n * Provides shared npm scripts for root packages\n *\n * 此模組被 root-scripts 和 ws-root-scripts 共用\n * This module is shared by root-scripts and ws-root-scripts\n */\n\n/**\n * 共享根目錄預設腳本 / Shared root default scripts\n *\n * 適用於所有根目錄類型的通用管理腳本\n * General management scripts for all root package types\n *\n * @returns 包含共享根目錄腳本的物件 / Object containing shared root scripts\n *\n * 包含腳本 / Includes scripts:\n * - ci:install: CI 環境安裝與依賴設定 / CI environment install and dependency setup\n * - test:jest:clearCache: 清除 Jest 快取 / Clear Jest cache\n * - install:resetLockfile: 重置鎖定檔安裝 / Install with reset lockfile\n * - install:frozenLockfile: 凍結鎖定檔安裝 / Install with frozen lockfile\n * - ws:fix-all: 修復所有工作區問題 / Fix all workspace issues\n * - ws:fix-all:resetStaticFiles: 修復並重置靜態檔 / Fix and reset static files\n */\nexport function defaultSharedRootScripts()\n{\n\treturn {\n\t\t/**\n\t\t * CI 環境安裝腳本 / CI environment install script\n\t\t *\n\t\t * 安裝核心開發工具:yarn-tool、lerna、ynpx、ts-node、ts-jest、jest、typescript、jest-config、tsx、pnpm\n\t\t * Installs core development tools\n\t\t */\n\t\t\"ci:install\": `yarn install --frozen-lockfile && yarn add -W ${[\n\t\t\t\"yarn-tool\",\n\t\t\t\"lerna@6\",\n\t\t\t\"ynpx\",\n\t\t\t\"ts-node\",\n\t\t\t\"ts-jest\",\n\t\t\t\"jest\",\n\t\t\t\"typescript@next\",\n\t\t\t'@bluelovers/jest-config',\n\t\t\t'tsx',\n\t\t\t'pnpm',\n\t\t].join(\" \")}`,\n\n\t\t/** 清除 Jest 快取 / Clear Jest cache */\n\t\t\"test:jest:clearCache\": \"jest --clearCache\",\n\n\t\t/** 重置鎖定檔安裝 / Install with reset lockfile */\n\t\t\"install:resetLockfile\": \"yarn-tool install --reset-lockfile\",\n\n\t\t/** 凍結鎖定檔安裝 / Install with frozen lockfile */\n\t\t\"install:frozenLockfile\": \"yarn-tool install --frozen-lockfile\",\n\n\t\t/** 修復所有工作區問題 / Fix all workspace issues */\n\t\t\"ws:fix-all\": \"yarn-tool fix-all --overwriteHostedGitInfo\",\n\n\t\t/** 修復並重置靜態檔 / Fix and reset static files */\n\t\t\"ws:fix-all:resetStaticFiles\": \"node --run ws:fix-all -- --resetStaticFiles\",\n\t}\n}\n"]}
1
+ {"version":3,"file":"shared-root-scripts.js","sourceRoot":"","sources":["shared-root-scripts.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;AA4CH,4DA4BC;AAtED;;;;;GAKG;AACU,QAAA,qBAAqB,GAAG;IACpC,WAAW;IACX,OAAO;IACP,MAAM;IACN,MAAM;IAEN,YAAY;IAEZ,SAAS;IACT,KAAK;IAEL,SAAS;IACT,MAAM;IAEN,yBAAyB;IACzB,sBAAsB;IAEtB,4BAA4B;CACnB,CAAC;AAEX;;;;;;;;;;;;;;;GAeG;AACH,SAAgB,wBAAwB;IAEvC,OAAO;QACN;;;;;WAKG;QACH,YAAY,EAAE,4BAA4B;QAC1C,iBAAiB,EAAE,iDAAiD,6BAAqB,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;QACrG,iBAAiB,EAAE,0DAA0D,6BAAqB,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;QAE9G,oCAAoC;QACpC,sBAAsB,EAAE,mBAAmB;QAE3C,4CAA4C;QAC5C,uBAAuB,EAAE,oCAAoC;QAE7D,6CAA6C;QAC7C,wBAAwB,EAAE,qCAAqC;QAE/D,2CAA2C;QAC3C,YAAY,EAAE,4CAA4C;QAE1D,4CAA4C;QAC5C,6BAA6B,EAAE,6CAA6C;KAC5E,CAAA;AACF,CAAC","sourcesContent":["/**\n * 共享根目錄腳本預設 / Shared Root Scripts Preset\n *\n * 提供根目錄套件共用的預設 npm scripts\n * Provides shared npm scripts for root packages\n *\n * 此模組被 root-scripts 和 ws-root-scripts 共用\n * This module is shared by root-scripts and ws-root-scripts\n */\n\n/**\n * CI 環境安裝腳本 / CI environment install script\n *\n * 安裝核心開發工具:yarn-tool、lerna、ynpx、ts-node、ts-jest、jest、typescript、jest-config、tsx、pnpm\n * Installs core development tools\n */\nexport const _defaultCiInstallDeps = [\n\t'yarn-tool',\n\t'lerna',\n\t'ynpx',\n\t'pnpm',\n\n\t'typescript',\n\n\t'ts-node',\n\t'tsx',\n\n\t'ts-jest',\n\t'jest',\n\n\t'@bluelovers/jest-config',\n\t'@bluelovers/tsconfig',\n\n\t'@yarn-tool/require-resolve',\n] as const;\n\n/**\n * 共享根目錄預設腳本 / Shared root default scripts\n *\n * 適用於所有根目錄類型的通用管理腳本\n * General management scripts for all root package types\n *\n * @returns 包含共享根目錄腳本的物件 / Object containing shared root scripts\n *\n * 包含腳本 / Includes scripts:\n * - ci:install: CI 環境安裝與依賴設定 / CI environment install and dependency setup\n * - test:jest:clearCache: 清除 Jest 快取 / Clear Jest cache\n * - install:resetLockfile: 重置鎖定檔安裝 / Install with reset lockfile\n * - install:frozenLockfile: 凍結鎖定檔安裝 / Install with frozen lockfile\n * - ws:fix-all: 修復所有工作區問題 / Fix all workspace issues\n * - ws:fix-all:resetStaticFiles: 修復並重置靜態檔 / Fix and reset static files\n */\nexport function defaultSharedRootScripts()\n{\n\treturn {\n\t\t/**\n\t\t * CI 環境安裝腳本 / CI environment install script\n\t\t *\n\t\t * 安裝核心開發工具:yarn-tool、lerna、ynpx、ts-node、ts-jest、jest、typescript、jest-config、tsx、pnpm\n\t\t * Installs core development tools\n\t\t */\n\t\t\"ci:install\": `node --run ci:install:pnpm`,\n\t\t\"ci:install:yarn\": `yarn install --frozen-lockfile && yarn add -W ${_defaultCiInstallDeps.join(\" \")}`,\n\t\t\"ci:install:pnpm\": `pnpm install --frozen-lockfile && pnpm add --workspace ${_defaultCiInstallDeps.join(\" \")}`,\n\n\t\t/** 清除 Jest 快取 / Clear Jest cache */\n\t\t\"test:jest:clearCache\": \"jest --clearCache\",\n\n\t\t/** 重置鎖定檔安裝 / Install with reset lockfile */\n\t\t\"install:resetLockfile\": \"yarn-tool install --reset-lockfile\",\n\n\t\t/** 凍結鎖定檔安裝 / Install with frozen lockfile */\n\t\t\"install:frozenLockfile\": \"yarn-tool install --frozen-lockfile\",\n\n\t\t/** 修復所有工作區問題 / Fix all workspace issues */\n\t\t\"ws:fix-all\": \"yarn-tool fix-all --overwriteHostedGitInfo\",\n\n\t\t/** 修復並重置靜態檔 / Fix and reset static files */\n\t\t\"ws:fix-all:resetStaticFiles\": \"node --run ws:fix-all -- --resetStaticFiles\",\n\t}\n}\n"]}
@@ -110,6 +110,8 @@ export declare function defaultWorkspaceRootScripts(): {
110
110
  "test:since": string;
111
111
  test: string;
112
112
  "ci:install": string;
113
+ "ci:install:yarn": string;
114
+ "ci:install:pnpm": string;
113
115
  "test:jest:clearCache": string;
114
116
  "install:resetLockfile": string;
115
117
  "install:frozenLockfile": string;
@@ -113,7 +113,7 @@ function defaultWorkspaceRootScripts() {
113
113
  ].reduce((a, bump, idx) => {
114
114
  if (idx === 0) {
115
115
  a[`lerna:publish:yes`] = `node --run lerna:publish:yes:${bump} --`;
116
- a[`lerna:publish:yes:force`] = `node --run lerna:publish:yes:${bump} -- --force-publish`;
116
+ a[`lerna:publish:yes:force`] = `lerna publish --no-private --yes --bump ${bump} --force-publish`;
117
117
  }
118
118
  a[`lerna:publish:yes:${bump}`] = bumpVersion(bump);
119
119
  return a;
@@ -1 +1 @@
1
- {"version":3,"file":"ws-root-scripts.js","sourceRoot":"","sources":["ws-root-scripts.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAqBH,wCAaC;AA2CD,kEAwFC;AAnKD,+DAAiE;AAGjE;;;;;;;;;;;;;;;GAeG;AACH,SAAgB,cAAc,CAAmB,MAAS;IAEzD,MAAM,GAAG,GAAG,GAAG,MAAM,MAAe,CAAC;IACrC,MAAM,KAAK,GAAG,GAAG,MAAM,QAAiB,CAAC;IAEzC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gC,IAAI,qBAAqB,CAAC;YAC1F,CAAC;YACD,CAAC,CAAC,qBAAqB,IAAI,EAAE,CAAC,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;YACnD,OAAO,CAAC,CAAA;QACT,CAAC,EAAE,EAA4B,CAAC;QAEhC,8CAA8C;QAC9C,qBAAqB,EAAE,wEAAwE;QAE/F,4BAA4B;QAC5B,yBAAyB,EAAE,4BAA4B;QAEvD,4BAA4B;QAC5B,0BAA0B,EAAE,uCAAuC;QAEnE,oCAAoC;QACpC,sBAAsB,EAAE,sCAAsC;QAE9D,iCAAiC;QACjC,uBAAuB,EAAE,4CAA4C;QAErE,gCAAgC;QAChC,KAAK,EAAE,mBAAmB;QAC1B,UAAU,EAAE,kBAAkB;QAC9B,QAAQ,EAAE,uBAAuB;QAEjC,6CAA6C;QAC7C,mBAAmB,EAAE,sEAAsE;QAC3F,wBAAwB,EAAE,gBAAgB;QAC1C,sBAAsB,EAAE,mBAAmB;QAE3C,qCAAqC;QACrC,iBAAiB,EAAE,qEAAqE;QAExF,wCAAwC;QACxC,mCAAmC,EAAE,6LAA6L;QAElO,kDAAkD;QAClD,gBAAgB,EAAE,8BAA8B;KAChD,CAAA;AACF,CAAC","sourcesContent":["/**\n * 工作區根目錄腳本預設 / Workspace Root Scripts Preset\n *\n * 提供 Yarn/Lerna 工作區根目錄的預設 npm scripts\n * Provides default npm scripts for Yarn/Lerna workspace root\n */\n\nimport { defaultSharedRootScripts } from './shared-root-scripts';\nimport { EnumScriptsEntry } from '../../field/scripts';\n\n/**\n * 產生「全部執行」與「僅變更執行」腳本對 / Generate \"all\" and \"since\" script pairs\n *\n * 為指定腳本名稱產生對應的 `:all`(全部工作區)與 `:since`(僅變更)版本\n * Generates corresponding `:all` (all workspaces) and `:since` (changed only) versions\n *\n * @template T - 基礎腳本名稱 / Base script name\n * @param script - 基礎腳本名稱 / Base script name\n * @returns 包含 all 與 since 變體的腳本物件 / Object containing all and since variants\n *\n * @example\n * ```typescript\n * _runAllOrSince('test')\n * // 返回: { 'test:all': 'yarn-tool ws run test --concurrency 1', 'test:since': 'node --run test:all -- --since' }\n * ```\n */\nexport function _runAllOrSince<T extends string>(script: T)\n{\n\tconst all = `${script}:all` as const;\n\tconst since = `${script}:since` as const;\n\n\treturn {\n\t\t[all]: `yarn-tool ws run ${script} --concurrency 1`,\n\t\t[since]: `node --run ${script}:all -- --since`,\n\t} as ({\n\t\t[x in `${T}:all`]: string;\n\t} & {\n\t\t[y in `${T}:since`]: string;\n\t})\n}\n\n/**\n * 工作區根目錄預設腳本 / Default scripts for workspace root\n *\n * 適用於 monorepo 工作區根目錄的完整管理腳本集合\n * Complete management script set for monorepo workspace root\n *\n * @returns 包含工作區管理腳本的物件 / Object containing workspace management scripts\n *\n * 核心功能 / Core features:\n * - 跨工作區腳本執行(全部或僅變更)/ Cross-workspace script execution (all or changed only)\n * - Lerna 發布流程 / Lerna publishing workflow\n * - 發布前檢查與準備 / Pre-publish checks and preparation\n * - 相依工作區連結修復 / Dependency workspace links fixing\n * - 統一依賴更新 / Unified dependency updates\n * - 發布後變更日誌更新 / Post-publish changelog updates\n *\n * 包含腳本 / Includes scripts:\n * - test: 執行變更工作區測試 / Run changed workspaces tests\n * - test:all|test:since: 全部/變更測試 / All/changed tests\n * - test:tsd:all|test:tsd:since: 型別檢查 / Type checking\n * - test:snapshot:all|test:snapshot:since: 快照更新 / Snapshot updates\n * - build:all|build:since: 建構 / Build\n * - review:all|review:since: 審查 / Review\n * - coverage:all|coverage:since: 覆蓋率 / Coverage\n * - lint:all|lint:since: 檢查 / Lint\n * - preversion: 版本更新前測試 / Pre-version test\n * - postversion: 版本更新後修復 / Post-version fix\n * - lerna:publish: Lerna 發布 / Lerna publish\n * - lerna:publish:yes|lerna:publish:yes:force: 確認發布 / Confirmed publish\n * - lerna:publish:yes:patch|minor|major: 特定版本發布 / Specific version publish\n * - prepublishOnly:root: 發布前檢查與修復 / Pre-publish checks and fixes\n * - prepublishOnly:lockfile: 鎖定檔同步 / Lockfile sync\n * - prepublishOnly:check-bin: 二進位檔檢查 / Binary check\n * - prepare:fix-ws-links: 工作區連結修復 / Workspace links fix\n * - prepublishOnly:update: 發布前更新 / Pre-publish update\n * - ncu:root|ncu:ws: 根目錄/工作區依賴更新 / Root/workspace dependency updates\n * - sort-package-json:root|sort-package-json:ws: package.json 排序 / package.json sorting\n * - postpublishOnly: 發布後執行 / Post-publish execution\n * - postpublishOnly:ws-root-changelog: 根目錄變更日誌更新 / Root changelog update\n * - tsc:showConfig: TypeScript 設定顯示 / TypeScript config display\n */\nexport function defaultWorkspaceRootScripts()\n{\n\t/**\n\t * 產生 Lerna 版本遞增與發布命令 / Generate Lerna version bump and publish command\n\t *\n\t * @param bump - 版本遞增類型(patch|minor|major)/ Version bump type\n\t * @returns 組合命令字串 / Combined command string\n\t */\n\tconst bumpVersion = (bump?: 'major' | 'minor' | 'patch') => {\n\t\treturn [\n\t\t\t`node --run prepublishOnly:root`,\n\t\t\t`lerna publish --no-private` + (bump ? ` --yes --bump ${bump}` : ''),\n\t\t\t`yarn run postpublishOnly`,\n\t\t].join(' && ')\n\t}\n\n\treturn {\n\t\t...defaultSharedRootScripts(),\n\n\t\t\"test\": \"node --run test:since\",\n\n\t\t// 動態產生 all/since 腳本對 / Dynamically generate all/since script pairs\n\t\t..._runAllOrSince('test'),\n\t\t..._runAllOrSince('test:tsd'),\n\t\t..._runAllOrSince('test:snapshot'),\n\t\t..._runAllOrSince('build'),\n\t\t..._runAllOrSince('review'),\n\t\t..._runAllOrSince('coverage'),\n\t\t..._runAllOrSince('lint'),\n\n\t\t/** 版本更新前測試 / Test before version bump */\n\t\t\"preversion\": EnumScriptsEntry.preversion,\n\n\t\t/** 版本更新後修復 / Fix after version bump */\n\t\t\"postversion\": \"yarn-tool fix-all\",\n\n\t\t/** Lerna 發布 / Lerna publish */\n\t\t\"lerna:publish\": bumpVersion(),\n\n\t\t// 動態產生各類版本發布腳本 / Dynamically generate version publish scripts\n\t\t...([\n\t\t\t'patch',\n\t\t\t'minor',\n\t\t\t'major',\n\t\t] as const).reduce((a, bump, idx) => {\n\t\t\tif (idx === 0)\n\t\t\t{\n\t\t\t\ta[`lerna:publish:yes`] = `node --run lerna:publish:yes:${bump} --`;\n\t\t\t\ta[`lerna:publish:yes:force`] = `node --run lerna:publish:yes:${bump} -- --force-publish`;\n\t\t\t}\n\t\t\ta[`lerna:publish:yes:${bump}`] = bumpVersion(bump);\n\t\t\treturn a\n\t\t}, {} as Record<string, string>),\n\n\t\t/** 發布前檢查與修復 / Pre-publish checks and fixes */\n\t\t\"prepublishOnly:root\": \"node --run prepublishOnly:check-bin && node --run prepare:fix-ws-links\",\n\n\t\t/** 鎖定檔同步 / Lockfile sync */\n\t\t\"prepublishOnly:lockfile\": \"ynpx --quiet sync-lockfile\",\n\n\t\t/** 二進位檔檢查 / Binary check */\n\t\t\"prepublishOnly:check-bin\": \"ynpx --quiet @yarn-tool/check-pkg-bin\",\n\n\t\t/** 工作區連結修復 / Workspace links fix */\n\t\t\"prepare:fix-ws-links\": \"ynpx --quiet @yarn-tool/fix-ws-links\",\n\n\t\t/** 發布前更新 / Pre-publish update */\n\t\t\"prepublishOnly:update\": \"yarn run ncu && yarn run sort-package-json\",\n\n\t\t/** 依賴更新 / Dependency updates */\n\t\t\"ncu\": \"node --run ncu:ws\",\n\t\t\"ncu:root\": \"yarn-tool ncu -u\",\n\t\t\"ncu:ws\": \"yarn-tool ncu -u --AA\",\n\n\t\t/** package.json 排序 / package.json sorting */\n\t\t\"sort-package-json\": \"node --run sort-package-json:root && node --run sort-package-json:ws\",\n\t\t\"sort-package-json:root\": \"yarn-tool sort\",\n\t\t\"sort-package-json:ws\": \"yarn-tool ws sort\",\n\n\t\t/** 發布後執行 / Post-publish execution */\n\t\t\"postpublishOnly\": \"node --run postpublishOnly:ws-root-changelog & echo postpublishOnly\",\n\n\t\t/** 根目錄變更日誌更新 / Root changelog update */\n\t\t\"postpublishOnly:ws-root-changelog\": \"ynpx ws-root-changelog & git add ./CHANGELOG.md & git commit ./CHANGELOG.md -m \\\"chore(changelog): update changelog toc in workspaces root\\\" & echo update changelog toc in workspaces root\",\n\n\t\t/** TypeScript 設定顯示 / TypeScript config display */\n\t\t\"tsc:showConfig\": \"ynpx get-current-tsconfig -p\",\n\t}\n}\n"]}
1
+ {"version":3,"file":"ws-root-scripts.js","sourceRoot":"","sources":["ws-root-scripts.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAqBH,wCAaC;AA2CD,kEAwFC;AAnKD,+DAAiE;AAGjE;;;;;;;;;;;;;;;GAeG;AACH,SAAgB,cAAc,CAAmB,MAAS;IAEzD,MAAM,GAAG,GAAG,GAAG,MAAM,MAAe,CAAC;IACrC,MAAM,KAAK,GAAG,GAAG,MAAM,QAAiB,CAAC;IAEzC,OAAO;QACN,CAAC,GAAG,CAAC,EAAE,oBAAoB,MAAM,kBAAkB;QACnD,CAAC,KAAK,CAAC,EAAE,cAAc,MAAM,iBAAiB;KAK7C,CAAA;AACH,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,SAAgB,2BAA2B;IAE1C;;;;;OAKG;IACH,MAAM,WAAW,GAAG,CAAC,IAAkC,EAAE,EAAE;QAC1D,OAAO;YACN,gCAAgC;YAChC,4BAA4B,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,iBAAiB,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACpE,0BAA0B;SAC1B,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IACf,CAAC,CAAA;IAED,OAAO;QACN,GAAG,IAAA,8CAAwB,GAAE;QAE7B,MAAM,EAAE,uBAAuB;QAE/B,mEAAmE;QACnE,GAAG,cAAc,CAAC,MAAM,CAAC;QACzB,GAAG,cAAc,CAAC,UAAU,CAAC;QAC7B,GAAG,cAAc,CAAC,eAAe,CAAC;QAClC,GAAG,cAAc,CAAC,OAAO,CAAC;QAC1B,GAAG,cAAc,CAA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,CAAA;AACF,CAAC","sourcesContent":["/**\n * 工作區根目錄腳本預設 / Workspace Root Scripts Preset\n *\n * 提供 Yarn/Lerna 工作區根目錄的預設 npm scripts\n * Provides default npm scripts for Yarn/Lerna workspace root\n */\n\nimport { defaultSharedRootScripts } from './shared-root-scripts';\nimport { EnumScriptsEntry } from '../../field/scripts';\n\n/**\n * 產生「全部執行」與「僅變更執行」腳本對 / Generate \"all\" and \"since\" script pairs\n *\n * 為指定腳本名稱產生對應的 `:all`(全部工作區)與 `:since`(僅變更)版本\n * Generates corresponding `:all` (all workspaces) and `:since` (changed only) versions\n *\n * @template T - 基礎腳本名稱 / Base script name\n * @param script - 基礎腳本名稱 / Base script name\n * @returns 包含 all 與 since 變體的腳本物件 / Object containing all and since variants\n *\n * @example\n * ```typescript\n * _runAllOrSince('test')\n * // 返回: { 'test:all': 'yarn-tool ws run test --concurrency 1', 'test:since': 'node --run test:all -- --since' }\n * ```\n */\nexport function _runAllOrSince<T extends string>(script: T)\n{\n\tconst all = `${script}:all` as const;\n\tconst since = `${script}:since` as const;\n\n\treturn {\n\t\t[all]: `yarn-tool ws run ${script} --concurrency 1`,\n\t\t[since]: `node --run ${script}:all -- --since`,\n\t} as ({\n\t\t[x in `${T}:all`]: string;\n\t} & {\n\t\t[y in `${T}:since`]: string;\n\t})\n}\n\n/**\n * 工作區根目錄預設腳本 / Default scripts for workspace root\n *\n * 適用於 monorepo 工作區根目錄的完整管理腳本集合\n * Complete management script set for monorepo workspace root\n *\n * @returns 包含工作區管理腳本的物件 / Object containing workspace management scripts\n *\n * 核心功能 / Core features:\n * - 跨工作區腳本執行(全部或僅變更)/ Cross-workspace script execution (all or changed only)\n * - Lerna 發布流程 / Lerna publishing workflow\n * - 發布前檢查與準備 / Pre-publish checks and preparation\n * - 相依工作區連結修復 / Dependency workspace links fixing\n * - 統一依賴更新 / Unified dependency updates\n * - 發布後變更日誌更新 / Post-publish changelog updates\n *\n * 包含腳本 / Includes scripts:\n * - test: 執行變更工作區測試 / Run changed workspaces tests\n * - test:all|test:since: 全部/變更測試 / All/changed tests\n * - test:tsd:all|test:tsd:since: 型別檢查 / Type checking\n * - test:snapshot:all|test:snapshot:since: 快照更新 / Snapshot updates\n * - build:all|build:since: 建構 / Build\n * - review:all|review:since: 審查 / Review\n * - coverage:all|coverage:since: 覆蓋率 / Coverage\n * - lint:all|lint:since: 檢查 / Lint\n * - preversion: 版本更新前測試 / Pre-version test\n * - postversion: 版本更新後修復 / Post-version fix\n * - lerna:publish: Lerna 發布 / Lerna publish\n * - lerna:publish:yes|lerna:publish:yes:force: 確認發布 / Confirmed publish\n * - lerna:publish:yes:patch|minor|major: 特定版本發布 / Specific version publish\n * - prepublishOnly:root: 發布前檢查與修復 / Pre-publish checks and fixes\n * - prepublishOnly:lockfile: 鎖定檔同步 / Lockfile sync\n * - prepublishOnly:check-bin: 二進位檔檢查 / Binary check\n * - prepare:fix-ws-links: 工作區連結修復 / Workspace links fix\n * - prepublishOnly:update: 發布前更新 / Pre-publish update\n * - ncu:root|ncu:ws: 根目錄/工作區依賴更新 / Root/workspace dependency updates\n * - sort-package-json:root|sort-package-json:ws: package.json 排序 / package.json sorting\n * - postpublishOnly: 發布後執行 / Post-publish execution\n * - postpublishOnly:ws-root-changelog: 根目錄變更日誌更新 / Root changelog update\n * - tsc:showConfig: TypeScript 設定顯示 / TypeScript config display\n */\nexport function defaultWorkspaceRootScripts()\n{\n\t/**\n\t * 產生 Lerna 版本遞增與發布命令 / Generate Lerna version bump and publish command\n\t *\n\t * @param bump - 版本遞增類型(patch|minor|major)/ Version bump type\n\t * @returns 組合命令字串 / Combined command string\n\t */\n\tconst bumpVersion = (bump?: 'major' | 'minor' | 'patch') => {\n\t\treturn [\n\t\t\t`node --run prepublishOnly:root`,\n\t\t\t`lerna publish --no-private` + (bump ? ` --yes --bump ${bump}` : ''),\n\t\t\t`yarn run postpublishOnly`,\n\t\t].join(' && ')\n\t}\n\n\treturn {\n\t\t...defaultSharedRootScripts(),\n\n\t\t\"test\": \"node --run test:since\",\n\n\t\t// 動態產生 all/since 腳本對 / Dynamically generate all/since script pairs\n\t\t..._runAllOrSince('test'),\n\t\t..._runAllOrSince('test:tsd'),\n\t\t..._runAllOrSince('test:snapshot'),\n\t\t..._runAllOrSince('build'),\n\t\t..._runAllOrSince('review'),\n\t\t..._runAllOrSince('coverage'),\n\t\t..._runAllOrSince('lint'),\n\n\t\t/** 版本更新前測試 / Test before version bump */\n\t\t\"preversion\": EnumScriptsEntry.preversion,\n\n\t\t/** 版本更新後修復 / Fix after version bump */\n\t\t\"postversion\": \"yarn-tool fix-all\",\n\n\t\t/** Lerna 發布 / Lerna publish */\n\t\t\"lerna:publish\": bumpVersion(),\n\n\t\t// 動態產生各類版本發布腳本 / Dynamically generate version publish scripts\n\t\t...([\n\t\t\t'patch',\n\t\t\t'minor',\n\t\t\t'major',\n\t\t] as const).reduce((a, bump, idx) => {\n\t\t\tif (idx === 0)\n\t\t\t{\n\t\t\t\ta[`lerna:publish:yes`] = `node --run lerna:publish:yes:${bump} --`;\n\t\t\t\ta[`lerna:publish:yes:force`] = `lerna publish --no-private --yes --bump ${bump} --force-publish`;\n\t\t\t}\n\t\t\ta[`lerna:publish:yes:${bump}`] = bumpVersion(bump);\n\t\t\treturn a\n\t\t}, {} as Record<string, string>),\n\n\t\t/** 發布前檢查與修復 / Pre-publish checks and fixes */\n\t\t\"prepublishOnly:root\": \"node --run prepublishOnly:check-bin && node --run prepare:fix-ws-links\",\n\n\t\t/** 鎖定檔同步 / Lockfile sync */\n\t\t\"prepublishOnly:lockfile\": \"ynpx --quiet sync-lockfile\",\n\n\t\t/** 二進位檔檢查 / Binary check */\n\t\t\"prepublishOnly:check-bin\": \"ynpx --quiet @yarn-tool/check-pkg-bin\",\n\n\t\t/** 工作區連結修復 / Workspace links fix */\n\t\t\"prepare:fix-ws-links\": \"ynpx --quiet @yarn-tool/fix-ws-links\",\n\n\t\t/** 發布前更新 / Pre-publish update */\n\t\t\"prepublishOnly:update\": \"yarn run ncu && yarn run sort-package-json\",\n\n\t\t/** 依賴更新 / Dependency updates */\n\t\t\"ncu\": \"node --run ncu:ws\",\n\t\t\"ncu:root\": \"yarn-tool ncu -u\",\n\t\t\"ncu:ws\": \"yarn-tool ncu -u --AA\",\n\n\t\t/** package.json 排序 / package.json sorting */\n\t\t\"sort-package-json\": \"node --run sort-package-json:root && node --run sort-package-json:ws\",\n\t\t\"sort-package-json:root\": \"yarn-tool sort\",\n\t\t\"sort-package-json:ws\": \"yarn-tool ws sort\",\n\n\t\t/** 發布後執行 / Post-publish execution */\n\t\t\"postpublishOnly\": \"node --run postpublishOnly:ws-root-changelog & echo postpublishOnly\",\n\n\t\t/** 根目錄變更日誌更新 / Root changelog update */\n\t\t\"postpublishOnly:ws-root-changelog\": \"ynpx ws-root-changelog & git add ./CHANGELOG.md & git commit ./CHANGELOG.md -m \\\"chore(changelog): update changelog toc in workspaces root\\\" & echo update changelog toc in workspaces root\",\n\n\t\t/** TypeScript 設定顯示 / TypeScript config display */\n\t\t\"tsc:showConfig\": \"ynpx get-current-tsconfig -p\",\n\t}\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yarn-tool/pkg-entry-util",
3
- "version": "3.0.6",
3
+ "version": "3.0.9",
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",
@@ -67,15 +67,15 @@
67
67
  "tsc:showConfig": "ynpx get-current-tsconfig -p"
68
68
  },
69
69
  "dependencies": {
70
- "@ts-type/package-dts": "^2.0.8",
71
- "@yarn-tool/find-root": "^2.0.17",
72
- "@yarn-tool/resolve-package": "^3.0.3",
73
- "fs-extra": "^11.3.3",
70
+ "@ts-type/package-dts": "^3.0.6",
71
+ "@yarn-tool/find-root": "^2.0.20",
72
+ "@yarn-tool/resolve-package": "^3.0.5",
73
+ "fs-extra": "^11.3.4",
74
74
  "tslib": ">=2",
75
75
  "upath2": "^3.1.23"
76
76
  },
77
77
  "publishConfig": {
78
78
  "access": "public"
79
79
  },
80
- "gitHead": "c4f430d52167892d911abbb9af9ef6d80e2355da"
80
+ "gitHead": "1baa583ecae8fa5869962494f8df3761bf527cdf"
81
81
  }