@elliemae/ds-codemods 3.18.0-next.1 → 3.18.0-next.2
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/bin/cli/code-mods/{cli.js → cli.mjs} +2 -2
- package/bin/cli/code-mods/command-logics/check-deprecated-packages/{index.js → index.mjs} +2 -2
- package/bin/cli/code-mods/command-logics/check-deprecated-packages/{logResults.js → logResults.mjs} +2 -2
- package/bin/cli/code-mods/command-logics/check-missing-packages/{index.js → index.mjs} +2 -2
- package/bin/cli/code-mods/command-logics/check-packages-inconsistencies/{index.js → index.mjs} +6 -3
- package/bin/cli/code-mods/command-logics/{execute-commands-map.js → execute-commands-map.mjs} +6 -6
- package/bin/cli/code-mods/command-logics/fix-legacy-imports/{index.js → index.mjs} +2 -2
- package/bin/cli/code-mods/command-logics/help-migrate-to-v3/{getSolutions.js → getSolutions.mjs} +2 -2
- package/bin/cli/code-mods/command-logics/help-migrate-to-v3/{index.js → index.mjs} +4 -4
- package/bin/cli/code-mods/command-logics/help-migrate-to-v3/{logMatch.js → logMatch.mjs} +2 -2
- package/bin/cli/code-mods/command-logics/help-migrate-to-v3/{matchDsBasicImports.js → matchDsBasicImports.mjs} +1 -1
- package/bin/cli/code-mods/{inquirer-questions-prompter.js → inquirer-questions-prompter.mjs} +6 -6
- package/bin/cli/utils/{getLatestDimsumVersion.js → getLatestDimsumVersion.mjs} +1 -1
- package/bin/cli/utils/{globArray.js → globArray.mjs} +1 -1
- package/bin/cli/utils/index.mjs +5 -0
- package/bin/ds-codemods.mjs +4 -0
- package/package.json +9 -10
- package/bin/cli/utils/index.js +0 -5
- package/bin/ds-codemods +0 -4
- /package/bin/cli/code-mods/command-arguments/{promptCheckEmPackagesInconsistencies.js → promptCheckEmPackagesInconsistencies.mjs} +0 -0
- /package/bin/cli/code-mods/command-arguments/{promptDeprecatedPackages.js → promptDeprecatedPackages.mjs} +0 -0
- /package/bin/cli/code-mods/command-arguments/{promptFixLegacyImports.js → promptFixLegacyImports.mjs} +0 -0
- /package/bin/cli/code-mods/command-arguments/{promptHelpMigrateToV3.js → promptHelpMigrateToV3.mjs} +0 -0
- /package/bin/cli/code-mods/command-arguments/{promptMissingPackages.js → promptMissingPackages.mjs} +0 -0
- /package/bin/cli/code-mods/command-logics/check-deprecated-packages/{constants.js → constants.mjs} +0 -0
- /package/bin/cli/code-mods/command-logics/check-deprecated-packages/{getEmDsPackagesFromNPMLS.js → getEmDsPackagesFromNPMLS.mjs} +0 -0
- /package/bin/cli/code-mods/command-logics/check-packages-inconsistencies/{getPackageJsonEmDsVersions.js → getPackageJsonEmDsVersions.mjs} +0 -0
- /package/bin/cli/code-mods/command-logics/fix-legacy-imports/{legacyImportMap.js → legacyImportMap.mjs} +0 -0
- /package/bin/cli/code-mods/command-logics/help-migrate-to-v3/{constants.js → constants.mjs} +0 -0
- /package/bin/cli/code-mods/command-logics/help-migrate-to-v3/{replaceFromSolutions.js → replaceFromSolutions.mjs} +0 -0
- /package/bin/cli/code-mods/{commands.js → commands.mjs} +0 -0
- /package/bin/cli/utils/{CLI_COLORS.js → CLI_COLORS.mjs} +0 -0
- /package/bin/cli/utils/{generatePathFromCurrentFolder.js → generatePathFromCurrentFolder.mjs} +0 -0
- /package/bin/cli/utils/{matchHelpers.js → matchHelpers.mjs} +0 -0
- /package/bin/cli/utils/{replaceFromMap.js → replaceFromMap.mjs} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import arg from 'arg';
|
|
2
|
-
import { promptForMissingOptions } from './inquirer-questions-prompter';
|
|
3
|
-
import { executeCommandsMap } from './command-logics/execute-commands-map';
|
|
2
|
+
import { promptForMissingOptions } from './inquirer-questions-prompter.mjs';
|
|
3
|
+
import { executeCommandsMap } from './command-logics/execute-commands-map.mjs';
|
|
4
4
|
|
|
5
5
|
function parseArgumentsIntoOptions(rawArgs) {
|
|
6
6
|
const args = arg(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { exec } from 'child_process';
|
|
2
|
-
import { getEmDsPackagesFromNPMLS } from './getEmDsPackagesFromNPMLS';
|
|
3
|
-
import { logResults, logCyanQuestion } from './logResults';
|
|
2
|
+
import { getEmDsPackagesFromNPMLS } from './getEmDsPackagesFromNPMLS.mjs';
|
|
3
|
+
import { logResults, logCyanQuestion } from './logResults.mjs';
|
|
4
4
|
|
|
5
5
|
const npmLs = async ({ cwd }) => {
|
|
6
6
|
const [, stdout] = await new Promise((resolve) => {
|
package/bin/cli/code-mods/command-logics/check-deprecated-packages/{logResults.js → logResults.mjs}
RENAMED
|
@@ -5,8 +5,8 @@ import {
|
|
|
5
5
|
boldGreenStr,
|
|
6
6
|
brightCyanStr,
|
|
7
7
|
whiteStr,
|
|
8
|
-
} from '../../../utils/CLI_COLORS';
|
|
9
|
-
import { DEPRECATED_PACKAGES } from './constants';
|
|
8
|
+
} from '../../../utils/CLI_COLORS.mjs';
|
|
9
|
+
import { DEPRECATED_PACKAGES } from './constants.mjs';
|
|
10
10
|
|
|
11
11
|
const logDeprecatedComponent = ({ name, solution, severity, confluence }) => {
|
|
12
12
|
const [sevDesc, sevLevel] = severity;
|
|
@@ -6,8 +6,8 @@ import {
|
|
|
6
6
|
brightMagentaStr,
|
|
7
7
|
boldBrightCyanStr,
|
|
8
8
|
greenStr,
|
|
9
|
-
} from '../../../utils/CLI_COLORS';
|
|
10
|
-
import { generatePathFromCurrentFolder } from '../../../utils';
|
|
9
|
+
} from '../../../utils/CLI_COLORS.mjs';
|
|
10
|
+
import { generatePathFromCurrentFolder } from '../../../utils/index.mjs';
|
|
11
11
|
|
|
12
12
|
const logUnusedDep = (unused) => {
|
|
13
13
|
console.log(brightYellowStr('### Found unused dependencies :>>'));
|
package/bin/cli/code-mods/command-logics/check-packages-inconsistencies/{index.js → index.mjs}
RENAMED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/* eslint-disable max-len */
|
|
2
|
+
/* eslint-disable complexity */
|
|
3
|
+
/* eslint-disable max-statements */
|
|
1
4
|
import fs from 'fs';
|
|
2
5
|
import {
|
|
3
6
|
yellowStr,
|
|
@@ -8,14 +11,14 @@ import {
|
|
|
8
11
|
brightCyanStr,
|
|
9
12
|
brightGreenStr,
|
|
10
13
|
redStr,
|
|
11
|
-
} from '../../../utils/CLI_COLORS';
|
|
12
|
-
import { getPackageJsonEmDsVersions } from './getPackageJsonEmDsVersions';
|
|
14
|
+
} from '../../../utils/CLI_COLORS.mjs';
|
|
15
|
+
import { getPackageJsonEmDsVersions } from './getPackageJsonEmDsVersions.mjs';
|
|
13
16
|
import {
|
|
14
17
|
generatePathFromCurrentFolder,
|
|
15
18
|
globArray,
|
|
16
19
|
getHighestMatchVersion,
|
|
17
20
|
getLatestDimsumVersion,
|
|
18
|
-
} from '../../../utils';
|
|
21
|
+
} from '../../../utils/index.mjs';
|
|
19
22
|
|
|
20
23
|
const getErrors = (highestVersion, matches = []) => {
|
|
21
24
|
const errors = [];
|
package/bin/cli/code-mods/command-logics/{execute-commands-map.js → execute-commands-map.mjs}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { fixLegacyImports } from './fix-legacy-imports';
|
|
2
|
-
import { checkPackagesInconsistencies } from './check-packages-inconsistencies';
|
|
3
|
-
import { checkMissingPackages } from './check-missing-packages';
|
|
4
|
-
import { checkDeprecatedPackages } from './check-deprecated-packages';
|
|
5
|
-
import { helpMigrateToV3 } from './help-migrate-to-v3';
|
|
6
|
-
import { COMMANDS } from '../commands';
|
|
1
|
+
import { fixLegacyImports } from './fix-legacy-imports/index.mjs';
|
|
2
|
+
import { checkPackagesInconsistencies } from './check-packages-inconsistencies/index.mjs';
|
|
3
|
+
import { checkMissingPackages } from './check-missing-packages/index.mjs';
|
|
4
|
+
import { checkDeprecatedPackages } from './check-deprecated-packages/index.mjs';
|
|
5
|
+
import { helpMigrateToV3 } from './help-migrate-to-v3/index.mjs';
|
|
6
|
+
import { COMMANDS } from '../commands.mjs';
|
|
7
7
|
|
|
8
8
|
export async function executeCommandsMap(args, options) {
|
|
9
9
|
switch (options.script) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import fs from 'fs';
|
|
2
2
|
import fse from 'fs-extra';
|
|
3
|
-
import { generatePathFromCurrentFolder, replaceFromMap, globArray } from '../../../utils';
|
|
4
|
-
import { legacyImportMap, legacyImportMapRevert } from './legacyImportMap';
|
|
3
|
+
import { generatePathFromCurrentFolder, replaceFromMap, globArray } from '../../../utils/index.mjs';
|
|
4
|
+
import { legacyImportMap, legacyImportMapRevert } from './legacyImportMap.mjs';
|
|
5
5
|
|
|
6
6
|
export const fixLegacyImports = (options, isRevert = false) => {
|
|
7
7
|
const csvGlobs = options.globPattern.split(',').map((pattern) => generatePathFromCurrentFolder(pattern));
|
package/bin/cli/code-mods/command-logics/help-migrate-to-v3/{getSolutions.js → getSolutions.mjs}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable max-statements */
|
|
2
|
-
import { SUGGESTABLE_MAP, COMPONENT_MAP, SOLUTIONS_TYPES } from './constants';
|
|
3
|
-
import { matchDsBasicImports } from './matchDsBasicImports';
|
|
2
|
+
import { SUGGESTABLE_MAP, COMPONENT_MAP, SOLUTIONS_TYPES } from './constants.mjs';
|
|
3
|
+
import { matchDsBasicImports } from './matchDsBasicImports.mjs';
|
|
4
4
|
|
|
5
5
|
export const mapComponentsToImportStatement = (fullMatch, components) => {
|
|
6
6
|
const autoSolutions = [];
|
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
import util from 'util';
|
|
4
4
|
import fs from 'fs';
|
|
5
5
|
import fse from 'fs-extra';
|
|
6
|
-
import { generatePathFromCurrentFolder, globArray } from '../../../utils';
|
|
6
|
+
import { generatePathFromCurrentFolder, globArray } from '../../../utils/index.mjs';
|
|
7
7
|
import {
|
|
8
8
|
brightMagentaStr,
|
|
9
9
|
boldGreenStr,
|
|
10
10
|
brightYellowStr,
|
|
11
11
|
brightRedStr,
|
|
12
12
|
brightCyanStr,
|
|
13
|
-
} from '../../../utils/CLI_COLORS';
|
|
14
|
-
import { getSolutions } from './getSolutions';
|
|
15
|
-
import { replaceFromSolutions } from './replaceFromSolutions';
|
|
13
|
+
} from '../../../utils/CLI_COLORS.mjs';
|
|
14
|
+
import { getSolutions } from './getSolutions.mjs';
|
|
15
|
+
import { replaceFromSolutions } from './replaceFromSolutions.mjs';
|
|
16
16
|
|
|
17
17
|
export const helpMigrateToV3 = (options) => {
|
|
18
18
|
const csvGlobs = options.globPattern.split(',').map((pattern) => generatePathFromCurrentFolder(pattern));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable no-console */
|
|
2
|
-
import { brightCyanStr, brightMagentaStr, yellowStr, brightGreenStr } from '../../../utils/CLI_COLORS';
|
|
3
|
-
import { getSubFolderSolution, mapComponentsToImportStatement } from './getSolutions';
|
|
2
|
+
import { brightCyanStr, brightMagentaStr, yellowStr, brightGreenStr } from '../../../utils/CLI_COLORS.mjs';
|
|
3
|
+
import { getSubFolderSolution, mapComponentsToImportStatement } from './getSolutions.mjs';
|
|
4
4
|
|
|
5
5
|
const logSubfolderImport = (fullMatch, components, fullFromPack) => {
|
|
6
6
|
const { solution } = getSubFolderSolution(fullMatch, components, fullFromPack);
|
package/bin/cli/code-mods/{inquirer-questions-prompter.js → inquirer-questions-prompter.mjs}
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import inquirer from 'inquirer';
|
|
2
|
-
import { COMMANDS, COMMANDS_ARRAY } from './commands';
|
|
3
|
-
import { getLegacyImportsQuestions } from './command-arguments/promptFixLegacyImports';
|
|
4
|
-
import { getPackagesInconsistenciesQuestions } from './command-arguments/promptCheckEmPackagesInconsistencies';
|
|
5
|
-
import { getDeprecatedPackagesQuestions } from './command-arguments/promptDeprecatedPackages';
|
|
6
|
-
import { getHelpMigrateToV3Questions } from './command-arguments/promptHelpMigrateToV3';
|
|
7
|
-
import { getMissingPackagesQuestions } from './command-arguments/promptMissingPackages';
|
|
2
|
+
import { COMMANDS, COMMANDS_ARRAY } from './commands.mjs';
|
|
3
|
+
import { getLegacyImportsQuestions } from './command-arguments/promptFixLegacyImports.mjs';
|
|
4
|
+
import { getPackagesInconsistenciesQuestions } from './command-arguments/promptCheckEmPackagesInconsistencies.mjs';
|
|
5
|
+
import { getDeprecatedPackagesQuestions } from './command-arguments/promptDeprecatedPackages.mjs';
|
|
6
|
+
import { getHelpMigrateToV3Questions } from './command-arguments/promptHelpMigrateToV3.mjs';
|
|
7
|
+
import { getMissingPackagesQuestions } from './command-arguments/promptMissingPackages.mjs';
|
|
8
8
|
|
|
9
9
|
async function promptForMissingScriptSpecificOptions({ originalOptions, promptOptions }) {
|
|
10
10
|
const script = originalOptions.script || promptOptions.script;
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-codemods",
|
|
3
|
-
"version": "3.18.0-next.
|
|
3
|
+
"version": "3.18.0-next.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Code Mods",
|
|
6
6
|
"files": [
|
|
7
7
|
"bin"
|
|
8
8
|
],
|
|
9
9
|
"bin": {
|
|
10
|
-
"@elliemae/ds-codemods": "bin/ds-codemods",
|
|
11
|
-
"ds-codemods": "bin/ds-codemods"
|
|
10
|
+
"@elliemae/ds-codemods": "./bin/ds-codemods.mjs",
|
|
11
|
+
"ds-codemods": "./bin/ds-codemods.mjs"
|
|
12
12
|
},
|
|
13
13
|
"sideEffects": [
|
|
14
14
|
"*.css",
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"url": "https://git.elliemae.io/platform-ui/dimsum.git"
|
|
20
20
|
},
|
|
21
21
|
"engines": {
|
|
22
|
-
"pnpm": ">=
|
|
23
|
-
"node": ">=
|
|
22
|
+
"pnpm": ">=8",
|
|
23
|
+
"node": ">=18"
|
|
24
24
|
},
|
|
25
25
|
"author": "ICE MT",
|
|
26
26
|
"jestSonar": {
|
|
@@ -32,12 +32,11 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"arg": "~5.0.2",
|
|
34
34
|
"depcheck": "~1.4.3",
|
|
35
|
-
"esm": "~3.2.25",
|
|
36
35
|
"fs": "~0.0.1-security",
|
|
37
|
-
"fs-extra": "~
|
|
38
|
-
"glob": "~
|
|
39
|
-
"inquirer": "~
|
|
40
|
-
"pacote": "~
|
|
36
|
+
"fs-extra": "~11.1.1",
|
|
37
|
+
"glob": "~10.2.5",
|
|
38
|
+
"inquirer": "~9.2.4",
|
|
39
|
+
"pacote": "~15.2.0",
|
|
41
40
|
"path": "~0.12.7"
|
|
42
41
|
},
|
|
43
42
|
"publishConfig": {
|
package/bin/cli/utils/index.js
DELETED
package/bin/ds-codemods
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/bin/cli/code-mods/command-arguments/{promptHelpMigrateToV3.js → promptHelpMigrateToV3.mjs}
RENAMED
|
File without changes
|
/package/bin/cli/code-mods/command-arguments/{promptMissingPackages.js → promptMissingPackages.mjs}
RENAMED
|
File without changes
|
/package/bin/cli/code-mods/command-logics/check-deprecated-packages/{constants.js → constants.mjs}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/bin/cli/utils/{generatePathFromCurrentFolder.js → generatePathFromCurrentFolder.mjs}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|