@yarn-tool/pkg-entry-util 2.0.10 → 2.0.15
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 +82 -0
- package/lib/field/scripts.d.ts +8 -0
- package/lib/field/scripts.js +16 -0
- package/lib/field/scripts.js.map +1 -0
- package/lib/preset/dummy.d.ts +2 -0
- package/lib/preset/dummy.js +15 -10
- package/lib/preset/dummy.js.map +1 -1
- package/lib/preset/pkg-scripts.d.ts +10 -3
- package/lib/preset/pkg-scripts.js +11 -4
- package/lib/preset/pkg-scripts.js.map +1 -1
- package/lib/preset/root-scripts.d.ts +3 -0
- package/lib/preset/root-scripts.js +2 -0
- package/lib/preset/root-scripts.js.map +1 -1
- package/lib/preset/ws-root-scripts.d.ts +2 -1
- package/lib/preset/ws-root-scripts.js +1 -1
- package/lib/preset/ws-root-scripts.js.map +1 -1
- package/lib/util/scripts/dummy.d.ts +5 -0
- package/lib/util/scripts/dummy.js +24 -0
- package/lib/util/scripts/dummy.js.map +1 -0
- package/package.json +8 -5
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,88 @@
|
|
|
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.15](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/pkg-entry-util@2.0.14...@yarn-tool/pkg-entry-util@2.0.15) (2022-09-06)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### 📚 Documentation
|
|
11
|
+
|
|
12
|
+
* add directory ([442a552](https://github.com/bluelovers/ws-yarn-workspaces/commit/442a55232619f7fe2b9bad6f8eccfffc4f8f47d2))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### 🔖 Miscellaneous
|
|
16
|
+
|
|
17
|
+
* . ([3a7fdc9](https://github.com/bluelovers/ws-yarn-workspaces/commit/3a7fdc924ada93b1d0ac0160f8d77e46ff060588))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
## [2.0.14](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/pkg-entry-util@2.0.13...@yarn-tool/pkg-entry-util@2.0.14) (2022-08-26)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### 🔖 Miscellaneous
|
|
26
|
+
|
|
27
|
+
* . ([157d5dc](https://github.com/bluelovers/ws-yarn-workspaces/commit/157d5dc8959261d9326f6e633987182898ae9670))
|
|
28
|
+
* . ([dafc19c](https://github.com/bluelovers/ws-yarn-workspaces/commit/dafc19c43afb42c904b6e7dcc49d93567897c092))
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
## [2.0.13](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/pkg-entry-util@2.0.10...@yarn-tool/pkg-entry-util@2.0.13) (2022-08-25)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### 📦 Code Refactoring
|
|
37
|
+
|
|
38
|
+
* update script ([cd1016d](https://github.com/bluelovers/ws-yarn-workspaces/commit/cd1016ddcd93d1c1df4795ea4228ec45a76822c3))
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
### 🚨 Tests
|
|
42
|
+
|
|
43
|
+
* **snapshot:** snapshots updated ([50bff7c](https://github.com/bluelovers/ws-yarn-workspaces/commit/50bff7c13e1b01eb551c9b2252cfe3d971da8db8))
|
|
44
|
+
* **snapshot:** snapshots updated ([ed29b43](https://github.com/bluelovers/ws-yarn-workspaces/commit/ed29b437ae8bc9502d117d6a02fd40c9c24f1e33))
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
### 🔖 Miscellaneous
|
|
48
|
+
|
|
49
|
+
* . ([7636d5d](https://github.com/bluelovers/ws-yarn-workspaces/commit/7636d5df9ecb9858107ba6a7ab097d9c948ea7df))
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
## [2.0.12](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/pkg-entry-util@2.0.10...@yarn-tool/pkg-entry-util@2.0.12) (2022-08-25)
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
### 📦 Code Refactoring
|
|
58
|
+
|
|
59
|
+
* update script ([cd1016d](https://github.com/bluelovers/ws-yarn-workspaces/commit/cd1016ddcd93d1c1df4795ea4228ec45a76822c3))
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
### 🚨 Tests
|
|
63
|
+
|
|
64
|
+
* **snapshot:** snapshots updated ([ed29b43](https://github.com/bluelovers/ws-yarn-workspaces/commit/ed29b437ae8bc9502d117d6a02fd40c9c24f1e33))
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
### 🔖 Miscellaneous
|
|
68
|
+
|
|
69
|
+
* . ([7636d5d](https://github.com/bluelovers/ws-yarn-workspaces/commit/7636d5df9ecb9858107ba6a7ab097d9c948ea7df))
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
## [2.0.11](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/pkg-entry-util@2.0.10...@yarn-tool/pkg-entry-util@2.0.11) (2022-08-25)
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
### 📦 Code Refactoring
|
|
78
|
+
|
|
79
|
+
* update script ([cd1016d](https://github.com/bluelovers/ws-yarn-workspaces/commit/cd1016ddcd93d1c1df4795ea4228ec45a76822c3))
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
### 🔖 Miscellaneous
|
|
83
|
+
|
|
84
|
+
* . ([7636d5d](https://github.com/bluelovers/ws-yarn-workspaces/commit/7636d5df9ecb9858107ba6a7ab097d9c948ea7df))
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
6
88
|
## [2.0.10](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/pkg-entry-util@2.0.9...@yarn-tool/pkg-entry-util@2.0.10) (2022-08-19)
|
|
7
89
|
|
|
8
90
|
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const enum EnumScriptsEntry {
|
|
2
|
+
JEST_TEST = "jest --passWithNoTests",
|
|
3
|
+
NO_TEST_SPECIFIED = "echo \"Error: no test specified\"",
|
|
4
|
+
NO_TEST_SPECIFIED_EXIT = "echo \"Error: no test specified\" && exit 1",
|
|
5
|
+
BUILD_DTS_BUNDLE = "ynpx dts-bundle-generator -o ./dist/index.d.ts ./src/index.ts --no-banner --inline-declare-global & echo build:dts:bundle",
|
|
6
|
+
preversion = "yarn run test"
|
|
7
|
+
}
|
|
8
|
+
export declare function scriptsEntryIsNoTestSpecified(value: string): value is EnumScriptsEntry.NO_TEST_SPECIFIED_EXIT | EnumScriptsEntry.NO_TEST_SPECIFIED;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.scriptsEntryIsNoTestSpecified = exports.EnumScriptsEntry = void 0;
|
|
4
|
+
var EnumScriptsEntry;
|
|
5
|
+
(function (EnumScriptsEntry) {
|
|
6
|
+
EnumScriptsEntry["JEST_TEST"] = "jest --passWithNoTests";
|
|
7
|
+
EnumScriptsEntry["NO_TEST_SPECIFIED"] = "echo \"Error: no test specified\"";
|
|
8
|
+
EnumScriptsEntry["NO_TEST_SPECIFIED_EXIT"] = "echo \"Error: no test specified\" && exit 1";
|
|
9
|
+
EnumScriptsEntry["BUILD_DTS_BUNDLE"] = "ynpx dts-bundle-generator -o ./dist/index.d.ts ./src/index.ts --no-banner --inline-declare-global & echo build:dts:bundle";
|
|
10
|
+
EnumScriptsEntry["preversion"] = "yarn run test";
|
|
11
|
+
})(EnumScriptsEntry = exports.EnumScriptsEntry || (exports.EnumScriptsEntry = {}));
|
|
12
|
+
function scriptsEntryIsNoTestSpecified(value) {
|
|
13
|
+
return value === "echo \"Error: no test specified\" && exit 1" /* EnumScriptsEntry.NO_TEST_SPECIFIED_EXIT */ || value === "echo \"Error: no test specified\"" /* EnumScriptsEntry.NO_TEST_SPECIFIED */;
|
|
14
|
+
}
|
|
15
|
+
exports.scriptsEntryIsNoTestSpecified = scriptsEntryIsNoTestSpecified;
|
|
16
|
+
//# sourceMappingURL=scripts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scripts.js","sourceRoot":"","sources":["scripts.ts"],"names":[],"mappings":";;;AACA,IAAkB,gBAQjB;AARD,WAAkB,gBAAgB;IAEjC,wDAAoC,CAAA;IACpC,2EAAuD,CAAA;IACvD,0FAAsE,CAAA;IACtE,kKAA8I,CAAA;IAE9I,gDAA4B,CAAA;AAC7B,CAAC,EARiB,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAQjC;AAED,SAAgB,6BAA6B,CAAC,KAAa;IAE1D,OAAO,KAAK,gGAA4C,IAAI,KAAK,iFAAuC,CAAA;AACzG,CAAC;AAHD,sEAGC","sourcesContent":["\nexport const enum EnumScriptsEntry\n{\n\tJEST_TEST = \"jest --passWithNoTests\",\n\tNO_TEST_SPECIFIED = \"echo \\\"Error: no test specified\\\"\",\n\tNO_TEST_SPECIFIED_EXIT = \"echo \\\"Error: no test specified\\\" && exit 1\",\n\tBUILD_DTS_BUNDLE = \"ynpx dts-bundle-generator -o ./dist/index.d.ts ./src/index.ts --no-banner --inline-declare-global & echo build:dts:bundle\",\n\n\tpreversion = \"yarn run test\",\n}\n\nexport function scriptsEntryIsNoTestSpecified(value: string): value is EnumScriptsEntry.NO_TEST_SPECIFIED_EXIT | EnumScriptsEntry.NO_TEST_SPECIFIED\n{\n\treturn value === EnumScriptsEntry.NO_TEST_SPECIFIED_EXIT || value === EnumScriptsEntry.NO_TEST_SPECIFIED\n}\n"]}
|
package/lib/preset/dummy.d.ts
CHANGED
|
@@ -1 +1,3 @@
|
|
|
1
|
+
import { ITSArrayListMaybeReadonly } from 'ts-type/lib/type/base';
|
|
2
|
+
export declare function _fillDummyScriptsCore<T extends Record<string, string>>(scripts: T, prefix: string, fields: ITSArrayListMaybeReadonly<string>): T;
|
|
1
3
|
export declare function fillDummyScripts<T extends Record<string, string>>(scripts?: T, prefix?: string): T;
|
package/lib/preset/dummy.js
CHANGED
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.fillDummyScripts = void 0;
|
|
4
|
-
|
|
3
|
+
exports.fillDummyScripts = exports._fillDummyScriptsCore = void 0;
|
|
4
|
+
const dummy_1 = require("../util/scripts/dummy");
|
|
5
|
+
function _fillDummyScriptsCore(scripts, prefix, fields) {
|
|
5
6
|
// @ts-ignore
|
|
6
7
|
scripts !== null && scripts !== void 0 ? scripts : (scripts = {});
|
|
7
|
-
let text =
|
|
8
|
-
|
|
8
|
+
let text = (0, dummy_1._dummyEchoPrefix)(prefix);
|
|
9
|
+
fields.forEach(k => {
|
|
10
|
+
var _a;
|
|
11
|
+
// @ts-ignore
|
|
12
|
+
(_a = scripts[k]) !== null && _a !== void 0 ? _a : (scripts[k] = `${text} ${k}`);
|
|
13
|
+
});
|
|
14
|
+
return scripts;
|
|
15
|
+
}
|
|
16
|
+
exports._fillDummyScriptsCore = _fillDummyScriptsCore;
|
|
17
|
+
function fillDummyScripts(scripts, prefix) {
|
|
18
|
+
return _fillDummyScriptsCore(scripts, prefix, [
|
|
9
19
|
'preversion',
|
|
10
20
|
'version',
|
|
11
21
|
'prepublishOnly',
|
|
@@ -21,12 +31,7 @@ function fillDummyScripts(scripts, prefix) {
|
|
|
21
31
|
'pretest',
|
|
22
32
|
'ci:build',
|
|
23
33
|
'ci:install',
|
|
24
|
-
]
|
|
25
|
-
var _a;
|
|
26
|
-
// @ts-ignore
|
|
27
|
-
(_a = scripts[k]) !== null && _a !== void 0 ? _a : (scripts[k] = `${text} ${k}`);
|
|
28
|
-
});
|
|
29
|
-
return scripts;
|
|
34
|
+
]);
|
|
30
35
|
}
|
|
31
36
|
exports.fillDummyScripts = fillDummyScripts;
|
|
32
37
|
//# sourceMappingURL=dummy.js.map
|
package/lib/preset/dummy.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dummy.js","sourceRoot":"","sources":["dummy.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"dummy.js","sourceRoot":"","sources":["dummy.ts"],"names":[],"mappings":";;;AACA,iDAAyD;AAEzD,SAAgB,qBAAqB,CAAmC,OAAU,EAAE,MAAc,EAAE,MAAyC;IAE5I,aAAa;IACb,OAAO,aAAP,OAAO,cAAP,OAAO,IAAP,OAAO,GAAK,EAAE,EAAC;IAEf,IAAI,IAAI,GAAG,IAAA,wBAAgB,EAAC,MAAM,CAAC,CAAC;IAEpC,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;AAdD,sDAcC;AAED,SAAgB,gBAAgB,CAAmC,OAAW,EAAE,MAAe;IAE9F,OAAO,qBAAqB,CAAC,OAAO,EAAE,MAAM,EAAE;QAC7C,YAAY;QACZ,SAAS;QACT,gBAAgB;QAChB,aAAa;QACb,SAAS;QACT,YAAY;QACZ,aAAa;QACb,iBAAiB;QACjB,SAAS;QACT,SAAS;QACT,MAAM;QACN,UAAU;QACV,SAAS;QACT,UAAU;QACV,YAAY;KACH,CAAC,CAAC;AACb,CAAC;AAnBD,4CAmBC","sourcesContent":["import { ITSArrayListMaybeReadonly } from 'ts-type/lib/type/base';\nimport { _dummyEchoPrefix } from '../util/scripts/dummy';\n\nexport function _fillDummyScriptsCore<T extends Record<string, string>>(scripts: T, prefix: string, fields: ITSArrayListMaybeReadonly<string>)\n{\n\t// @ts-ignore\n\tscripts ??= {};\n\n\tlet text = _dummyEchoPrefix(prefix);\n\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\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,9 +1,13 @@
|
|
|
1
|
+
import { EnumScriptsEntry } from '../field/scripts';
|
|
2
|
+
export declare function defaultPkgScripts(): {
|
|
3
|
+
"test:jest": EnumScriptsEntry;
|
|
4
|
+
"test:snapshot": string;
|
|
5
|
+
"test:jest:snapshot": string;
|
|
6
|
+
};
|
|
1
7
|
export declare function defaultPkgNotOldExists(): {
|
|
2
8
|
"test:mocha": string;
|
|
3
|
-
"test:jest": string;
|
|
4
|
-
"test:snapshot": string;
|
|
5
9
|
"test:tsdx": string;
|
|
6
|
-
"build:dts:bundle":
|
|
10
|
+
"build:dts:bundle": EnumScriptsEntry;
|
|
7
11
|
"build:dts:copy": string;
|
|
8
12
|
"build:dts:tsc:emit": string;
|
|
9
13
|
"build:dts:tsc": string;
|
|
@@ -15,4 +19,7 @@ export declare function defaultPkgNotOldExists(): {
|
|
|
15
19
|
"review:test": string;
|
|
16
20
|
"review:coverage": string;
|
|
17
21
|
coverage: string;
|
|
22
|
+
"test:jest": EnumScriptsEntry;
|
|
23
|
+
"test:snapshot": string;
|
|
24
|
+
"test:jest:snapshot": string;
|
|
18
25
|
};
|
|
@@ -1,13 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.defaultPkgNotOldExists = void 0;
|
|
3
|
+
exports.defaultPkgNotOldExists = exports.defaultPkgScripts = void 0;
|
|
4
|
+
function defaultPkgScripts() {
|
|
5
|
+
return {
|
|
6
|
+
"test:jest": "jest --passWithNoTests" /* EnumScriptsEntry.JEST_TEST */,
|
|
7
|
+
"test:snapshot": "yarn run test -- -u",
|
|
8
|
+
"test:jest:snapshot": "yarn run test:jest -- -u",
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
exports.defaultPkgScripts = defaultPkgScripts;
|
|
4
12
|
function defaultPkgNotOldExists() {
|
|
5
13
|
return {
|
|
14
|
+
...defaultPkgScripts(),
|
|
6
15
|
"test:mocha": "ynpx --quiet -p ts-node -p mocha mocha -- --require ts-node/register \"!(node_modules)/**/*.{test,spec}.{ts,tsx}\"",
|
|
7
|
-
"test:jest": "jest --passWithNoTests",
|
|
8
|
-
"test:snapshot": "yarn run test -- -u",
|
|
9
16
|
"test:tsdx": "ynpx @bluelovers/tsdx test --passWithNoTests",
|
|
10
|
-
"build:dts:bundle": "ynpx dts-bundle-generator -o ./dist/index.d.ts ./src/index.ts --no-banner --inline-declare-global & echo build:dts:bundle"
|
|
17
|
+
"build:dts:bundle": "ynpx dts-bundle-generator -o ./dist/index.d.ts ./src/index.ts --no-banner --inline-declare-global & echo build:dts:bundle" /* EnumScriptsEntry.BUILD_DTS_BUNDLE */,
|
|
11
18
|
"build:dts:copy": "copy .\\src\\index.d.ts .\\dist\\index.d.ts & echo build:dts",
|
|
12
19
|
"build:dts:tsc:emit": "tsc --emitDeclarationOnly --declaration --noEmit false",
|
|
13
20
|
"build:dts:tsc": "yarn run build:dts:tsc:emit && yarn run build:dts:copy",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pkg-scripts.js","sourceRoot":"","sources":["pkg-scripts.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"pkg-scripts.js","sourceRoot":"","sources":["pkg-scripts.ts"],"names":[],"mappings":";;;AAEA,SAAgB,iBAAiB;IAEhC,OAAO;QACN,WAAW,2DAA4B;QACvC,eAAe,EAAE,qBAAqB;QACtC,oBAAoB,EAAE,0BAA0B;KAChD,CAAA;AACF,CAAC;AAPD,8CAOC;AAED,SAAgB,sBAAsB;IAErC,OAAO;QACN,GAAG,iBAAiB,EAAE;QACtB,YAAY,EAAE,oHAAoH;QAClI,WAAW,EAAE,8CAA8C;QAC3D,kBAAkB,qKAAmC;QACrD,gBAAgB,EAAE,8DAA8D;QAChF,oBAAoB,EAAE,wDAAwD;QAC9E,eAAe,EAAE,wDAAwD;QACzE,YAAY,EAAE,wDAAwD;QACtE,mBAAmB,EAAE,gCAAgC;QACrD,MAAM,EAAE,sBAAsB;QAC9B,aAAa,EAAE,yCAAyC;QACxD,QAAQ,EAAE,0BAA0B;QACpC,aAAa,EAAE,gCAAgC;QAC/C,iBAAiB,EAAE,oCAAoC;QACvD,UAAU,EAAE,6BAA6B;KACzC,CAAA;AACF,CAAC;AAnBD,wDAmBC","sourcesContent":["import { EnumScriptsEntry } from '../field/scripts';\n\nexport function defaultPkgScripts()\n{\n\treturn {\n\t\t\"test:jest\": EnumScriptsEntry.JEST_TEST,\n\t\t\"test:snapshot\": \"yarn run test -- -u\",\n\t\t\"test:jest:snapshot\": \"yarn run test:jest -- -u\",\n\t}\n}\n\nexport function defaultPkgNotOldExists()\n{\n\treturn {\n\t\t...defaultPkgScripts(),\n\t\t\"test:mocha\": \"ynpx --quiet -p ts-node -p mocha mocha -- --require ts-node/register \\\"!(node_modules)/**/*.{test,spec}.{ts,tsx}\\\"\",\n\t\t\"test:tsdx\": \"ynpx @bluelovers/tsdx test --passWithNoTests\",\n\t\t\"build:dts:bundle\": EnumScriptsEntry.BUILD_DTS_BUNDLE,\n\t\t\"build:dts:copy\": \"copy .\\\\src\\\\index.d.ts .\\\\dist\\\\index.d.ts & echo build:dts\",\n\t\t\"build:dts:tsc:emit\": \"tsc --emitDeclarationOnly --declaration --noEmit false\",\n\t\t\"build:dts:tsc\": \"yarn run build:dts:tsc:emit && yarn run build:dts:copy\",\n\t\t\"build:tsdx\": \"ynpx @bluelovers/tsdx build --target node --name index\",\n\t\t\"build:microbundle\": \"ynpx microbundle --target node\",\n\t\t\"lint\": \"yarn run lint:eslint\",\n\t\t\"lint:eslint\": \"ynpx eslint --ext .ts,.tsx,.mts,.cts ./\",\n\t\t\"review\": \"yarn run review:coverage\",\n\t\t\"review:test\": \"yarn run lint && yarn run test\",\n\t\t\"review:coverage\": \"yarn run lint && yarn run coverage\",\n\t\t\"coverage\": \"yarn run test -- --coverage\",\n\t}\n}\n"]}
|
|
@@ -12,4 +12,7 @@ export declare function defaultRootScripts(): {
|
|
|
12
12
|
"test:jest:clearCache": string;
|
|
13
13
|
"install:resetLockfile": string;
|
|
14
14
|
"install:frozenLockfile": string;
|
|
15
|
+
"test:jest": import("../field/scripts").EnumScriptsEntry;
|
|
16
|
+
"test:snapshot": string;
|
|
17
|
+
"test:jest:snapshot": string;
|
|
15
18
|
};
|
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.defaultRootScripts = void 0;
|
|
4
4
|
const shared_root_scripts_1 = require("./shared-root-scripts");
|
|
5
|
+
const pkg_scripts_1 = require("./pkg-scripts");
|
|
5
6
|
function defaultRootScripts() {
|
|
6
7
|
return {
|
|
8
|
+
...(0, pkg_scripts_1.defaultPkgScripts)(),
|
|
7
9
|
...(0, shared_root_scripts_1.defaultSharedRootScripts)(),
|
|
8
10
|
"prepublishOnly:check-bin": "ynpx --quiet @yarn-tool/check-pkg-bin",
|
|
9
11
|
"version:bump": "yarn-tool version",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"root-scripts.js","sourceRoot":"","sources":["root-scripts.ts"],"names":[],"mappings":";;;AAAA,+DAAiE;
|
|
1
|
+
{"version":3,"file":"root-scripts.js","sourceRoot":"","sources":["root-scripts.ts"],"names":[],"mappings":";;;AAAA,+DAAiE;AACjE,+CAAkD;AAElD,SAAgB,kBAAkB;IAEjC,OAAO;QACN,GAAG,IAAA,+BAAiB,GAAE;QACtB,GAAG,IAAA,8CAAwB,GAAE;QAC7B,0BAA0B,EAAE,uCAAuC;QACnE,cAAc,EAAE,mBAAmB;QACnC,aAAa,EAAE,aAAa;QAC5B,kBAAkB,EAAE,sCAAsC;QAC1D,wBAAwB,EAAE,yEAAyE;QACnG,qBAAqB,EAAE,6BAA6B;QACpD,uBAAuB,EAAE,6DAA6D;QACtF,sBAAsB,EAAE,wBAAwB;QAChD,aAAa,EAAE,oIAAoI;KACnJ,CAAA;AACF,CAAC;AAfD,gDAeC","sourcesContent":["import { defaultSharedRootScripts } from './shared-root-scripts';\nimport { defaultPkgScripts } from './pkg-scripts';\n\nexport function defaultRootScripts()\n{\n\treturn {\n\t\t...defaultPkgScripts(),\n\t\t...defaultSharedRootScripts(),\n\t\t\"prepublishOnly:check-bin\": \"ynpx --quiet @yarn-tool/check-pkg-bin\",\n\t\t\"version:bump\": \"yarn-tool version\",\n\t\t\"npm:publish\": \"npm publish\",\n\t\t\"npm:publish:bump\": \"yarn run version:bump && npm publish\",\n\t\t\"postpublish:git:commit\": `git commit -m \"chore(release): publish\" . & echo postpublish:git:commit`,\n\t\t\"postpublish:git:tag\": `ynpx --quiet @yarn-tool/tag`,\n\t\t\"postpublish:changelog\": `ynpx --quiet @yarn-tool/changelog && git add ./CHANGELOG.md`,\n\t\t\"postpublish:git:push\": `git push --follow-tags`,\n\t\t\"postpublish\": `yarn run postpublish:changelog && yarn run postpublish:git:commit && yarn run postpublish:git:tag && yarn run postpublish:git:push`,\n\t}\n}\n"]}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { EnumScriptsEntry } from '../field/scripts';
|
|
1
2
|
export declare function defaultWorkspaceRootScripts(): {
|
|
2
3
|
"test:all": string;
|
|
3
4
|
"test:since": string;
|
|
@@ -5,7 +6,7 @@ export declare function defaultWorkspaceRootScripts(): {
|
|
|
5
6
|
"review:all": string;
|
|
6
7
|
"coverage:all": string;
|
|
7
8
|
"lint:all": string;
|
|
8
|
-
preversion:
|
|
9
|
+
preversion: EnumScriptsEntry;
|
|
9
10
|
postversion: string;
|
|
10
11
|
"lerna:publish": string;
|
|
11
12
|
"lerna:publish:yes": string;
|
|
@@ -11,7 +11,7 @@ function defaultWorkspaceRootScripts() {
|
|
|
11
11
|
"review:all": "yarn-tool ws run review --concurrency 1",
|
|
12
12
|
"coverage:all": "yarn-tool ws run coverage --concurrency 1",
|
|
13
13
|
"lint:all": "yarn-tool ws run lint --concurrency 1",
|
|
14
|
-
"preversion": "yarn run test"
|
|
14
|
+
"preversion": "yarn run test" /* EnumScriptsEntry.preversion */,
|
|
15
15
|
"postversion": "yarn-tool fix-all",
|
|
16
16
|
"lerna:publish": "yarn run prepublishOnly:root && lerna publish && yarn run postpublishOnly",
|
|
17
17
|
"lerna:publish:yes": "yarn run prepublishOnly:root && lerna publish --yes --bump patch && yarn run postpublishOnly",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ws-root-scripts.js","sourceRoot":"","sources":["ws-root-scripts.ts"],"names":[],"mappings":";;;AAAA,+DAAiE;
|
|
1
|
+
{"version":3,"file":"ws-root-scripts.js","sourceRoot":"","sources":["ws-root-scripts.ts"],"names":[],"mappings":";;;AAAA,+DAAiE;AAGjE,SAAgB,2BAA2B;IAE1C,OAAO;QACN,GAAG,IAAA,8CAAwB,GAAE;QAC7B,UAAU,EAAE,uCAAuC;QACnD,YAAY,EAAE,8BAA8B;QAC5C,WAAW,EAAE,wCAAwC;QACrD,YAAY,EAAE,yCAAyC;QACvD,cAAc,EAAE,2CAA2C;QAC3D,UAAU,EAAE,uCAAuC;QACnD,YAAY,mDAA6B;QACzC,aAAa,EAAE,mBAAmB;QAClC,eAAe,EAAE,2EAA2E;QAC5F,mBAAmB,EAAE,8FAA8F;QACnH,qBAAqB,EAAE,oEAAoE;QAC3F,yBAAyB,EAAE,4BAA4B;QACvD,0BAA0B,EAAE,uCAAuC;QACnE,sBAAsB,EAAE,sCAAsC;QAC9D,uBAAuB,EAAE,4CAA4C;QACrE,KAAK,EAAE,iBAAiB;QACxB,UAAU,EAAE,kBAAkB;QAC9B,QAAQ,EAAE,uBAAuB;QACjC,mBAAmB,EAAE,kEAAkE;QACvF,wBAAwB,EAAE,gBAAgB;QAC1C,sBAAsB,EAAE,mBAAmB;QAC3C,iBAAiB,EAAE,mEAAmE;QACtF,mCAAmC,EAAE,6LAA6L;QAClO,MAAM,EAAE,qBAAqB;QAC7B,mBAAmB,EAAE,gDAAgD;QACrE,qBAAqB,EAAE,uCAAuC;QAC9D,wBAAwB,EAAE,oCAAoC;QAC9D,YAAY,EAAC,6CAA6C;QAC1D,gBAAgB,EAAE,8BAA8B;KAChD,CAAA;AACF,CAAC;AAlCD,kEAkCC","sourcesContent":["import { defaultSharedRootScripts } from './shared-root-scripts';\nimport { EnumScriptsEntry } from '../field/scripts';\n\nexport function defaultWorkspaceRootScripts()\n{\n\treturn {\n\t\t...defaultSharedRootScripts(),\n\t\t\"test:all\": \"yarn-tool ws run test --concurrency 1\",\n\t\t\"test:since\": \"yarn run test:all -- --since\",\n\t\t\"build:all\": \"yarn-tool ws run build --concurrency 1\",\n\t\t\"review:all\": \"yarn-tool ws run review --concurrency 1\",\n\t\t\"coverage:all\": \"yarn-tool ws run coverage --concurrency 1\",\n\t\t\"lint:all\": \"yarn-tool ws run lint --concurrency 1\",\n\t\t\"preversion\": EnumScriptsEntry.preversion,\n\t\t\"postversion\": \"yarn-tool fix-all\",\n\t\t\"lerna:publish\": \"yarn run prepublishOnly:root && lerna publish && yarn run postpublishOnly\",\n\t\t\"lerna:publish:yes\": \"yarn run prepublishOnly:root && lerna publish --yes --bump patch && yarn run postpublishOnly\",\n\t\t\"prepublishOnly:root\": \"yarn run prepublishOnly:check-bin && yarn run prepare:fix-ws-links\",\n\t\t\"prepublishOnly:lockfile\": \"ynpx --quiet sync-lockfile\",\n\t\t\"prepublishOnly:check-bin\": \"ynpx --quiet @yarn-tool/check-pkg-bin\",\n\t\t\"prepare:fix-ws-links\": \"ynpx --quiet @yarn-tool/fix-ws-links\",\n\t\t\"prepublishOnly:update\": \"yarn run ncu && yarn run sort-package-json\",\n\t\t\"ncu\": \"yarn run ncu:ws\",\n\t\t\"ncu:root\": \"yarn-tool ncu -u\",\n\t\t\"ncu:ws\": \"yarn-tool ncu -u --AA\",\n\t\t\"sort-package-json\": \"yarn run sort-package-json:root && yarn 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\t\t\"postpublishOnly\": \"yarn run postpublishOnly:ws-root-changelog & echo postpublishOnly\",\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\t\t\"test\": \"yarn run test:since\",\n\t\t\"test:snapshot:all\": \"yarn-tool ws run test:snapshot --concurrency 1\",\n\t\t\"test:snapshot:since\": \"yarn run test:snapshot:all -- --since\",\n\t\t\"install:reset-lockfile\": \"yarn-tool install --reset-lockfile\",\n\t\t\"ws:fix-all\":\"yarn-tool fix-all --overwriteHostedGitInfo\",\n\t\t\"tsc:showConfig\": \"ynpx get-current-tsconfig -p\",\n\t}\n}\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare function _dummyEchoPrefix(prefix: string): string;
|
|
2
|
+
export declare function _dummyEchoTextCore(pre: string, text: string): string;
|
|
3
|
+
export declare function _dummyEchoText(prefix: string, text: string): string;
|
|
4
|
+
export declare function isDummyEchoMaybe(value: string): boolean;
|
|
5
|
+
export declare function isDummyEchoMaybeOrEmpty(value: string): boolean;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isDummyEchoMaybeOrEmpty = exports.isDummyEchoMaybe = exports._dummyEchoText = exports._dummyEchoTextCore = exports._dummyEchoPrefix = void 0;
|
|
4
|
+
function _dummyEchoPrefix(prefix) {
|
|
5
|
+
return `echo ${prefix !== null && prefix !== void 0 ? prefix : ''}`.trim();
|
|
6
|
+
}
|
|
7
|
+
exports._dummyEchoPrefix = _dummyEchoPrefix;
|
|
8
|
+
function _dummyEchoTextCore(pre, text) {
|
|
9
|
+
return `${pre} ${text}`.trim();
|
|
10
|
+
}
|
|
11
|
+
exports._dummyEchoTextCore = _dummyEchoTextCore;
|
|
12
|
+
function _dummyEchoText(prefix, text) {
|
|
13
|
+
return _dummyEchoTextCore(_dummyEchoPrefix(prefix), text);
|
|
14
|
+
}
|
|
15
|
+
exports._dummyEchoText = _dummyEchoText;
|
|
16
|
+
function isDummyEchoMaybe(value) {
|
|
17
|
+
return (value === null || value === void 0 ? void 0 : value.length) && value.startsWith('echo ') && !value.includes('&');
|
|
18
|
+
}
|
|
19
|
+
exports.isDummyEchoMaybe = isDummyEchoMaybe;
|
|
20
|
+
function isDummyEchoMaybeOrEmpty(value) {
|
|
21
|
+
return !(value === null || value === void 0 ? void 0 : value.length) || (value.startsWith('echo ') && !value.includes('&'));
|
|
22
|
+
}
|
|
23
|
+
exports.isDummyEchoMaybeOrEmpty = isDummyEchoMaybeOrEmpty;
|
|
24
|
+
//# sourceMappingURL=dummy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dummy.js","sourceRoot":"","sources":["dummy.ts"],"names":[],"mappings":";;;AAAA,SAAgB,gBAAgB,CAAC,MAAc;IAE9C,OAAO,QAAQ,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC;AACtC,CAAC;AAHD,4CAGC;AAED,SAAgB,kBAAkB,CAAC,GAAW,EAAE,IAAY;IAE3D,OAAO,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC,IAAI,EAAE,CAAC;AAChC,CAAC;AAHD,gDAGC;AAED,SAAgB,cAAc,CAAC,MAAc,EAAE,IAAY;IAE1D,OAAO,kBAAkB,CAAC,gBAAgB,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,CAAA;AAC1D,CAAC;AAHD,wCAGC;AAED,SAAgB,gBAAgB,CAAC,KAAa;IAE7C,OAAO,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,MAAM,KAAI,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAA;AAC1E,CAAC;AAHD,4CAGC;AAED,SAAgB,uBAAuB,CAAC,KAAa;IAEpD,OAAO,CAAC,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,MAAM,CAAA,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAA;AAC7E,CAAC;AAHD,0DAGC","sourcesContent":["export function _dummyEchoPrefix(prefix: string)\n{\n\treturn `echo ${prefix ?? ''}`.trim();\n}\n\nexport function _dummyEchoTextCore(pre: string, text: string)\n{\n\treturn `${pre} ${text}`.trim();\n}\n\nexport function _dummyEchoText(prefix: string, text: string)\n{\n\treturn _dummyEchoTextCore(_dummyEchoPrefix(prefix), text)\n}\n\nexport function isDummyEchoMaybe(value: string)\n{\n\treturn value?.length && value.startsWith('echo ') && !value.includes('&')\n}\n\nexport function isDummyEchoMaybeOrEmpty(value: string)\n{\n\treturn !value?.length || (value.startsWith('echo ') && !value.includes('&'))\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yarn-tool/pkg-entry-util",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.15",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"yarn",
|
|
@@ -23,7 +23,8 @@
|
|
|
23
23
|
},
|
|
24
24
|
"repository": {
|
|
25
25
|
"type": "git",
|
|
26
|
-
"url": "git+https://github.com/bluelovers/ws-yarn-workspaces.git"
|
|
26
|
+
"url": "git+https://github.com/bluelovers/ws-yarn-workspaces.git",
|
|
27
|
+
"directory": "packages/@yarn-tool/pkg-entry-util"
|
|
27
28
|
},
|
|
28
29
|
"license": "ISC",
|
|
29
30
|
"author": "bluelovers",
|
|
@@ -33,7 +34,9 @@
|
|
|
33
34
|
"lint": "ynpx --quiet eslint -- **/*.ts",
|
|
34
35
|
"test": "jest --passWithNoTests",
|
|
35
36
|
"test:jest": "jest --passWithNoTests",
|
|
37
|
+
"test:jest:snapshot": "yarn run test:jest -- -u",
|
|
36
38
|
"test:mocha": "ynpx --quiet -p ts-node -p mocha mocha -- --require ts-node/register \"!(node_modules)/**/*.{test,spec}.{ts,tsx}\"",
|
|
39
|
+
"test:snapshot": "yarn run test -- -u",
|
|
37
40
|
"test:tsdx": "ynpx @bluelovers/tsdx test --passWithNoTests",
|
|
38
41
|
"build:dts": "ynpx dts-bundle-generator -o ./dist/index.d.ts ./src/index.ts --no-banner & echo build:dts",
|
|
39
42
|
"build:tsdx": "ynpx @bluelovers/tsdx build --target node --name index",
|
|
@@ -52,14 +55,14 @@
|
|
|
52
55
|
},
|
|
53
56
|
"dependencies": {
|
|
54
57
|
"@ts-type/package-dts": "^2.0.5",
|
|
55
|
-
"@yarn-tool/find-root": "^2.0.
|
|
58
|
+
"@yarn-tool/find-root": "^2.0.6",
|
|
56
59
|
"fs-extra": "^10.1.0",
|
|
57
|
-
"tslib": "
|
|
60
|
+
"tslib": ">=2",
|
|
58
61
|
"upath2": "^3.1.15"
|
|
59
62
|
},
|
|
60
63
|
"packageManager": "yarn@1.22.19",
|
|
61
64
|
"publishConfig": {
|
|
62
65
|
"access": "public"
|
|
63
66
|
},
|
|
64
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "fccc2913440df31b04f2971e479fbe1d4c3a7a0c"
|
|
65
68
|
}
|