@yarn-tool/fix-all 2.0.7 → 2.0.10
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 +33 -0
- package/lib/pkg/index.js +11 -0
- package/lib/pkg/index.js.map +1 -1
- package/lib/root/index.js +1 -0
- package/lib/root/index.js.map +1 -1
- package/package.json +11 -10
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,39 @@
|
|
|
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.10](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/fix-all@2.0.9...@yarn-tool/fix-all@2.0.10) (2022-08-15)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### 🐛 Bug Fixes
|
|
10
|
+
|
|
11
|
+
* sort root scripts ([042e47f](https://github.com/bluelovers/ws-yarn-workspaces/commit/042e47f682789c2c101e40ab76f5781153724325))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [2.0.9](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/fix-all@2.0.8...@yarn-tool/fix-all@2.0.9) (2022-08-15)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### 🐛 Bug Fixes
|
|
21
|
+
|
|
22
|
+
* use normalizeDepsValue ([9de3904](https://github.com/bluelovers/ws-yarn-workspaces/commit/9de39049be08a900c4562fa0b6e766e824980c6d))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
## [2.0.8](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/fix-all@2.0.7...@yarn-tool/fix-all@2.0.8) (2022-08-13)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
### ✨ Features
|
|
32
|
+
|
|
33
|
+
* normalize deps semver ([d058f57](https://github.com/bluelovers/ws-yarn-workspaces/commit/d058f579b6c3e84f0ab427c106d8a45ebb0d70fd))
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
6
39
|
## [2.0.7](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/fix-all@2.0.6...@yarn-tool/fix-all@2.0.7) (2022-08-13)
|
|
7
40
|
|
|
8
41
|
|
package/lib/pkg/index.js
CHANGED
|
@@ -13,6 +13,8 @@ const debug_color2_1 = require("debug-color2");
|
|
|
13
13
|
const pkg_hosted_info_1 = require("@yarn-tool/pkg-hosted-info");
|
|
14
14
|
const sort_package_json3_1 = require("sort-package-json3");
|
|
15
15
|
const fix_ws_versions_1 = require("@yarn-tool/fix-ws-versions");
|
|
16
|
+
const types_1 = require("@ts-type/package-dts/lib/package-json/types");
|
|
17
|
+
const normalize_deps_value_1 = require("@yarn-tool/normalize-deps-value");
|
|
16
18
|
function _handler(cwd, ...argv) {
|
|
17
19
|
return {
|
|
18
20
|
...(0, ws_pkg_list_1.normalizeListableRowExtra)(argv[0], cwd),
|
|
@@ -48,6 +50,15 @@ function _runEachPackagesAsync(list, options) {
|
|
|
48
50
|
branch,
|
|
49
51
|
});
|
|
50
52
|
(0, fix_ws_versions_1.fixPkgDepsVersionsCore)(pkg.data, cache);
|
|
53
|
+
types_1.packageJsonDependenciesFields
|
|
54
|
+
.forEach(field => {
|
|
55
|
+
var _a;
|
|
56
|
+
Object.keys((_a = pkg.data[field]) !== null && _a !== void 0 ? _a : {})
|
|
57
|
+
.forEach(name => {
|
|
58
|
+
const _value = (0, normalize_deps_value_1.normalizeDepsValue)(pkg.data[field][name]);
|
|
59
|
+
pkg.data[field][name] = _value;
|
|
60
|
+
});
|
|
61
|
+
});
|
|
51
62
|
pkg.data = (0, sort_package_json3_1.sortPackageJson)(pkg.data);
|
|
52
63
|
pkg.autofix();
|
|
53
64
|
pkg.write();
|
package/lib/pkg/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;AAAA,6CAAoH;AAEpH,qEAA4D;AAC5D,8DAA6D;AAC7D,+DAA2D;AAC3D,gEAAgC;AAChC,uDAA+D;AAC/D,gDAAoD;AACpD,+CAAuC;AAEvC,gEAA0F;AAE1F,2DAAqD;AACrD,gEAAyF;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;AAAA,6CAAoH;AAEpH,qEAA4D;AAC5D,8DAA6D;AAC7D,+DAA2D;AAC3D,gEAAgC;AAChC,uDAA+D;AAC/D,gDAAoD;AACpD,+CAAuC;AAEvC,gEAA0F;AAE1F,2DAAqD;AACrD,gEAAyF;AACzF,uEAA4F;AAC5F,0EAAqE;AAErE,SAAgB,QAAQ,CAAC,GAAW,EAAE,GAAG,IAAgD;IAExF,OAAO;QACN,GAAG,IAAA,uCAAyB,EAAC,IAAI,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC;QAC1C,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC;KACZ,CAAA;AACF,CAAC;AAND,4BAMC;AAID,SAAgB,qBAAqB,CAAC,IAAc,EACnD,OAAuH;IAGvH,MAAM,EACL,QAAQ,EACR,sBAAsB,EACtB,aAAa,EACb,MAAM,GACN,GAAG,OAAO,CAAC;IAEZ,IAAI,MAAyB,CAAC;IAC9B,IAAI,KAAK,GAAwB,EAAS,CAAC;IAE3C,OAAO,kBAAQ,CAAC,OAAO,CAAC,IAAI,CAAC;SAC3B,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE;QAEjB,MAAM,GAAG,IAAA,sCAAuB,EAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QAEhD,sBAAa,CAAC,IAAI,CAAC,yBAAyB,CAAC,CAAC;QAE9C,KAAK,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAE3B,CAAC,CAAC;SACD,SAAS,CA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AAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,IAAI,CAAC,CAAA;QAEvC,OAAO,aAAa;aAClB,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;aACvB,IAAI,CAAC,GAAG,EAAE;YAEV,IAAI,GAAG,CAAC,MAAM,EACd;gBACC,sBAAO,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC;aAC9B;QACF,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CACD;AACH,CAAC;AApFD,sDAoFC;AAED,SAAgB,0BAA0B,CAAC,QAA4D;IAEtG,IAAI,GAAG,GAAG,QAAQ,CAAC,IAAI,CAAC;IAExB,IAAI,QAAQ,CAAC,YAAY,EACzB;QACC,OAAO,IAAA,2BAAa,EAAC,GAAG,EAAE;YACzB,OAAO,CAAC,GAAG,IAAI;gBAEd,OAAO,QAAQ,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAA;YAC9B,CAAC;SACD,CAAC,CAAA;KACF;IAED,OAAO,IAAA,oCAAsB,EAAC;QAC7B,GAAG;KACH,EAAE,GAAG,EAAE;QACP,OAAO,CAAC,GAAG,IAAI;YAEd,OAAO,QAAQ,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAA;QAC9B,CAAC;KACD,CAAC,CAAA;AACH,CAAC;AAtBD,gEAsBC","sourcesContent":["import { IOptionsPkgListable, normalizeListableRowExtra, wsPkgListable, wsPkgListableFromPaths } from 'ws-pkg-list';\nimport { IFindRootReturnType } from '@yarn-tool/find-root';\nimport { PackageJsonLoader } from 'npm-package-json-loader';\nimport { pkgExportsVerify } from '@yarn-tool/pkg-entry-util';\nimport { AggregateErrorExtra } from 'lazy-aggregate-error';\nimport Bluebird from 'bluebird';\nimport { createProgressEstimator } from '../util/cli-progress';\nimport { consoleLogger } from 'debug-color2/logger';\nimport { console } from 'debug-color2';\nimport { ProgressEstimator } from 'progress-estimator';\nimport { fillPkgHostedInfo, IFillPkgHostedInfoOptions } from '@yarn-tool/pkg-hosted-info';\nimport { ITSRequiredPick } from 'ts-type/lib/type/record';\nimport { sortPackageJson } from 'sort-package-json3';\nimport { fixPkgDepsVersionsCore, ICache, ICacheInput } from '@yarn-tool/fix-ws-versions';\nimport { packageJsonDependenciesFields } from '@ts-type/package-dts/lib/package-json/types';\nimport { normalizeDepsValue } from '@yarn-tool/normalize-deps-value';\n\nexport function _handler(cwd: string, ...argv: Parameters<IOptionsPkgListable[\"handler\"]>)\n{\n\treturn {\n\t\t...normalizeListableRowExtra(argv[0], cwd),\n\t\tpkg: argv[1],\n\t}\n}\n\nexport type IEntry = ReturnType<typeof _handler>\n\nexport function _runEachPackagesAsync(list: IEntry[],\n\toptions: ITSRequiredPick<IFillPkgHostedInfoOptions, 'overwriteHostedGitInfo' | 'branch' | 'rootData' | 'hostedGitInfo'>,\n)\n{\n\tconst {\n\t\trootData,\n\t\toverwriteHostedGitInfo,\n\t\thostedGitInfo,\n\t\tbranch,\n\t} = options;\n\n\tlet logger: ProgressEstimator;\n\tlet cache: ICacheInput<IEntry> = {} as any;\n\n\treturn Bluebird.resolve(list)\n\t\t.tap((listable) =>\n\t\t{\n\t\t\tlogger = createProgressEstimator(rootData.root);\n\n\t\t\tconsoleLogger.info(`auto check/fix packages`);\n\n\t\t\tcache.listable = listable;\n\n\t\t})\n\t\t.mapSeries(async (row) =>\n\t\t{\n\t\t\t//console.dir(row);\n\n\t\t\tconst err = new AggregateErrorExtra();\n\n\t\t\tconst promiseLogger = logger((async () =>\n\t\t\t{\n\n\t\t\t\tconst pkg = new PackageJsonLoader(row.manifestLocation);\n\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tpkgExportsVerify(pkg.data);\n\t\t\t\t}\n\t\t\t\tcatch (e)\n\t\t\t\t{\n\t\t\t\t\terr.push(e);\n\t\t\t\t}\n\n\t\t\t\tfillPkgHostedInfo(pkg.data, {\n\t\t\t\t\ttargetDir: row.location,\n\t\t\t\t\toverwriteHostedGitInfo,\n\t\t\t\t\thostedGitInfo,\n\t\t\t\t\tbranch,\n\t\t\t\t});\n\n\t\t\t\tfixPkgDepsVersionsCore(pkg.data, cache);\n\n\t\t\t\tpackageJsonDependenciesFields\n\t\t\t\t\t.forEach(field => {\n\n\t\t\t\t\t\tObject.keys(pkg.data[field] ?? {})\n\t\t\t\t\t\t\t.forEach(name => {\n\t\t\t\t\t\t\t\tconst _value = normalizeDepsValue(pkg.data[field][name]);\n\t\t\t\t\t\t\t\tpkg.data[field][name] = _value;\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t;\n\n\t\t\t\t\t})\n\t\t\t\t;\n\n\t\t\t\tpkg.data = sortPackageJson(pkg.data);\n\n\t\t\t\tpkg.autofix();\n\t\t\t\tpkg.write();\n\n\t\t\t})().catch(e => err.push(e)), row.name)\n\n\t\t\treturn promiseLogger\n\t\t\t\t.catch(e => err.push(e))\n\t\t\t\t.then(() =>\n\t\t\t\t{\n\t\t\t\t\tif (err.length)\n\t\t\t\t\t{\n\t\t\t\t\t\tconsole.error(err.toString());\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t})\n\t\t;\n}\n\nexport function _initPkgListableByRootData(rootData: Pick<IFindRootReturnType, 'root' | 'hasWorkspace'>)\n{\n\tlet cwd = rootData.root;\n\n\tif (rootData.hasWorkspace)\n\t{\n\t\treturn wsPkgListable(cwd, {\n\t\t\thandler(...argv)\n\t\t\t{\n\t\t\t\treturn _handler(cwd, ...argv)\n\t\t\t},\n\t\t})\n\t}\n\n\treturn wsPkgListableFromPaths([\n\t\tcwd,\n\t], cwd, {\n\t\thandler(...argv)\n\t\t{\n\t\t\treturn _handler(cwd, ...argv)\n\t\t},\n\t})\n}\n"]}
|
package/lib/root/index.js
CHANGED
|
@@ -50,6 +50,7 @@ function _fixWsRoot(options) {
|
|
|
50
50
|
var _b;
|
|
51
51
|
(_a = (_b = runtime.root_pkg_json.data.scripts)[key]) !== null && _a !== void 0 ? _a : (_b[key] = value);
|
|
52
52
|
});
|
|
53
|
+
runtime.root_pkg_json.data = (0, sort_package_json3_1.sortPackageJson)(runtime.root_pkg_json.data);
|
|
53
54
|
runtime.root_pkg_json.write();
|
|
54
55
|
let wss = new ws_scope_1.WorkspacesScope(runtime.rootData.ws);
|
|
55
56
|
wss.syncValue();
|
package/lib/root/index.js.map
CHANGED
|
@@ -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;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,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,4BA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,aAAa,CAAC,KAAK,EAAE,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;AA1BD,gCA0BC","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.data = sortPackageJson(runtime.root_pkg_json.data);\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": "2.0.
|
|
3
|
+
"version": "2.0.10",
|
|
4
4
|
"description": "auto check/fix workspaces/package",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"yarn",
|
|
@@ -54,27 +54,28 @@
|
|
|
54
54
|
"tsc:showConfig": "ynpx get-current-tsconfig -p"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@yarn-tool/find-root": "^2.0.
|
|
58
|
-
"@yarn-tool/fix-ws-versions": "^2.0.
|
|
57
|
+
"@yarn-tool/find-root": "^2.0.4",
|
|
58
|
+
"@yarn-tool/fix-ws-versions": "^2.0.4",
|
|
59
|
+
"@yarn-tool/normalize-deps-value": "^1.0.1",
|
|
59
60
|
"@yarn-tool/pkg-git-info": "^1.0.33",
|
|
60
|
-
"@yarn-tool/pkg-hosted-info": "^2.0.
|
|
61
|
-
"@yarn-tool/ws-scope": "^2.0.
|
|
61
|
+
"@yarn-tool/pkg-hosted-info": "^2.0.5",
|
|
62
|
+
"@yarn-tool/ws-scope": "^2.0.4",
|
|
62
63
|
"bluebird": "^3.7.2",
|
|
63
|
-
"cache-path": "^3.0.
|
|
64
|
+
"cache-path": "^3.0.4",
|
|
64
65
|
"debug-color2": "^1.3.1",
|
|
65
66
|
"fs-extra": "^10.1.0",
|
|
66
67
|
"lazy-aggregate-error": "^1.0.11",
|
|
67
|
-
"npm-package-json-loader": "^2.0.
|
|
68
|
+
"npm-package-json-loader": "^2.0.8",
|
|
68
69
|
"progress-estimator": "^0.3.0",
|
|
69
|
-
"sort-package-json3": "^2.0.
|
|
70
|
+
"sort-package-json3": "^2.0.3",
|
|
70
71
|
"ts-type": "^2.1.10",
|
|
71
72
|
"tslib": "^2",
|
|
72
73
|
"upath2": "^3.1.15",
|
|
73
|
-
"ws-pkg-list": "^2.0.
|
|
74
|
+
"ws-pkg-list": "^2.0.4"
|
|
74
75
|
},
|
|
75
76
|
"packageManager": "yarn@1.22.19",
|
|
76
77
|
"publishConfig": {
|
|
77
78
|
"access": "public"
|
|
78
79
|
},
|
|
79
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "99edcdf82658cdc6131947e8c94f88d790420e55"
|
|
80
81
|
}
|