Skip to content

Commit

Permalink
Upgrade envalid to 7.3.0 (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
kachkaev authored Mar 28, 2022
1 parent 730ff8f commit d71ee20
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
"chalk": "^5.0.0",
"dedent": "^0.7.0",
"dotenv-flow": "^3.2.0",
"envalid": "^7.2.2",
"envalid": "^7.3.0",
"eslint": "^8.9.0",
"execa": "^6.1.0",
"fs-extra": "^10.0.0",
Expand Down
6 changes: 2 additions & 4 deletions src/scripts/4-results/generate-geosemantica-layer-styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: "",
}),
});
Expand Down
4 changes: 2 additions & 2 deletions src/scripts/4-results/generate-poster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
}),
});
Expand Down
4 changes: 2 additions & 2 deletions src/shared/stage-results/get-locale-from-env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3431,10 +3431,10 @@ entities@~2.1.0:
resolved "https://registry.yarnpkg.com/entities/-/entities-2.1.0.tgz#992d3129cf7df6870b96c57858c249a120f8b8b5"
integrity sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==

envalid@^7.2.2:
version "7.2.2"
resolved "https://registry.yarnpkg.com/envalid/-/envalid-7.2.2.tgz#f3219f85e692002dca0f28076740227d30c817e3"
integrity sha512-bl/3VF5PhoF26HlDWiE0NRRHUbKT/+UDP/+0JtOFmhUwK3cUPS7JgWYGbE8ArvA61T+SyNquxscLCS6y4Wnpdw==
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"

Expand Down

0 comments on commit d71ee20

Please sign in to comment.