@yarn-tool/pkg-entry-util 3.0.1 → 3.0.2

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,16 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [3.0.2](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/pkg-entry-util@3.0.1...@yarn-tool/pkg-entry-util@3.0.2) (2024-05-03)
7
+
8
+
9
+
10
+ ### 🛠 Build System
11
+
12
+ * update typescript ([ffa656a](https://github.com/bluelovers/ws-yarn-workspaces/commit/ffa656aefe53966db445d52234eb0efe4651e3dd))
13
+
14
+
15
+
6
16
  ## [3.0.1](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/pkg-entry-util@3.0.0...@yarn-tool/pkg-entry-util@3.0.1) (2024-02-28)
7
17
 
8
18
 
package/lib/field/bin.js CHANGED
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.fixPkgBinField = exports.fixBinPath = void 0;
3
+ exports.fixBinPath = fixBinPath;
4
+ exports.fixPkgBinField = fixPkgBinField;
4
5
  const fs_extra_1 = require("fs-extra");
5
6
  const upath2_1 = require("upath2");
6
7
  function fixBinPath(bin, root) {
@@ -10,7 +11,6 @@ function fixBinPath(bin, root) {
10
11
  }
11
12
  return null;
12
13
  }
13
- exports.fixBinPath = fixBinPath;
14
14
  function fixPkgBinField(pkg, root) {
15
15
  if (pkg.bin) {
16
16
  if (typeof pkg.bin === 'string') {
@@ -34,5 +34,4 @@ function fixPkgBinField(pkg, root) {
34
34
  }
35
35
  return pkg;
36
36
  }
37
- exports.fixPkgBinField = fixPkgBinField;
38
37
  //# sourceMappingURL=bin.js.map
@@ -1 +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,CAAC;QACA,OAAO,IAAA,aAAI,EAAC,GAAG,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC;IAC9B,CAAC;IAED,OAAO,IAAI,CAAC;AACb,CAAC;AAXD,gCAWC;AAED,SAAgB,cAAc,CAAyB,GAAM,EAAE,IAAY;IAE1E,IAAI,GAAG,CAAC,GAAG,EACX,CAAC;QACA,IAAI,OAAO,GAAG,CAAC,GAAG,KAAK,QAAQ,EAC/B,CAAC;YACA,IAAI,OAAO,GAAG,UAAU,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;YAExC,IAAI,OAAO,EACX,CAAC;gBACA,aAAa;gBACb,GAAG,CAAC,GAAG,GAAG,OAAO,CAAC;YACnB,CAAC;QACF,CAAC;aACI,IAAI,OAAO,GAAG,CAAC,GAAG,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,EAC/D,CAAC;YACA,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,CAAC;oBACA,IAAI,OAAO,GAAG,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,CAAC;oBAE7C,IAAI,OAAO,EACX,CAAC;wBACA,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC;oBACxB,CAAC;gBACF,CAAC;YACF,CAAC,CAAC,CACF;QACF,CAAC;IACF,CAAC;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"]}
1
+ {"version":3,"file":"bin.js","sourceRoot":"","sources":["bin.ts"],"names":[],"mappings":";;AAIA,gCAWC;AAED,wCAkCC;AAlDD,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,CAAC;QACA,OAAO,IAAA,aAAI,EAAC,GAAG,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC;IAC9B,CAAC;IAED,OAAO,IAAI,CAAC;AACb,CAAC;AAED,SAAgB,cAAc,CAAyB,GAAM,EAAE,IAAY;IAE1E,IAAI,GAAG,CAAC,GAAG,EACX,CAAC;QACA,IAAI,OAAO,GAAG,CAAC,GAAG,KAAK,QAAQ,EAC/B,CAAC;YACA,IAAI,OAAO,GAAG,UAAU,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;YAExC,IAAI,OAAO,EACX,CAAC;gBACA,aAAa;gBACb,GAAG,CAAC,GAAG,GAAG,OAAO,CAAC;YACnB,CAAC;QACF,CAAC;aACI,IAAI,OAAO,GAAG,CAAC,GAAG,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,EAC/D,CAAC;YACA,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,CAAC;oBACA,IAAI,OAAO,GAAG,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,CAAC;oBAE7C,IAAI,OAAO,EACX,CAAC;wBACA,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC;oBACxB,CAAC;gBACF,CAAC;YACF,CAAC,CAAC,CACF;QACF,CAAC;IACF,CAAC;IAED,OAAO,GAAG,CAAA;AACX,CAAC","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"]}
@@ -1,6 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.pkgExportsVerify = exports._isPackageExportsEntry = exports.pkgExportsAddPJsonEntry = exports._pkgExportsAddPJsonEntryCore = void 0;
3
+ exports._pkgExportsAddPJsonEntryCore = _pkgExportsAddPJsonEntryCore;
4
+ exports.pkgExportsAddPJsonEntry = pkgExportsAddPJsonEntry;
5
+ exports._isPackageExportsEntry = _isPackageExportsEntry;
6
+ exports.pkgExportsVerify = pkgExportsVerify;
4
7
  const fs_extra_1 = require("fs-extra");
5
8
  const find_root_1 = require("@yarn-tool/find-root");
6
9
  const resolve_package_1 = require("@yarn-tool/resolve-package");
@@ -11,16 +14,13 @@ function _pkgExportsAddPJsonEntryCore(pkgExports) {
11
14
  }
12
15
  return pkgExports;
13
16
  }
14
- exports._pkgExportsAddPJsonEntryCore = _pkgExportsAddPJsonEntryCore;
15
17
  function pkgExportsAddPJsonEntry(pkg) {
16
18
  _pkgExportsAddPJsonEntryCore(pkg.exports);
17
19
  return pkg;
18
20
  }
19
- exports.pkgExportsAddPJsonEntry = pkgExportsAddPJsonEntry;
20
21
  function _isPackageExportsEntry(entry, value) {
21
22
  return entry.startsWith('./') && !!(value !== null && value !== void 0 ? value : false);
22
23
  }
23
- exports._isPackageExportsEntry = _isPackageExportsEntry;
24
24
  function pkgExportsVerify(pkg, options) {
25
25
  if (typeof pkg.exports === 'object') {
26
26
  const rootData = (0, find_root_1.findRootLazy)({
@@ -63,5 +63,4 @@ function pkgExportsVerify(pkg, options) {
63
63
  }
64
64
  return null;
65
65
  }
66
- exports.pkgExportsVerify = pkgExportsVerify;
67
66
  //# sourceMappingURL=exports.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"exports.js","sourceRoot":"","sources":["exports.ts"],"names":[],"mappings":";;;AAEA,uCAA0C;AAC1C,oDAAoD;AACpD,gEAAgF;AAEhF,SAAgB,4BAA4B,CAAoC,UAAa;;IAE5F,IAAI,OAAO,UAAU,KAAK,QAAQ,EAClC,CAAC;QACA,MAAA,UAAU,CAAC,gBAAgB,qCAA3B,UAAU,CAAC,gBAAgB,IAAM,gBAAgB,EAAC;IACnD,CAAC;IAED,OAAO,UAAU,CAAA;AAClB,CAAC;AARD,oEAQC;AAED,SAAgB,uBAAuB,CAAyB,GAAM;IAErE,4BAA4B,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAE1C,OAAO,GAAG,CAAA;AACX,CAAC;AALD,0DAKC;AAED,SAAgB,sBAAsB,CAAC,KAAmD,EACzF,KAAmD;IAGnD,OAAO,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,KAAK,CAAC,CAAA;AACpD,CAAC;AALD,wDAKC;AAED,SAAgB,gBAAgB,CAAyB,GAAM,EAAE,OAEhE;IAEA,IAAI,OAAO,GAAG,CAAC,OAAO,KAAK,QAAQ,EACnC,CAAC;QACA,MAAM,QAAQ,GAAG,IAAA,wBAAY,EAAC;YAC7B,GAAG,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,GAAG;SACjB,CAAC,CAAC;QAEH,IAAI,CAAC,QAAQ,CAAC,WAAW,IAAI,QAAQ,CAAC,GAAG,EACzC,CAAC;YACA,MAAM,IAAI,GAAa,EAAE,CAAC;YAE1B,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC;iBACzB,OAAO,CAAC,CAAC,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,EAAE;gBAE3B,IAAI,sBAAsB,CAAC,KAAK,EAAE,KAAK,CAAC,EACxC,CAAC;oBACA,MAAM,CAAC,GAAG,IAAA,gCAAc,EAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;oBAEtC,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAc;yBACtE,IAAI,EAAE;yBACN,OAAO,CAAC,IAAI,CAAC,EAAE;;wBAEf;;2BAEG;wBACH,IAAI,MAAA,IAAI,CAAC,QAAQ,qDAAG,GAAG,CAAC,EACxB,CAAC;4BACA,OAAO;wBACR,CAAC;wBAED,MAAM,IAAI,GAAG,IAAA,yBAAc,EAAC,CAAC,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC;wBAErD,IAAI,CAAC,IAAI,EACT,CAAC;4BACA,IAAI,CAAC,IAAI,CAAC,YAAY,KAAK,sBAAsB,IAAI,GAAG,CAAC,CAAC;wBAC3D,CAAC;oBAEF,CAAC,CAAC,CACF;gBACF,CAAC;YACF,CAAC,CAAC,CACF;YAED,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EACnB,CAAC;gBACA,IAAI,GAAG,GAAG,IAAI,KAAK,CAAC,4BAA4B,QAAQ,CAAC,GAAG,KAAK,IAAI,CAAC,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;gBAEhH,aAAa;gBACb,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC;gBAChB,aAAa;gBACb,GAAG,CAAC,QAAQ,GAAG,QAAQ,CAAC;gBACxB,aAAa;gBACb,GAAG,CAAC,UAAU,GAAG,GAAG,CAAC,OAAO,CAAC;gBAE7B,MAAM,GAAG,CAAC;YACX,CAAC;QACF,CAAC;IAEF,CAAC;IAED,OAAO,IAAY,CAAA;AACpB,CAAC;AAhED,4CAgEC","sourcesContent":["import { IPackageJson } from '@ts-type/package-dts/package-json';\nimport { PackageExportsEntry, PackageExportsFallback } from '@ts-type/package-dts/types/package.json';\nimport { pathExistsSync } from 'fs-extra';\nimport { findRootLazy } from '@yarn-tool/find-root';\nimport { resolvePackage, resolvePackageRoot } from '@yarn-tool/resolve-package';\n\nexport function _pkgExportsAddPJsonEntryCore<T extends IPackageJson[\"exports\"]>(pkgExports: T)\n{\n\tif (typeof pkgExports === 'object')\n\t{\n\t\tpkgExports['./package.json'] ??= './package.json';\n\t}\n\n\treturn pkgExports\n}\n\nexport function pkgExportsAddPJsonEntry<T extends IPackageJson>(pkg: T)\n{\n\t_pkgExportsAddPJsonEntryCore(pkg.exports);\n\n\treturn pkg\n}\n\nexport function _isPackageExportsEntry(entry: string | keyof keyof IPackageJson[\"exports\"],\n\tvalue: PackageExportsEntry | PackageExportsFallback,\n): value is PackageExportsEntry\n{\n\treturn entry.startsWith('./') && !!(value ?? false)\n}\n\nexport function pkgExportsVerify<T extends IPackageJson>(pkg: T, options?: {\n\tcwd?: string,\n})\n{\n\tif (typeof pkg.exports === 'object')\n\t{\n\t\tconst rootData = findRootLazy({\n\t\t\tcwd: options?.cwd,\n\t\t});\n\n\t\tif (!rootData.isWorkspace && rootData.pkg)\n\t\t{\n\t\t\tconst list: string[] = [];\n\n\t\t\tObject.entries(pkg.exports)\n\t\t\t\t.forEach(([entry, value]) =>\n\t\t\t\t{\n\t\t\t\t\tif (_isPackageExportsEntry(entry, value))\n\t\t\t\t\t{\n\t\t\t\t\t\tconst _ = resolvePackage(rootData.pkg);\n\n\t\t\t\t\t\t([typeof value === 'string' ? value : Object.values(value)] as string[])\n\t\t\t\t\t\t\t.flat()\n\t\t\t\t\t\t\t.forEach(file =>\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t\t * skip check './src/*'\n\t\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\tif (file.includes?.('*'))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tconst bool = pathExistsSync(_.resolveLocation(file));\n\n\t\t\t\t\t\t\t\tif (!bool)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tlist.push(`path of '${entry}' does not exist: '${file}'`);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t;\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t;\n\n\t\t\tif (list.length > 0)\n\t\t\t{\n\t\t\t\tlet err = new Error(`Invalid package exports: ${rootData.pkg}\\n${list.slice().map(v => ` - ${v}`).join('\\n')}`);\n\n\t\t\t\t// @ts-ignore\n\t\t\t\terr.list = list;\n\t\t\t\t// @ts-ignore\n\t\t\t\terr.rootData = rootData;\n\t\t\t\t// @ts-ignore\n\t\t\t\terr.pkgExports = pkg.exports;\n\n\t\t\t\tthrow err;\n\t\t\t}\n\t\t}\n\n\t}\n\n\treturn null as null\n}\n"]}
1
+ {"version":3,"file":"exports.js","sourceRoot":"","sources":["exports.ts"],"names":[],"mappings":";;AAMA,oEAQC;AAED,0DAKC;AAED,wDAKC;AAED,4CAgEC;AA5FD,uCAA0C;AAC1C,oDAAoD;AACpD,gEAAgF;AAEhF,SAAgB,4BAA4B,CAAoC,UAAa;;IAE5F,IAAI,OAAO,UAAU,KAAK,QAAQ,EAClC,CAAC;QACA,MAAA,UAAU,CAAC,gBAAgB,qCAA3B,UAAU,CAAC,gBAAgB,IAAM,gBAAgB,EAAC;IACnD,CAAC;IAED,OAAO,UAAU,CAAA;AAClB,CAAC;AAED,SAAgB,uBAAuB,CAAyB,GAAM;IAErE,4BAA4B,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAE1C,OAAO,GAAG,CAAA;AACX,CAAC;AAED,SAAgB,sBAAsB,CAAC,KAAmD,EACzF,KAAmD;IAGnD,OAAO,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,KAAK,CAAC,CAAA;AACpD,CAAC;AAED,SAAgB,gBAAgB,CAAyB,GAAM,EAAE,OAEhE;IAEA,IAAI,OAAO,GAAG,CAAC,OAAO,KAAK,QAAQ,EACnC,CAAC;QACA,MAAM,QAAQ,GAAG,IAAA,wBAAY,EAAC;YAC7B,GAAG,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,GAAG;SACjB,CAAC,CAAC;QAEH,IAAI,CAAC,QAAQ,CAAC,WAAW,IAAI,QAAQ,CAAC,GAAG,EACzC,CAAC;YACA,MAAM,IAAI,GAAa,EAAE,CAAC;YAE1B,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC;iBACzB,OAAO,CAAC,CAAC,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,EAAE;gBAE3B,IAAI,sBAAsB,CAAC,KAAK,EAAE,KAAK,CAAC,EACxC,CAAC;oBACA,MAAM,CAAC,GAAG,IAAA,gCAAc,EAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;oBAEtC,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAc;yBACtE,IAAI,EAAE;yBACN,OAAO,CAAC,IAAI,CAAC,EAAE;;wBAEf;;2BAEG;wBACH,IAAI,MAAA,IAAI,CAAC,QAAQ,qDAAG,GAAG,CAAC,EACxB,CAAC;4BACA,OAAO;wBACR,CAAC;wBAED,MAAM,IAAI,GAAG,IAAA,yBAAc,EAAC,CAAC,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC;wBAErD,IAAI,CAAC,IAAI,EACT,CAAC;4BACA,IAAI,CAAC,IAAI,CAAC,YAAY,KAAK,sBAAsB,IAAI,GAAG,CAAC,CAAC;wBAC3D,CAAC;oBAEF,CAAC,CAAC,CACF;gBACF,CAAC;YACF,CAAC,CAAC,CACF;YAED,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EACnB,CAAC;gBACA,IAAI,GAAG,GAAG,IAAI,KAAK,CAAC,4BAA4B,QAAQ,CAAC,GAAG,KAAK,IAAI,CAAC,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;gBAEhH,aAAa;gBACb,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC;gBAChB,aAAa;gBACb,GAAG,CAAC,QAAQ,GAAG,QAAQ,CAAC;gBACxB,aAAa;gBACb,GAAG,CAAC,UAAU,GAAG,GAAG,CAAC,OAAO,CAAC;gBAE7B,MAAM,GAAG,CAAC;YACX,CAAC;QACF,CAAC;IAEF,CAAC;IAED,OAAO,IAAY,CAAA;AACpB,CAAC","sourcesContent":["import { IPackageJson } from '@ts-type/package-dts/package-json';\nimport { PackageExportsEntry, PackageExportsFallback } from '@ts-type/package-dts/types/package.json';\nimport { pathExistsSync } from 'fs-extra';\nimport { findRootLazy } from '@yarn-tool/find-root';\nimport { resolvePackage, resolvePackageRoot } from '@yarn-tool/resolve-package';\n\nexport function _pkgExportsAddPJsonEntryCore<T extends IPackageJson[\"exports\"]>(pkgExports: T)\n{\n\tif (typeof pkgExports === 'object')\n\t{\n\t\tpkgExports['./package.json'] ??= './package.json';\n\t}\n\n\treturn pkgExports\n}\n\nexport function pkgExportsAddPJsonEntry<T extends IPackageJson>(pkg: T)\n{\n\t_pkgExportsAddPJsonEntryCore(pkg.exports);\n\n\treturn pkg\n}\n\nexport function _isPackageExportsEntry(entry: string | keyof keyof IPackageJson[\"exports\"],\n\tvalue: PackageExportsEntry | PackageExportsFallback,\n): value is PackageExportsEntry\n{\n\treturn entry.startsWith('./') && !!(value ?? false)\n}\n\nexport function pkgExportsVerify<T extends IPackageJson>(pkg: T, options?: {\n\tcwd?: string,\n})\n{\n\tif (typeof pkg.exports === 'object')\n\t{\n\t\tconst rootData = findRootLazy({\n\t\t\tcwd: options?.cwd,\n\t\t});\n\n\t\tif (!rootData.isWorkspace && rootData.pkg)\n\t\t{\n\t\t\tconst list: string[] = [];\n\n\t\t\tObject.entries(pkg.exports)\n\t\t\t\t.forEach(([entry, value]) =>\n\t\t\t\t{\n\t\t\t\t\tif (_isPackageExportsEntry(entry, value))\n\t\t\t\t\t{\n\t\t\t\t\t\tconst _ = resolvePackage(rootData.pkg);\n\n\t\t\t\t\t\t([typeof value === 'string' ? value : Object.values(value)] as string[])\n\t\t\t\t\t\t\t.flat()\n\t\t\t\t\t\t\t.forEach(file =>\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t\t * skip check './src/*'\n\t\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\tif (file.includes?.('*'))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tconst bool = pathExistsSync(_.resolveLocation(file));\n\n\t\t\t\t\t\t\t\tif (!bool)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tlist.push(`path of '${entry}' does not exist: '${file}'`);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t;\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t;\n\n\t\t\tif (list.length > 0)\n\t\t\t{\n\t\t\t\tlet err = new Error(`Invalid package exports: ${rootData.pkg}\\n${list.slice().map(v => ` - ${v}`).join('\\n')}`);\n\n\t\t\t\t// @ts-ignore\n\t\t\t\terr.list = list;\n\t\t\t\t// @ts-ignore\n\t\t\t\terr.rootData = rootData;\n\t\t\t\t// @ts-ignore\n\t\t\t\terr.pkgExports = pkg.exports;\n\n\t\t\t\tthrow err;\n\t\t\t}\n\t\t}\n\n\t}\n\n\treturn null as null\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.fixPublishConfig = void 0;
3
+ exports.fixPublishConfig = fixPublishConfig;
4
4
  function fixPublishConfig(pkg) {
5
5
  if (!pkg.publishConfig
6
6
  && !pkg.private
@@ -12,5 +12,4 @@ function fixPublishConfig(pkg) {
12
12
  }
13
13
  return pkg;
14
14
  }
15
- exports.fixPublishConfig = fixPublishConfig;
16
15
  //# sourceMappingURL=publishConfig.js.map
@@ -1 +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,CAAC;QACA,GAAG,CAAC,aAAa,GAAG;YACnB,MAAM,EAAE,QAAQ;SAChB,CAAC;IACH,CAAC;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"]}
1
+ {"version":3,"file":"publishConfig.js","sourceRoot":"","sources":["publishConfig.ts"],"names":[],"mappings":";;AAGA,4CAeC;AAfD,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,CAAC;QACA,GAAG,CAAC,aAAa,GAAG;YACnB,MAAM,EAAE,QAAQ;SAChB,CAAC;IACH,CAAC;IACD,OAAO,GAEN,CAAA;AACF,CAAC","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"]}
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.scriptsEntryIsNoTestSpecified = exports.EnumScriptsEntry = void 0;
3
+ exports.EnumScriptsEntry = void 0;
4
+ exports.scriptsEntryIsNoTestSpecified = scriptsEntryIsNoTestSpecified;
4
5
  var EnumScriptsEntry;
5
6
  (function (EnumScriptsEntry) {
6
7
  EnumScriptsEntry["JEST_TEST"] = "jest --passWithNoTests";
@@ -12,5 +13,4 @@ var EnumScriptsEntry;
12
13
  function scriptsEntryIsNoTestSpecified(value) {
13
14
  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
  }
15
- exports.scriptsEntryIsNoTestSpecified = scriptsEntryIsNoTestSpecified;
16
16
  //# sourceMappingURL=scripts.js.map
@@ -1 +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,8KAA0J,CAAA;IAE1J,gDAA4B,CAAA;AAC7B,CAAC,EARiB,gBAAgB,gCAAhB,gBAAgB,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 @bluelovers/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"]}
1
+ {"version":3,"file":"scripts.js","sourceRoot":"","sources":["scripts.ts"],"names":[],"mappings":";;;AAWA,sEAGC;AAbD,IAAkB,gBAQjB;AARD,WAAkB,gBAAgB;IAEjC,wDAAoC,CAAA;IACpC,2EAAuD,CAAA;IACvD,0FAAsE,CAAA;IACtE,8KAA0J,CAAA;IAE1J,gDAA4B,CAAA;AAC7B,CAAC,EARiB,gBAAgB,gCAAhB,gBAAgB,QAQjC;AAED,SAAgB,6BAA6B,CAAC,KAAa;IAE1D,OAAO,KAAK,gGAA4C,IAAI,KAAK,iFAAuC,CAAA;AACzG,CAAC","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 @bluelovers/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"]}
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.fillDummyScripts = exports._fillDummyScriptsCore = void 0;
3
+ exports._fillDummyScriptsCore = _fillDummyScriptsCore;
4
+ exports.fillDummyScripts = fillDummyScripts;
4
5
  const dummy_1 = require("../../util/scripts/dummy");
5
6
  function _fillDummyScriptsCore(scripts, prefix, fields) {
6
7
  // @ts-ignore
@@ -13,7 +14,6 @@ function _fillDummyScriptsCore(scripts, prefix, fields) {
13
14
  });
14
15
  return scripts;
15
16
  }
16
- exports._fillDummyScriptsCore = _fillDummyScriptsCore;
17
17
  function fillDummyScripts(scripts, prefix) {
18
18
  return _fillDummyScriptsCore(scripts, prefix, [
19
19
  'preversion',
@@ -33,5 +33,4 @@ function fillDummyScripts(scripts, prefix) {
33
33
  'ci:install',
34
34
  ]);
35
35
  }
36
- exports.fillDummyScripts = fillDummyScripts;
37
36
  //# sourceMappingURL=dummy.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dummy.js","sourceRoot":"","sources":["dummy.ts"],"names":[],"mappings":";;;AACA,oDAA4D;AAE5D,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
+ {"version":3,"file":"dummy.js","sourceRoot":"","sources":["dummy.ts"],"names":[],"mappings":";;AAGA,sDAcC;AAED,4CAmBC;AArCD,oDAA4D;AAE5D,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;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","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,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.defaultPkgNotOldExists = exports.defaultPkgScripts = void 0;
3
+ exports.defaultPkgScripts = defaultPkgScripts;
4
+ exports.defaultPkgNotOldExists = defaultPkgNotOldExists;
4
5
  function defaultPkgScripts() {
5
6
  return {
6
7
  "test": "yarn run test:jest",
@@ -13,7 +14,6 @@ function defaultPkgScripts() {
13
14
  "tsc:showConfig": "ynpx get-current-tsconfig -p",
14
15
  };
15
16
  }
16
- exports.defaultPkgScripts = defaultPkgScripts;
17
17
  function defaultPkgNotOldExists() {
18
18
  return {
19
19
  ...defaultPkgScripts(),
@@ -35,5 +35,4 @@ function defaultPkgNotOldExists() {
35
35
  "tsc:esm": "tsc -p tsconfig.esm.json",
36
36
  };
37
37
  }
38
- exports.defaultPkgNotOldExists = defaultPkgNotOldExists;
39
38
  //# sourceMappingURL=pkg-scripts.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pkg-scripts.js","sourceRoot":"","sources":["pkg-scripts.ts"],"names":[],"mappings":";;;AAEA,SAAgB,iBAAiB;IAEhC,OAAO;QACN,MAAM,EAAE,oBAAoB;QAC5B,UAAU,EAAE,6BAA6B;QACzC,WAAW,2DAA4B;QACvC,eAAe,EAAE,qBAAqB;QACtC,oBAAoB,EAAE,0BAA0B;QAChD,oBAAoB,EAAE,kCAAkC;QACxD,UAAU,EAAE,UAAU;QACtB,gBAAgB,EAAE,8BAA8B;KAChD,CAAA;AACF,CAAC;AAZD,8CAYC;AAED,SAAgB,sBAAsB;IAErC,OAAO;QACN,GAAG,iBAAiB,EAAE;QACtB,YAAY,EAAE,oHAAoH;QAClI,WAAW,EAAE,8CAA8C;QAC3D,kBAAkB,iLAAmC;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,mBAAmB,EAAE,gBAAgB;QACrC,aAAa,EAAE,sBAAsB;QACrC,SAAS,EAAE,0BAA0B;KACrC,CAAA;AACF,CAAC;AArBD,wDAqBC","sourcesContent":["import { EnumScriptsEntry } from '../../field/scripts';\n\nexport function defaultPkgScripts()\n{\n\treturn {\n\t\t\"test\": \"yarn run test:jest\",\n\t\t\"coverage\": \"yarn run test -- --coverage\",\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\t\"test:jest:coverage\": \"yarn run test:jest -- --coverage\",\n\t\t\"test:tsd\": \"ynpx tsd\",\n\t\t\"tsc:showConfig\": \"ynpx get-current-tsconfig -p\",\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\"sort-package-json\": \"yarn-tool sort\",\n\t\t\"tsc:default\": \"tsc -p tsconfig.json\",\n\t\t\"tsc:esm\": \"tsc -p tsconfig.esm.json\",\n\t}\n}\n"]}
1
+ {"version":3,"file":"pkg-scripts.js","sourceRoot":"","sources":["pkg-scripts.ts"],"names":[],"mappings":";;AAEA,8CAYC;AAED,wDAqBC;AAnCD,SAAgB,iBAAiB;IAEhC,OAAO;QACN,MAAM,EAAE,oBAAoB;QAC5B,UAAU,EAAE,6BAA6B;QACzC,WAAW,2DAA4B;QACvC,eAAe,EAAE,qBAAqB;QACtC,oBAAoB,EAAE,0BAA0B;QAChD,oBAAoB,EAAE,kCAAkC;QACxD,UAAU,EAAE,UAAU;QACtB,gBAAgB,EAAE,8BAA8B;KAChD,CAAA;AACF,CAAC;AAED,SAAgB,sBAAsB;IAErC,OAAO;QACN,GAAG,iBAAiB,EAAE;QACtB,YAAY,EAAE,oHAAoH;QAClI,WAAW,EAAE,8CAA8C;QAC3D,kBAAkB,iLAAmC;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,mBAAmB,EAAE,gBAAgB;QACrC,aAAa,EAAE,sBAAsB;QACrC,SAAS,EAAE,0BAA0B;KACrC,CAAA;AACF,CAAC","sourcesContent":["import { EnumScriptsEntry } from '../../field/scripts';\n\nexport function defaultPkgScripts()\n{\n\treturn {\n\t\t\"test\": \"yarn run test:jest\",\n\t\t\"coverage\": \"yarn run test -- --coverage\",\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\t\"test:jest:coverage\": \"yarn run test:jest -- --coverage\",\n\t\t\"test:tsd\": \"ynpx tsd\",\n\t\t\"tsc:showConfig\": \"ynpx get-current-tsconfig -p\",\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\"sort-package-json\": \"yarn-tool sort\",\n\t\t\"tsc:default\": \"tsc -p tsconfig.json\",\n\t\t\"tsc:esm\": \"tsc -p tsconfig.esm.json\",\n\t}\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.defaultRootScripts = void 0;
3
+ exports.defaultRootScripts = defaultRootScripts;
4
4
  const shared_root_scripts_1 = require("./shared-root-scripts");
5
5
  const pkg_scripts_1 = require("./pkg-scripts");
6
6
  function defaultRootScripts() {
@@ -36,5 +36,4 @@ function defaultRootScripts() {
36
36
  "ncu": "yarn-tool ncu -u",
37
37
  };
38
38
  }
39
- exports.defaultRootScripts = defaultRootScripts;
40
39
  //# sourceMappingURL=root-scripts.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"root-scripts.js","sourceRoot":"","sources":["root-scripts.ts"],"names":[],"mappings":";;;AAAA,+DAAiE;AACjE,+CAAkD;AAElD,SAAgB,kBAAkB;IAEjC,MAAM,WAAW,GAAG,CAAC,IAAiD,EAAE,EAAE;QAEzE,OAAO;YACN,uBAAuB,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAClD,aAAa;SACb,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IACf,CAAC,CAAA;IAED,OAAO;QACN,GAAG,IAAA,+BAAiB,GAAE;QACtB,GAAG,IAAA,8CAAwB,GAAE;QAC7B,0BAA0B,EAAE,uCAAuC;QACnE,cAAc,EAAE,mBAAmB;QACnC,aAAa,EAAE,aAAa;QAC5B,6DAA6D;QAC7D,kBAAkB,EAAE,WAAW,EAAE;QAEjC,GAAI;YACH,OAAO;YACP,OAAO;YACP,OAAO;YACP,YAAY;SACF,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;YAEnC,CAAC,CAAC,gBAAgB,IAAI,EAAE,CAAC,GAAG,uBAAuB,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,cAAc,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;YACzF,CAAC,CAAC,oBAAoB,IAAI,EAAE,CAAC,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;YAClD,OAAO,CAAC,CAAA;QACT,CAAC,EAAE,EAA4B,CAAC;QAEhC,wBAAwB,EAAE,yEAAyE;QACnG,qBAAqB,EAAE,6BAA6B;QACpD,uBAAuB,EAAE,6DAA6D;QACtF,sBAAsB,EAAE,wBAAwB;QAChD,aAAa,EAAE,oIAAoI;QACnJ,KAAK,EAAE,kBAAkB;KACzB,CAAA;AACF,CAAC;AAtCD,gDAsCC","sourcesContent":["import { defaultSharedRootScripts } from './shared-root-scripts';\nimport { defaultPkgScripts } from './pkg-scripts';\n\nexport function defaultRootScripts()\n{\n\tconst bumpVersion = (bump?: 'major' | 'minor' | 'patch' | 'prerelease') =>\n\t{\n\t\treturn [\n\t\t\t`yarn run version:bump` + (bump ? `:${bump}` : ''),\n\t\t\t`npm publish`,\n\t\t].join(' && ')\n\t}\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\"npm:publish:bump\": bumpVersion(),\n\n\t\t...([\n\t\t\t'patch',\n\t\t\t'minor',\n\t\t\t'major',\n\t\t\t'prerelease',\n\t\t] as const).reduce((a, bump, idx) =>\n\t\t{\n\t\t\ta[`version:bump:${bump}`] = `yarn run version:bump` + (bump ? ` -- --bump ${bump}` : '');\n\t\t\ta[`npm:publish:bump:${bump}`] = bumpVersion(bump);\n\t\t\treturn a\n\t\t}, {} as Record<string, string>),\n\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\t\"ncu\": \"yarn-tool ncu -u\",\n\t}\n}\n"]}
1
+ {"version":3,"file":"root-scripts.js","sourceRoot":"","sources":["root-scripts.ts"],"names":[],"mappings":";;AAGA,gDAsCC;AAzCD,+DAAiE;AACjE,+CAAkD;AAElD,SAAgB,kBAAkB;IAEjC,MAAM,WAAW,GAAG,CAAC,IAAiD,EAAE,EAAE;QAEzE,OAAO;YACN,uBAAuB,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAClD,aAAa;SACb,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IACf,CAAC,CAAA;IAED,OAAO;QACN,GAAG,IAAA,+BAAiB,GAAE;QACtB,GAAG,IAAA,8CAAwB,GAAE;QAC7B,0BAA0B,EAAE,uCAAuC;QACnE,cAAc,EAAE,mBAAmB;QACnC,aAAa,EAAE,aAAa;QAC5B,6DAA6D;QAC7D,kBAAkB,EAAE,WAAW,EAAE;QAEjC,GAAI;YACH,OAAO;YACP,OAAO;YACP,OAAO;YACP,YAAY;SACF,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;YAEnC,CAAC,CAAC,gBAAgB,IAAI,EAAE,CAAC,GAAG,uBAAuB,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,cAAc,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;YACzF,CAAC,CAAC,oBAAoB,IAAI,EAAE,CAAC,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;YAClD,OAAO,CAAC,CAAA;QACT,CAAC,EAAE,EAA4B,CAAC;QAEhC,wBAAwB,EAAE,yEAAyE;QACnG,qBAAqB,EAAE,6BAA6B;QACpD,uBAAuB,EAAE,6DAA6D;QACtF,sBAAsB,EAAE,wBAAwB;QAChD,aAAa,EAAE,oIAAoI;QACnJ,KAAK,EAAE,kBAAkB;KACzB,CAAA;AACF,CAAC","sourcesContent":["import { defaultSharedRootScripts } from './shared-root-scripts';\nimport { defaultPkgScripts } from './pkg-scripts';\n\nexport function defaultRootScripts()\n{\n\tconst bumpVersion = (bump?: 'major' | 'minor' | 'patch' | 'prerelease') =>\n\t{\n\t\treturn [\n\t\t\t`yarn run version:bump` + (bump ? `:${bump}` : ''),\n\t\t\t`npm publish`,\n\t\t].join(' && ')\n\t}\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\"npm:publish:bump\": bumpVersion(),\n\n\t\t...([\n\t\t\t'patch',\n\t\t\t'minor',\n\t\t\t'major',\n\t\t\t'prerelease',\n\t\t] as const).reduce((a, bump, idx) =>\n\t\t{\n\t\t\ta[`version:bump:${bump}`] = `yarn run version:bump` + (bump ? ` -- --bump ${bump}` : '');\n\t\t\ta[`npm:publish:bump:${bump}`] = bumpVersion(bump);\n\t\t\treturn a\n\t\t}, {} as Record<string, string>),\n\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\t\"ncu\": \"yarn-tool ncu -u\",\n\t}\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.defaultSharedRootScripts = void 0;
3
+ exports.defaultSharedRootScripts = defaultSharedRootScripts;
4
4
  function defaultSharedRootScripts() {
5
5
  return {
6
6
  "ci:install": `yarn install --frozen-lockfile && yarn add -W ${[
@@ -21,5 +21,4 @@ function defaultSharedRootScripts() {
21
21
  "ws:fix-all:resetStaticFiles": "yarn run ws:fix-all -- --resetStaticFiles",
22
22
  };
23
23
  }
24
- exports.defaultSharedRootScripts = defaultSharedRootScripts;
25
24
  //# sourceMappingURL=shared-root-scripts.js.map
@@ -1 +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,iDAAiD;YAC9D,WAAW;YACX,SAAS;YACT,MAAM;YACN,SAAS;YACT,SAAS;YACT,MAAM;YACN,iBAAiB;YACd,yBAAyB;YAC5B,KAAK;SACL,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;QACb,sBAAsB,EAAE,mBAAmB;QAC3C,uBAAuB,EAAE,oCAAoC;QAC7D,wBAAwB,EAAE,qCAAqC;QAC7D,YAAY,EAAE,6CAA6C;QAC3D,6BAA6B,EAAE,2CAA2C;KAC5E,CAAA;AACF,CAAC;AApBD,4DAoBC","sourcesContent":["export function defaultSharedRootScripts()\n{\n\treturn {\n\t\t\"ci:install\": `yarn install --frozen-lockfile && yarn add -W ${[\n\t\t\t\"yarn-tool\",\n\t\t\t\"lerna@6\",\n\t\t\t\"ynpx\",\n\t\t\t\"ts-node\",\n\t\t\t\"ts-jest\",\n\t\t\t\"jest\",\n\t\t\t\"typescript@next\",\n '@bluelovers/jest-config',\n\t\t\t'tsx',\n\t\t].join(\" \")}`,\n\t\t\"test:jest:clearCache\": \"jest --clearCache\",\n\t\t\"install:resetLockfile\": \"yarn-tool install --reset-lockfile\",\n\t\t\"install:frozenLockfile\": \"yarn-tool install --frozen-lockfile\",\n \"ws:fix-all\": \"yarn-tool fix-all --overwriteHostedGitInfo\",\n \"ws:fix-all:resetStaticFiles\": \"yarn run ws:fix-all -- --resetStaticFiles\",\n\t}\n}\n"]}
1
+ {"version":3,"file":"shared-root-scripts.js","sourceRoot":"","sources":["shared-root-scripts.ts"],"names":[],"mappings":";;AAAA,4DAoBC;AApBD,SAAgB,wBAAwB;IAEvC,OAAO;QACN,YAAY,EAAE,iDAAiD;YAC9D,WAAW;YACX,SAAS;YACT,MAAM;YACN,SAAS;YACT,SAAS;YACT,MAAM;YACN,iBAAiB;YACd,yBAAyB;YAC5B,KAAK;SACL,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;QACb,sBAAsB,EAAE,mBAAmB;QAC3C,uBAAuB,EAAE,oCAAoC;QAC7D,wBAAwB,EAAE,qCAAqC;QAC7D,YAAY,EAAE,6CAA6C;QAC3D,6BAA6B,EAAE,2CAA2C;KAC5E,CAAA;AACF,CAAC","sourcesContent":["export function defaultSharedRootScripts()\n{\n\treturn {\n\t\t\"ci:install\": `yarn install --frozen-lockfile && yarn add -W ${[\n\t\t\t\"yarn-tool\",\n\t\t\t\"lerna@6\",\n\t\t\t\"ynpx\",\n\t\t\t\"ts-node\",\n\t\t\t\"ts-jest\",\n\t\t\t\"jest\",\n\t\t\t\"typescript@next\",\n '@bluelovers/jest-config',\n\t\t\t'tsx',\n\t\t].join(\" \")}`,\n\t\t\"test:jest:clearCache\": \"jest --clearCache\",\n\t\t\"install:resetLockfile\": \"yarn-tool install --reset-lockfile\",\n\t\t\"install:frozenLockfile\": \"yarn-tool install --frozen-lockfile\",\n \"ws:fix-all\": \"yarn-tool fix-all --overwriteHostedGitInfo\",\n \"ws:fix-all:resetStaticFiles\": \"yarn run ws:fix-all -- --resetStaticFiles\",\n\t}\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  import { EnumScriptsEntry } from '../../field/scripts';
2
- export declare function _runAllOrSince<T extends string>(script: T): { [x in `${T}:all`]: string; } & { [y in `${T}:since`]: string; };
2
+ export declare function _runAllOrSince<T extends string>(script: T): ({ [x in `${T}:all`]: string; } & { [y in `${T}:since`]: string; });
3
3
  export declare function defaultWorkspaceRootScripts(): {
4
4
  "prepublishOnly:root": string;
5
5
  "prepublishOnly:lockfile": string;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.defaultWorkspaceRootScripts = exports._runAllOrSince = void 0;
3
+ exports._runAllOrSince = _runAllOrSince;
4
+ exports.defaultWorkspaceRootScripts = defaultWorkspaceRootScripts;
4
5
  const shared_root_scripts_1 = require("./shared-root-scripts");
5
6
  function _runAllOrSince(script) {
6
7
  const all = `${script}:all`;
@@ -10,7 +11,6 @@ function _runAllOrSince(script) {
10
11
  [since]: `yarn run ${script}:all -- --since`,
11
12
  };
12
13
  }
13
- exports._runAllOrSince = _runAllOrSince;
14
14
  function defaultWorkspaceRootScripts() {
15
15
  const bumpVersion = (bump) => {
16
16
  return [
@@ -59,5 +59,4 @@ function defaultWorkspaceRootScripts() {
59
59
  "tsc:showConfig": "ynpx get-current-tsconfig -p",
60
60
  };
61
61
  }
62
- exports.defaultWorkspaceRootScripts = defaultWorkspaceRootScripts;
63
62
  //# sourceMappingURL=ws-root-scripts.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ws-root-scripts.js","sourceRoot":"","sources":["ws-root-scripts.ts"],"names":[],"mappings":";;;AAAA,+DAAiE;AAGjE,SAAgB,cAAc,CAAmB,MAAS;IAEzD,MAAM,GAAG,GAAG,GAAG,MAAM,MAAe,CAAC;IACrC,MAAM,KAAK,GAAG,GAAG,MAAM,QAAiB,CAAC;IAEzC,OAAO;QACN,CAAC,GAAG,CAAC,EAAE,oBAAoB,MAAM,kBAAkB;QACnD,CAAC,KAAK,CAAC,EAAE,YAAY,MAAM,iBAAiB;KAK3C,CAAA;AACH,CAAC;AAbD,wCAaC;AAED,SAAgB,2BAA2B;IAE1C,MAAM,WAAW,GAAG,CAAC,IAAkC,EAAE,EAAE;QAC1D,OAAO;YACN,8BAA8B;YAC9B,4BAA4B,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,iBAAiB,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACpE,0BAA0B;SAC1B,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IACf,CAAC,CAAA;IAED,OAAO;QACN,GAAG,IAAA,8CAAwB,GAAE;QAE7B,MAAM,EAAE,qBAAqB;QAE7B,GAAG,cAAc,CAAC,MAAM,CAAC;QACzB,GAAG,cAAc,CAAC,UAAU,CAAC;QAC7B,GAAG,cAAc,CAAC,eAAe,CAAC;QAClC,GAAG,cAAc,CAAC,OAAO,CAAC;QAC1B,GAAG,cAAc,CAAC,QAAQ,CAAC;QAC3B,GAAG,cAAc,CAAC,UAAU,CAAC;QAC7B,GAAG,cAAc,CAAC,MAAM,CAAC;QAEzB,YAAY,mDAA6B;QACzC,aAAa,EAAE,mBAAmB;QAClC,eAAe,EAAE,WAAW,EAAE;QAC9B,GAAI;YACH,OAAO;YACP,OAAO;YACP,OAAO;SACG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;YACnC,IAAI,GAAG,KAAK,CAAC,EACb,CAAC;gBACA,CAAC,CAAC,mBAAmB,CAAC,GAAG,8BAA8B,IAAI,EAAE,CAAC;YAC/D,CAAC;YACD,CAAC,CAAC,qBAAqB,IAAI,EAAE,CAAC,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;YACnD,OAAO,CAAC,CAAA;QACT,CAAC,EAAE,EAA4B,CAAC;QAEhC,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,gBAAgB,EAAE,8BAA8B;KAChD,CAAA;AACF,CAAC;AAtDD,kEAsDC","sourcesContent":["import { defaultSharedRootScripts } from './shared-root-scripts';\nimport { EnumScriptsEntry } from '../../field/scripts';\n\nexport function _runAllOrSince<T extends string>(script: T)\n{\n\tconst all = `${script}:all` as const;\n\tconst since = `${script}:since` as const;\n\n\treturn {\n\t\t[all]: `yarn-tool ws run ${script} --concurrency 1`,\n\t\t[since]: `yarn run ${script}:all -- --since`,\n\t} as ({\n\t\t[x in `${T}:all`]: string;\n\t} & {\n\t\t[y in `${T}:since`]: string;\n\t})\n}\n\nexport function defaultWorkspaceRootScripts()\n{\n\tconst bumpVersion = (bump?: 'major' | 'minor' | 'patch') => {\n\t\treturn [\n\t\t\t`yarn run prepublishOnly:root`,\n\t\t\t`lerna publish --no-private` + (bump ? ` --yes --bump ${bump}` : ''),\n\t\t\t`yarn run postpublishOnly`,\n\t\t].join(' && ')\n\t}\n\n\treturn {\n\t\t...defaultSharedRootScripts(),\n\n\t\t\"test\": \"yarn run test:since\",\n\n\t\t..._runAllOrSince('test'),\n\t\t..._runAllOrSince('test:tsd'),\n\t\t..._runAllOrSince('test:snapshot'),\n\t\t..._runAllOrSince('build'),\n\t\t..._runAllOrSince('review'),\n\t\t..._runAllOrSince('coverage'),\n\t\t..._runAllOrSince('lint'),\n\n\t\t\"preversion\": EnumScriptsEntry.preversion,\n\t\t\"postversion\": \"yarn-tool fix-all\",\n\t\t\"lerna:publish\": bumpVersion(),\n\t\t...([\n\t\t\t'patch',\n\t\t\t'minor',\n\t\t\t'major',\n\t\t] as const).reduce((a, bump, idx) => {\n\t\t\tif (idx === 0)\n\t\t\t{\n\t\t\t\ta[`lerna:publish:yes`] = `yarn run lerna:publish:yes:${bump}`;\n\t\t\t}\n\t\t\ta[`lerna:publish:yes:${bump}`] = bumpVersion(bump);\n\t\t\treturn a\n\t\t}, {} as Record<string, string>),\n\n\t\t\"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\"tsc:showConfig\": \"ynpx get-current-tsconfig -p\",\n\t}\n}\n"]}
1
+ {"version":3,"file":"ws-root-scripts.js","sourceRoot":"","sources":["ws-root-scripts.ts"],"names":[],"mappings":";;AAGA,wCAaC;AAED,kEAsDC;AAxED,+DAAiE;AAGjE,SAAgB,cAAc,CAAmB,MAAS;IAEzD,MAAM,GAAG,GAAG,GAAG,MAAM,MAAe,CAAC;IACrC,MAAM,KAAK,GAAG,GAAG,MAAM,QAAiB,CAAC;IAEzC,OAAO;QACN,CAAC,GAAG,CAAC,EAAE,oBAAoB,MAAM,kBAAkB;QACnD,CAAC,KAAK,CAAC,EAAE,YAAY,MAAM,iBAAiB;KAK3C,CAAA;AACH,CAAC;AAED,SAAgB,2BAA2B;IAE1C,MAAM,WAAW,GAAG,CAAC,IAAkC,EAAE,EAAE;QAC1D,OAAO;YACN,8BAA8B;YAC9B,4BAA4B,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,iBAAiB,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACpE,0BAA0B;SAC1B,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IACf,CAAC,CAAA;IAED,OAAO;QACN,GAAG,IAAA,8CAAwB,GAAE;QAE7B,MAAM,EAAE,qBAAqB;QAE7B,GAAG,cAAc,CAAC,MAAM,CAAC;QACzB,GAAG,cAAc,CAAC,UAAU,CAAC;QAC7B,GAAG,cAAc,CAAC,eAAe,CAAC;QAClC,GAAG,cAAc,CAAC,OAAO,CAAC;QAC1B,GAAG,cAAc,CAAC,QAAQ,CAAC;QAC3B,GAAG,cAAc,CAAC,UAAU,CAAC;QAC7B,GAAG,cAAc,CAAC,MAAM,CAAC;QAEzB,YAAY,mDAA6B;QACzC,aAAa,EAAE,mBAAmB;QAClC,eAAe,EAAE,WAAW,EAAE;QAC9B,GAAI;YACH,OAAO;YACP,OAAO;YACP,OAAO;SACG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;YACnC,IAAI,GAAG,KAAK,CAAC,EACb,CAAC;gBACA,CAAC,CAAC,mBAAmB,CAAC,GAAG,8BAA8B,IAAI,EAAE,CAAC;YAC/D,CAAC;YACD,CAAC,CAAC,qBAAqB,IAAI,EAAE,CAAC,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;YACnD,OAAO,CAAC,CAAA;QACT,CAAC,EAAE,EAA4B,CAAC;QAEhC,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,gBAAgB,EAAE,8BAA8B;KAChD,CAAA;AACF,CAAC","sourcesContent":["import { defaultSharedRootScripts } from './shared-root-scripts';\nimport { EnumScriptsEntry } from '../../field/scripts';\n\nexport function _runAllOrSince<T extends string>(script: T)\n{\n\tconst all = `${script}:all` as const;\n\tconst since = `${script}:since` as const;\n\n\treturn {\n\t\t[all]: `yarn-tool ws run ${script} --concurrency 1`,\n\t\t[since]: `yarn run ${script}:all -- --since`,\n\t} as ({\n\t\t[x in `${T}:all`]: string;\n\t} & {\n\t\t[y in `${T}:since`]: string;\n\t})\n}\n\nexport function defaultWorkspaceRootScripts()\n{\n\tconst bumpVersion = (bump?: 'major' | 'minor' | 'patch') => {\n\t\treturn [\n\t\t\t`yarn run prepublishOnly:root`,\n\t\t\t`lerna publish --no-private` + (bump ? ` --yes --bump ${bump}` : ''),\n\t\t\t`yarn run postpublishOnly`,\n\t\t].join(' && ')\n\t}\n\n\treturn {\n\t\t...defaultSharedRootScripts(),\n\n\t\t\"test\": \"yarn run test:since\",\n\n\t\t..._runAllOrSince('test'),\n\t\t..._runAllOrSince('test:tsd'),\n\t\t..._runAllOrSince('test:snapshot'),\n\t\t..._runAllOrSince('build'),\n\t\t..._runAllOrSince('review'),\n\t\t..._runAllOrSince('coverage'),\n\t\t..._runAllOrSince('lint'),\n\n\t\t\"preversion\": EnumScriptsEntry.preversion,\n\t\t\"postversion\": \"yarn-tool fix-all\",\n\t\t\"lerna:publish\": bumpVersion(),\n\t\t...([\n\t\t\t'patch',\n\t\t\t'minor',\n\t\t\t'major',\n\t\t] as const).reduce((a, bump, idx) => {\n\t\t\tif (idx === 0)\n\t\t\t{\n\t\t\t\ta[`lerna:publish:yes`] = `yarn run lerna:publish:yes:${bump}`;\n\t\t\t}\n\t\t\ta[`lerna:publish:yes:${bump}`] = bumpVersion(bump);\n\t\t\treturn a\n\t\t}, {} as Record<string, string>),\n\n\t\t\"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\"tsc:showConfig\": \"ynpx get-current-tsconfig -p\",\n\t}\n}\n"]}
@@ -1,24 +1,23 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isDummyEchoMaybeOrEmpty = exports.isDummyEchoMaybe = exports._dummyEchoText = exports._dummyEchoTextCore = exports._dummyEchoPrefix = void 0;
3
+ exports._dummyEchoPrefix = _dummyEchoPrefix;
4
+ exports._dummyEchoTextCore = _dummyEchoTextCore;
5
+ exports._dummyEchoText = _dummyEchoText;
6
+ exports.isDummyEchoMaybe = isDummyEchoMaybe;
7
+ exports.isDummyEchoMaybeOrEmpty = isDummyEchoMaybeOrEmpty;
4
8
  function _dummyEchoPrefix(prefix) {
5
9
  return `echo ${prefix !== null && prefix !== void 0 ? prefix : ''}`.trim();
6
10
  }
7
- exports._dummyEchoPrefix = _dummyEchoPrefix;
8
11
  function _dummyEchoTextCore(pre, text) {
9
12
  return `${pre} ${text}`.trim();
10
13
  }
11
- exports._dummyEchoTextCore = _dummyEchoTextCore;
12
14
  function _dummyEchoText(prefix, text) {
13
15
  return _dummyEchoTextCore(_dummyEchoPrefix(prefix), text);
14
16
  }
15
- exports._dummyEchoText = _dummyEchoText;
16
17
  function isDummyEchoMaybe(value) {
17
18
  return (value === null || value === void 0 ? void 0 : value.length) && value.startsWith('echo ') && !value.includes('&');
18
19
  }
19
- exports.isDummyEchoMaybe = isDummyEchoMaybe;
20
20
  function isDummyEchoMaybeOrEmpty(value) {
21
21
  return !(value === null || value === void 0 ? void 0 : value.length) || (value.startsWith('echo ') && !value.includes('&'));
22
22
  }
23
- exports.isDummyEchoMaybeOrEmpty = isDummyEchoMaybeOrEmpty;
24
23
  //# sourceMappingURL=dummy.js.map
@@ -1 +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"]}
1
+ {"version":3,"file":"dummy.js","sourceRoot":"","sources":["dummy.ts"],"names":[],"mappings":";;AAAA,4CAGC;AAED,gDAGC;AAED,wCAGC;AAED,4CAGC;AAED,0DAGC;AAvBD,SAAgB,gBAAgB,CAAC,MAAc;IAE9C,OAAO,QAAQ,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC;AACtC,CAAC;AAED,SAAgB,kBAAkB,CAAC,GAAW,EAAE,IAAY;IAE3D,OAAO,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC,IAAI,EAAE,CAAC;AAChC,CAAC;AAED,SAAgB,cAAc,CAAC,MAAc,EAAE,IAAY;IAE1D,OAAO,kBAAkB,CAAC,gBAAgB,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,CAAA;AAC1D,CAAC;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;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","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": "3.0.1",
3
+ "version": "3.0.2",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "yarn",
@@ -57,8 +57,8 @@
57
57
  },
58
58
  "dependencies": {
59
59
  "@ts-type/package-dts": "^2.0.8",
60
- "@yarn-tool/find-root": "^2.0.13",
61
- "@yarn-tool/resolve-package": "^2.0.11",
60
+ "@yarn-tool/find-root": "^2.0.14",
61
+ "@yarn-tool/resolve-package": "^2.0.12",
62
62
  "fs-extra": "^11.2.0",
63
63
  "tslib": ">=2",
64
64
  "upath2": "^3.1.19"
@@ -67,5 +67,5 @@
67
67
  "publishConfig": {
68
68
  "access": "public"
69
69
  },
70
- "gitHead": "920c374dcedfbddfb32ae1f1f14033deefd2f80f"
70
+ "gitHead": "089606f66f3c5501a8f3fdfc42e5a85b57f4d0e9"
71
71
  }