@yarn-tool/table 2.0.21 → 2.0.23

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,59 @@
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
+ ## [2.0.23](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/table@2.0.22...@yarn-tool/table@2.0.23) (2026-10-12)
7
+
8
+
9
+
10
+ ### 📚 Documentation
11
+
12
+ * add jsdoc ([9cb9b13](https://github.com/bluelovers/ws-yarn-workspaces/commit/9cb9b13eda8c357221ad1b754458aa9916eada22))
13
+
14
+
15
+ ### 🚨 Tests
16
+
17
+ * **snap:** update snapshots ([c9945a5](https://github.com/bluelovers/ws-yarn-workspaces/commit/c9945a5b9cd723d38ded2a69b83e2e83ecc3b524))
18
+ * **test:** 將測試框架從 jest 遷移至 node:test ([3af9774](https://github.com/bluelovers/ws-yarn-workspaces/commit/3af9774964abc48083ec60b2021c1cec08874803))
19
+
20
+
21
+ ### 🛠 Build System
22
+
23
+ * update build ([3186340](https://github.com/bluelovers/ws-yarn-workspaces/commit/3186340758172427cb1e9b8955f6fd677abac625))
24
+ * **deps:** 更新測試腳本與依賴以支援 node:test ([f9c71c7](https://github.com/bluelovers/ws-yarn-workspaces/commit/f9c71c795c792c5c7ed9d613ce7e9c3c726c39d5))
25
+
26
+
27
+ ### ♻️ Chores
28
+
29
+ * **deps:** 更新各套件依賴版本 ([569f075](https://github.com/bluelovers/ws-yarn-workspaces/commit/569f0756189cdadf69955d8e388ac0a6a8988056))
30
+ * **workspace:** 更新測試指令路徑與新增工作區搜尋選項 ([a80039d](https://github.com/bluelovers/ws-yarn-workspaces/commit/a80039dd8c691e047466966ffc8f8a4e2e31c03f))
31
+
32
+
33
+ ### 🔖 Miscellaneous
34
+
35
+ * . ([e5788f8](https://github.com/bluelovers/ws-yarn-workspaces/commit/e5788f84551b870490a96d0a5d67d8d542481373))
36
+
37
+
38
+
39
+ ## [2.0.22](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/table@2.0.21...@yarn-tool/table@2.0.22) (2026-09-06)
40
+
41
+
42
+
43
+ ### 🛠 Build System
44
+
45
+ * update Static Files ([b2f5d72](https://github.com/bluelovers/ws-yarn-workspaces/commit/b2f5d7216773c53eb35f267ba34f8788543d46a1))
46
+
47
+
48
+ ### ♻️ Chores
49
+
50
+ * **workspace:** 將所有套件的指令從 yarn 改為 pnpm 並更新依賴版本 ([0505892](https://github.com/bluelovers/ws-yarn-workspaces/commit/0505892e5e7c356f8cf59495fefda1aa681499c6))
51
+
52
+
53
+ ### 🔖 Miscellaneous
54
+
55
+ * . ([b545589](https://github.com/bluelovers/ws-yarn-workspaces/commit/b54558925d67304019e2b4f9bb3c4671c429a96e))
56
+
57
+
58
+
6
59
  ## [2.0.21](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/table@2.0.20...@yarn-tool/table@2.0.21) (2026-04-26)
7
60
 
8
61
 
package/README.md CHANGED
@@ -1,8 +1,17 @@
1
- # README.md
1
+ # @yarn-tool/table
2
2
 
3
- shared cli table utils for yarn-tool
3
+ shared cli table utils for yarn-tool
4
4
 
5
- ## install
5
+ 為 yarn-tool 系列指令列 (CLI) 工具共用的表格工具,基於 [cli-table3](https://github.com/cli-table/cli-table3) 提供建立依賴表格、版本差異著色與無邊框樣式等常用功能。
6
+
7
+ ## 功能特色 / Features
8
+
9
+ - **依賴表格 (Dependency Table)**:一行程式碼建立預設無邊框、右對齊版本欄的表格
10
+ - **版本差異著色 (Version Diff Colorize)**:搭配 `@yarn-tool/semver-diff` 將版本升級/降級以顏色標示
11
+ - **無邊框樣式 (Borderless Style)**:可對既有表格套用無邊框樣式
12
+ - **型別再匯出 (Type Re-export)**:直接取得 `ITable`、`ICell`、`IDependency` 等常用型別,不必另行引用 `cli-table3`
13
+
14
+ ## 安裝 / Install
6
15
 
7
16
  ```bash
8
17
  yarn add @yarn-tool/table
@@ -10,3 +19,85 @@ yarn-tool add @yarn-tool/table
10
19
  yt add @yarn-tool/table
11
20
  ```
12
21
 
22
+ ## 使用方法 / Usage
23
+
24
+ ```typescript
25
+ import { createDependencyTable, toDependencyTable, applyStyleBorderless } from '@yarn-tool/table';
26
+
27
+ // 建立空白表格並自行填入內容 / Create an empty table and fill it in yourself
28
+ const table = createDependencyTable();
29
+ table.options.head = ['package name', 'old version(s)', '', 'new version(s)'];
30
+ table.push(['lodash', '^4.17.20', '→', '^4.17.21']);
31
+
32
+ console.log(table.toString());
33
+
34
+ // 直接把兩份依賴清單轉成版本差異表格 / Turn two dependency maps into a diff table
35
+ const diffTable = toDependencyTable({
36
+ from: { lodash: '^4.17.20' },
37
+ to: { lodash: '^4.17.21' },
38
+ });
39
+
40
+ console.log(diffTable.toString());
41
+
42
+ // 對既有表格套用無邊框樣式 / Apply the borderless style to an existing table
43
+ applyStyleBorderless(table);
44
+ ```
45
+
46
+ 也可以直接以 `CliTable` / `Table` 別名使用 `cli-table3` 本體:
47
+
48
+ ```typescript
49
+ import { CliTable, Table } from '@yarn-tool/table';
50
+ ```
51
+
52
+ ## API Documentation
53
+
54
+ ### `createDependencyTable(options?)`
55
+
56
+ 建立一個預設「無邊框」的依賴表格 (Dependency Table)。
57
+
58
+ - `options`(選用):`cli-table3` 的 `TableConstructorOptions`,會展開並覆寫預設值(例如 `colAligns`、`head`、`chars`)。
59
+ - 回傳值:`cli-table3` 的 `Table` 實例。
60
+
61
+ 預設欄位對齊為 `['left', 'right', 'right', 'right']`:套件名稱靠左、版本欄靠右,適合呈現依賴版本清單。
62
+
63
+ ### `toDependencyTable(args)`
64
+
65
+ 將「更新前後」的兩份依賴 (Dependencies) 清單轉為版本差異表格。
66
+
67
+ | 參數 | 類型 | 說明 |
68
+ |------|------|------|
69
+ | `args.from` | `IDependency` | 更新前的依賴清單(`套件名稱: 版本`) |
70
+ | `args.to` | `IDependency` | 更新後的依賴清單 |
71
+ | `args.options` | `IOptionsParseVersionsDiff`(選用) | 傳給 `@yarn-tool/semver-diff` 的著色選項 |
72
+
73
+ - 每列輸出格式為 `[套件名稱, 舊版本, '→', 經著色的新版本]`。
74
+ - `from` 中不存在的套件,舊版本欄會顯示為空字串。
75
+ - 回傳值:已填入資料列的 `Table` 實例。
76
+
77
+ ### `applyStyleBorderless(table)`
78
+
79
+ 對**既有**表格就地 (in-place) 套用無邊框樣式(將所有 `chars` 邊框字元設為空字串),並回傳同一個 `table` 實例以便鏈式使用。
80
+
81
+ ### 型別 / Types
82
+
83
+ 自 `lib/types.ts` 再匯出(源自 `cli-table3` 與 `@ts-type/package-dts`):
84
+
85
+ - `ITable`、`ITableConstructorOptions`、`ICell`
86
+ - `IHorizontalAlignment`、`IVerticalAlignment`
87
+ - `IDependency`:依賴清單的鍵值對型別
88
+
89
+ ### 匯出別名 / Export Aliases
90
+
91
+ | 匯出 | 說明 |
92
+ |------|------|
93
+ | `CliTable` | `cli-table3` 的預設匯出 |
94
+ | `Table` | `CliTable` 的別名 |
95
+ | 預設匯出 (default) | 同 `CliTable` |
96
+
97
+ ## 設定 / Configuration
98
+
99
+ 本套件沒有自身的設定檔 (Config File),所有行為皆由呼叫時傳入的參數決定:
100
+
101
+ - `createDependencyTable(options)` 的 `options` 可覆寫任何 `cli-table3` 的建構選項。
102
+ - `toDependencyTable(args.options)` 控制版本差異的著色行為(交由 `@yarn-tool/semver-diff` 處理)。
103
+ - 表格輸出寬度、顏色支援等終端列 (Terminal) 相關行為由 `cli-table3` 及執行環境決定。
package/index.d.ts CHANGED
@@ -1,4 +1,12 @@
1
1
  /**
2
+ * 模組入口:彙整並再匯出 yarn-tool 共用的 CLI 表格工具。
3
+ * 集中於此單一入口(Single Entry)再匯出,讓使用端只需引用套件名稱,
4
+ * 不必知道內部 `lib/` 的目錄結構。
5
+ *
6
+ * Module entry: re-exports the shared CLI table utilities of yarn-tool.
7
+ * Everything is gathered into this single entry so consumers only need to
8
+ * import the package name without knowing the internal `lib/` layout.
9
+ *
2
10
  * Created by user on 2020/6/11.
3
11
  */
4
12
  import CliTable from 'cli-table3';
@@ -6,6 +14,22 @@ export * from './lib/types';
6
14
  export * from './lib/deps-table';
7
15
  export * from './lib/core';
8
16
  export * from './lib/style';
17
+ /**
18
+ * 以 `CliTable` 與 `Table` 兩個名稱同時匯出 `cli-table3` 的建構子,
19
+ * 相容不同命名偏好的使用端(既有程式碼大多使用 `Table` 這個名稱)。
20
+ *
21
+ * Exports the `cli-table3` constructor under both `CliTable` and `Table`
22
+ * names to accommodate consumers with different naming preferences
23
+ * (existing code mostly uses the name `Table`).
24
+ */
9
25
  export { CliTable };
10
26
  export { CliTable as Table };
27
+ /**
28
+ * 預設匯出即為 `cli-table3` 建構子,讓 `import Table from '@yarn-tool/table'`
29
+ * 的用法與直接使用 `cli-table3` 一致。
30
+ *
31
+ * The default export is the `cli-table3` constructor, so
32
+ * `import Table from '@yarn-tool/table'` behaves the same as using
33
+ * `cli-table3` directly.
34
+ */
11
35
  export default CliTable;
package/index.js CHANGED
@@ -1,5 +1,13 @@
1
1
  "use strict";
2
2
  /**
3
+ * 模組入口:彙整並再匯出 yarn-tool 共用的 CLI 表格工具。
4
+ * 集中於此單一入口(Single Entry)再匯出,讓使用端只需引用套件名稱,
5
+ * 不必知道內部 `lib/` 的目錄結構。
6
+ *
7
+ * Module entry: re-exports the shared CLI table utilities of yarn-tool.
8
+ * Everything is gathered into this single entry so consumers only need to
9
+ * import the package name without knowing the internal `lib/` layout.
10
+ *
3
11
  * Created by user on 2020/6/11.
4
12
  */
5
13
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -12,5 +20,13 @@ tslib_1.__exportStar(require("./lib/types"), exports);
12
20
  tslib_1.__exportStar(require("./lib/deps-table"), exports);
13
21
  tslib_1.__exportStar(require("./lib/core"), exports);
14
22
  tslib_1.__exportStar(require("./lib/style"), exports);
23
+ /**
24
+ * 預設匯出即為 `cli-table3` 建構子,讓 `import Table from '@yarn-tool/table'`
25
+ * 的用法與直接使用 `cli-table3` 一致。
26
+ *
27
+ * The default export is the `cli-table3` constructor, so
28
+ * `import Table from '@yarn-tool/table'` behaves the same as using
29
+ * `cli-table3` directly.
30
+ */
15
31
  exports.default = cli_table3_1.default;
16
32
  //# sourceMappingURL=index.js.map
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;AAEH,oEAAkC;AAOzB,mBAPF,oBAAQ,CAOE;AACI,gBARd,oBAAQ,CAQW;AAN1B,sDAA4B;AAC5B,2DAAiC;AACjC,qDAA2B;AAC3B,sDAA4B;AAK5B,kBAAe,oBAAQ,CAAA","sourcesContent":["/**\n * Created by user on 2020/6/11.\n */\n\nimport CliTable from 'cli-table3';\n\nexport * from './lib/types';\nexport * from './lib/deps-table';\nexport * from './lib/core';\nexport * from './lib/style';\n\nexport { CliTable }\nexport { CliTable as Table }\n\nexport default CliTable\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;AAEH,oEAAkC;AAezB,mBAfF,oBAAQ,CAeE;AACI,gBAhBd,oBAAQ,CAgBW;AAd1B,sDAA4B;AAC5B,2DAAiC;AACjC,qDAA2B;AAC3B,sDAA4B;AAa5B;;;;;;;GAOG;AACH,kBAAe,oBAAQ,CAAA","sourcesContent":["/**\n * 模組入口:彙整並再匯出 yarn-tool 共用的 CLI 表格工具。\n * 集中於此單一入口(Single Entry)再匯出,讓使用端只需引用套件名稱,\n * 不必知道內部 `lib/` 的目錄結構。\n *\n * Module entry: re-exports the shared CLI table utilities of yarn-tool.\n * Everything is gathered into this single entry so consumers only need to\n * import the package name without knowing the internal `lib/` layout.\n *\n * Created by user on 2020/6/11.\n */\n\nimport CliTable from 'cli-table3';\n\nexport * from './lib/types';\nexport * from './lib/deps-table';\nexport * from './lib/core';\nexport * from './lib/style';\n\n/**\n * 以 `CliTable` 與 `Table` 兩個名稱同時匯出 `cli-table3` 的建構子,\n * 相容不同命名偏好的使用端(既有程式碼大多使用 `Table` 這個名稱)。\n *\n * Exports the `cli-table3` constructor under both `CliTable` and `Table`\n * names to accommodate consumers with different naming preferences\n * (existing code mostly uses the name `Table`).\n */\nexport { CliTable }\nexport { CliTable as Table }\n\n/**\n * 預設匯出即為 `cli-table3` 建構子,讓 `import Table from '@yarn-tool/table'`\n * 的用法與直接使用 `cli-table3` 一致。\n *\n * The default export is the `cli-table3` constructor, so\n * `import Table from '@yarn-tool/table'` behaves the same as using\n * `cli-table3` directly.\n */\nexport default CliTable\n"]}
package/lib/core.d.ts CHANGED
@@ -1,5 +1,27 @@
1
1
  /**
2
+ * 依賴表格的建立核心:提供預設「無邊框」樣式的 `cli-table3` 表格。
3
+ *
4
+ * Core for building dependency tables: provides a `cli-table3` table with a
5
+ * borderless style by default.
6
+ *
2
7
  * Created by user on 2020/6/11.
3
8
  */
4
9
  import Table, { TableConstructorOptions } from 'cli-table3';
10
+ /**
11
+ * 建立預設無邊框的依賴表格 (Dependency Table)。
12
+ *
13
+ * 為什麼預設值必須是「無邊框」:yarn-tool 的輸出多為終端列 (CLI) 較短的
14
+ * 狀態清單,框線字元會造成多餘的視覺噪音,因此整份預設 `chars` 皆設為空字串。
15
+ * `colAligns` 預設第一欄靠左(套件名稱較長可讀)、其餘靠右(版本欄數字對齊)。
16
+ *
17
+ * @param options - 額外的 `cli-table3` 建構選項 / Extra `cli-table3` constructor options
18
+ *
19
+ * 呼叫端的 `options` 刻意放在物件最後展開:任何指定的欄位(如自訂
20
+ * `colAligns`、`head`、`chars`)都會覆寫上面的預設值。
21
+ *
22
+ * The caller's `options` are deliberately spread last: any specified field
23
+ * (custom `colAligns`, `head`, `chars`, ...) overrides the defaults above.
24
+ *
25
+ * @returns 無邊框的 `cli-table3` 表格實例 / A borderless `cli-table3` table instance
26
+ */
5
27
  export declare function createDependencyTable(options?: TableConstructorOptions): Table.Table;
package/lib/core.js CHANGED
@@ -1,11 +1,33 @@
1
1
  "use strict";
2
2
  /**
3
+ * 依賴表格的建立核心:提供預設「無邊框」樣式的 `cli-table3` 表格。
4
+ *
5
+ * Core for building dependency tables: provides a `cli-table3` table with a
6
+ * borderless style by default.
7
+ *
3
8
  * Created by user on 2020/6/11.
4
9
  */
5
10
  Object.defineProperty(exports, "__esModule", { value: true });
6
11
  exports.createDependencyTable = createDependencyTable;
7
12
  const tslib_1 = require("tslib");
8
13
  const cli_table3_1 = tslib_1.__importDefault(require("cli-table3"));
14
+ /**
15
+ * 建立預設無邊框的依賴表格 (Dependency Table)。
16
+ *
17
+ * 為什麼預設值必須是「無邊框」:yarn-tool 的輸出多為終端列 (CLI) 較短的
18
+ * 狀態清單,框線字元會造成多餘的視覺噪音,因此整份預設 `chars` 皆設為空字串。
19
+ * `colAligns` 預設第一欄靠左(套件名稱較長可讀)、其餘靠右(版本欄數字對齊)。
20
+ *
21
+ * @param options - 額外的 `cli-table3` 建構選項 / Extra `cli-table3` constructor options
22
+ *
23
+ * 呼叫端的 `options` 刻意放在物件最後展開:任何指定的欄位(如自訂
24
+ * `colAligns`、`head`、`chars`)都會覆寫上面的預設值。
25
+ *
26
+ * The caller's `options` are deliberately spread last: any specified field
27
+ * (custom `colAligns`, `head`, `chars`, ...) overrides the defaults above.
28
+ *
29
+ * @returns 無邊框的 `cli-table3` 表格實例 / A borderless `cli-table3` table instance
30
+ */
9
31
  function createDependencyTable(options) {
10
32
  return new cli_table3_1.default({
11
33
  colAligns: ['left', 'right', 'right', 'right'],
package/lib/core.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"core.js","sourceRoot":"","sources":["core.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAIH,sDAwBC;;AA1BD,oEAA4D;AAE5D,SAAgB,qBAAqB,CAAC,OAAiC;IAEtE,OAAO,IAAI,oBAAK,CAAC;QAChB,SAAS,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC;QAC9C,oDAAoD;QACpD,KAAK,EAAE;YACN,GAAG,EAAE,EAAE;YACP,SAAS,EAAE,EAAE;YACb,UAAU,EAAE,EAAE;YACd,WAAW,EAAE,EAAE;YACf,MAAM,EAAE,EAAE;YACV,YAAY,EAAE,EAAE;YAChB,aAAa,EAAE,EAAE;YACjB,cAAc,EAAE,EAAE;YAClB,IAAI,EAAE,EAAE;YACR,UAAU,EAAE,EAAE;YACd,GAAG,EAAE,EAAE;YACP,SAAS,EAAE,EAAE;YACb,KAAK,EAAE,EAAE;YACT,WAAW,EAAE,EAAE;YACf,MAAM,EAAE,EAAE;SACV;QACD,GAAG,OAAO;KACV,CAAC,CAAC;AACJ,CAAC","sourcesContent":["/**\n * Created by user on 2020/6/11.\n */\n\nimport Table, { TableConstructorOptions } from 'cli-table3';\n\nexport function createDependencyTable(options?: TableConstructorOptions)\n{\n\treturn new Table({\n\t\tcolAligns: ['left', 'right', 'right', 'right'],\n\t\t//colAligns: ['left', 'center', 'center', 'center'],\n\t\tchars: {\n\t\t\ttop: '',\n\t\t\t'top-mid': '',\n\t\t\t'top-left': '',\n\t\t\t'top-right': '',\n\t\t\tbottom: '',\n\t\t\t'bottom-mid': '',\n\t\t\t'bottom-left': '',\n\t\t\t'bottom-right': '',\n\t\t\tleft: '',\n\t\t\t'left-mid': '',\n\t\t\tmid: '',\n\t\t\t'mid-mid': '',\n\t\t\tright: '',\n\t\t\t'right-mid': '',\n\t\t\tmiddle: '',\n\t\t},\n\t\t...options,\n\t});\n}\n"]}
1
+ {"version":3,"file":"core.js","sourceRoot":"","sources":["core.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;AAqBH,sDAwBC;;AA3CD,oEAA4D;AAE5D;;;;;;;;;;;;;;;;GAgBG;AACH,SAAgB,qBAAqB,CAAC,OAAiC;IAEtE,OAAO,IAAI,oBAAK,CAAC;QAChB,SAAS,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC;QAC9C,oDAAoD;QACpD,KAAK,EAAE;YACN,GAAG,EAAE,EAAE;YACP,SAAS,EAAE,EAAE;YACb,UAAU,EAAE,EAAE;YACd,WAAW,EAAE,EAAE;YACf,MAAM,EAAE,EAAE;YACV,YAAY,EAAE,EAAE;YAChB,aAAa,EAAE,EAAE;YACjB,cAAc,EAAE,EAAE;YAClB,IAAI,EAAE,EAAE;YACR,UAAU,EAAE,EAAE;YACd,GAAG,EAAE,EAAE;YACP,SAAS,EAAE,EAAE;YACb,KAAK,EAAE,EAAE;YACT,WAAW,EAAE,EAAE;YACf,MAAM,EAAE,EAAE;SACV;QACD,GAAG,OAAO;KACV,CAAC,CAAC;AACJ,CAAC","sourcesContent":["/**\n * 依賴表格的建立核心:提供預設「無邊框」樣式的 `cli-table3` 表格。\n *\n * Core for building dependency tables: provides a `cli-table3` table with a\n * borderless style by default.\n *\n * Created by user on 2020/6/11.\n */\n\nimport Table, { TableConstructorOptions } from 'cli-table3';\n\n/**\n * 建立預設無邊框的依賴表格 (Dependency Table)。\n *\n * 為什麼預設值必須是「無邊框」:yarn-tool 的輸出多為終端列 (CLI) 較短的\n * 狀態清單,框線字元會造成多餘的視覺噪音,因此整份預設 `chars` 皆設為空字串。\n * `colAligns` 預設第一欄靠左(套件名稱較長可讀)、其餘靠右(版本欄數字對齊)。\n *\n * @param options - 額外的 `cli-table3` 建構選項 / Extra `cli-table3` constructor options\n *\n * 呼叫端的 `options` 刻意放在物件最後展開:任何指定的欄位(如自訂\n * `colAligns`、`head`、`chars`)都會覆寫上面的預設值。\n *\n * The caller's `options` are deliberately spread last: any specified field\n * (custom `colAligns`, `head`, `chars`, ...) overrides the defaults above.\n *\n * @returns 無邊框的 `cli-table3` 表格實例 / A borderless `cli-table3` table instance\n */\nexport function createDependencyTable(options?: TableConstructorOptions)\n{\n\treturn new Table({\n\t\tcolAligns: ['left', 'right', 'right', 'right'],\n\t\t//colAligns: ['left', 'center', 'center', 'center'],\n\t\tchars: {\n\t\t\ttop: '',\n\t\t\t'top-mid': '',\n\t\t\t'top-left': '',\n\t\t\t'top-right': '',\n\t\t\tbottom: '',\n\t\t\t'bottom-mid': '',\n\t\t\t'bottom-left': '',\n\t\t\t'bottom-right': '',\n\t\t\tleft: '',\n\t\t\t'left-mid': '',\n\t\t\tmid: '',\n\t\t\t'mid-mid': '',\n\t\t\tright: '',\n\t\t\t'right-mid': '',\n\t\t\tmiddle: '',\n\t\t},\n\t\t...options,\n\t});\n}\n"]}
@@ -1,8 +1,31 @@
1
1
  /**
2
+ * 將更新前後的兩份依賴清單轉為「版本差異」表格 (Version Diff Table)。
3
+ *
4
+ * Converts two dependency maps (before/after) into a version diff table.
5
+ *
2
6
  * Created by user on 2020/6/11.
3
7
  */
4
8
  import { IOptionsParseVersionsDiff } from '@yarn-tool/semver-diff';
5
9
  import { IDependency } from './types';
10
+ /**
11
+ * 建立版本差異表格。
12
+ *
13
+ * 以 `to`(更新後)的鍵為準遍歷,因為「新增的依賴」只可能存在於 `to`;
14
+ * 若改以 `from` 為準,會漏掉新套件。`from` 中不存在的依賴其舊版本欄
15
+ * 以空字串填補,避免輸出 `undefined`。
16
+ *
17
+ * Builds a version diff table.
18
+ *
19
+ * Iterates over the keys of `to` (the updated set) because a newly added
20
+ * dependency can only exist there — iterating `from` would miss new packages.
21
+ * A missing "from" version is padded with an empty string so the output never
22
+ * contains `undefined`.
23
+ *
24
+ * @param args.from - 更新前的依賴清單 / Dependency map before the update
25
+ * @param args.to - 更新後的依賴清單 / Dependency map after the update
26
+ * @param args.options - 版本差異著色選項 / Options for colorizing the version diff
27
+ * @returns 已填入資料列的表格實例 / A table instance with rows already pushed
28
+ */
6
29
  export declare function toDependencyTable(args: {
7
30
  from: IDependency;
8
31
  to: IDependency;
package/lib/deps-table.js CHANGED
@@ -1,15 +1,45 @@
1
1
  "use strict";
2
2
  /**
3
+ * 將更新前後的兩份依賴清單轉為「版本差異」表格 (Version Diff Table)。
4
+ *
5
+ * Converts two dependency maps (before/after) into a version diff table.
6
+ *
3
7
  * Created by user on 2020/6/11.
4
8
  */
5
9
  Object.defineProperty(exports, "__esModule", { value: true });
6
10
  exports.toDependencyTable = toDependencyTable;
7
11
  const semver_diff_1 = require("@yarn-tool/semver-diff");
8
12
  const core_1 = require("./core");
13
+ /**
14
+ * 建立版本差異表格。
15
+ *
16
+ * 以 `to`(更新後)的鍵為準遍歷,因為「新增的依賴」只可能存在於 `to`;
17
+ * 若改以 `from` 為準,會漏掉新套件。`from` 中不存在的依賴其舊版本欄
18
+ * 以空字串填補,避免輸出 `undefined`。
19
+ *
20
+ * Builds a version diff table.
21
+ *
22
+ * Iterates over the keys of `to` (the updated set) because a newly added
23
+ * dependency can only exist there — iterating `from` would miss new packages.
24
+ * A missing "from" version is padded with an empty string so the output never
25
+ * contains `undefined`.
26
+ *
27
+ * @param args.from - 更新前的依賴清單 / Dependency map before the update
28
+ * @param args.to - 更新後的依賴清單 / Dependency map after the update
29
+ * @param args.options - 版本差異著色選項 / Options for colorizing the version diff
30
+ * @returns 已填入資料列的表格實例 / A table instance with rows already pushed
31
+ */
9
32
  function toDependencyTable(args) {
10
33
  const table = (0, core_1.createDependencyTable)({
11
34
  colAligns: ['left', 'right', 'right', 'right'],
12
35
  });
36
+ /**
37
+ * 每列格式固定為 `[套件名稱, 舊版本, '→', 著色後的新版本]`:
38
+ * 中間插入箭頭欄,讓終端列上「變更方向」一目了然。
39
+ *
40
+ * Each row is fixed as `[name, old version, '→', colorized new version]`:
41
+ * the arrow column makes the direction of the change obvious in terminal output.
42
+ */
13
43
  const rows = Object.keys(args.to).map(dep => {
14
44
  const from = args.from[dep] || '';
15
45
  const to = (0, semver_diff_1.colorizeDiff)(args.from[dep], args.to[dep] || '', args.options);
@@ -1 +1 @@
1
- {"version":3,"file":"deps-table.js","sourceRoot":"","sources":["deps-table.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAMH,8CAiBC;AArBD,wDAAiF;AAEjF,iCAA+C;AAE/C,SAAgB,iBAAiB,CAAC,IAIjC;IAEA,MAAM,KAAK,GAAG,IAAA,4BAAqB,EAAC;QACnC,SAAS,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC;KAC9C,CAAC,CAAC;IACH,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;QAE3C,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;QAClC,MAAM,EAAE,GAAG,IAAA,0BAAY,EAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,IAAI,CAAC,OAAc,CAAC,CAAC;QACjF,OAAO,CAAC,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC;IAC7B,CAAC,CAAC,CAAC;IACH,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,GAAU,CAAC,CAAC,CAAC;IAC5C,OAAO,KAAK,CAAC;AACd,CAAC;AAED,kBAAe,iBAAiB,CAAA","sourcesContent":["/**\n * Created by user on 2020/6/11.\n */\n\nimport { IOptionsParseVersionsDiff, colorizeDiff } from '@yarn-tool/semver-diff';\nimport { IDependency } from './types';\nimport { createDependencyTable } from './core';\n\nexport function toDependencyTable(args: {\n\tfrom: IDependency,\n\tto: IDependency,\n\toptions?: IOptionsParseVersionsDiff,\n})\n{\n\tconst table = createDependencyTable({\n\t\tcolAligns: ['left', 'right', 'right', 'right'],\n\t});\n\tconst rows = Object.keys(args.to).map(dep =>\n\t{\n\t\tconst from = args.from[dep] || '';\n\t\tconst to = colorizeDiff(args.from[dep], args.to[dep] || '', args.options as any);\n\t\treturn [dep, from, '→', to];\n\t});\n\trows.forEach(row => table.push(row as any));\n\treturn table;\n}\n\nexport default toDependencyTable\n"]}
1
+ {"version":3,"file":"deps-table.js","sourceRoot":"","sources":["deps-table.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAyBH,8CAwBC;AA/CD,wDAAiF;AAEjF,iCAA+C;AAE/C;;;;;;;;;;;;;;;;;;GAkBG;AACH,SAAgB,iBAAiB,CAAC,IAIjC;IAEA,MAAM,KAAK,GAAG,IAAA,4BAAqB,EAAC;QACnC,SAAS,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC;KAC9C,CAAC,CAAC;IACH;;;;;;OAMG;IACH,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;QAE3C,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;QAClC,MAAM,EAAE,GAAG,IAAA,0BAAY,EAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,IAAI,CAAC,OAAc,CAAC,CAAC;QACjF,OAAO,CAAC,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC;IAC7B,CAAC,CAAC,CAAC;IACH,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,GAAU,CAAC,CAAC,CAAC;IAC5C,OAAO,KAAK,CAAC;AACd,CAAC;AAED,kBAAe,iBAAiB,CAAA","sourcesContent":["/**\n * 將更新前後的兩份依賴清單轉為「版本差異」表格 (Version Diff Table)。\n *\n * Converts two dependency maps (before/after) into a version diff table.\n *\n * Created by user on 2020/6/11.\n */\n\nimport { IOptionsParseVersionsDiff, colorizeDiff } from '@yarn-tool/semver-diff';\nimport { IDependency } from './types';\nimport { createDependencyTable } from './core';\n\n/**\n * 建立版本差異表格。\n *\n * 以 `to`(更新後)的鍵為準遍歷,因為「新增的依賴」只可能存在於 `to`;\n * 若改以 `from` 為準,會漏掉新套件。`from` 中不存在的依賴其舊版本欄\n * 以空字串填補,避免輸出 `undefined`。\n *\n * Builds a version diff table.\n *\n * Iterates over the keys of `to` (the updated set) because a newly added\n * dependency can only exist there — iterating `from` would miss new packages.\n * A missing \"from\" version is padded with an empty string so the output never\n * contains `undefined`.\n *\n * @param args.from - 更新前的依賴清單 / Dependency map before the update\n * @param args.to - 更新後的依賴清單 / Dependency map after the update\n * @param args.options - 版本差異著色選項 / Options for colorizing the version diff\n * @returns 已填入資料列的表格實例 / A table instance with rows already pushed\n */\nexport function toDependencyTable(args: {\n\tfrom: IDependency,\n\tto: IDependency,\n\toptions?: IOptionsParseVersionsDiff,\n})\n{\n\tconst table = createDependencyTable({\n\t\tcolAligns: ['left', 'right', 'right', 'right'],\n\t});\n\t/**\n\t * 每列格式固定為 `[套件名稱, 舊版本, '→', 著色後的新版本]`:\n\t * 中間插入箭頭欄,讓終端列上「變更方向」一目了然。\n\t *\n\t * Each row is fixed as `[name, old version, '→', colorized new version]`:\n\t * the arrow column makes the direction of the change obvious in terminal output.\n\t */\n\tconst rows = Object.keys(args.to).map(dep =>\n\t{\n\t\tconst from = args.from[dep] || '';\n\t\tconst to = colorizeDiff(args.from[dep], args.to[dep] || '', args.options as any);\n\t\treturn [dep, from, '→', to];\n\t});\n\trows.forEach(row => table.push(row as any));\n\treturn table;\n}\n\nexport default toDependencyTable\n"]}
package/lib/style.d.ts CHANGED
@@ -1,5 +1,27 @@
1
1
  /**
2
+ * 表格樣式工具:為已建立的表格套用無邊框樣式 (Borderless Style)。
3
+ *
4
+ * Table styling utilities: apply a borderless style to an existing table.
5
+ *
2
6
  * Created by user on 2020/6/13.
3
7
  */
4
8
  import { Table } from 'cli-table3';
9
+ /**
10
+ * 就地 (in-place) 將表格的所有邊框字元設為空字串,並回傳同一實例。
11
+ *
12
+ * 為什麼採用就地修改而非回傳新表格:`cli-table3` 的外觀由
13
+ * `table.options` 於渲染 (render) 時決定,改選項即可讓先前已 push 的
14
+ * 資料列沿用新樣式,不必重新建立與填充表格。
15
+ *
16
+ * Mutates the table in place, setting every border char to an empty string,
17
+ * and returns the same instance.
18
+ *
19
+ * Why mutate instead of returning a new table: `cli-table3` reads its
20
+ * appearance from `table.options` at render time, so updating the options
21
+ * lets rows that were already pushed pick up the new style without
22
+ * rebuilding and refilling the table.
23
+ *
24
+ * @param table - 要套用樣式的 `cli-table3` 表格 / The `cli-table3` table to restyle
25
+ * @returns 同一個表格實例,方便鏈式使用 / The same table instance, for chaining
26
+ */
5
27
  export declare function applyStyleBorderless(table: Table): Table;
package/lib/style.js CHANGED
@@ -1,6 +1,24 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.applyStyleBorderless = applyStyleBorderless;
4
+ /**
5
+ * 就地 (in-place) 將表格的所有邊框字元設為空字串,並回傳同一實例。
6
+ *
7
+ * 為什麼採用就地修改而非回傳新表格:`cli-table3` 的外觀由
8
+ * `table.options` 於渲染 (render) 時決定,改選項即可讓先前已 push 的
9
+ * 資料列沿用新樣式,不必重新建立與填充表格。
10
+ *
11
+ * Mutates the table in place, setting every border char to an empty string,
12
+ * and returns the same instance.
13
+ *
14
+ * Why mutate instead of returning a new table: `cli-table3` reads its
15
+ * appearance from `table.options` at render time, so updating the options
16
+ * lets rows that were already pushed pick up the new style without
17
+ * rebuilding and refilling the table.
18
+ *
19
+ * @param table - 要套用樣式的 `cli-table3` 表格 / The `cli-table3` table to restyle
20
+ * @returns 同一個表格實例,方便鏈式使用 / The same table instance, for chaining
21
+ */
4
22
  function applyStyleBorderless(table) {
5
23
  Object.assign(table.options, {
6
24
  chars: {
package/lib/style.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"style.js","sourceRoot":"","sources":["style.ts"],"names":[],"mappings":";;AAKA,oDAuBC;AAvBD,SAAgB,oBAAoB,CAAC,KAAY;IAEhD,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE;QAC5B,KAAK,EAAE;YACN,GAAG,EAAE,EAAE;YACP,SAAS,EAAE,EAAE;YACb,UAAU,EAAE,EAAE;YACd,WAAW,EAAE,EAAE;YACf,MAAM,EAAE,EAAE;YACV,YAAY,EAAE,EAAE;YAChB,aAAa,EAAE,EAAE;YACjB,cAAc,EAAE,EAAE;YAClB,IAAI,EAAE,EAAE;YACR,UAAU,EAAE,EAAE;YACd,GAAG,EAAE,EAAE;YACP,SAAS,EAAE,EAAE;YACb,KAAK,EAAE,EAAE;YACT,WAAW,EAAE,EAAE;YACf,MAAM,EAAE,EAAE;SACV;KACD,CAAC,CAAA;IAEF,OAAO,KAAK,CAAA;AACb,CAAC","sourcesContent":["/**\n * Created by user on 2020/6/13.\n */\nimport { Table } from 'cli-table3';\n\nexport function applyStyleBorderless(table: Table)\n{\n\tObject.assign(table.options, {\n\t\tchars: {\n\t\t\ttop: '',\n\t\t\t'top-mid': '',\n\t\t\t'top-left': '',\n\t\t\t'top-right': '',\n\t\t\tbottom: '',\n\t\t\t'bottom-mid': '',\n\t\t\t'bottom-left': '',\n\t\t\t'bottom-right': '',\n\t\t\tleft: '',\n\t\t\t'left-mid': '',\n\t\t\tmid: '',\n\t\t\t'mid-mid': '',\n\t\t\tright: '',\n\t\t\t'right-mid': '',\n\t\t\tmiddle: '',\n\t\t},\n\t})\n\n\treturn table\n}\n"]}
1
+ {"version":3,"file":"style.js","sourceRoot":"","sources":["style.ts"],"names":[],"mappings":";;AA2BA,oDAuBC;AAzCD;;;;;;;;;;;;;;;;;GAiBG;AACH,SAAgB,oBAAoB,CAAC,KAAY;IAEhD,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE;QAC5B,KAAK,EAAE;YACN,GAAG,EAAE,EAAE;YACP,SAAS,EAAE,EAAE;YACb,UAAU,EAAE,EAAE;YACd,WAAW,EAAE,EAAE;YACf,MAAM,EAAE,EAAE;YACV,YAAY,EAAE,EAAE;YAChB,aAAa,EAAE,EAAE;YACjB,cAAc,EAAE,EAAE;YAClB,IAAI,EAAE,EAAE;YACR,UAAU,EAAE,EAAE;YACd,GAAG,EAAE,EAAE;YACP,SAAS,EAAE,EAAE;YACb,KAAK,EAAE,EAAE;YACT,WAAW,EAAE,EAAE;YACf,MAAM,EAAE,EAAE;SACV;KACD,CAAC,CAAA;IAEF,OAAO,KAAK,CAAA;AACb,CAAC","sourcesContent":["/**\n * 表格樣式工具:為已建立的表格套用無邊框樣式 (Borderless Style)。\n *\n * Table styling utilities: apply a borderless style to an existing table.\n *\n * Created by user on 2020/6/13.\n */\nimport { Table } from 'cli-table3';\n\n/**\n * 就地 (in-place) 將表格的所有邊框字元設為空字串,並回傳同一實例。\n *\n * 為什麼採用就地修改而非回傳新表格:`cli-table3` 的外觀由\n * `table.options` 於渲染 (render) 時決定,改選項即可讓先前已 push 的\n * 資料列沿用新樣式,不必重新建立與填充表格。\n *\n * Mutates the table in place, setting every border char to an empty string,\n * and returns the same instance.\n *\n * Why mutate instead of returning a new table: `cli-table3` reads its\n * appearance from `table.options` at render time, so updating the options\n * lets rows that were already pushed pick up the new style without\n * rebuilding and refilling the table.\n *\n * @param table - 要套用樣式的 `cli-table3` 表格 / The `cli-table3` table to restyle\n * @returns 同一個表格實例,方便鏈式使用 / The same table instance, for chaining\n */\nexport function applyStyleBorderless(table: Table)\n{\n\tObject.assign(table.options, {\n\t\tchars: {\n\t\t\ttop: '',\n\t\t\t'top-mid': '',\n\t\t\t'top-left': '',\n\t\t\t'top-right': '',\n\t\t\tbottom: '',\n\t\t\t'bottom-mid': '',\n\t\t\t'bottom-left': '',\n\t\t\t'bottom-right': '',\n\t\t\tleft: '',\n\t\t\t'left-mid': '',\n\t\t\tmid: '',\n\t\t\t'mid-mid': '',\n\t\t\tright: '',\n\t\t\t'right-mid': '',\n\t\t\tmiddle: '',\n\t\t},\n\t})\n\n\treturn table\n}\n"]}
package/lib/types.d.ts CHANGED
@@ -1,2 +1,16 @@
1
+ /**
2
+ * `cli-table3` 的表格與單元格 (Cell) 相關型別,統一以 `I` 前綴命名,
3
+ * 以符合本 monorepo 的介面命名慣例。
4
+ *
5
+ * Table and cell types from `cli-table3`, all renamed with an `I` prefix to
6
+ * follow this monorepo's interface naming convention.
7
+ */
1
8
  export type { Table as ITable, TableConstructorOptions as ITableConstructorOptions, Cell as ICell, HorizontalAlignment as IHorizontalAlignment, VerticalAlignment as IVerticalAlignment, } from 'cli-table3';
9
+ /**
10
+ * 依賴清單 (Dependency Map) 型別,定義於 `@ts-type/package-dts` 的
11
+ * `package.json` 型別中;此處再匯出供 `toDependencyTable` 等 API 使用。
12
+ *
13
+ * Dependency map type defined in `@ts-type/package-dts`'s `package.json` types;
14
+ * re-exported here for APIs such as `toDependencyTable`.
15
+ */
2
16
  export type { IDependency } from '@ts-type/package-dts/lib/package-json/types';
package/lib/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["types.ts"],"names":[],"mappings":"","sourcesContent":["import { Cell } from 'cli-table3';\n\nexport type {\n\tTable as ITable,\n\tTableConstructorOptions as ITableConstructorOptions,\n\tCell as ICell,\n\tHorizontalAlignment as IHorizontalAlignment,\n\tVerticalAlignment as IVerticalAlignment,\n} from 'cli-table3';\n\nexport type { IDependency } from '@ts-type/package-dts/lib/package-json/types';\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["types.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * 共用型別 (Shared Types) 的單一事實來源 (Single Source of Truth):\n * 將 `cli-table3` 與套件內部使用的依賴型別集中再匯出,\n * 讓使用端只依賴本套件即可取得表格相關型別,避免各處重複宣告。\n *\n * Single source of truth for shared types: re-exports table-related types from\n * `cli-table3` together with the dependency type used internally, so consumers\n * only need to depend on this package instead of declaring them everywhere.\n */\nimport { Cell } from 'cli-table3';\n\n/**\n * `cli-table3` 的表格與單元格 (Cell) 相關型別,統一以 `I` 前綴命名,\n * 以符合本 monorepo 的介面命名慣例。\n *\n * Table and cell types from `cli-table3`, all renamed with an `I` prefix to\n * follow this monorepo's interface naming convention.\n */\nexport type {\n\tTable as ITable,\n\tTableConstructorOptions as ITableConstructorOptions,\n\tCell as ICell,\n\tHorizontalAlignment as IHorizontalAlignment,\n\tVerticalAlignment as IVerticalAlignment,\n} from 'cli-table3';\n\n/**\n * 依賴清單 (Dependency Map) 型別,定義於 `@ts-type/package-dts` 的\n * `package.json` 型別中;此處再匯出供 `toDependencyTable` 等 API 使用。\n *\n * Dependency map type defined in `@ts-type/package-dts`'s `package.json` types;\n * re-exported here for APIs such as `toDependencyTable`.\n */\nexport type { IDependency } from '@ts-type/package-dts/lib/package-json/types';\n"]}
package/package.json CHANGED
@@ -1,7 +1,20 @@
1
1
  {
2
2
  "name": "@yarn-tool/table",
3
- "version": "2.0.21",
3
+ "version": "2.0.23",
4
4
  "description": "shared cli table utils for yarn-tool",
5
+ "keywords": [
6
+ "cli",
7
+ "table",
8
+ "cli-table",
9
+ "dependency-table",
10
+ "dependencies",
11
+ "semver",
12
+ "version-diff",
13
+ "yarn-tool",
14
+ "utils",
15
+ "terminal",
16
+ "output"
17
+ ],
5
18
  "homepage": "https://github.com/bluelovers/ws-yarn-workspaces/tree/master/packages/@yarn-tool/table#readme",
6
19
  "bugs": {
7
20
  "url": "https://github.com/bluelovers/ws-yarn-workspaces/issues"
@@ -15,20 +28,22 @@
15
28
  "author": "bluelovers",
16
29
  "main": "index.js",
17
30
  "scripts": {
18
- "coverage": "npx nyc yarn run test",
31
+ "coverage": "npx nyc pnpm run test",
19
32
  "lint": "npx eslint **/*.ts",
20
- "test": "jest",
33
+ "test": "node --run test:node",
21
34
  "test:jest": "jest --coverage",
22
- "test:jest:coverage": "yarn run test:jest -- --coverage",
23
- "test:jest:snapshot": "yarn run test:jest -- -u",
35
+ "test:jest:coverage": "pnpm run test:jest -- --coverage",
36
+ "test:jest:snapshot": "pnpm run test:jest -- -u",
24
37
  "test:mocha": "npx mocha --require ts-node/register \"!(node_modules)/**/*.{test,spec}.{ts,tsx}\"",
25
- "test:snapshot": "yarn run test -- -u",
38
+ "test:node": "tsx --test --test-update-snapshots **/*.node-spec.ts **/*.node-test.ts **/*.spec.ts **/*.test.ts",
39
+ "test:snapshot": "pnpm run test -u",
40
+ "test:tsc": "tsc --noEmit & echo typescript check done",
26
41
  "test:tsd": "ynpx tsd",
27
42
  "npm:publish": "npm publish",
28
43
  "npm:publish:lerna": "lerna publish --yes",
29
- "preversion": "yarn run test",
44
+ "preversion": "pnpm run test",
30
45
  "prepublish:lockfile": "npx sync-lockfile .",
31
- "prepublishOnly_": "yarn run ncu && yarn run sort-package-json && yarn run test",
46
+ "prepublishOnly_": "pnpm run ncu && pnpm run sort-package-json && pnpm run test",
32
47
  "postpublish_": "git commit -m \"chore(release): publish\" .",
33
48
  "ncu": "npx yarn-tool ncu -u",
34
49
  "sort-package-json": "npx yarn-tool sort",
@@ -37,13 +52,13 @@
37
52
  "tsc:showConfig": "ynpx get-current-tsconfig -p"
38
53
  },
39
54
  "dependencies": {
40
- "@ts-type/package-dts": "^3.0.9",
41
- "@yarn-tool/semver-diff": "^2.0.20",
55
+ "@ts-type/package-dts": "^3.0.14",
56
+ "@yarn-tool/semver-diff": "^2.0.22",
42
57
  "cli-table3": "^0.6.5",
43
58
  "tslib": ">=2.8.1"
44
59
  },
45
60
  "publishConfig": {
46
61
  "access": "public"
47
62
  },
48
- "gitHead": "8c939a673ef0f088d4a3aa8a240ed6c28d390f98"
63
+ "gitHead": "471c63ee11851f0ac3487f23d1c472936f99b460"
49
64
  }