Skip to content

Commit

Permalink
switch from lodash to lodash-es.
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima committed Jun 8, 2023
1 parent f1ffe70 commit 5d4b70a
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
12 changes: 9 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"dependencies": {
"@yeoman/adapter": "^1.0.4",
"inquirer": "^9.2.2",
"lodash": "^4.17.21",
"lodash-es": "^4.17.21",
"mem-fs": "^3.0.0",
"mem-fs-editor": "^10.0.2",
"sinon": "^15.1.0",
Expand All @@ -47,6 +47,7 @@
},
"devDependencies": {
"@types/inquirer": "^9.0.3",
"@types/lodash": "^4.14.195",
"@types/node": "^16.18.19",
"@types/sinon": "^10.0.13",
"c8": "^7.13.0",
Expand Down
4 changes: 1 addition & 3 deletions src/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { mkdirSync, existsSync, rmSync } from 'node:fs';
import { resolve } from 'node:path';
import process from 'node:process';
import _ from 'lodash';
import { cloneDeep } from 'lodash-es';
import { spy as sinonSpy, stub as sinonStub } from 'sinon';
import type {
BaseEnvironment,
Expand All @@ -25,8 +25,6 @@ try {
GeneratorImplementation = GeneratorImport.default ?? GeneratorImport;
} catch {}

const { cloneDeep } = _;

export type CreateEnv = (options: BaseEnvironmentOptions) => Promise<BaseEnvironment>;

/**
Expand Down
6 changes: 2 additions & 4 deletions src/run-context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import path, { resolve, isAbsolute, join as pathJoin } from 'node:path';
import assert from 'node:assert';
import { EventEmitter } from 'node:events';
import process from 'node:process';
import _ from 'lodash';
import { camelCase, kebabCase, merge as lodashMerge, set as lodashSet } from 'lodash-es';
// eslint-disable-next-line n/file-extension-in-import
import { resetFileCommitStates } from 'mem-fs-editor/state';
import { create as createMemFs, type Store } from 'mem-fs';
Expand All @@ -21,11 +21,9 @@ import { create as createMemFsEditor, type MemFsEditorFile, type MemFsEditor } f
import type { DefaultGeneratorApi, DefaultEnvironmentApi } from '../types/type-helpers.js';
import RunResult, { type RunResultOptions } from './run-result.js';
import defaultHelpers, { type CreateEnv, type Dependency, type YeomanTest } from './helpers.js';
import { TestAdapter, type DummyPromptOptions, type TestAdapterOptions } from './adapter.js';
import { type DummyPromptOptions, type TestAdapterOptions } from './adapter.js';
import testContext from './test-context.js';

const { camelCase, kebabCase, merge: lodashMerge, set: lodashSet } = _;

/**
* Provides settings for creating a `RunContext`.
*/
Expand Down

0 comments on commit 5d4b70a

Please sign in to comment.