@yarn-tool/fix-all 2.0.16 → 2.0.19

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,44 @@
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.19](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/fix-all@2.0.18...@yarn-tool/fix-all@2.0.19) (2022-09-12)
7
+
8
+ **Note:** Version bump only for package @yarn-tool/fix-all
9
+
10
+
11
+
12
+
13
+
14
+ ## [2.0.18](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/fix-all@2.0.17...@yarn-tool/fix-all@2.0.18) (2022-09-06)
15
+
16
+
17
+
18
+ ### 📚 Documentation
19
+
20
+ * add directory ([442a552](https://github.com/bluelovers/ws-yarn-workspaces/commit/442a55232619f7fe2b9bad6f8eccfffc4f8f47d2))
21
+
22
+
23
+ ### 📌 Dependencies
24
+
25
+ * update deps ([aeb5e41](https://github.com/bluelovers/ws-yarn-workspaces/commit/aeb5e416e8ea6c7d37ed7d38fedd6ff5c8c371df))
26
+
27
+
28
+ ### 🔖 Miscellaneous
29
+
30
+ * . ([3a7fdc9](https://github.com/bluelovers/ws-yarn-workspaces/commit/3a7fdc924ada93b1d0ac0160f8d77e46ff060588))
31
+
32
+
33
+
34
+ ## [2.0.17](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/fix-all@2.0.16...@yarn-tool/fix-all@2.0.17) (2022-08-28)
35
+
36
+
37
+
38
+ ### ✨ Features
39
+
40
+ * fixLernaJson ([5b5a5b1](https://github.com/bluelovers/ws-yarn-workspaces/commit/5b5a5b162fe68689fbef2f9fb46f884ea6814d7b))
41
+
42
+
43
+
6
44
  ## [2.0.16](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/fix-all@2.0.15...@yarn-tool/fix-all@2.0.16) (2022-08-26)
7
45
 
8
46
 
package/index.js CHANGED
@@ -11,6 +11,7 @@ const bluebird_1 = tslib_1.__importDefault(require("bluebird"));
11
11
  const static_file_1 = require("@yarn-tool/static-file");
12
12
  const wsCopyStaticFiles_1 = require("@yarn-tool/static-file/lib/ws/wsCopyStaticFiles");
13
13
  const getRootCopyStaticFiles_1 = require("@yarn-tool/static-file/lib/root/getRootCopyStaticFiles");
14
+ const lerna_1 = require("./lib/ws/lerna");
14
15
  function npmAutoFixAll(cwd, options) {
15
16
  return bluebird_1.default.resolve().then(() => {
16
17
  cwd !== null && cwd !== void 0 ? cwd : (cwd = process.cwd());
@@ -70,6 +71,9 @@ function npmAutoFixAll(cwd, options) {
70
71
  targetDir: rootData.root,
71
72
  });
72
73
  }
74
+ (0, lerna_1._fixLernaJson)({
75
+ rootData,
76
+ });
73
77
  const list = (0, index_2._initPkgListableByRootData)(rootData);
74
78
  return (0, index_2._runEachPackagesAsync)(list, {
75
79
  rootData,
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;AAAA,oDAA8D;AAC9D,0DAA+D;AAC/D,4CAAwD;AACxD,2CAAoF;AACpF,gDAAoD;AACpD,gEAAgC;AAChC,wDAAyD;AACzD,uFAAuF;AACvF,mGAAoG;AAQpG,SAAgB,aAAa,CAAC,GAAW,EAAE,OAAwB;IAElE,OAAO,kBAAQ,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE;QAEnC,GAAG,aAAH,GAAG,cAAH,GAAG,IAAH,GAAG,GAAK,OAAO,CAAC,GAAG,EAAE,EAAC;QAEtB,sBAAa,CAAC,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC,CAAC;QAElC,IAAI,QAAQ,GAAG,IAAA,wBAAY,EAAC;YAC3B,GAAG;SACH,CAAC,CAAC;QAEH,IAAI,CAAC,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAA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AAC,CAAC;QAErD,sBAAa,CAAC,IAAI,CAAC,uCAAuC,CAAC,CAAC;QAE5D,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC;QAEpC,IAAI,QAAQ,CAAC,YAAY,EACzB;YACC,IAAA,kBAAU,EAAC;gBACV,QAAQ;gBACR,aAAa;gBACb,MAAM;gBACN,sBAAsB;aACtB,CAAC,CAAA;SACF;aAED;YACC,IAAA,gBAAQ,EAAC;gBACR,QAAQ;gBACR,aAAa;gBACb,MAAM;gBACN,sBAAsB;gBACtB,SAAS,EAAE,QAAQ,CAAC,IAAI;aACxB,CAAC,CAAA;SACF;QAED,MAAM,IAAI,GAAG,IAAA,kCAA0B,EAAC,QAAQ,CAAC,CAAC;QAElD,OAAO,IAAA,6BAAqB,EAAC,IAAI,EAAE;YAClC,QAAQ;YACR,sBAAsB;YACtB,MAAM;YACN,aAAa;SACb,CAAC,CAAA;IACH,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,KAAK,CAAS,CAAC,CAAA;AAC9B,CAAC;AA7FD,sCA6FC;AAED,kBAAe,aAAa,CAAA","sourcesContent":["import { findRoot, findRootLazy } from '@yarn-tool/find-root';\nimport { npmHostedGitInfoLazy } from '@yarn-tool/pkg-git-info';\nimport { _fixRoot, _fixWsRoot } from './lib/root/index';\nimport { _initPkgListableByRootData, _runEachPackagesAsync } from './lib/pkg/index';\nimport { consoleLogger } from 'debug-color2/logger';\nimport Bluebird from 'bluebird';\nimport { copyStaticFiles } from '@yarn-tool/static-file';\nimport { getWsCopyStaticFiles } from '@yarn-tool/static-file/lib/ws/wsCopyStaticFiles';\nimport { getRootCopyStaticFilesAuto } from '@yarn-tool/static-file/lib/root/getRootCopyStaticFiles';\n\nexport interface INpmAutoFixAll\n{\n\toverwriteHostedGitInfo?: boolean;\n\tbranch?: string;\n}\n\nexport function npmAutoFixAll(cwd: string, options?: INpmAutoFixAll)\n{\n\treturn Bluebird.resolve().then(() =>\n\t{\n\t\tcwd ??= process.cwd();\n\n\t\tconsoleLogger.info(`cwd: ${cwd}`);\n\n\t\tlet rootData = findRootLazy({\n\t\t\tcwd,\n\t\t});\n\n\t\tif (!rootData?.root)\n\t\t{\n\t\t\tthrow new Error(`Invalid workspaces / package: ${cwd}`)\n\t\t}\n\n\t\tif (rootData.hasWorkspace && !rootData.isWorkspace)\n\t\t{\n\t\t\trootData = findRoot({\n\t\t\t\tcwd: rootData.root,\n\t\t\t});\n\t\t}\n\n\t\tconsole.log(`root:`, rootData.root);\n\t\tconsole.log(`hasWorkspace:`, rootData.hasWorkspace);\n\n\t\tlet { branch, overwriteHostedGitInfo } = options ?? {};\n\n\t\tcwd = rootData.cwd;\n\n\t\tif (rootData.hasWorkspace)\n\t\t{\n\t\t\tconst file_map = getWsCopyStaticFiles();\n\n\t\t\tcopyStaticFiles({\n\t\t\t\tcwd: rootData.ws,\n\t\t\t\tfile_map,\n\t\t\t});\n\t\t}\n\t\telse if (rootData.root)\n\t\t{\n\t\t\tconst file_map = getRootCopyStaticFilesAuto({\n\t\t\t\t...rootData,\n\t\t\t\tisRoot: true,\n\t\t\t});\n\n\t\t\tcopyStaticFiles({\n\t\t\t\tcwd: rootData.root,\n\t\t\t\tfile_map,\n\t\t\t});\n\t\t}\n\n\t\tconsoleLogger.info(`check git info`);\n\n\t\tconst hostedGitInfo = npmHostedGitInfoLazy(cwd);\n\n\t\tconsole.log(`homepage:`, hostedGitInfo.homepage);\n\t\tconsole.log(`repository:`, hostedGitInfo.repository);\n\n\t\tconsoleLogger.info(`auto fix root of workspaces / package`);\n\n\t\tconsole.log(`root:`, rootData.root);\n\n\t\tif (rootData.hasWorkspace)\n\t\t{\n\t\t\t_fixWsRoot({\n\t\t\t\trootData,\n\t\t\t\thostedGitInfo,\n\t\t\t\tbranch,\n\t\t\t\toverwriteHostedGitInfo,\n\t\t\t})\n\t\t}\n\t\telse\n\t\t{\n\t\t\t_fixRoot({\n\t\t\t\trootData,\n\t\t\t\thostedGitInfo,\n\t\t\t\tbranch,\n\t\t\t\toverwriteHostedGitInfo,\n\t\t\t\ttargetDir: rootData.root,\n\t\t\t})\n\t\t}\n\n\t\tconst list = _initPkgListableByRootData(rootData);\n\n\t\treturn _runEachPackagesAsync(list, {\n\t\t\trootData,\n\t\t\toverwriteHostedGitInfo,\n\t\t\tbranch,\n\t\t\thostedGitInfo,\n\t\t})\n\t}).then(() => void 0 as void)\n}\n\nexport default npmAutoFixAll\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;AAAA,oDAA8D;AAC9D,0DAA+D;AAC/D,4CAAwD;AACxD,2CAAoF;AACpF,gDAAoD;AACpD,gEAAgC;AAChC,wDAAyD;AACzD,uFAAuF;AACvF,mGAAoG;AACpG,0CAA+C;AAQ/C,SAAgB,aAAa,CAAC,GAAW,EAAE,OAAwB;IAElE,OAAO,kBAAQ,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE;QAEnC,GAAG,aAAH,GAAG,cAAH,GAAG,IAAH,GAAG,GAAK,OAAO,CAAC,GAAG,EAAE,EAAC;QAEtB,sBAAa,CAAC,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC,CAAC;QAElC,IAAI,QAAQ,GAAG,IAAA,wBAAY,EAAC;YAC3B,GAAG;SACH,CAAC,CAAC;QAEH,IAAI,CAAC,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,IAAI,CAAA,EACnB;YACC,MAAM,IAAI,KAAK,CAAC,iCAAiC,GAAG,EAAE,CAAC,CAAA;SACvD;QAED,IAAI,QAAQ,CAAC,YAAY,IAAI,CAAC,QAAQ,CAAC,WAAW,EAClD;YACC,QAAQ,GAAG,IAAA,oBAAQ,EAAC;gBACnB,GAAG,EAAE,QAAQ,CAAC,IAAI;aAClB,CAAC,CAAC;SACH;QAED,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,QAAQ,CAAC,IAAI,C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aAAa;gBACb,MAAM;gBACN,sBAAsB;gBACtB,SAAS,EAAE,QAAQ,CAAC,IAAI;aACxB,CAAC,CAAA;SACF;QAED,IAAA,qBAAa,EAAC;YACb,QAAQ;SACR,CAAC,CAAC;QAEH,MAAM,IAAI,GAAG,IAAA,kCAA0B,EAAC,QAAQ,CAAC,CAAC;QAElD,OAAO,IAAA,6BAAqB,EAAC,IAAI,EAAE;YAClC,QAAQ;YACR,sBAAsB;YACtB,MAAM;YACN,aAAa;SACb,CAAC,CAAA;IACH,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,KAAK,CAAS,CAAC,CAAA;AAC9B,CAAC;AAjGD,sCAiGC;AAED,kBAAe,aAAa,CAAA","sourcesContent":["import { findRoot, findRootLazy } from '@yarn-tool/find-root';\nimport { npmHostedGitInfoLazy } from '@yarn-tool/pkg-git-info';\nimport { _fixRoot, _fixWsRoot } from './lib/root/index';\nimport { _initPkgListableByRootData, _runEachPackagesAsync } from './lib/pkg/index';\nimport { consoleLogger } from 'debug-color2/logger';\nimport Bluebird from 'bluebird';\nimport { copyStaticFiles } from '@yarn-tool/static-file';\nimport { getWsCopyStaticFiles } from '@yarn-tool/static-file/lib/ws/wsCopyStaticFiles';\nimport { getRootCopyStaticFilesAuto } from '@yarn-tool/static-file/lib/root/getRootCopyStaticFiles';\nimport { _fixLernaJson } from './lib/ws/lerna';\n\nexport interface INpmAutoFixAll\n{\n\toverwriteHostedGitInfo?: boolean;\n\tbranch?: string;\n}\n\nexport function npmAutoFixAll(cwd: string, options?: INpmAutoFixAll)\n{\n\treturn Bluebird.resolve().then(() =>\n\t{\n\t\tcwd ??= process.cwd();\n\n\t\tconsoleLogger.info(`cwd: ${cwd}`);\n\n\t\tlet rootData = findRootLazy({\n\t\t\tcwd,\n\t\t});\n\n\t\tif (!rootData?.root)\n\t\t{\n\t\t\tthrow new Error(`Invalid workspaces / package: ${cwd}`)\n\t\t}\n\n\t\tif (rootData.hasWorkspace && !rootData.isWorkspace)\n\t\t{\n\t\t\trootData = findRoot({\n\t\t\t\tcwd: rootData.root,\n\t\t\t});\n\t\t}\n\n\t\tconsole.log(`root:`, rootData.root);\n\t\tconsole.log(`hasWorkspace:`, rootData.hasWorkspace);\n\n\t\tlet { branch, overwriteHostedGitInfo } = options ?? {};\n\n\t\tcwd = rootData.cwd;\n\n\t\tif (rootData.hasWorkspace)\n\t\t{\n\t\t\tconst file_map = getWsCopyStaticFiles();\n\n\t\t\tcopyStaticFiles({\n\t\t\t\tcwd: rootData.ws,\n\t\t\t\tfile_map,\n\t\t\t});\n\t\t}\n\t\telse if (rootData.root)\n\t\t{\n\t\t\tconst file_map = getRootCopyStaticFilesAuto({\n\t\t\t\t...rootData,\n\t\t\t\tisRoot: true,\n\t\t\t});\n\n\t\t\tcopyStaticFiles({\n\t\t\t\tcwd: rootData.root,\n\t\t\t\tfile_map,\n\t\t\t});\n\t\t}\n\n\t\tconsoleLogger.info(`check git info`);\n\n\t\tconst hostedGitInfo = npmHostedGitInfoLazy(cwd);\n\n\t\tconsole.log(`homepage:`, hostedGitInfo.homepage);\n\t\tconsole.log(`repository:`, hostedGitInfo.repository);\n\n\t\tconsoleLogger.info(`auto fix root of workspaces / package`);\n\n\t\tconsole.log(`root:`, rootData.root);\n\n\t\tif (rootData.hasWorkspace)\n\t\t{\n\t\t\t_fixWsRoot({\n\t\t\t\trootData,\n\t\t\t\thostedGitInfo,\n\t\t\t\tbranch,\n\t\t\t\toverwriteHostedGitInfo,\n\t\t\t})\n\t\t}\n\t\telse\n\t\t{\n\t\t\t_fixRoot({\n\t\t\t\trootData,\n\t\t\t\thostedGitInfo,\n\t\t\t\tbranch,\n\t\t\t\toverwriteHostedGitInfo,\n\t\t\t\ttargetDir: rootData.root,\n\t\t\t})\n\t\t}\n\n\t\t_fixLernaJson({\n\t\t\trootData,\n\t\t});\n\n\t\tconst list = _initPkgListableByRootData(rootData);\n\n\t\treturn _runEachPackagesAsync(list, {\n\t\t\trootData,\n\t\t\toverwriteHostedGitInfo,\n\t\t\tbranch,\n\t\t\thostedGitInfo,\n\t\t})\n\t}).then(() => void 0 as void)\n}\n\nexport default npmAutoFixAll\n"]}
@@ -0,0 +1,5 @@
1
+ import { ITSRequiredPick } from 'ts-type/lib/type/record';
2
+ import { IFillPkgHostedInfoOptions } from '@yarn-tool/pkg-hosted-info';
3
+ import { ILernaJson } from '@ts-type/package-dts/lerna-json';
4
+ export declare function _fixLernaJsonCore(current: ILernaJson, tpl: ILernaJson): ILernaJson;
5
+ export declare function _fixLernaJson(options: ITSRequiredPick<IFillPkgHostedInfoOptions, 'rootData'>): void;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports._fixLernaJson = exports._fixLernaJsonCore = void 0;
4
+ const path_1 = require("path");
5
+ const fs_extra_1 = require("fs-extra");
6
+ const lodash_1 = require("lodash");
7
+ const __root_1 = require("@yarn-tool/static-file/__root");
8
+ const write_package_json_1 = require("@yarn-tool/write-package-json");
9
+ const array_hyper_unique_1 = require("array-hyper-unique");
10
+ function _fixLernaJsonCore(current, tpl) {
11
+ current.command = (0, lodash_1.defaultsDeep)(current.command, tpl.command);
12
+ current.command.publish.ignoreChanges = current.command.publish.ignoreChanges.concat(tpl.command.publish.ignoreChanges);
13
+ (0, array_hyper_unique_1.array_unique_overwrite)(current.command.publish.ignoreChanges);
14
+ return current;
15
+ }
16
+ exports._fixLernaJsonCore = _fixLernaJsonCore;
17
+ function _fixLernaJson(options) {
18
+ const file = (0, path_1.resolve)(options.rootData.root, 'lerna.json');
19
+ if ((0, fs_extra_1.existsSync)(file)) {
20
+ let json = (0, fs_extra_1.readJSONSync)(file);
21
+ let json2 = (0, fs_extra_1.readJSONSync)((0, path_1.resolve)(__root_1.__STATIC_ROOT, 'file/lerna.json.tpl'));
22
+ json = _fixLernaJsonCore(json, json2);
23
+ (0, write_package_json_1.writePackageJSONSync)(file, json);
24
+ }
25
+ }
26
+ exports._fixLernaJson = _fixLernaJson;
27
+ //# sourceMappingURL=lerna.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lerna.js","sourceRoot":"","sources":["lerna.ts"],"names":[],"mappings":";;;AAEA,+BAA+B;AAC/B,uCAAoD;AACpD,mCAA6C;AAC7C,0DAA8D;AAC9D,sEAAqE;AAErE,2DAA4D;AAE5D,SAAgB,iBAAiB,CAAC,OAAmB,EAAE,GAAe;IAErE,OAAO,CAAC,OAAO,GAAG,IAAA,qBAAY,EAAC,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IAE7D,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,aAAa,GAAI,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,aAA0B,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,aAAyB,CAAC,CAAC;IAElJ,IAAA,2CAAsB,EAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;IAE9D,OAAO,OAAO,CAAA;AACf,CAAC;AATD,8CASC;AAED,SAAgB,aAAa,CAAC,OAA+D;IAE5F,MAAM,IAAI,GAAG,IAAA,cAAO,EAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;IAE1D,IAAI,IAAA,qBAAU,EAAC,IAAI,CAAC,EACpB;QACC,IAAI,IAAI,GAAG,IAAA,uBAAY,EAAC,IAAI,CAAC,CAAC;QAC9B,IAAI,KAAK,GAAG,IAAA,uBAAY,EAAC,IAAA,cAAO,EAAC,sBAAa,EAAE,qBAAqB,CAAC,CAAC,CAAC;QAExE,IAAI,GAAG,iBAAiB,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QAEtC,IAAA,yCAAoB,EAAC,IAAI,EAAE,IAAI,CAAC,CAAC;KACjC;AACF,CAAC;AAbD,sCAaC","sourcesContent":["import { ITSRequiredPick } from 'ts-type/lib/type/record';\nimport { IFillPkgHostedInfoOptions } from '@yarn-tool/pkg-hosted-info';\nimport { resolve } from 'path';\nimport { existsSync, readJSONSync } from 'fs-extra';\nimport { defaultsDeep, merge } from 'lodash';\nimport { __STATIC_ROOT } from '@yarn-tool/static-file/__root';\nimport { writePackageJSONSync } from '@yarn-tool/write-package-json';\nimport { ILernaJson } from '@ts-type/package-dts/lerna-json';\nimport { array_unique_overwrite } from 'array-hyper-unique';\n\nexport function _fixLernaJsonCore(current: ILernaJson, tpl: ILernaJson)\n{\n\tcurrent.command = defaultsDeep(current.command, tpl.command);\n\n\tcurrent.command.publish.ignoreChanges = (current.command.publish.ignoreChanges as string[]).concat(tpl.command.publish.ignoreChanges as string[]);\n\n\tarray_unique_overwrite(current.command.publish.ignoreChanges);\n\n\treturn current\n}\n\nexport function _fixLernaJson(options: ITSRequiredPick<IFillPkgHostedInfoOptions, 'rootData'>)\n{\n\tconst file = resolve(options.rootData.root, 'lerna.json');\n\n\tif (existsSync(file))\n\t{\n\t\tlet json = readJSONSync(file);\n\t\tlet json2 = readJSONSync(resolve(__STATIC_ROOT, 'file/lerna.json.tpl'));\n\n\t\tjson = _fixLernaJsonCore(json, json2);\n\n\t\twritePackageJSONSync(file, json);\n\t}\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yarn-tool/fix-all",
3
- "version": "2.0.16",
3
+ "version": "2.0.19",
4
4
  "description": "auto check/fix workspaces/package",
5
5
  "keywords": [
6
6
  "yarn",
@@ -23,7 +23,8 @@
23
23
  },
24
24
  "repository": {
25
25
  "type": "git",
26
- "url": "git+https://github.com/bluelovers/ws-yarn-workspaces.git"
26
+ "url": "git+https://github.com/bluelovers/ws-yarn-workspaces.git",
27
+ "directory": "packages/@yarn-tool/fix-all"
27
28
  },
28
29
  "license": "ISC",
29
30
  "author": "bluelovers",
@@ -56,29 +57,33 @@
56
57
  "tsc:showConfig": "ynpx get-current-tsconfig -p"
57
58
  },
58
59
  "dependencies": {
59
- "@yarn-tool/find-root": "^2.0.5",
60
- "@yarn-tool/fix-ws-versions": "^2.0.5",
61
- "@yarn-tool/normalize-deps-value": "^1.0.3",
62
- "@yarn-tool/pkg-git-info": "^1.0.34",
63
- "@yarn-tool/pkg-hosted-info": "^2.0.6",
64
- "@yarn-tool/static-file": "^2.0.6",
65
- "@yarn-tool/ws-scope": "^2.0.5",
60
+ "@ts-type/package-dts": "^2.0.5",
61
+ "@yarn-tool/find-root": "^2.0.6",
62
+ "@yarn-tool/fix-ws-versions": "^2.0.6",
63
+ "@yarn-tool/normalize-deps-value": "^1.0.4",
64
+ "@yarn-tool/pkg-git-info": "^1.0.36",
65
+ "@yarn-tool/pkg-hosted-info": "^2.0.8",
66
+ "@yarn-tool/static-file": "^2.0.9",
67
+ "@yarn-tool/write-package-json": "^1.0.5",
68
+ "@yarn-tool/ws-scope": "^2.0.6",
69
+ "array-hyper-unique": "^2.0.8",
66
70
  "bluebird": "^3.7.2",
67
- "cache-path": "^3.0.5",
71
+ "cache-path": "^3.0.6",
68
72
  "debug-color2": "^1.3.2",
69
73
  "fs-extra": "^10.1.0",
70
- "lazy-aggregate-error": "^1.0.12",
71
- "npm-package-json-loader": "^2.0.12",
74
+ "lazy-aggregate-error": "^1.0.16",
75
+ "lodash": "^4.17.21",
76
+ "npm-package-json-loader": "^2.0.13",
72
77
  "progress-estimator": "^0.3.0",
73
- "sort-package-json3": "^2.0.5",
78
+ "sort-package-json3": "^2.0.6",
74
79
  "ts-type": "^2.1.10",
75
- "tslib": "^2",
80
+ "tslib": ">=2",
76
81
  "upath2": "^3.1.15",
77
- "ws-pkg-list": "^2.0.5"
82
+ "ws-pkg-list": "^2.0.6"
78
83
  },
79
84
  "packageManager": "yarn@1.22.19",
80
85
  "publishConfig": {
81
86
  "access": "public"
82
87
  },
83
- "gitHead": "086af430ae2b6b0b89a7f456c7aad5d9fd2a4ec1"
88
+ "gitHead": "f1ecaa59749bcb8c8ecd9f4ef17b3522bf9337c1"
84
89
  }