@yarn-tool/pkg-entry-util 2.0.9 → 2.0.14

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,84 @@
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.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)
7
+
8
+
9
+
10
+ ### 🔖 Miscellaneous
11
+
12
+ * . ([157d5dc](https://github.com/bluelovers/ws-yarn-workspaces/commit/157d5dc8959261d9326f6e633987182898ae9670))
13
+ * . ([dafc19c](https://github.com/bluelovers/ws-yarn-workspaces/commit/dafc19c43afb42c904b6e7dcc49d93567897c092))
14
+
15
+
16
+
17
+ ## [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)
18
+
19
+
20
+
21
+ ### 📦 Code Refactoring
22
+
23
+ * update script ([cd1016d](https://github.com/bluelovers/ws-yarn-workspaces/commit/cd1016ddcd93d1c1df4795ea4228ec45a76822c3))
24
+
25
+
26
+ ### 🚨 Tests
27
+
28
+ * **snapshot:** snapshots updated ([50bff7c](https://github.com/bluelovers/ws-yarn-workspaces/commit/50bff7c13e1b01eb551c9b2252cfe3d971da8db8))
29
+ * **snapshot:** snapshots updated ([ed29b43](https://github.com/bluelovers/ws-yarn-workspaces/commit/ed29b437ae8bc9502d117d6a02fd40c9c24f1e33))
30
+
31
+
32
+ ### 🔖 Miscellaneous
33
+
34
+ * . ([7636d5d](https://github.com/bluelovers/ws-yarn-workspaces/commit/7636d5df9ecb9858107ba6a7ab097d9c948ea7df))
35
+
36
+
37
+
38
+ ## [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)
39
+
40
+
41
+
42
+ ### 📦 Code Refactoring
43
+
44
+ * update script ([cd1016d](https://github.com/bluelovers/ws-yarn-workspaces/commit/cd1016ddcd93d1c1df4795ea4228ec45a76822c3))
45
+
46
+
47
+ ### 🚨 Tests
48
+
49
+ * **snapshot:** snapshots updated ([ed29b43](https://github.com/bluelovers/ws-yarn-workspaces/commit/ed29b437ae8bc9502d117d6a02fd40c9c24f1e33))
50
+
51
+
52
+ ### 🔖 Miscellaneous
53
+
54
+ * . ([7636d5d](https://github.com/bluelovers/ws-yarn-workspaces/commit/7636d5df9ecb9858107ba6a7ab097d9c948ea7df))
55
+
56
+
57
+
58
+ ## [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)
59
+
60
+
61
+
62
+ ### 📦 Code Refactoring
63
+
64
+ * update script ([cd1016d](https://github.com/bluelovers/ws-yarn-workspaces/commit/cd1016ddcd93d1c1df4795ea4228ec45a76822c3))
65
+
66
+
67
+ ### 🔖 Miscellaneous
68
+
69
+ * . ([7636d5d](https://github.com/bluelovers/ws-yarn-workspaces/commit/7636d5df9ecb9858107ba6a7ab097d9c948ea7df))
70
+
71
+
72
+
73
+ ## [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)
74
+
75
+
76
+ ### 🐛 Bug Fixes
77
+
78
+ * skip check './src/*' ([e2c48e2](https://github.com/bluelovers/ws-yarn-workspaces/commit/e2c48e2ef7a32700a6208e60766d0e43af623f45))
79
+
80
+
81
+
82
+
83
+
6
84
  ## [2.0.9](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/pkg-entry-util@2.0.8...@yarn-tool/pkg-entry-util@2.0.9) (2022-08-18)
7
85
 
8
86
 
@@ -34,6 +34,13 @@ function pkgExportsVerify(pkg, options) {
34
34
  [typeof value === 'string' ? value : Object.values(value)]
35
35
  .flat()
36
36
  .forEach(file => {
37
+ var _a;
38
+ /**
39
+ * skip check './src/*'
40
+ */
41
+ if ((_a = file.includes) === null || _a === void 0 ? void 0 : _a.call(file, '*')) {
42
+ return;
43
+ }
37
44
  const bool = (0, fs_extra_1.pathExistsSync)((0, path_1.resolve)(rootData.pkg, file));
38
45
  if (!bool) {
39
46
  list.push(`path of '${entry}' does not exist: '${file}'`);
@@ -1 +1 @@
1
- {"version":3,"file":"exports.js","sourceRoot":"","sources":["exports.ts"],"names":[],"mappings":";;;AAEA,+BAA+B;AAC/B,uCAA0C;AAC1C,oDAAoD;AAEpD,SAAgB,4BAA4B,CAAoC,UAAa;;IAE5F,IAAI,OAAO,UAAU,KAAK,QAAQ,EAClC;QACC,MAAA,UAAU,CAAC,gBAAgB,qCAA3B,UAAU,CAAC,gBAAgB,IAAM,gBAAgB,EAAC;KAClD;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;QACC,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;YACC,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;oBACE,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,MAAM,IAAI,GAAG,IAAA,yBAAc,EAAC,IAAA,cAAO,EAAC,QAAQ,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC;wBAEzD,IAAI,CAAC,IAAI,EACT;4BACC,IAAI,CAAC,IAAI,CAAC,YAAY,KAAK,sBAAsB,IAAI,GAAG,CAAC,CAAC;yBAC1D;oBAEF,CAAC,CAAC,CACF;iBACD;YACF,CAAC,CAAC,CACF;YAED,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EACnB;gBACC,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;aACV;SACD;KAED;IAED,OAAO,IAAY,CAAA;AACpB,CAAC;AAtDD,4CAsDC","sourcesContent":["import { IPackageJson } from '@ts-type/package-dts/package-json';\nimport { PackageExportsEntry, PackageExportsFallback } from '@ts-type/package-dts/types/package.json';\nimport { resolve } from 'path';\nimport { pathExistsSync } from 'fs-extra';\nimport { findRootLazy } from '@yarn-tool/find-root';\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\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\tconst bool = pathExistsSync(resolve(rootData.pkg, 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":";;;AAEA,+BAA+B;AAC/B,uCAA0C;AAC1C,oDAAoD;AAEpD,SAAgB,4BAA4B,CAAoC,UAAa;;IAE5F,IAAI,OAAO,UAAU,KAAK,QAAQ,EAClC;QACC,MAAA,UAAU,CAAC,gBAAgB,qCAA3B,UAAU,CAAC,gBAAgB,IAAM,gBAAgB,EAAC;KAClD;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;QACC,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;YACC,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;oBACE,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;4BACC,OAAO;yBACP;wBAED,MAAM,IAAI,GAAG,IAAA,yBAAc,EAAC,IAAA,cAAO,EAAC,QAAQ,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC;wBAEzD,IAAI,CAAC,IAAI,EACT;4BACC,IAAI,CAAC,IAAI,CAAC,YAAY,KAAK,sBAAsB,IAAI,GAAG,CAAC,CAAC;yBAC1D;oBAEF,CAAC,CAAC,CACF;iBACD;YACF,CAAC,CAAC,CACF;YAED,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EACnB;gBACC,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;aACV;SACD;KAED;IAED,OAAO,IAAY,CAAA;AACpB,CAAC;AA9DD,4CA8DC","sourcesContent":["import { IPackageJson } from '@ts-type/package-dts/package-json';\nimport { PackageExportsEntry, PackageExportsFallback } from '@ts-type/package-dts/types/package.json';\nimport { resolve } from 'path';\nimport { pathExistsSync } from 'fs-extra';\nimport { findRootLazy } from '@yarn-tool/find-root';\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\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(resolve(rootData.pkg, 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"]}
@@ -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"]}
@@ -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;
@@ -1,11 +1,21 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.fillDummyScripts = void 0;
4
- function fillDummyScripts(scripts, prefix) {
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 = `echo ${prefix !== null && prefix !== void 0 ? prefix : ''}`.trim();
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
- ].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;
34
+ ]);
30
35
  }
31
36
  exports.fillDummyScripts = fillDummyScripts;
32
37
  //# sourceMappingURL=dummy.js.map
@@ -1 +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"]}
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": string;
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":";;;AAAA,SAAgB,sBAAsB;IAErC,OAAO;QACN,YAAY,EAAE,oHAAoH;QAClI,WAAW,EAAE,wBAAwB;QACrC,eAAe,EAAE,qBAAqB;QACtC,WAAW,EAAE,8CAA8C;QAC3D,kBAAkB,EAAE,2HAA2H;QAC/I,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;AApBD,wDAoBC","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:snapshot\": \"yarn run test -- -u\",\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 --inline-declare-global & echo 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"]}
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;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"]}
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: string;
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;AAEjE,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,EAAE,eAAe;QAC7B,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';\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\": \"yarn run test\",\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"]}
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.9",
3
+ "version": "2.0.14",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "yarn",
@@ -33,7 +33,9 @@
33
33
  "lint": "ynpx --quiet eslint -- **/*.ts",
34
34
  "test": "jest --passWithNoTests",
35
35
  "test:jest": "jest --passWithNoTests",
36
+ "test:jest:snapshot": "yarn run test:jest -- -u",
36
37
  "test:mocha": "ynpx --quiet -p ts-node -p mocha mocha -- --require ts-node/register \"!(node_modules)/**/*.{test,spec}.{ts,tsx}\"",
38
+ "test:snapshot": "yarn run test -- -u",
37
39
  "test:tsdx": "ynpx @bluelovers/tsdx test --passWithNoTests",
38
40
  "build:dts": "ynpx dts-bundle-generator -o ./dist/index.d.ts ./src/index.ts --no-banner & echo build:dts",
39
41
  "build:tsdx": "ynpx @bluelovers/tsdx build --target node --name index",
@@ -52,7 +54,7 @@
52
54
  },
53
55
  "dependencies": {
54
56
  "@ts-type/package-dts": "^2.0.5",
55
- "@yarn-tool/find-root": "^2.0.4",
57
+ "@yarn-tool/find-root": "^2.0.5",
56
58
  "fs-extra": "^10.1.0",
57
59
  "tslib": "^2",
58
60
  "upath2": "^3.1.15"
@@ -61,5 +63,5 @@
61
63
  "publishConfig": {
62
64
  "access": "public"
63
65
  },
64
- "gitHead": "43e4e36c013c2f68c7f4a485651276495da5039c"
66
+ "gitHead": "150365d3846067505842c6503564abe98ebe508d"
65
67
  }