js-dev-tool 1.2.15 → 1.2.16
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/package.json +3 -3
- package/tool-lib/rws.js +5 -2
- package/tool-lib/tools.d.ts +6 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "js-dev-tool",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.16",
|
|
4
4
|
"bin": {
|
|
5
5
|
"jstool": "tools.js",
|
|
6
6
|
"tgl-jsonl": "extras/toggle-jsonl.js"
|
|
@@ -92,8 +92,8 @@
|
|
|
92
92
|
"mini-semaphore": "^1.5.4",
|
|
93
93
|
"replace": "^1.2.2",
|
|
94
94
|
"rm-cstyle-cmts": "^3.4.4",
|
|
95
|
-
"terser": "^5.
|
|
96
|
-
"tin-args": "^0.1.
|
|
95
|
+
"terser": "^5.47.1",
|
|
96
|
+
"tin-args": "^0.1.6",
|
|
97
97
|
"ts-cc-map": "^1.1.0"
|
|
98
98
|
}
|
|
99
99
|
}
|
package/tool-lib/rws.js
CHANGED
|
@@ -73,7 +73,9 @@ module.exports = (fs, utils) => {
|
|
|
73
73
|
return {
|
|
74
74
|
taskName: "(R)ecord(W)ebpack(S)ize",
|
|
75
75
|
fn() {
|
|
76
|
-
const
|
|
76
|
+
const versionSourcePath = params.versionSource || "./package.json";
|
|
77
|
+
/** @type {{ version: TVersionString }} */
|
|
78
|
+
const thisPackage = utils.readJson(versionSourcePath);
|
|
77
79
|
const recordPath = params.dest || "./logs/webpack-size.json";
|
|
78
80
|
/** @type {TVersionRecords} */
|
|
79
81
|
const sizeRecord = fs.existsSync(recordPath)
|
|
@@ -162,8 +164,9 @@ module.exports = (fs, utils) => {
|
|
|
162
164
|
},
|
|
163
165
|
get help() {
|
|
164
166
|
return `${this.taskName}
|
|
165
|
-
ex - jstool -cmd rws [-webpack lib/webpack.js -umd umd/webpack.js -dest "./dev-extras/webpack-size.json"] [-rws-tags "web/login:./dist/es/web/login.mjs,webpack-esm:./dist/webpack-esm/index.mjs"]
|
|
167
|
+
ex - jstool -cmd rws [-versionSource "<version source path>"] [-webpack lib/webpack.js -umd umd/webpack.js -dest "./dev-extras/webpack-size.json"] [-rws-tags "web/login:./dist/es/web/login.mjs,webpack-esm:./dist/webpack-esm/index.mjs"]
|
|
166
168
|
note:
|
|
169
|
+
versionSource - JSON file path used to read the "version" field. if not specified then apply "./package.json"
|
|
167
170
|
webpack - if not specified then apply "./dist/webpack/index.js"
|
|
168
171
|
umd - if not specified then apply "./dist/umd/index.js"
|
|
169
172
|
bin - if not specified then apply "./dist/bin/index.js"
|
package/tool-lib/tools.d.ts
CHANGED
|
@@ -77,6 +77,11 @@ declare global {
|
|
|
77
77
|
regex: RegExp;
|
|
78
78
|
/** rmc */
|
|
79
79
|
rmc4ts: boolean | "keepBangLine";
|
|
80
|
+
/**
|
|
81
|
+
* @default `./package.json`
|
|
82
|
+
* @date 2026/05/12 22:06:36
|
|
83
|
+
*/
|
|
84
|
+
versionSource?: string;
|
|
80
85
|
/**
|
|
81
86
|
* webpacked source path.
|
|
82
87
|
* @default `./dist/webpack/index.js`
|
|
@@ -137,7 +142,7 @@ declare global {
|
|
|
137
142
|
/**
|
|
138
143
|
* version command type
|
|
139
144
|
*/
|
|
140
|
-
declare type TVersionString = `${number}.${number}.${number}`;
|
|
145
|
+
declare type TVersionString = `${number}.${number}.${number}${string}`;
|
|
141
146
|
declare type TVersionRecords = Record<TVersionString, Partial<Record<TRwsTags, number>>>;
|
|
142
147
|
declare type TSizeRecordEntry = TVersionRecords["0.0.0"];
|
|
143
148
|
}
|