Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace lodash with lodash-es #23767

Merged
merged 1 commit into from
Oct 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .blueprint/code-workspace/generator.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { join } from 'path';
import _ from 'lodash';
import * as _ from 'lodash-es';
import BaseGenerator from '../../generators/base/index.mjs';
import { getPackageRoot } from '../../lib/index.mjs';
import command from './command.mjs';
Expand Down
2 changes: 1 addition & 1 deletion cli/environment-builder.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { existsSync, readFileSync } from 'fs';
import path, { dirname, resolve } from 'path';
import { fileURLToPath, pathToFileURL } from 'url';
import chalk from 'chalk';
import _ from 'lodash';
import * as _ from 'lodash-es';
import Environment from 'yeoman-environment';
import { QueuedAdapter } from '@yeoman/adapter';

Expand Down
2 changes: 1 addition & 1 deletion generators/angular/generator.mts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import _ from 'lodash';
import * as _ from 'lodash-es';
import chalk from 'chalk';
import { isFilePending } from 'mem-fs-editor/state';

Expand Down
2 changes: 1 addition & 1 deletion generators/angular/needle-api/needle-client-angular.mts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* limitations under the License.
*/
import chalk from 'chalk';
import _ from 'lodash';
import * as _ from 'lodash-es';

import needleClientBase from '../../client/needle-api/needle-client.mjs';
import { LINE_LENGTH } from '../../generator-constants.mjs';
Expand Down
2 changes: 1 addition & 1 deletion generators/app/generator.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
/* eslint-disable consistent-return, import/no-named-as-default-member */
import chalk from 'chalk';
import _ from 'lodash';
import * as _ from 'lodash-es';

import BaseApplicationGenerator from '../base-application/index.mjs';
import { checkNode, loadStoredAppOptions } from './support/index.mjs';
Expand Down
2 changes: 1 addition & 1 deletion generators/app/support/config.mts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import _ from 'lodash';
import * as _ from 'lodash-es';
import { NODE_VERSION } from '../../generator-constants.mjs';
import { applicationTypes, authenticationTypes, databaseTypes, testFrameworkTypes } from '../../../jdl/index.js';
import { getHipster, upperFirstCamelCase } from '../../base/support/index.mjs';
Expand Down
2 changes: 1 addition & 1 deletion generators/base-application/support/entity.mts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* limitations under the License.
*/

import _ from 'lodash';
import * as _ from 'lodash-es';
import { Entity } from '../../../jdl/converters/types.js';

const { upperFirst } = _;
Expand Down
2 changes: 1 addition & 1 deletion generators/base-application/support/enum.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import _ from 'lodash';
import * as _ from 'lodash-es';
import { formatDocAsJavaDoc } from '../../server/support/doc.mjs';

