From e381ed28ef319afe94d474b0bf1fb18821919fd4 Mon Sep 17 00:00:00 2001 From: Matt Byrne Date: Fri, 15 Dec 2023 13:21:55 +1100 Subject: [PATCH] Fix leftover imports from "lodash" instead of "lodash-es" --- .changeset/quiet-geese-rule.md | 6 ++++++ packages/core/src/configuration/configuration.ts | 4 ++-- packages/gcp-core/src/configuration/configuration.ts | 6 +++--- 3 files changed, 11 insertions(+), 5 deletions(-) create mode 100644 .changeset/quiet-geese-rule.md diff --git a/.changeset/quiet-geese-rule.md b/.changeset/quiet-geese-rule.md new file mode 100644 index 0000000..7b659cd --- /dev/null +++ b/.changeset/quiet-geese-rule.md @@ -0,0 +1,6 @@ +--- +"@mondokit/gcp-core": patch +"@mondokit/core": patch +--- + +Fix leftover imports from "lodash" instead of "lodash-es" diff --git a/packages/core/src/configuration/configuration.ts b/packages/core/src/configuration/configuration.ts index caafa70..d4d19c1 100644 --- a/packages/core/src/configuration/configuration.ts +++ b/packages/core/src/configuration/configuration.ts @@ -1,9 +1,9 @@ import FileSystem from "fs"; -import { merge } from "lodash"; +import { merge } from "lodash-es"; import Path from "path"; import { createLogger } from "../logging/logging.js"; -import { ENV_VAR_CONFIG_DIR, ENV_VAR_CONFIG_OVERRIDES } from "./variables.js"; import { DataValidator } from "../util/data.js"; +import { ENV_VAR_CONFIG_DIR, ENV_VAR_CONFIG_OVERRIDES } from "./variables.js"; export type ConfigValidator = DataValidator; diff --git a/packages/gcp-core/src/configuration/configuration.ts b/packages/gcp-core/src/configuration/configuration.ts index 13d44ab..f9e4144 100644 --- a/packages/gcp-core/src/configuration/configuration.ts +++ b/packages/gcp-core/src/configuration/configuration.ts @@ -1,5 +1,5 @@ -import _, { isString } from "lodash"; -import { createLogger, ConfigValidator, loadConfiguration as initBaseConfig } from "@mondokit/core"; +import { ConfigValidator, createLogger, loadConfiguration as initBaseConfig } from "@mondokit/core"; +import { isString, last } from "lodash-es"; import { GcpCoreConfiguration } from "./schema.js"; import { SecretsResolver } from "./secrets/secrets.resolver.js"; import { ENV_VAR_CONFIG_ENV, ENV_VAR_PROJECT } from "./variables.js"; @@ -24,7 +24,7 @@ export const getProjectId = (optionsProjectId?: string): string | undefined => { const projectSuffixEnvironment: EnvironmentStrategy = (projectId?: string) => { if (!projectId) return undefined; - return _.last(projectId.split("-")); + return last(projectId.split("-")); }; const getEnvironment = (