@yarn-tool/pkg-entry-util 1.0.2 → 1.0.6
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 +49 -0
- package/lib/field/bin.d.ts +3 -0
- package/lib/field/bin.js +38 -0
- package/lib/field/bin.js.map +1 -0
- package/lib/field/publishConfig.d.ts +5 -0
- package/lib/field/publishConfig.js +16 -0
- package/lib/field/publishConfig.js.map +1 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +5 -1
- package/lib/index.js.map +1 -1
- package/lib/preset/dummy.d.ts +1 -0
- package/lib/preset/dummy.js +32 -0
- package/lib/preset/dummy.js.map +1 -0
- package/lib/preset/pkg-scripts.d.ts +17 -0
- package/lib/preset/pkg-scripts.js +24 -0
- package/lib/preset/pkg-scripts.js.map +1 -0
- package/lib/preset/root-scripts.d.ts +12 -0
- package/lib/preset/root-scripts.js +20 -0
- package/lib/preset/root-scripts.js.map +1 -0
- package/lib/preset/shared-root-scripts.d.ts +3 -0
- package/lib/preset/shared-root-scripts.js +10 -0
- package/lib/preset/shared-root-scripts.js.map +1 -0
- package/lib/preset/ws-root-scripts.d.ts +28 -0
- package/lib/preset/ws-root-scripts.js +36 -0
- package/lib/preset/ws-root-scripts.js.map +1 -0
- package/package.json +6 -5
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,55 @@
|
|
|
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
|
+
## [1.0.6](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/pkg-entry-util@1.0.5...@yarn-tool/pkg-entry-util@1.0.6) (2022-01-25)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### ♻️ Chores
|
|
10
|
+
|
|
11
|
+
* **deps:** update deps ([9d91e96](https://github.com/bluelovers/ws-yarn-workspaces/commit/9d91e960a0e02ec2896b791cb5933f47d86b0bc5))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [1.0.5](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/pkg-entry-util@1.0.4...@yarn-tool/pkg-entry-util@1.0.5) (2022-01-13)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### 📦 Code Refactoring
|
|
21
|
+
|
|
22
|
+
* move to shared preset ([158218f](https://github.com/bluelovers/ws-yarn-workspaces/commit/158218f4e58cfb97a40bed485a46deec8978f454))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### ♻️ Chores
|
|
26
|
+
|
|
27
|
+
* **deps:** update deps ([7658604](https://github.com/bluelovers/ws-yarn-workspaces/commit/7658604e5cabfa61ed92c2579ecae3d37d3fd737))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
## [1.0.4](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/pkg-entry-util@1.0.3...@yarn-tool/pkg-entry-util@1.0.4) (2022-01-01)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### 📦 Code Refactoring
|
|
37
|
+
|
|
38
|
+
* code splitting ([fa83e8f](https://github.com/bluelovers/ws-yarn-workspaces/commit/fa83e8f47a10a5ad7ed1ac5337d8a2d20c556df9))
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
## [1.0.3](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/pkg-entry-util@1.0.2...@yarn-tool/pkg-entry-util@1.0.3) (2021-12-31)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
### 📦 Code Refactoring
|
|
48
|
+
|
|
49
|
+
* code splitting ([3236306](https://github.com/bluelovers/ws-yarn-workspaces/commit/323630687dcfaa851cd65176d446d55f74a1dd3b))
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
6
55
|
## [1.0.2](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/pkg-entry-util@1.0.1...@yarn-tool/pkg-entry-util@1.0.2) (2021-12-26)
|
|
7
56
|
|
|
8
57
|
**Note:** Version bump only for package @yarn-tool/pkg-entry-util
|
package/lib/field/bin.js
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fixPkgBinField = exports.fixBinPath = void 0;
|
|
4
|
+
const fs_extra_1 = require("fs-extra");
|
|
5
|
+
const upath2_1 = require("upath2");
|
|
6
|
+
function fixBinPath(bin, root) {
|
|
7
|
+
if (!(0, fs_extra_1.existsSync)((0, upath2_1.join)(root, bin))
|
|
8
|
+
&& (0, fs_extra_1.existsSync)((0, upath2_1.join)(root, 'bin', bin))) {
|
|
9
|
+
return (0, upath2_1.join)('.', 'bin', bin);
|
|
10
|
+
}
|
|
11
|
+
return null;
|
|
12
|
+
}
|
|
13
|
+
exports.fixBinPath = fixBinPath;
|
|
14
|
+
function fixPkgBinField(pkg, root) {
|
|
15
|
+
if (pkg.bin) {
|
|
16
|
+
if (typeof pkg.bin === 'string') {
|
|
17
|
+
let bin_new = fixBinPath(pkg.bin, root);
|
|
18
|
+
if (bin_new) {
|
|
19
|
+
// @ts-ignore
|
|
20
|
+
pkg.bin = bin_new;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
else if (typeof pkg.bin === 'object' && !Array.isArray(pkg.bin)) {
|
|
24
|
+
Object.keys(pkg.bin)
|
|
25
|
+
.forEach(function (key) {
|
|
26
|
+
if (typeof pkg.bin[key] === 'string') {
|
|
27
|
+
let bin_new = fixBinPath(pkg.bin[key], root);
|
|
28
|
+
if (bin_new) {
|
|
29
|
+
pkg.bin[key] = bin_new;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return pkg;
|
|
36
|
+
}
|
|
37
|
+
exports.fixPkgBinField = fixPkgBinField;
|
|
38
|
+
//# sourceMappingURL=bin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bin.js","sourceRoot":"","sources":["bin.ts"],"names":[],"mappings":";;;AACA,uCAAsC;AACtC,mCAAqC;AAErC,SAAgB,UAAU,CAAC,GAAW,EAAE,IAAY;IAEnD,IACC,CAAC,IAAA,qBAAU,EAAC,IAAA,aAAI,EAAC,IAAI,EAAE,GAAG,CAAC,CAAC;WACzB,IAAA,qBAAU,EAAC,IAAA,aAAI,EAAC,IAAI,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC,EAEtC;QACC,OAAO,IAAA,aAAI,EAAC,GAAG,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC;KAC7B;IAED,OAAO,IAAI,CAAC;AACb,CAAC;AAXD,gCAWC;AAED,SAAgB,cAAc,CAAyB,GAAM,EAAE,IAAY;IAE1E,IAAI,GAAG,CAAC,GAAG,EACX;QACC,IAAI,OAAO,GAAG,CAAC,GAAG,KAAK,QAAQ,EAC/B;YACC,IAAI,OAAO,GAAG,UAAU,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;YAExC,IAAI,OAAO,EACX;gBACC,aAAa;gBACb,GAAG,CAAC,GAAG,GAAG,OAAO,CAAC;aAClB;SACD;aACI,IAAI,OAAO,GAAG,CAAC,GAAG,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,EAC/D;YACC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;iBAClB,OAAO,CAAC,UAAU,GAAG;gBAErB,IAAI,OAAO,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,QAAQ,EACpC;oBACC,IAAI,OAAO,GAAG,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,CAAC;oBAE7C,IAAI,OAAO,EACX;wBACC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC;qBACvB;iBACD;YACF,CAAC,CAAC,CACF;SACD;KACD;IAED,OAAO,GAAG,CAAA;AACX,CAAC;AAlCD,wCAkCC","sourcesContent":["import { IPackageJson } from '@ts-type/package-dts/package-json';\nimport { existsSync } from 'fs-extra';\nimport { join, posix } from 'upath2';\n\nexport function fixBinPath(bin: string, root: string)\n{\n\tif (\n\t\t!existsSync(join(root, bin))\n\t\t&& existsSync(join(root, 'bin', bin))\n\t)\n\t{\n\t\treturn join('.', 'bin', bin);\n\t}\n\n\treturn null;\n}\n\nexport function fixPkgBinField<T extends IPackageJson>(pkg: T, root: string)\n{\n\tif (pkg.bin)\n\t{\n\t\tif (typeof pkg.bin === 'string')\n\t\t{\n\t\t\tlet bin_new = fixBinPath(pkg.bin, root);\n\n\t\t\tif (bin_new)\n\t\t\t{\n\t\t\t\t// @ts-ignore\n\t\t\t\tpkg.bin = bin_new;\n\t\t\t}\n\t\t}\n\t\telse if (typeof pkg.bin === 'object' && !Array.isArray(pkg.bin))\n\t\t{\n\t\t\tObject.keys(pkg.bin)\n\t\t\t\t.forEach(function (key)\n\t\t\t\t{\n\t\t\t\t\tif (typeof pkg.bin[key] === 'string')\n\t\t\t\t\t{\n\t\t\t\t\t\tlet bin_new = fixBinPath(pkg.bin[key], root);\n\n\t\t\t\t\t\tif (bin_new)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpkg.bin[key] = bin_new;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t;\n\t\t}\n\t}\n\n\treturn pkg\n}\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { IPackageJson } from '@ts-type/package-dts/package-json';
|
|
2
|
+
import { IPackageJsonPublishConfig } from '@ts-type/package-dts/lib/package-json/types';
|
|
3
|
+
export declare function fixPublishConfig<T extends IPackageJson>(pkg: T): T & {
|
|
4
|
+
publishConfig: IPackageJsonPublishConfig;
|
|
5
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fixPublishConfig = void 0;
|
|
4
|
+
function fixPublishConfig(pkg) {
|
|
5
|
+
if (!pkg.publishConfig
|
|
6
|
+
&& !pkg.private
|
|
7
|
+
&& pkg.name
|
|
8
|
+
&& /\//.test(pkg.name)) {
|
|
9
|
+
pkg.publishConfig = {
|
|
10
|
+
access: "public",
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
return pkg;
|
|
14
|
+
}
|
|
15
|
+
exports.fixPublishConfig = fixPublishConfig;
|
|
16
|
+
//# sourceMappingURL=publishConfig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publishConfig.js","sourceRoot":"","sources":["publishConfig.ts"],"names":[],"mappings":";;;AAGA,SAAgB,gBAAgB,CAAyB,GAAM;IAE9D,IAAI,CAAC,GAAG,CAAC,aAAa;WAClB,CAAC,GAAG,CAAC,OAAO;WACZ,GAAG,CAAC,IAAI;WACR,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,EAEvB;QACC,GAAG,CAAC,aAAa,GAAG;YACnB,MAAM,EAAE,QAAQ;SAChB,CAAC;KACF;IACD,OAAO,GAEN,CAAA;AACF,CAAC;AAfD,4CAeC","sourcesContent":["import { IPackageJson } from '@ts-type/package-dts/package-json';\nimport { IPackageJsonPublishConfig } from '@ts-type/package-dts/lib/package-json/types';\n\nexport function fixPublishConfig<T extends IPackageJson>(pkg: T)\n{\n\tif (!pkg.publishConfig\n\t\t&& !pkg.private\n\t\t&& pkg.name\n\t\t&& /\\//.test(pkg.name)\n\t)\n\t{\n\t\tpkg.publishConfig = {\n\t\t\taccess: \"public\",\n\t\t};\n\t}\n\treturn pkg as T & {\n\t\tpublishConfig: IPackageJsonPublishConfig\n\t}\n}\n"]}
|
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.pkgExportsVerify = exports.pkgExportsAddPJsonEntry = void 0;
|
|
3
|
+
exports.pkgExportsVerify = exports.pkgExportsAddPJsonEntry = exports.fixPublishConfig = exports.fixPkgBinField = void 0;
|
|
4
|
+
var bin_1 = require("./field/bin");
|
|
5
|
+
Object.defineProperty(exports, "fixPkgBinField", { enumerable: true, get: function () { return bin_1.fixPkgBinField; } });
|
|
6
|
+
var publishConfig_1 = require("./field/publishConfig");
|
|
7
|
+
Object.defineProperty(exports, "fixPublishConfig", { enumerable: true, get: function () { return publishConfig_1.fixPublishConfig; } });
|
|
4
8
|
var exports_1 = require("./field/exports");
|
|
5
9
|
Object.defineProperty(exports, "pkgExportsAddPJsonEntry", { enumerable: true, get: function () { return exports_1.pkgExportsAddPJsonEntry; } });
|
|
6
10
|
Object.defineProperty(exports, "pkgExportsVerify", { enumerable: true, get: function () { return exports_1.pkgExportsVerify; } });
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAAA,mCAA6C;AAApC,qGAAA,cAAc,OAAA;AAEvB,uDAAyD;AAAhD,iHAAA,gBAAgB,OAAA;AAEzB,2CAA4E;AAAnE,kHAAA,uBAAuB,OAAA;AAAE,2GAAA,gBAAgB,OAAA","sourcesContent":["export { fixPkgBinField } from './field/bin';\n\nexport { fixPublishConfig } from './field/publishConfig';\n\nexport { pkgExportsAddPJsonEntry, pkgExportsVerify } from './field/exports';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function fillDummyScripts<T extends Record<string, string>>(scripts?: T, prefix?: string): T;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fillDummyScripts = void 0;
|
|
4
|
+
function fillDummyScripts(scripts, prefix) {
|
|
5
|
+
// @ts-ignore
|
|
6
|
+
scripts !== null && scripts !== void 0 ? scripts : (scripts = {});
|
|
7
|
+
let text = `echo ${prefix !== null && prefix !== void 0 ? prefix : ''}`.trim();
|
|
8
|
+
[
|
|
9
|
+
'preversion',
|
|
10
|
+
'version',
|
|
11
|
+
'prepublishOnly',
|
|
12
|
+
'postversion',
|
|
13
|
+
'publish',
|
|
14
|
+
'prepublish',
|
|
15
|
+
'postpublish',
|
|
16
|
+
'postpublishOnly',
|
|
17
|
+
'prepare',
|
|
18
|
+
'prepack',
|
|
19
|
+
'pack',
|
|
20
|
+
'postpack',
|
|
21
|
+
'pretest',
|
|
22
|
+
'ci:build',
|
|
23
|
+
'ci:install',
|
|
24
|
+
].forEach(k => {
|
|
25
|
+
var _a;
|
|
26
|
+
// @ts-ignore
|
|
27
|
+
(_a = scripts[k]) !== null && _a !== void 0 ? _a : (scripts[k] = `${text} ${k}`);
|
|
28
|
+
});
|
|
29
|
+
return scripts;
|
|
30
|
+
}
|
|
31
|
+
exports.fillDummyScripts = fillDummyScripts;
|
|
32
|
+
//# sourceMappingURL=dummy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dummy.js","sourceRoot":"","sources":["dummy.ts"],"names":[],"mappings":";;;AAAA,SAAgB,gBAAgB,CAAmC,OAAW,EAAE,MAAe;IAE9F,aAAa;IACb,OAAO,aAAP,OAAO,cAAP,OAAO,IAAP,OAAO,GAAK,EAAE,EAAC;IAEf,IAAI,IAAI,GAAG,QAAQ,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC;IAExC;QACA,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;KACF,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;;QAEvB,aAAa;QACb,MAAA,OAAO,CAAC,CAAC,qCAAT,OAAO,CAAC,CAAC,IAAM,GAAG,IAAI,IAAI,CAAC,EAAE,EAAA;IAC9B,CAAC,CAAC,CAAC;IACH,OAAO,OAAO,CAAC;AAChB,CAAC;AA7BD,4CA6BC","sourcesContent":["export function fillDummyScripts<T extends Record<string, string>>(scripts?: T, prefix?: string)\n{\n\t// @ts-ignore\n\tscripts ??= {};\n\n\tlet text = `echo ${prefix ?? ''}`.trim();\n\n\t([\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).forEach(k =>\n\t{\n\t\t// @ts-ignore\n\t\tscripts[k] ??= `${text} ${k}`\n\t});\n\treturn scripts;\n}\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare function defaultPkgNotOldExists(): {
|
|
2
|
+
"test:mocha": string;
|
|
3
|
+
"test:jest": string;
|
|
4
|
+
"test:tsdx": string;
|
|
5
|
+
"build:dts:bundle": string;
|
|
6
|
+
"build:dts:copy": string;
|
|
7
|
+
"build:dts:tsc:emit": string;
|
|
8
|
+
"build:dts:tsc": string;
|
|
9
|
+
"build:tsdx": string;
|
|
10
|
+
"build:microbundle": string;
|
|
11
|
+
lint: string;
|
|
12
|
+
"lint:eslint": string;
|
|
13
|
+
review: string;
|
|
14
|
+
"review:test": string;
|
|
15
|
+
"review:coverage": string;
|
|
16
|
+
coverage: string;
|
|
17
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.defaultPkgNotOldExists = void 0;
|
|
4
|
+
function defaultPkgNotOldExists() {
|
|
5
|
+
return {
|
|
6
|
+
"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:tsdx": "ynpx @bluelovers/tsdx test --passWithNoTests",
|
|
9
|
+
"build:dts:bundle": "ynpx dts-bundle-generator -o ./dist/index.d.ts ./src/index.ts --no-banner & echo build:dts",
|
|
10
|
+
"build:dts:copy": "copy .\\src\\index.d.ts .\\dist\\index.d.ts & echo build:dts",
|
|
11
|
+
"build:dts:tsc:emit": "tsc --emitDeclarationOnly --declaration --noEmit false",
|
|
12
|
+
"build:dts:tsc": "yarn run build:dts:tsc:emit && yarn run build:dts:copy",
|
|
13
|
+
"build:tsdx": "ynpx @bluelovers/tsdx build --target node --name index",
|
|
14
|
+
"build:microbundle": "ynpx microbundle --target node",
|
|
15
|
+
"lint": "yarn run lint:eslint",
|
|
16
|
+
"lint:eslint": "ynpx eslint --ext .ts,.tsx,.mts,.cts ./",
|
|
17
|
+
"review": "yarn run review:coverage",
|
|
18
|
+
"review:test": "yarn run lint && yarn run test",
|
|
19
|
+
"review:coverage": "yarn run lint && yarn run coverage",
|
|
20
|
+
"coverage": "yarn run test -- --coverage",
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
exports.defaultPkgNotOldExists = defaultPkgNotOldExists;
|
|
24
|
+
//# sourceMappingURL=pkg-scripts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pkg-scripts.js","sourceRoot":"","sources":["pkg-scripts.ts"],"names":[],"mappings":";;;AAAA,SAAgB,sBAAsB;IAErC,OAAO;QACN,YAAY,EAAE,oHAAoH;QAClI,WAAW,EAAE,wBAAwB;QACrC,WAAW,EAAE,8CAA8C;QAC3D,kBAAkB,EAAE,4FAA4F;QAChH,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":["export function defaultPkgNotOldExists()\n{\n\treturn {\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:jest\": \"jest --passWithNoTests\",\n\t\t\"test:tsdx\": \"ynpx @bluelovers/tsdx test --passWithNoTests\",\n\t\t\"build:dts:bundle\": \"ynpx dts-bundle-generator -o ./dist/index.d.ts ./src/index.ts --no-banner & echo build:dts\",\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"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare function defaultRootScripts(): {
|
|
2
|
+
"prepublishOnly:check-bin": string;
|
|
3
|
+
"version:bump": string;
|
|
4
|
+
"npm:publish": string;
|
|
5
|
+
"npm:publish:bump": string;
|
|
6
|
+
"postpublish:git:commit": string;
|
|
7
|
+
"postpublish:git:tag": string;
|
|
8
|
+
"postpublish:changelog": string;
|
|
9
|
+
"postpublish:git:push": string;
|
|
10
|
+
postpublish: string;
|
|
11
|
+
"ci:install": string;
|
|
12
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.defaultRootScripts = void 0;
|
|
4
|
+
const shared_root_scripts_1 = require("./shared-root-scripts");
|
|
5
|
+
function defaultRootScripts() {
|
|
6
|
+
return {
|
|
7
|
+
...(0, shared_root_scripts_1.defaultSharedRootScripts)(),
|
|
8
|
+
"prepublishOnly:check-bin": "ynpx --quiet @yarn-tool/check-pkg-bin",
|
|
9
|
+
"version:bump": "yarn-tool version",
|
|
10
|
+
"npm:publish": "npm publish",
|
|
11
|
+
"npm:publish:bump": "yarn run version:bump && npm publish",
|
|
12
|
+
"postpublish:git:commit": `git commit -m "chore(release): publish" . & echo postpublish:git:commit`,
|
|
13
|
+
"postpublish:git:tag": `ynpx --quiet @yarn-tool/tag`,
|
|
14
|
+
"postpublish:changelog": `ynpx --quiet @yarn-tool/changelog && git add ./CHANGELOG.md`,
|
|
15
|
+
"postpublish:git:push": `git push --follow-tags`,
|
|
16
|
+
"postpublish": `yarn run postpublish:changelog && yarn run postpublish:git:commit && yarn run postpublish:git:tag && yarn run postpublish:git:push`,
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
exports.defaultRootScripts = defaultRootScripts;
|
|
20
|
+
//# sourceMappingURL=root-scripts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"root-scripts.js","sourceRoot":"","sources":["root-scripts.ts"],"names":[],"mappings":";;;AAAA,+DAAiE;AAEjE,SAAgB,kBAAkB;IAEjC,OAAO;QACN,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;AAdD,gDAcC","sourcesContent":["import { defaultSharedRootScripts } from './shared-root-scripts';\n\nexport function defaultRootScripts()\n{\n\treturn {\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"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.defaultSharedRootScripts = void 0;
|
|
4
|
+
function defaultSharedRootScripts() {
|
|
5
|
+
return {
|
|
6
|
+
"ci:install": "yarn install --frozen-lockfile && yarn add -W typescript@next jest ts-jest ts-node ynpx lerna yarn-tool",
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
exports.defaultSharedRootScripts = defaultSharedRootScripts;
|
|
10
|
+
//# sourceMappingURL=shared-root-scripts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared-root-scripts.js","sourceRoot":"","sources":["shared-root-scripts.ts"],"names":[],"mappings":";;;AAAA,SAAgB,wBAAwB;IAEvC,OAAO;QACN,YAAY,EAAE,yGAAyG;KACvH,CAAA;AACF,CAAC;AALD,4DAKC","sourcesContent":["export function defaultSharedRootScripts()\n{\n\treturn {\n\t\t\"ci:install\": \"yarn install --frozen-lockfile && yarn add -W typescript@next jest ts-jest ts-node ynpx lerna yarn-tool\",\n\t}\n}\n"]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export declare function defaultWorkspaceRootScripts(): {
|
|
2
|
+
"test:all": string;
|
|
3
|
+
"build:all": string;
|
|
4
|
+
"review:all": string;
|
|
5
|
+
"coverage:all": string;
|
|
6
|
+
"lint:all": string;
|
|
7
|
+
preversion: string;
|
|
8
|
+
"lerna:publish": string;
|
|
9
|
+
"lerna:publish:yes": string;
|
|
10
|
+
"prepublishOnly:root": string;
|
|
11
|
+
"prepublishOnly:lockfile": string;
|
|
12
|
+
"prepublishOnly:check-bin": string;
|
|
13
|
+
"prepare:fix-ws-links": string;
|
|
14
|
+
"prepublishOnly:update": string;
|
|
15
|
+
ncu: string;
|
|
16
|
+
"ncu:root": string;
|
|
17
|
+
"ncu:ws": string;
|
|
18
|
+
"sort-package-json": string;
|
|
19
|
+
"sort-package-json:root": string;
|
|
20
|
+
"sort-package-json:ws": string;
|
|
21
|
+
postpublishOnly: string;
|
|
22
|
+
"postpublishOnly:ws-root-changelog": string;
|
|
23
|
+
test: string;
|
|
24
|
+
"install:reset-lockfile": string;
|
|
25
|
+
"ws:fix-all": string;
|
|
26
|
+
"tsc:showConfig": string;
|
|
27
|
+
"ci:install": string;
|
|
28
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.defaultWorkspaceRootScripts = void 0;
|
|
4
|
+
const shared_root_scripts_1 = require("./shared-root-scripts");
|
|
5
|
+
function defaultWorkspaceRootScripts() {
|
|
6
|
+
return {
|
|
7
|
+
...(0, shared_root_scripts_1.defaultSharedRootScripts)(),
|
|
8
|
+
"test:all": "lerna run test --concurrency 1",
|
|
9
|
+
"build:all": "lerna run build --concurrency 1",
|
|
10
|
+
"review:all": "lerna run review --concurrency 1",
|
|
11
|
+
"coverage:all": "lerna run coverage --concurrency 1",
|
|
12
|
+
"lint:all": "lerna run lint --concurrency 1",
|
|
13
|
+
"preversion": "yt ws run test",
|
|
14
|
+
"lerna:publish": "yarn run prepublishOnly:root && lerna publish && yarn run postpublishOnly",
|
|
15
|
+
"lerna:publish:yes": "yarn run prepublishOnly:root && lerna publish --yes --bump patch && yarn run postpublishOnly",
|
|
16
|
+
"prepublishOnly:root": "yarn run prepublishOnly:check-bin && yarn run prepare:fix-ws-links",
|
|
17
|
+
"prepublishOnly:lockfile": "ynpx --quiet sync-lockfile",
|
|
18
|
+
"prepublishOnly:check-bin": "ynpx --quiet @yarn-tool/check-pkg-bin",
|
|
19
|
+
"prepare:fix-ws-links": "ynpx --quiet @yarn-tool/fix-ws-links",
|
|
20
|
+
"prepublishOnly:update": "yarn run ncu && yarn run sort-package-json",
|
|
21
|
+
"ncu": "yarn run ncu:root && yarn run ncu:ws",
|
|
22
|
+
"ncu:root": "yarn-tool ncu -u",
|
|
23
|
+
"ncu:ws": "yarn-tool ws exec yarn-tool ncu -- -u",
|
|
24
|
+
"sort-package-json": "yarn run sort-package-json:root && yarn run sort-package-json:ws",
|
|
25
|
+
"sort-package-json:root": "yarn-tool sort",
|
|
26
|
+
"sort-package-json:ws": "yarn-tool ws sort",
|
|
27
|
+
"postpublishOnly": "yarn run postpublishOnly:ws-root-changelog & echo postpublishOnly",
|
|
28
|
+
"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",
|
|
29
|
+
"test": "yarn-tool ws run test",
|
|
30
|
+
"install:reset-lockfile": "yarn-tool install --reset-lockfile",
|
|
31
|
+
"ws:fix-all": "yarn-tool fix-all --overwriteHostedGitInfo",
|
|
32
|
+
"tsc:showConfig": "ynpx get-current-tsconfig -p",
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
exports.defaultWorkspaceRootScripts = defaultWorkspaceRootScripts;
|
|
36
|
+
//# sourceMappingURL=ws-root-scripts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ws-root-scripts.js","sourceRoot":"","sources":["ws-root-scripts.ts"],"names":[],"mappings":";;;AAAA,+DAAiE;AAEjE,SAAgB,2BAA2B;IAE1C,OAAO;QACN,GAAG,IAAA,8CAAwB,GAAE;QAC7B,UAAU,EAAE,gCAAgC;QAC5C,WAAW,EAAE,iCAAiC;QAC9C,YAAY,EAAE,kCAAkC;QAChD,cAAc,EAAE,oCAAoC;QACpD,UAAU,EAAE,gCAAgC;QAC5C,YAAY,EAAE,gBAAgB;QAC9B,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,sCAAsC;QAC7C,UAAU,EAAE,kBAAkB;QAC9B,QAAQ,EAAE,uCAAuC;QACjD,mBAAmB,EAAE,kEAAkE;QACvF,wBAAwB,EAAE,gBAAgB;QAC1C,sBAAsB,EAAE,mBAAmB;QAC3C,iBAAiB,EAAE,mEAAmE;QACtF,mCAAmC,EAAE,6LAA6L;QAClO,MAAM,EAAE,uBAAuB;QAC/B,wBAAwB,EAAE,oCAAoC;QAC9D,YAAY,EAAC,6CAA6C;QAC1D,gBAAgB,EAAE,8BAA8B;KAChD,CAAA;AACF,CAAC;AA9BD,kEA8BC","sourcesContent":["import { defaultSharedRootScripts } from './shared-root-scripts';\n\nexport function defaultWorkspaceRootScripts()\n{\n\treturn {\n\t\t...defaultSharedRootScripts(),\n\t\t\"test:all\": \"lerna run test --concurrency 1\",\n\t\t\"build:all\": \"lerna run build --concurrency 1\",\n\t\t\"review:all\": \"lerna run review --concurrency 1\",\n\t\t\"coverage:all\": \"lerna run coverage --concurrency 1\",\n\t\t\"lint:all\": \"lerna run lint --concurrency 1\",\n\t\t\"preversion\": \"yt ws run test\",\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:root && yarn run ncu:ws\",\n\t\t\"ncu:root\": \"yarn-tool ncu -u\",\n\t\t\"ncu:ws\": \"yarn-tool ws exec yarn-tool ncu -- -u\",\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-tool ws run test\",\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"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yarn-tool/pkg-entry-util",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"yarn",
|
|
@@ -51,14 +51,15 @@
|
|
|
51
51
|
"tsc:showConfig": "ynpx get-current-tsconfig -p"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@ts-type/package-dts": "^1.0.
|
|
55
|
-
"@yarn-tool/find-root": "^1.0.
|
|
54
|
+
"@ts-type/package-dts": "^1.0.58",
|
|
55
|
+
"@yarn-tool/find-root": "^1.0.61",
|
|
56
56
|
"fs-extra": "^10.0.0",
|
|
57
|
-
"tslib": "^2.3.1"
|
|
57
|
+
"tslib": "^2.3.1",
|
|
58
|
+
"upath2": "^3.1.12"
|
|
58
59
|
},
|
|
59
60
|
"publishConfig": {
|
|
60
61
|
"access": "public"
|
|
61
62
|
},
|
|
62
63
|
"packageManager": "yarn@^1.22.11",
|
|
63
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "fbf381266d9eac5a9f129be640e2690e19cbb956"
|
|
64
65
|
}
|