From 8355c3ab2a5f6428b871df8df6c52e609b3db3d1 Mon Sep 17 00:00:00 2001 From: Alexander Kachkaev Date: Sat, 5 Feb 2022 14:46:35 +0000 Subject: [PATCH 1/6] Improve typings in `envalid` calls --- package.json | 2 +- src/scripts/4-results/generate-geosemantica-layer-styles.ts | 6 ++---- src/scripts/4-results/generate-poster.ts | 4 ++-- src/shared/results/getLocaleFromEnv.ts | 4 ++-- yarn.lock | 5 ++--- 5 files changed, 9 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index 3b212fe..1a7db7b 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,7 @@ "chalk": "^5.0.0", "dedent": "^0.7.0", "dotenv-flow": "^3.2.0", - "envalid": "^7.2.2", + "envalid": "github:af/envalid#fix-defaults", "eslint": "^8.8.0", "execa": "^6.0.0", "fs-extra": "^10.0.0", diff --git a/src/scripts/4-results/generate-geosemantica-layer-styles.ts b/src/scripts/4-results/generate-geosemantica-layer-styles.ts index 0de9751..23b4697 100644 --- a/src/scripts/4-results/generate-geosemantica-layer-styles.ts +++ b/src/scripts/4-results/generate-geosemantica-layer-styles.ts @@ -432,10 +432,8 @@ const script = async () => { output.write(` Done.\n`); const { COPY_TO_CLIPBOARD: layerStyleToCopy } = cleanEnv({ - COPY_TO_CLIPBOARD: envalid.str< - "background" | "buildings" | "foreground" | "" - >({ - choices: ["background", "buildings", "foreground", ""], + COPY_TO_CLIPBOARD: envalid.str({ + choices: ["background", "buildings", "foreground", ""] as const, default: "", }), }); diff --git a/src/scripts/4-results/generate-poster.ts b/src/scripts/4-results/generate-poster.ts index f739262..13e5798 100644 --- a/src/scripts/4-results/generate-poster.ts +++ b/src/scripts/4-results/generate-poster.ts @@ -33,8 +33,8 @@ const script = async () => { ); const { EXTENSION: extension } = cleanEnv({ - EXTENSION: envalid.str<"pdf" | "jpg" | "png">({ - choices: ["pdf", "jpg", "png"], + EXTENSION: envalid.str({ + choices: ["pdf", "jpg", "png"] as const, default: "pdf", }), }); diff --git a/src/shared/results/getLocaleFromEnv.ts b/src/shared/results/getLocaleFromEnv.ts index 013d619..d2024d6 100644 --- a/src/shared/results/getLocaleFromEnv.ts +++ b/src/shared/results/getLocaleFromEnv.ts @@ -7,10 +7,10 @@ export type Locale = "en" | "ru"; export const getLocaleFromEnv = (): Locale => { const env = cleanEnv({ LOCALE: envalid.str({ + choices: ["ru", "en"] as const, default: "ru", - choices: ["ru", "en"], }), }); - return env.LOCALE as Locale; + return env.LOCALE; }; diff --git a/yarn.lock b/yarn.lock index 0e24314..67545df 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3400,10 +3400,9 @@ entities@~2.1.0: resolved "https://registry.yarnpkg.com/entities/-/entities-2.1.0.tgz#992d3129cf7df6870b96c57858c249a120f8b8b5" integrity sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w== -envalid@^7.2.2: +"envalid@github:af/envalid#fix-defaults": version "7.2.2" - resolved "https://registry.yarnpkg.com/envalid/-/envalid-7.2.2.tgz#f3219f85e692002dca0f28076740227d30c817e3" - integrity sha512-bl/3VF5PhoF26HlDWiE0NRRHUbKT/+UDP/+0JtOFmhUwK3cUPS7JgWYGbE8ArvA61T+SyNquxscLCS6y4Wnpdw== + resolved "https://codeload.github.com/af/envalid/tar.gz/269c58865f29bab5968f73ef8e6d3c9c0bb258f5" dependencies: tslib "2.3.1" From 6637156992abbc34e8b46dfb6cb681dae3a1bcb3 Mon Sep 17 00:00:00 2001 From: Alexander Kachkaev Date: Mon, 7 Feb 2022 13:51:31 +0000 Subject: [PATCH 2/6] Upgrade `envalid` to `7.3.0-beta.1` --- package.json | 2 +- yarn.lock | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 1a7db7b..3a81a2d 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,7 @@ "chalk": "^5.0.0", "dedent": "^0.7.0", "dotenv-flow": "^3.2.0", - "envalid": "github:af/envalid#fix-defaults", + "envalid": "7.3.0-beta.1", "eslint": "^8.8.0", "execa": "^6.0.0", "fs-extra": "^10.0.0", diff --git a/yarn.lock b/yarn.lock index 67545df..8d1730e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3400,9 +3400,10 @@ entities@~2.1.0: resolved "https://registry.yarnpkg.com/entities/-/entities-2.1.0.tgz#992d3129cf7df6870b96c57858c249a120f8b8b5" integrity sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w== -"envalid@github:af/envalid#fix-defaults": - version "7.2.2" - resolved "https://codeload.github.com/af/envalid/tar.gz/269c58865f29bab5968f73ef8e6d3c9c0bb258f5" +envalid@7.3.0-beta.1: + version "7.3.0-beta.1" + resolved "https://registry.yarnpkg.com/envalid/-/envalid-7.3.0-beta.1.tgz#ecaec571bab91b613af4d7e4620b79b1f5fd613b" + integrity sha512-fvMuSe7fPj4aRCaZ/lZdE6bHap+i0s33SMcLuVg4KZMVUhfCajjue/XV1KKxJD2ZVuafB/INCpw6hUWRXvya2A== dependencies: tslib "2.3.1" From 910bf3dbc036eaeb6f4daf9bf3e3b26c4bc0e612 Mon Sep 17 00:00:00 2001 From: Alexander Kachkaev Date: Mon, 7 Feb 2022 13:59:55 +0000 Subject: [PATCH 3/6] Update `envalid` imports --- src/scripts/2-sources/osm/tiles/fetch-images.ts | 2 +- .../rosreestr/6-fetch-object-infos-from-pkk-api.ts | 2 +- .../yandex/1-geocode-addresses-without-position.ts | 2 +- .../4-results/generate-geosemantica-layer-styles.ts | 2 +- src/scripts/4-results/generate-poster.ts | 2 +- src/scripts/format-data-files.ts | 2 +- src/shared/cleanEnv.ts | 2 +- src/shared/envalidDefaultReporter.ts | 8 +++++--- .../geocoding/debugAddressNormalizationIfEnabled.ts | 2 +- src/shared/results/getLocaleFromEnv.ts | 2 +- src/shared/sources/mkrf/helpersForPaths.ts | 2 +- .../rosreestr/pauseBetweenPkkApiRequestsToAvoid403.ts | 2 +- src/shared/territory.ts | 2 +- 13 files changed, 17 insertions(+), 15 deletions(-) diff --git a/src/scripts/2-sources/osm/tiles/fetch-images.ts b/src/scripts/2-sources/osm/tiles/fetch-images.ts index 18f5276..b25dbc8 100644 --- a/src/scripts/2-sources/osm/tiles/fetch-images.ts +++ b/src/scripts/2-sources/osm/tiles/fetch-images.ts @@ -1,6 +1,6 @@ import { AxiosInstance } from "axios"; import chalk from "chalk"; -import * as envalid from "envalid"; +import envalid from "envalid"; import fs from "fs-extra"; import path from "node:path"; import stream from "node:stream"; diff --git a/src/scripts/2-sources/rosreestr/6-fetch-object-infos-from-pkk-api.ts b/src/scripts/2-sources/rosreestr/6-fetch-object-infos-from-pkk-api.ts index 1cf15b2..e696fc2 100644 --- a/src/scripts/2-sources/rosreestr/6-fetch-object-infos-from-pkk-api.ts +++ b/src/scripts/2-sources/rosreestr/6-fetch-object-infos-from-pkk-api.ts @@ -1,6 +1,6 @@ import { AxiosResponse } from "axios"; import chalk from "chalk"; -import * as envalid from "envalid"; +import envalid from "envalid"; import sortKeys from "sort-keys"; import { cleanEnv } from "../../../shared/cleanEnv"; diff --git a/src/scripts/2-sources/yandex/1-geocode-addresses-without-position.ts b/src/scripts/2-sources/yandex/1-geocode-addresses-without-position.ts index 67ff9c6..a949849 100644 --- a/src/scripts/2-sources/yandex/1-geocode-addresses-without-position.ts +++ b/src/scripts/2-sources/yandex/1-geocode-addresses-without-position.ts @@ -2,7 +2,7 @@ import * as turf from "@turf/turf"; import axios, { AxiosError, AxiosInstance } from "axios"; import axiosRetry from "axios-retry"; import chalk from "chalk"; -import * as envalid from "envalid"; +import envalid from "envalid"; import fs from "fs-extra"; import http from "node:http"; import https from "node:https"; diff --git a/src/scripts/4-results/generate-geosemantica-layer-styles.ts b/src/scripts/4-results/generate-geosemantica-layer-styles.ts index 23b4697..0abeb09 100644 --- a/src/scripts/4-results/generate-geosemantica-layer-styles.ts +++ b/src/scripts/4-results/generate-geosemantica-layer-styles.ts @@ -1,7 +1,7 @@ import chalk from "chalk"; import clipboardy from "clipboardy"; import { color as d3Color } from "d3-color"; -import * as envalid from "envalid"; +import envalid from "envalid"; import fs from "fs-extra"; import _ from "lodash"; import path from "node:path"; diff --git a/src/scripts/4-results/generate-poster.ts b/src/scripts/4-results/generate-poster.ts index 13e5798..a59b00c 100644 --- a/src/scripts/4-results/generate-poster.ts +++ b/src/scripts/4-results/generate-poster.ts @@ -1,5 +1,5 @@ import chalk from "chalk"; -import * as envalid from "envalid"; +import envalid from "envalid"; import path from "node:path"; import puppeteer from "puppeteer"; diff --git a/src/scripts/format-data-files.ts b/src/scripts/format-data-files.ts index b9893f1..f1f9506 100644 --- a/src/scripts/format-data-files.ts +++ b/src/scripts/format-data-files.ts @@ -1,5 +1,5 @@ import chalk from "chalk"; -import * as envalid from "envalid"; +import envalid from "envalid"; import fs from "fs-extra"; import path from "node:path"; diff --git a/src/shared/cleanEnv.ts b/src/shared/cleanEnv.ts index b58cc06..73592cb 100644 --- a/src/shared/cleanEnv.ts +++ b/src/shared/cleanEnv.ts @@ -1,5 +1,5 @@ import { config } from "dotenv-flow"; -import * as envalid from "envalid"; +import envalid from "envalid"; import { defaultReporter } from "./envalidDefaultReporter"; diff --git a/src/shared/envalidDefaultReporter.ts b/src/shared/envalidDefaultReporter.ts index 26455bc..e9fc309 100644 --- a/src/shared/envalidDefaultReporter.ts +++ b/src/shared/envalidDefaultReporter.ts @@ -1,6 +1,6 @@ // Origin: https://github.com/af/envalid/blob/a694876d3fe5f8a8316d15ce4e26e895f41966f6/src/reporter.ts -import { EnvMissingError, ReporterOptions } from "envalid"; +import envalid from "envalid"; import { ScriptError } from "./helpersForScripts"; @@ -17,7 +17,9 @@ const colors = { const rule = colors.white("================================"); -export const defaultReporter = ({ errors = {} }: ReporterOptions) => { +export const defaultReporter = ({ + errors = {}, +}: envalid.ReporterOptions) => { if (Object.keys(errors).length === 0) { return; } @@ -25,7 +27,7 @@ export const defaultReporter = ({ errors = {} }: ReporterOptions) => { const missingVarsOutput: string[] = []; const invalidVarsOutput: string[] = []; for (const [key, error] of Object.entries(errors)) { - if (error instanceof EnvMissingError) { + if (error instanceof envalid.EnvMissingError) { missingVarsOutput.push( ` ${colors.blue(key)}: ${error.message || "(required)"}`, ); diff --git a/src/shared/geocoding/debugAddressNormalizationIfEnabled.ts b/src/shared/geocoding/debugAddressNormalizationIfEnabled.ts index bf30e44..2191407 100644 --- a/src/shared/geocoding/debugAddressNormalizationIfEnabled.ts +++ b/src/shared/geocoding/debugAddressNormalizationIfEnabled.ts @@ -1,5 +1,5 @@ import chalk from "chalk"; -import * as envalid from "envalid"; +import envalid from "envalid"; import { WriteStream } from "node:tty"; import { AddressNormalizationConfig, normalizeAddress } from "../addresses"; diff --git a/src/shared/results/getLocaleFromEnv.ts b/src/shared/results/getLocaleFromEnv.ts index d2024d6..6d037c2 100644 --- a/src/shared/results/getLocaleFromEnv.ts +++ b/src/shared/results/getLocaleFromEnv.ts @@ -1,4 +1,4 @@ -import * as envalid from "envalid"; +import envalid from "envalid"; import { cleanEnv } from "../cleanEnv"; diff --git a/src/shared/sources/mkrf/helpersForPaths.ts b/src/shared/sources/mkrf/helpersForPaths.ts index 8531b9d..36627be 100644 --- a/src/shared/sources/mkrf/helpersForPaths.ts +++ b/src/shared/sources/mkrf/helpersForPaths.ts @@ -1,4 +1,4 @@ -import * as envalid from "envalid"; +import envalid from "envalid"; import path from "node:path"; import { cleanEnv } from "../../cleanEnv"; diff --git a/src/shared/sources/rosreestr/pauseBetweenPkkApiRequestsToAvoid403.ts b/src/shared/sources/rosreestr/pauseBetweenPkkApiRequestsToAvoid403.ts index 9c8dcdb..8a2af5b 100644 --- a/src/shared/sources/rosreestr/pauseBetweenPkkApiRequestsToAvoid403.ts +++ b/src/shared/sources/rosreestr/pauseBetweenPkkApiRequestsToAvoid403.ts @@ -1,4 +1,4 @@ -import * as envalid from "envalid"; +import envalid from "envalid"; import _ from "lodash"; import sleep from "sleep-promise"; diff --git a/src/shared/territory.ts b/src/shared/territory.ts index be1dedc..780cda2 100644 --- a/src/shared/territory.ts +++ b/src/shared/territory.ts @@ -1,6 +1,6 @@ import * as turf from "@turf/turf"; import chalk from "chalk"; -import * as envalid from "envalid"; +import envalid from "envalid"; import fs from "fs-extra"; import { load } from "js-yaml"; import _ from "lodash"; From 67b9f4388c160353ecc19762010e600461564bb5 Mon Sep 17 00:00:00 2001 From: Alexander Kachkaev Date: Wed, 9 Feb 2022 12:17:51 +0000 Subject: [PATCH 4/6] Bump `envalid` to `7.3.0-beta.2` --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 3a81a2d..53a1b0a 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,7 @@ "chalk": "^5.0.0", "dedent": "^0.7.0", "dotenv-flow": "^3.2.0", - "envalid": "7.3.0-beta.1", + "envalid": "7.3.0-beta.2", "eslint": "^8.8.0", "execa": "^6.0.0", "fs-extra": "^10.0.0", diff --git a/yarn.lock b/yarn.lock index 8d1730e..3653996 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3400,10 +3400,10 @@ entities@~2.1.0: resolved "https://registry.yarnpkg.com/entities/-/entities-2.1.0.tgz#992d3129cf7df6870b96c57858c249a120f8b8b5" integrity sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w== -envalid@7.3.0-beta.1: - version "7.3.0-beta.1" - resolved "https://registry.yarnpkg.com/envalid/-/envalid-7.3.0-beta.1.tgz#ecaec571bab91b613af4d7e4620b79b1f5fd613b" - integrity sha512-fvMuSe7fPj4aRCaZ/lZdE6bHap+i0s33SMcLuVg4KZMVUhfCajjue/XV1KKxJD2ZVuafB/INCpw6hUWRXvya2A== +envalid@7.3.0-beta.2: + version "7.3.0-beta.2" + resolved "https://registry.yarnpkg.com/envalid/-/envalid-7.3.0-beta.2.tgz#5e4425dad1410630d203590cbbd676bb6245df97" + integrity sha512-N0s1U19SMYxGG0rbJ6qNCH/1iyDufb/1cW/Bk7JD908qi2ia3MVFa3++eLaTfUjurftpZbcvKZwekC6iGpNMag== dependencies: tslib "2.3.1" From 595c7193f65ecde35e8d2a318820329a18927e23 Mon Sep 17 00:00:00 2001 From: Alexander Kachkaev Date: Wed, 9 Feb 2022 12:18:51 +0000 Subject: [PATCH 5/6] Revert "Update `envalid` imports" This reverts commit 910bf3dbc036eaeb6f4daf9bf3e3b26c4bc0e612. --- src/scripts/2-sources/osm/tiles/fetch-images.ts | 2 +- .../rosreestr/6-fetch-object-infos-from-pkk-api.ts | 2 +- .../yandex/1-geocode-addresses-without-position.ts | 2 +- .../4-results/generate-geosemantica-layer-styles.ts | 2 +- src/scripts/4-results/generate-poster.ts | 2 +- src/scripts/format-data-files.ts | 2 +- src/shared/cleanEnv.ts | 2 +- src/shared/envalidDefaultReporter.ts | 8 +++----- .../geocoding/debugAddressNormalizationIfEnabled.ts | 2 +- src/shared/results/getLocaleFromEnv.ts | 2 +- src/shared/sources/mkrf/helpersForPaths.ts | 2 +- .../rosreestr/pauseBetweenPkkApiRequestsToAvoid403.ts | 2 +- src/shared/territory.ts | 2 +- 13 files changed, 15 insertions(+), 17 deletions(-) diff --git a/src/scripts/2-sources/osm/tiles/fetch-images.ts b/src/scripts/2-sources/osm/tiles/fetch-images.ts index b25dbc8..18f5276 100644 --- a/src/scripts/2-sources/osm/tiles/fetch-images.ts +++ b/src/scripts/2-sources/osm/tiles/fetch-images.ts @@ -1,6 +1,6 @@ import { AxiosInstance } from "axios"; import chalk from "chalk"; -import envalid from "envalid"; +import * as envalid from "envalid"; import fs from "fs-extra"; import path from "node:path"; import stream from "node:stream"; diff --git a/src/scripts/2-sources/rosreestr/6-fetch-object-infos-from-pkk-api.ts b/src/scripts/2-sources/rosreestr/6-fetch-object-infos-from-pkk-api.ts index e696fc2..1cf15b2 100644 --- a/src/scripts/2-sources/rosreestr/6-fetch-object-infos-from-pkk-api.ts +++ b/src/scripts/2-sources/rosreestr/6-fetch-object-infos-from-pkk-api.ts @@ -1,6 +1,6 @@ import { AxiosResponse } from "axios"; import chalk from "chalk"; -import envalid from "envalid"; +import * as envalid from "envalid"; import sortKeys from "sort-keys"; import { cleanEnv } from "../../../shared/cleanEnv"; diff --git a/src/scripts/2-sources/yandex/1-geocode-addresses-without-position.ts b/src/scripts/2-sources/yandex/1-geocode-addresses-without-position.ts index a949849..67ff9c6 100644 --- a/src/scripts/2-sources/yandex/1-geocode-addresses-without-position.ts +++ b/src/scripts/2-sources/yandex/1-geocode-addresses-without-position.ts @@ -2,7 +2,7 @@ import * as turf from "@turf/turf"; import axios, { AxiosError, AxiosInstance } from "axios"; import axiosRetry from "axios-retry"; import chalk from "chalk"; -import envalid from "envalid"; +import * as envalid from "envalid"; import fs from "fs-extra"; import http from "node:http"; import https from "node:https"; diff --git a/src/scripts/4-results/generate-geosemantica-layer-styles.ts b/src/scripts/4-results/generate-geosemantica-layer-styles.ts index 0abeb09..23b4697 100644 --- a/src/scripts/4-results/generate-geosemantica-layer-styles.ts +++ b/src/scripts/4-results/generate-geosemantica-layer-styles.ts @@ -1,7 +1,7 @@ import chalk from "chalk"; import clipboardy from "clipboardy"; import { color as d3Color } from "d3-color"; -import envalid from "envalid"; +import * as envalid from "envalid"; import fs from "fs-extra"; import _ from "lodash"; import path from "node:path"; diff --git a/src/scripts/4-results/generate-poster.ts b/src/scripts/4-results/generate-poster.ts index a59b00c..13e5798 100644 --- a/src/scripts/4-results/generate-poster.ts +++ b/src/scripts/4-results/generate-poster.ts @@ -1,5 +1,5 @@ import chalk from "chalk"; -import envalid from "envalid"; +import * as envalid from "envalid"; import path from "node:path"; import puppeteer from "puppeteer"; diff --git a/src/scripts/format-data-files.ts b/src/scripts/format-data-files.ts index f1f9506..b9893f1 100644 --- a/src/scripts/format-data-files.ts +++ b/src/scripts/format-data-files.ts @@ -1,5 +1,5 @@ import chalk from "chalk"; -import envalid from "envalid"; +import * as envalid from "envalid"; import fs from "fs-extra"; import path from "node:path"; diff --git a/src/shared/cleanEnv.ts b/src/shared/cleanEnv.ts index 73592cb..b58cc06 100644 --- a/src/shared/cleanEnv.ts +++ b/src/shared/cleanEnv.ts @@ -1,5 +1,5 @@ import { config } from "dotenv-flow"; -import envalid from "envalid"; +import * as envalid from "envalid"; import { defaultReporter } from "./envalidDefaultReporter"; diff --git a/src/shared/envalidDefaultReporter.ts b/src/shared/envalidDefaultReporter.ts index e9fc309..26455bc 100644 --- a/src/shared/envalidDefaultReporter.ts +++ b/src/shared/envalidDefaultReporter.ts @@ -1,6 +1,6 @@ // Origin: https://github.com/af/envalid/blob/a694876d3fe5f8a8316d15ce4e26e895f41966f6/src/reporter.ts -import envalid from "envalid"; +import { EnvMissingError, ReporterOptions } from "envalid"; import { ScriptError } from "./helpersForScripts"; @@ -17,9 +17,7 @@ const colors = { const rule = colors.white("================================"); -export const defaultReporter = ({ - errors = {}, -}: envalid.ReporterOptions) => { +export const defaultReporter = ({ errors = {} }: ReporterOptions) => { if (Object.keys(errors).length === 0) { return; } @@ -27,7 +25,7 @@ export const defaultReporter = ({ const missingVarsOutput: string[] = []; const invalidVarsOutput: string[] = []; for (const [key, error] of Object.entries(errors)) { - if (error instanceof envalid.EnvMissingError) { + if (error instanceof EnvMissingError) { missingVarsOutput.push( ` ${colors.blue(key)}: ${error.message || "(required)"}`, ); diff --git a/src/shared/geocoding/debugAddressNormalizationIfEnabled.ts b/src/shared/geocoding/debugAddressNormalizationIfEnabled.ts index 2191407..bf30e44 100644 --- a/src/shared/geocoding/debugAddressNormalizationIfEnabled.ts +++ b/src/shared/geocoding/debugAddressNormalizationIfEnabled.ts @@ -1,5 +1,5 @@ import chalk from "chalk"; -import envalid from "envalid"; +import * as envalid from "envalid"; import { WriteStream } from "node:tty"; import { AddressNormalizationConfig, normalizeAddress } from "../addresses"; diff --git a/src/shared/results/getLocaleFromEnv.ts b/src/shared/results/getLocaleFromEnv.ts index 6d037c2..d2024d6 100644 --- a/src/shared/results/getLocaleFromEnv.ts +++ b/src/shared/results/getLocaleFromEnv.ts @@ -1,4 +1,4 @@ -import envalid from "envalid"; +import * as envalid from "envalid"; import { cleanEnv } from "../cleanEnv"; diff --git a/src/shared/sources/mkrf/helpersForPaths.ts b/src/shared/sources/mkrf/helpersForPaths.ts index 36627be..8531b9d 100644 --- a/src/shared/sources/mkrf/helpersForPaths.ts +++ b/src/shared/sources/mkrf/helpersForPaths.ts @@ -1,4 +1,4 @@ -import envalid from "envalid"; +import * as envalid from "envalid"; import path from "node:path"; import { cleanEnv } from "../../cleanEnv"; diff --git a/src/shared/sources/rosreestr/pauseBetweenPkkApiRequestsToAvoid403.ts b/src/shared/sources/rosreestr/pauseBetweenPkkApiRequestsToAvoid403.ts index 8a2af5b..9c8dcdb 100644 --- a/src/shared/sources/rosreestr/pauseBetweenPkkApiRequestsToAvoid403.ts +++ b/src/shared/sources/rosreestr/pauseBetweenPkkApiRequestsToAvoid403.ts @@ -1,4 +1,4 @@ -import envalid from "envalid"; +import * as envalid from "envalid"; import _ from "lodash"; import sleep from "sleep-promise"; diff --git a/src/shared/territory.ts b/src/shared/territory.ts index 780cda2..be1dedc 100644 --- a/src/shared/territory.ts +++ b/src/shared/territory.ts @@ -1,6 +1,6 @@ import * as turf from "@turf/turf"; import chalk from "chalk"; -import envalid from "envalid"; +import * as envalid from "envalid"; import fs from "fs-extra"; import { load } from "js-yaml"; import _ from "lodash"; From 2cb4d3c7e8239fcbd4900be66879a5635683bc37 Mon Sep 17 00:00:00 2001 From: Alexander Kachkaev Date: Mon, 28 Mar 2022 22:50:02 +0100 Subject: [PATCH 6/6] Upgrade `envalid` to 7.3.0 --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 651506d..3159aa0 100644 --- a/package.json +++ b/package.json @@ -86,7 +86,7 @@ "chalk": "^5.0.0", "dedent": "^0.7.0", "dotenv-flow": "^3.2.0", - "envalid": "7.3.0-beta.2", + "envalid": "^7.3.0", "eslint": "^8.9.0", "execa": "^6.0.0", "fs-extra": "^10.0.0", diff --git a/yarn.lock b/yarn.lock index a40b3e3..1bd77be 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3430,10 +3430,10 @@ entities@~2.1.0: resolved "https://registry.yarnpkg.com/entities/-/entities-2.1.0.tgz#992d3129cf7df6870b96c57858c249a120f8b8b5" integrity sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w== -envalid@7.3.0-beta.2: - version "7.3.0-beta.2" - resolved "https://registry.yarnpkg.com/envalid/-/envalid-7.3.0-beta.2.tgz#5e4425dad1410630d203590cbbd676bb6245df97" - integrity sha512-N0s1U19SMYxGG0rbJ6qNCH/1iyDufb/1cW/Bk7JD908qi2ia3MVFa3++eLaTfUjurftpZbcvKZwekC6iGpNMag== +envalid@^7.3.0: + version "7.3.0" + resolved "https://registry.yarnpkg.com/envalid/-/envalid-7.3.0.tgz#9d5eda789216cfdd8c55ff0d6fe30ddff38e52d5" + integrity sha512-RWAAXLU+s884YwbVQ+D8OYRIspo7hvF9zPTvjToVzqZknHwycAuGiiHG/XiI1UDY/PeYSlMwQvMUGb25n06iwA== dependencies: tslib "2.3.1"