@yarn-tool/fix-all 1.0.3 → 1.0.7

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
+ ## [1.0.7](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/fix-all@1.0.6...@yarn-tool/fix-all@1.0.7) (2022-01-25)
7
+
8
+ **Note:** Version bump only for package @yarn-tool/fix-all
9
+
10
+
11
+
12
+
13
+
14
+ ## [1.0.6](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/fix-all@1.0.5...@yarn-tool/fix-all@1.0.6) (2022-01-13)
15
+
16
+ **Note:** Version bump only for package @yarn-tool/fix-all
17
+
18
+
19
+
20
+
21
+
22
+ ## [1.0.5](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/fix-all@1.0.4...@yarn-tool/fix-all@1.0.5) (2022-01-01)
23
+
24
+
25
+ ### 📦 Code Refactoring
26
+
27
+ * code splitting ([fa83e8f](https://github.com/bluelovers/ws-yarn-workspaces/commit/fa83e8f47a10a5ad7ed1ac5337d8a2d20c556df9))
28
+
29
+
30
+
31
+
32
+
33
+ ## [1.0.4](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/fix-all@1.0.3...@yarn-tool/fix-all@1.0.4) (2021-12-31)
34
+
35
+
36
+ ### 📦 Code Refactoring
37
+
38
+ * code splitting ([3236306](https://github.com/bluelovers/ws-yarn-workspaces/commit/323630687dcfaa851cd65176d446d55f74a1dd3b))
39
+
40
+
41
+
42
+
43
+
6
44
  ## [1.0.3](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/fix-all@1.0.2...@yarn-tool/fix-all@1.0.3) (2021-12-30)
7
45
 
8
46
  **Note:** Version bump only for package @yarn-tool/fix-all
package/lib/root/index.js CHANGED
@@ -7,6 +7,8 @@ const pkg_git_info_1 = require("@yarn-tool/pkg-git-info");
7
7
  const npm_package_json_loader_1 = require("npm-package-json-loader");
8
8
  const ws_scope_1 = require("@yarn-tool/ws-scope");
9
9
  const sort_package_json3_1 = require("sort-package-json3");
10
+ const ws_root_scripts_1 = require("@yarn-tool/pkg-entry-util/lib/preset/ws-root-scripts");
11
+ const dummy_1 = require("@yarn-tool/pkg-entry-util/lib/preset/dummy");
10
12
  function _fixRoot(options) {
11
13
  let { rootData, branch, overwriteHostedGitInfo, hostedGitInfo, targetDir } = options;
12
14
  const root_file_package_json = (0, upath2_1.join)(targetDir, 'package.json');
@@ -43,6 +45,12 @@ function _fixWsRoot(options) {
43
45
  ...options,
44
46
  targetDir: options.rootData.ws,
45
47
  });
48
+ Object.entries((0, dummy_1.fillDummyScripts)((0, ws_root_scripts_1.defaultWorkspaceRootScripts)())).forEach(([key, value]) => {
49
+ var _a;
50
+ var _b;
51
+ (_a = (_b = runtime.root_pkg_json.data.scripts)[key]) !== null && _a !== void 0 ? _a : (_b[key] = value);
52
+ });
53
+ runtime.root_pkg_json.write();
46
54
  let wss = new ws_scope_1.WorkspacesScope(runtime.rootData.ws);
47
55
  wss.syncValue();
48
56
  wss.save();
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AACA,gEAA0F;AAC1F,mCAA8B;AAC9B,0DAA+D;AAC/D,qEAA4D;AAC5D,kDAAsD;AACtD,2DAAqD;AAErD,SAAgB,QAAQ,CAAC,OAA4C;IAEpE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,sBAAsB,EAAE,aAAa,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC;IAErF,MAAM,sBAAsB,GAAG,IAAA,aAAI,EAAC,SAAS,EAAE,cAAc,CAAC,CAAC;IAE/D,IAAI,aAAa,GAAG,IAAI,2CAAiB,CAAC,sBAAsB,CAAC,CAAC;IAElE,aAAa,aAAb,aAAa,cAAb,aAAa,IAAb,aAAa,GAAK,IAAA,mCAAoB,GAAE,EAAC;IAEzC,IAAI,aAAa,EACjB;QACC,IAAA,mCAAiB,EAAC,aAAa,CAAC,IAAI,EAAE;YACrC,SAAS;YACT,QAAQ;YACR,aAAa;YACb,MAAM;YACN,sBAAsB;SACtB,CAAC,CAAC;QAEH,aAAa,CAAC,IAAI,GAAG,IAAA,oCAAe,EAAC,aAAa,CAAC,IAAI,CAAC,CAAC;QAEzD,aAAa,CAAC,KAAK,EAAE,CAAC;KACtB;IAED,OAAO;QACN,sBAAsB;QACtB,aAAa;QACb,SAAS;QACT,QAAQ;QACR,aAAa;QACb,MAAM;QACN,sBAAsB;KACtB,CAAA;AACF,CAAC;AAlCD,4BAkCC;AAED,SAAgB,UAAU,CAAC,OAAuH;;IAEjJ,IAAI,CAAC,CAAA,MAAA,OAAO,CAAC,QAAQ,CAAC,EAAE,0CAAE,MAAM,CAAA,EAChC;QACC,MAAM,IAAI,KAAK,CAAC,oBAAoB,CAAC,CAAA;KACrC;IAED,IAAI,OAAO,GAAG,QAAQ,CAAC;QACtB,GAAG,OAAO;QACV,SAAS,EAAE,OAAO,CAAC,QAAQ,CAAC,EAAE;KAC9B,CAAC,CAAC;IAEH,IAAI,GAAG,GAAG,IAAI,0BAAe,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IACnD,GAAG,CAAC,SAAS,EAAE,CAAC;IAChB,GAAG,CAAC,IAAI,EAAE,CAAC;IAEX,OAAO,OAAO,CAAA;AACf,CAAC;AAjBD,gCAiBC","sourcesContent":["import { ITSRequiredPick } from 'ts-type/lib/type/record';\nimport { fillPkgHostedInfo, IFillPkgHostedInfoOptions } from '@yarn-tool/pkg-hosted-info';\nimport { join } from 'upath2';\nimport { npmHostedGitInfoLazy } from '@yarn-tool/pkg-git-info';\nimport { PackageJsonLoader } from 'npm-package-json-loader';\nimport { WorkspacesScope } from '@yarn-tool/ws-scope';\nimport { sortPackageJson } from 'sort-package-json3';\n\nexport function _fixRoot(options: Required<IFillPkgHostedInfoOptions>)\n{\n\tlet { rootData, branch, overwriteHostedGitInfo, hostedGitInfo, targetDir } = options;\n\n\tconst root_file_package_json = join(targetDir, 'package.json');\n\n\tlet root_pkg_json = new PackageJsonLoader(root_file_package_json);\n\n\thostedGitInfo ??= npmHostedGitInfoLazy();\n\n\tif (hostedGitInfo)\n\t{\n\t\tfillPkgHostedInfo(root_pkg_json.data, {\n\t\t\ttargetDir,\n\t\t\trootData,\n\t\t\thostedGitInfo,\n\t\t\tbranch,\n\t\t\toverwriteHostedGitInfo,\n\t\t});\n\n\t\troot_pkg_json.data = sortPackageJson(root_pkg_json.data);\n\n\t\troot_pkg_json.write();\n\t}\n\n\treturn {\n\t\troot_file_package_json,\n\t\troot_pkg_json,\n\t\ttargetDir,\n\t\trootData,\n\t\thostedGitInfo,\n\t\tbranch,\n\t\toverwriteHostedGitInfo,\n\t}\n}\n\nexport function _fixWsRoot(options: ITSRequiredPick<IFillPkgHostedInfoOptions, 'hostedGitInfo' | 'rootData' | 'overwriteHostedGitInfo' | 'branch'>)\n{\n\tif (!options.rootData.ws?.length)\n\t{\n\t\tthrow new Error(`Invalid workspaces`)\n\t}\n\n\tlet runtime = _fixRoot({\n\t\t...options,\n\t\ttargetDir: options.rootData.ws,\n\t});\n\n\tlet wss = new WorkspacesScope(runtime.rootData.ws);\n\twss.syncValue();\n\twss.save();\n\n\treturn runtime\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AACA,gEAA0F;AAC1F,mCAA8B;AAC9B,0DAA+D;AAC/D,qEAA4D;AAC5D,kDAAsD;AACtD,2DAAqD;AACrD,0FAAmG;AACnG,sEAA8E;AAE9E,SAAgB,QAAQ,CAAC,OAA4C;IAEpE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,sBAAsB,EAAE,aAAa,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC;IAErF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AAE,CAAC;IAE9B,IAAI,GAAG,GAAG,IAAI,0BAAe,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IACnD,GAAG,CAAC,SAAS,EAAE,CAAC;IAChB,GAAG,CAAC,IAAI,EAAE,CAAC;IAEX,OAAO,OAAO,CAAA;AACf,CAAC;AAxBD,gCAwBC","sourcesContent":["import { ITSRequiredPick } from 'ts-type/lib/type/record';\nimport { fillPkgHostedInfo, IFillPkgHostedInfoOptions } from '@yarn-tool/pkg-hosted-info';\nimport { join } from 'upath2';\nimport { npmHostedGitInfoLazy } from '@yarn-tool/pkg-git-info';\nimport { PackageJsonLoader } from 'npm-package-json-loader';\nimport { WorkspacesScope } from '@yarn-tool/ws-scope';\nimport { sortPackageJson } from 'sort-package-json3';\nimport { defaultWorkspaceRootScripts } from '@yarn-tool/pkg-entry-util/lib/preset/ws-root-scripts';\nimport { fillDummyScripts } from '@yarn-tool/pkg-entry-util/lib/preset/dummy';\n\nexport function _fixRoot(options: Required<IFillPkgHostedInfoOptions>)\n{\n\tlet { rootData, branch, overwriteHostedGitInfo, hostedGitInfo, targetDir } = options;\n\n\tconst root_file_package_json = join(targetDir, 'package.json');\n\n\tlet root_pkg_json = new PackageJsonLoader(root_file_package_json);\n\n\thostedGitInfo ??= npmHostedGitInfoLazy();\n\n\tif (hostedGitInfo)\n\t{\n\t\tfillPkgHostedInfo(root_pkg_json.data, {\n\t\t\ttargetDir,\n\t\t\trootData,\n\t\t\thostedGitInfo,\n\t\t\tbranch,\n\t\t\toverwriteHostedGitInfo,\n\t\t});\n\n\t\troot_pkg_json.data = sortPackageJson(root_pkg_json.data);\n\n\t\troot_pkg_json.write();\n\t}\n\n\treturn {\n\t\troot_file_package_json,\n\t\troot_pkg_json,\n\t\ttargetDir,\n\t\trootData,\n\t\thostedGitInfo,\n\t\tbranch,\n\t\toverwriteHostedGitInfo,\n\t}\n}\n\nexport function _fixWsRoot(options: ITSRequiredPick<IFillPkgHostedInfoOptions, 'hostedGitInfo' | 'rootData' | 'overwriteHostedGitInfo' | 'branch'>)\n{\n\tif (!options.rootData.ws?.length)\n\t{\n\t\tthrow new Error(`Invalid workspaces`)\n\t}\n\n\tlet runtime = _fixRoot({\n\t\t...options,\n\t\ttargetDir: options.rootData.ws,\n\t});\n\n\tObject.entries(fillDummyScripts(defaultWorkspaceRootScripts())).forEach(([key, value]) =>\n\t{\n\t\truntime.root_pkg_json.data.scripts[key] ??= value;\n\t});\n\n\truntime.root_pkg_json.write();\n\n\tlet wss = new WorkspacesScope(runtime.rootData.ws);\n\twss.syncValue();\n\twss.save();\n\n\treturn runtime\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yarn-tool/fix-all",
3
- "version": "1.0.3",
3
+ "version": "1.0.7",
4
4
  "description": "auto check/fix workspaces/package",
5
5
  "keywords": [
6
6
  "yarn",
@@ -54,26 +54,26 @@
54
54
  "tsc:showConfig": "ynpx get-current-tsconfig -p"
55
55
  },
56
56
  "dependencies": {
57
- "@yarn-tool/find-root": "^1.0.59",
58
- "@yarn-tool/pkg-git-info": "^1.0.24",
59
- "@yarn-tool/pkg-hosted-info": "^1.0.9",
60
- "@yarn-tool/ws-scope": "^1.0.11",
57
+ "@yarn-tool/find-root": "^1.0.61",
58
+ "@yarn-tool/pkg-git-info": "^1.0.25",
59
+ "@yarn-tool/pkg-hosted-info": "^1.0.11",
60
+ "@yarn-tool/ws-scope": "^1.0.13",
61
61
  "bluebird": "^3.7.2",
62
- "cache-path": "^2.0.28",
62
+ "cache-path": "^2.0.30",
63
63
  "debug-color2": "^1.2.7",
64
64
  "fs-extra": "^10.0.0",
65
65
  "lazy-aggregate-error": "^1.0.6",
66
- "npm-package-json-loader": "^1.0.69",
66
+ "npm-package-json-loader": "^1.0.73",
67
67
  "progress-estimator": "^0.3.0",
68
- "sort-package-json3": "^1.0.49",
69
- "ts-type": "^2.1.2",
68
+ "sort-package-json3": "^1.0.51",
69
+ "ts-type": "^2.1.4",
70
70
  "tslib": "^2.3.1",
71
- "upath2": "^3.1.10",
72
- "ws-pkg-list": "^1.0.72"
71
+ "upath2": "^3.1.12",
72
+ "ws-pkg-list": "^1.0.74"
73
73
  },
74
74
  "publishConfig": {
75
75
  "access": "public"
76
76
  },
77
77
  "packageManager": "yarn@^1.22.11",
78
- "gitHead": "7b4a5e4d67ade2339b94b6df98a0264cac7ba046"
78
+ "gitHead": "fbf381266d9eac5a9f129be640e2690e19cbb956"
79
79
  }