const doesTheEnumValueHaveACustomValue = enumValue => {
Expand Down
2 changes: 1 addition & 1 deletion generators/base-application/support/prepare-entity.mts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import _ from 'lodash';
import * as _ from 'lodash-es';
import pluralize from 'pluralize';

import type BaseGenerator from '../../base-core/index.mjs';
Expand Down
2 changes: 1 addition & 1 deletion generators/base-application/support/prepare-field.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import _ from 'lodash';
import * as _ from 'lodash-es';
import { fieldTypes, validations } from '../../../jdl/jhipster/index.mjs';
import { getTypescriptType, prepareField as prepareClientFieldForTemplates } from '../../client/support/index.mjs';
import { prepareField as prepareServerFieldForTemplates } from '../../server/support/index.mjs';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import _ from 'lodash';
import * as _ from 'lodash-es';
import pluralize from 'pluralize';

import {
Expand Down
2 changes: 1 addition & 1 deletion generators/base-application/support/relationship.mts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* limitations under the License.
*/

import _ from 'lodash';
import * as _ from 'lodash-es';

import { Relationship, Entity } from '../../../jdl/converters/types.js';
import { ValidationResult } from '../../base/api.mjs';
Expand Down
2 changes: 1 addition & 1 deletion generators/base-core/generator.mts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import assert from 'assert';
import { requireNamespace } from '@yeoman/namespace';
import chalk from 'chalk';
import { parse as parseYaml, stringify as stringifyYaml } from 'yaml';
import _ from 'lodash';
import * as _ from 'lodash-es';
import { simpleGit } from 'simple-git';
import type { CopyOptions } from 'mem-fs-editor';
import type { Data as TemplateData, Options as TemplateOptions } from 'ejs';
Expand Down
2 changes: 1 addition & 1 deletion generators/base-workspaces/internal/deployments.mts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import _ from 'lodash';
import * as _ from 'lodash-es';
import { applicationOptions, deploymentOptions } from '../../../jdl/index.js';
import { loadDerivedPlatformConfig, loadPlatformConfig, loadDerivedServerAndPlatformProperties } from '../../server/support/index.mjs';
import type { GeneratorBaseCore } from '../../index.js';
Expand Down
2 changes: 1 addition & 1 deletion generators/base/generator.mts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import fs from 'fs';
import path from 'path';
import chalk from 'chalk';
import semver from 'semver';
import _ from 'lodash';
import * as _ from 'lodash-es';

import type { ComposeOptions } from 'yeoman-generator';
import { packageJson } from '../../lib/index.mjs';
Expand Down
2 changes: 1 addition & 1 deletion generators/base/shared-data.mts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import _ from 'lodash';
import * as _ from 'lodash-es';
import { type BaseApplication } from '../base-application/types.mjs';
import { type Control } from './types.mjs';

Expand Down
2 changes: 1 addition & 1 deletion generators/base/support/basename.mts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import _ from 'lodash';
import * as _ from 'lodash-es';

const { camelCase } = _;

Expand Down
2 changes: 1 addition & 1 deletion generators/base/support/needles.mts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* limitations under the License.
*/
import assert from 'assert';
import _ from 'lodash';
import * as _ from 'lodash-es';
import escapeStringRegexp from 'escape-string-regexp';
import CoreGenerator from '../../base-core/index.mjs';
import { CascatedEditFileCallback, EditFileCallback } from '../api.mjs';
Expand Down
2 changes: 1 addition & 1 deletion generators/base/support/string.mts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* limitations under the License.
*/

import _ from 'lodash';
import * as _ from 'lodash-es';

/**
* Calculate a hash code for a given string.
Expand Down
2 changes: 1 addition & 1 deletion generators/bootstrap-application-base/generator.mts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
import assert from 'assert';
import os from 'os';
import _ from 'lodash';
import * as _ from 'lodash-es';
import chalk from 'chalk';
import { passthrough } from '@yeoman/transform';

Expand Down
2 changes: 1 addition & 1 deletion generators/bootstrap-application-base/utils.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import _ from 'lodash';
import * as _ from 'lodash-es';
import { authenticationTypes, databaseTypes, fieldTypes } from '../../jdl/jhipster/index.mjs';
import { loadRequiredConfigIntoEntity } from '../base-application/support/index.mjs';
import { hibernateSnakeCase } from '../server/support/string.mjs';
Expand Down
2 changes: 1 addition & 1 deletion generators/bootstrap-application-server/generator.mts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import _ from 'lodash';
import * as _ from 'lodash-es';

import BaseApplicationGenerator from '../base-application/index.mjs';
import { GENERATOR_BOOTSTRAP_APPLICATION_BASE } from '../generator-list.mjs';
Expand Down
2 changes: 1 addition & 1 deletion generators/ci-cd/command.mts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* limitations under the License.
*/
import chalk from 'chalk';
import _ from 'lodash';
import * as _ from 'lodash-es';
import { JHipsterCommandDefinition } from '../base/api.mjs';

const { kebabCase, intersection } = _;
Expand Down
2 changes: 1 addition & 1 deletion generators/client/command.mts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* limitations under the License.
*/
import chalk from 'chalk';
import _ from 'lodash';
import * as _ from 'lodash-es';
import { testFrameworkTypes } from '../../jdl/jhipster/index.mjs';
import { JHipsterCommandDefinition } from '../base/api.mjs';
import { APPLICATION_TYPE_GATEWAY, APPLICATION_TYPE_MICROSERVICE, clientFrameworkTypes } from '../../jdl/index.js';
Expand Down
2 changes: 1 addition & 1 deletion generators/client/needle-api/needle-client-vue.mts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* limitations under the License.
*/
import chalk from 'chalk';
import _ from 'lodash';
import * as _ from 'lodash-es';
import needleClientBase from './needle-client.mjs';
import { stripMargin } from '../../base/support/index.mjs';
import { createNeedleCallback } from '../../base/support/needles.mjs';
Expand Down
2 changes: 1 addition & 1 deletion generators/docker-compose/generator.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import pathjs from 'path';
import chalk from 'chalk';
import jsyaml from 'js-yaml';
import normalize from 'normalize-path';
import _ from 'lodash';
import * as _ from 'lodash-es';

import BaseWorkspacesGenerator from '../base-workspaces/index.mjs';

Expand Down
2 changes: 1 addition & 1 deletion generators/docker/generator.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* limitations under the License.
*/
/* eslint-disable camelcase */
import _ from 'lodash';
import * as _ from 'lodash-es';
import BaseApplicationGenerator from '../base-application/index.mjs';
import { createDockerComposeFile, createDockerExtendedServices } from '../docker/support/index.mjs';
import { GENERATOR_BOOTSTRAP_APPLICATION_SERVER, GENERATOR_DOCKER } from '../generator-list.mjs';
Expand Down
2 changes: 1 addition & 1 deletion generators/docker/utils.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* limitations under the License.
*/
import { DockerfileParser } from 'dockerfile-ast';
import _ from 'lodash';
import * as _ from 'lodash-es';

const { camelCase } = _;

Expand Down
2 changes: 1 addition & 1 deletion generators/entity/generator.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import fs from 'fs';
import path from 'path';
import chalk from 'chalk';
import _ from 'lodash';
import * as _ from 'lodash-es';

import BaseApplicationGenerator from '../base-application/index.mjs';
import prompts from './prompts.mjs';
Expand Down
2 changes: 1 addition & 1 deletion generators/entity/prompts.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
import fs from 'fs';
import chalk from 'chalk';
import _ from 'lodash';
import * as _ from 'lodash-es';
import {
reservedKeywords,
databaseTypes,
Expand Down
2 changes: 1 addition & 1 deletion generators/heroku/generator.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import crypto from 'crypto';
import fs from 'fs';
import ChildProcess from 'child_process';
import util from 'util';
import _ from 'lodash';
import * as _ from 'lodash-es';
import chalk from 'chalk';
import { glob } from 'glob';
import runAsync from 'run-async';
Expand Down
2 changes: 1 addition & 1 deletion generators/java/support/util.mts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import _ from 'lodash';
import * as _ from 'lodash-es';
import { getMicroserviceAppName } from '../../base/support/index.mjs';

const { upperFirst } = _;
Expand Down
2 changes: 1 addition & 1 deletion generators/jdl/generator.mts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
import { extname } from 'path';
import { QueuedAdapter } from '@yeoman/adapter';
import _ from 'lodash';
import * as _ from 'lodash-es';
import { create as createMemFs, type Store as MemFs } from 'mem-fs';
import { create as createMemFsEditor, type MemFsEditor } from 'mem-fs-editor';

Expand Down
2 changes: 1 addition & 1 deletion generators/kubernetes/kubernetes-base.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* limitations under the License.
*/
import crypto from 'crypto';
import _ from 'lodash';
import * as _ from 'lodash-es';

import { defaultKubernetesConfig } from './kubernetes-constants.mjs';
import { loadFromYoRc } from '../base-workspaces/internal/docker-base.mjs';
Expand Down
2 changes: 1 addition & 1 deletion generators/languages/generator.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
/* eslint-disable consistent-return */
import chalk from 'chalk';
import _ from 'lodash';
import * as _ from 'lodash-es';

import BaseApplicationGenerator from '../base-application/index.mjs';
import { askForLanguages, askI18n } from './prompts.mjs';
Expand Down
2 changes: 1 addition & 1 deletion generators/languages/translation-data.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* limitations under the License.
*/
import { inspect } from 'node:util';
import _ from 'lodash';
import * as _ from 'lodash-es';
import { passthrough } from '@yeoman/transform';
import { Minimatch } from 'minimatch';
import { clearFileState } from 'mem-fs-editor/state';
Expand Down
2 changes: 1 addition & 1 deletion generators/liquibase/generator.mts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* limitations under the License.
*/
import fs from 'fs';
import _ from 'lodash';
import * as _ from 'lodash-es';

import BaseEntityChangesGenerator from '../base-entity-changes/index.mjs';
import { GENERATOR_LIQUIBASE, GENERATOR_BOOTSTRAP_APPLICATION_SERVER } from '../generator-list.mjs';
Expand Down
2 changes: 1 addition & 1 deletion generators/liquibase/support/prepare-field.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* limitations under the License.
*/

import _ from 'lodash';
import * as _ from 'lodash-es';

import { databaseTypes, fieldTypes } from '../../../jdl/jhipster/index.mjs';

Expand Down
2 changes: 1 addition & 1 deletion generators/liquibase/support/relationship.mts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import _ from 'lodash';
import * as _ from 'lodash-es';
import { getFKConstraintName } from '../../server/support/index.mjs';

function relationshipBaseDataEquals(relationshipA, relationshipB) {
Expand Down
2 changes: 1 addition & 1 deletion generators/maven/internal/xml-store.mts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import assert from 'assert';
import { XMLParser, XMLBuilder, XmlBuilderOptions, X2jOptions } from 'fast-xml-parser';
import _ from 'lodash';
import * as _ from 'lodash-es';

const { merge } = _;

Expand Down
2 changes: 1 addition & 1 deletion generators/maven/support/pom-store.mts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* limitations under the License.
*/

import _ from 'lodash';
import * as _ from 'lodash-es';
import sortKeys from 'sort-keys';

import CoreGenerator from '../../base-core/index.mjs';
Expand Down
2 changes: 1 addition & 1 deletion generators/project-name/generator.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* limitations under the License.
*/
/* eslint-disable consistent-return */
import _ from 'lodash';
import * as _ from 'lodash-es';
import { getDefaultAppName } from './support/index.mjs';
import BaseApplicationGenerator from '../base-application/index.mjs';

Expand Down
2 changes: 1 addition & 1 deletion generators/react/generator.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import _ from 'lodash';
import * as _ from 'lodash-es';
import { isFilePending } from 'mem-fs-editor/state';
import chalk from 'chalk';

Expand Down
2 changes: 1 addition & 1 deletion generators/react/needle-api/needle-client-react.mts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* limitations under the License.
*/
import chalk from 'chalk';
import _ from 'lodash';
import * as _ from 'lodash-es';

import needleClientBase from '../../client/needle-api/needle-client.mjs';
import { stripMargin } from '../../base/support/index.mjs';
Expand Down
2 changes: 1 addition & 1 deletion generators/server/entity-files.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* limitations under the License.
*/
import fs from 'fs';
import _ from 'lodash';
import * as _ from 'lodash-es';
import chalk from 'chalk';
import { cleanupOldFiles } from './entity-cleanup.mjs';
import { moveToJavaPackageSrcDir, javaMainPackageTemplatesBlock, javaTestPackageTemplatesBlock } from './support/index.mjs';
Expand Down
Loading