@yarn-tool/pkg-entry-util 3.0.10 → 3.0.12
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,24 @@
|
|
|
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.12](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/pkg-entry-util@3.0.11...@yarn-tool/pkg-entry-util@3.0.12) (2026-04-26)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### ♻️ Chores
|
|
11
|
+
|
|
12
|
+
* 大範圍更新依賴版本並優化腳本執行與路徑解析 ([221eb35](https://github.com/bluelovers/ws-yarn-workspaces/commit/221eb352b31a00d5ffea5e2c8323b50863508f2c))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
## [3.0.11](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/pkg-entry-util@3.0.10...@yarn-tool/pkg-entry-util@3.0.11) (2026-03-12)
|
|
17
|
+
|
|
18
|
+
**Note:** Version bump only for package @yarn-tool/pkg-entry-util
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
6
24
|
## [3.0.10](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/pkg-entry-util@3.0.9...@yarn-tool/pkg-entry-util@3.0.10) (2026-03-09)
|
|
7
25
|
|
|
8
26
|
**Note:** Version bump only for package @yarn-tool/pkg-entry-util
|
|
@@ -127,7 +127,7 @@ function defaultWorkspaceRootScripts() {
|
|
|
127
127
|
/** 工作區連結修復 / Workspace links fix */
|
|
128
128
|
"prepare:fix-ws-links": "ynpx --quiet @yarn-tool/fix-ws-links",
|
|
129
129
|
/** 發布前更新 / Pre-publish update */
|
|
130
|
-
"prepublishOnly:update": "yarn run ncu &&
|
|
130
|
+
"prepublishOnly:update": "yarn run ncu && node --run sort-package-json",
|
|
131
131
|
/** 依賴更新 / Dependency updates */
|
|
132
132
|
"ncu": "node --run ncu:ws",
|
|
133
133
|
"ncu:root": "yarn-tool ncu -u",
|
|
@@ -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,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,C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AC;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,8CAA8C;QAEvE,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`] = `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 && node --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.
|
|
3
|
+
"version": "3.0.12",
|
|
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,9 +67,9 @@
|
|
|
67
67
|
"tsc:showConfig": "ynpx get-current-tsconfig -p"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"@ts-type/package-dts": "^3.0.
|
|
71
|
-
"@yarn-tool/find-root": "^2.0.
|
|
72
|
-
"@yarn-tool/resolve-package": "^3.0.
|
|
70
|
+
"@ts-type/package-dts": "^3.0.9",
|
|
71
|
+
"@yarn-tool/find-root": "^2.0.23",
|
|
72
|
+
"@yarn-tool/resolve-package": "^3.0.8",
|
|
73
73
|
"fs-extra": "^11.3.4",
|
|
74
74
|
"tslib": ">=2",
|
|
75
75
|
"upath2": "^3.1.23"
|
|
@@ -77,5 +77,5 @@
|
|
|
77
77
|
"publishConfig": {
|
|
78
78
|
"access": "public"
|
|
79
79
|
},
|
|
80
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "2cbfd8a3dfa6944bba8e6c55742790fed32dd680"
|
|
81
81
|
}
|