@elliemae/ds-codemods 2.0.0-rc.7 → 2.0.1-rc.0
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,111 @@
|
|
|
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.1-rc.0](https://git.elliemae.io/platform-ui/dimsum/compare/v2.0.0-rc.19...v2.0.1-rc.0) (2021-12-13)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @elliemae/ds-codemods
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [2.0.0-rc.19](https://git.elliemae.io/platform-ui/dimsum/compare/v2.0.0-rc.18...v2.0.0-rc.19) (2021-12-10)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @elliemae/ds-codemods
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## [2.0.0-rc.18](https://git.elliemae.io/platform-ui/dimsum/compare/v2.0.0-rc.17...v2.0.0-rc.18) (2021-12-08)
|
|
23
|
+
|
|
24
|
+
**Note:** Version bump only for package @elliemae/ds-codemods
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## [2.0.0-rc.17](https://git.elliemae.io/platform-ui/dimsum/compare/v2.0.0-rc.16...v2.0.0-rc.17) (2021-12-08)
|
|
31
|
+
|
|
32
|
+
**Note:** Version bump only for package @elliemae/ds-codemods
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
## [2.0.0-rc.16](https://git.elliemae.io/platform-ui/dimsum/compare/v2.0.0-rc.15...v2.0.0-rc.16) (2021-12-08)
|
|
39
|
+
|
|
40
|
+
**Note:** Version bump only for package @elliemae/ds-codemods
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
## [2.0.0-rc.15](https://git.elliemae.io/platform-ui/dimsum/compare/v2.0.0-rc.14...v2.0.0-rc.15) (2021-12-06)
|
|
47
|
+
|
|
48
|
+
**Note:** Version bump only for package @elliemae/ds-codemods
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
## [2.0.0-rc.14](https://git.elliemae.io/platform-ui/dimsum/compare/v2.0.0-rc.13...v2.0.0-rc.14) (2021-12-03)
|
|
55
|
+
|
|
56
|
+
**Note:** Version bump only for package @elliemae/ds-codemods
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
## [2.0.0-rc.13](https://git.elliemae.io/platform-ui/dimsum/compare/v2.0.0-rc.12...v2.0.0-rc.13) (2021-12-03)
|
|
63
|
+
|
|
64
|
+
**Note:** Version bump only for package @elliemae/ds-codemods
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
## [2.0.0-rc.12](https://git.elliemae.io/platform-ui/dimsum/compare/v2.0.0-rc.11...v2.0.0-rc.12) (2021-12-01)
|
|
71
|
+
|
|
72
|
+
**Note:** Version bump only for package @elliemae/ds-codemods
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
## [2.0.0-rc.11](https://git.elliemae.io/platform-ui/dimsum/compare/v2.0.0-rc.10...v2.0.0-rc.11) (2021-12-01)
|
|
79
|
+
|
|
80
|
+
**Note:** Version bump only for package @elliemae/ds-codemods
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
## [2.0.0-rc.10](https://git.elliemae.io/platform-ui/dimsum/compare/v2.0.0-rc.9...v2.0.0-rc.10) (2021-11-24)
|
|
87
|
+
|
|
88
|
+
**Note:** Version bump only for package @elliemae/ds-codemods
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
## [2.0.0-rc.9](https://git.elliemae.io/platform-ui/dimsum/compare/v2.0.0-rc.8...v2.0.0-rc.9) (2021-11-23)
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
### Bug Fixes
|
|
98
|
+
|
|
99
|
+
* dimsum:: fixed all the package.json missing/unused dependencies up to now ([#3758](https://git.elliemae.io/platform-ui/dimsum/issues/3758)) ([c5bd0d5](https://git.elliemae.io/platform-ui/dimsum/commit/c5bd0d5675be1680af6f12678b50421bac85cb1b))
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
## [2.0.0-rc.8](https://git.elliemae.io/platform-ui/dimsum/compare/v2.0.0-rc.7...v2.0.0-rc.8) (2021-11-23)
|
|
104
|
+
|
|
105
|
+
**Note:** Version bump only for package @elliemae/ds-codemods
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
6
111
|
## [2.0.0-rc.7](https://git.elliemae.io/platform-ui/dimsum/compare/v2.0.0-rc.6...v2.0.0-rc.7) (2021-11-23)
|
|
7
112
|
|
|
8
113
|
**Note:** Version bump only for package @elliemae/ds-codemods
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-codemods",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1-rc.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Code Mods",
|
|
6
6
|
"module": "./esm/index.js",
|
|
@@ -30,13 +30,16 @@
|
|
|
30
30
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"arg": "
|
|
34
|
-
"
|
|
33
|
+
"arg": "^5.0.1",
|
|
34
|
+
"chalk": "4.1.2",
|
|
35
|
+
"depcheck": "1.4.2",
|
|
36
|
+
"esm": "^3.2.25",
|
|
35
37
|
"fs": "0.0.1-security",
|
|
36
|
-
"fs-extra": "
|
|
37
|
-
"glob": "
|
|
38
|
-
"inquirer": "
|
|
39
|
-
"
|
|
38
|
+
"fs-extra": "^10.0.0",
|
|
39
|
+
"glob": "^7.2.0",
|
|
40
|
+
"inquirer": "^8.2.0",
|
|
41
|
+
"pacote": "12.0.2",
|
|
42
|
+
"path": "^0.12.7"
|
|
40
43
|
},
|
|
41
44
|
"publishConfig": {
|
|
42
45
|
"access": "public"
|
|
@@ -1,6 +1,30 @@
|
|
|
1
|
+
/* eslint-disable no-console */
|
|
1
2
|
import depcheck from 'depcheck';
|
|
2
3
|
import chalk from 'chalk';
|
|
3
4
|
import { generatePathFromCurrentFolder } from '../../../utils';
|
|
5
|
+
|
|
6
|
+
const logUnusedDep = (unused) => {
|
|
7
|
+
console.log(chalk.yellowBright('### Found unused dependencies :>>'));
|
|
8
|
+
console.log('```');
|
|
9
|
+
console.log(unused.dependencies);
|
|
10
|
+
console.log('```');
|
|
11
|
+
};
|
|
12
|
+
const logUnusedDevDep = (unused) => {
|
|
13
|
+
console.log(chalk.magentaBright('### Found unused dev dependencies :>>'));
|
|
14
|
+
console.log('```');
|
|
15
|
+
console.log(unused.devDependencies);
|
|
16
|
+
console.log('```');
|
|
17
|
+
};
|
|
18
|
+
const logMissing = (unused) => {
|
|
19
|
+
const missingString = [...Object.keys(unused.missing)].map((pack) => `\t${pack}`).join(',\n');
|
|
20
|
+
console.log(chalk.redBright('### Found missing dependencies :>>'));
|
|
21
|
+
console.log('```');
|
|
22
|
+
console.log('{');
|
|
23
|
+
console.log(missingString);
|
|
24
|
+
console.log('}');
|
|
25
|
+
console.log('```');
|
|
26
|
+
};
|
|
27
|
+
|
|
4
28
|
export const checkMissingPackages = async (options) => {
|
|
5
29
|
const { projectFolderPath, ignorePackagesGlobPattern, ignoreFilesGlobPattern } = options;
|
|
6
30
|
const ignorePatterns = ignorePackagesGlobPattern
|
|
@@ -42,22 +66,17 @@ export const checkMissingPackages = async (options) => {
|
|
|
42
66
|
ignoreMatches,
|
|
43
67
|
};
|
|
44
68
|
const pathToRoot = generatePathFromCurrentFolder(projectFolderPath);
|
|
45
|
-
|
|
69
|
+
|
|
46
70
|
depcheck(pathToRoot, depCheckOptions).then((unused) => {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
if (
|
|
57
|
-
noError = false;
|
|
58
|
-
console.log(chalk.redBright('Found missing dependencies :>> '), unused.missing);
|
|
59
|
-
}
|
|
60
|
-
if (noError) console.log(chalk.bold.greenBright(`no errors found!`));
|
|
61
|
-
console.log('\n');
|
|
71
|
+
const unusedDep = Array.isArray(unused.dependencies) && unused.dependencies.length > 0;
|
|
72
|
+
const unusedDevDep = Array.isArray(unused.devDependencies) && unused.devDependencies.length > 0;
|
|
73
|
+
const missing = Object.keys(unused.missing).length > 0;
|
|
74
|
+
const hasErrors = unusedDep || unusedDevDep || missing;
|
|
75
|
+
console.log(chalk.bold.cyanBright(`# Dependencies results for ${pathToRoot}`));
|
|
76
|
+
console.log(chalk.bold.cyanBright(`[${pathToRoot}](${pathToRoot}package.json)`));
|
|
77
|
+
if (unusedDep) logUnusedDep(unused);
|
|
78
|
+
if (unusedDevDep) logUnusedDevDep(unused);
|
|
79
|
+
if (missing) logMissing(unused);
|
|
80
|
+
if (!hasErrors) console.log(chalk.bold.green(`no problems found!`));
|
|
62
81
|
});
|
|
63
82
|
};
|