From 0c3c4e99d9c4d4853272ac8967b25f90660b6210 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sat, 18 Apr 2020 07:31:53 +0000 Subject: [PATCH 1/2] Bump @types/node from 13.11.1 to 13.13.0 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.11.1 to 13.13.0. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7d70612..a831eda 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2188,9 +2188,9 @@ "dev": true }, "@types/node": { - "version": "13.11.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-13.11.1.tgz", - "integrity": "sha512-eWQGP3qtxwL8FGneRrC5DwrJLGN4/dH1clNTuLfN81HCrxVtxRjygDTUoZJ5ASlDEeo0ppYFQjQIlXhtXpOn6g==", + "version": "13.13.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.0.tgz", + "integrity": "sha512-WE4IOAC6r/yBZss1oQGM5zs2D7RuKR6Q+w+X2SouPofnWn+LbCqClRyhO3ZE7Ix8nmFgo/oVuuE01cJT2XB13A==", "dev": true }, "@types/parse-json": { diff --git a/package.json b/package.json index b228110..14527fa 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "@types/jest": "^25.2.1", "@types/lodash.debounce": "^4.0.6", "@types/lodash.isequal": "^4.5.5", - "@types/node": "^13.11.1", + "@types/node": "^13.13.0", "@types/react": "^16.9.34", "@types/react-bootstrap-daterangepicker": "0.0.26", "@types/react-bootstrap-typeahead": "^3.4.5", From 72e5240a2a35df56e05bc0ba458c949524fc5197 Mon Sep 17 00:00:00 2001 From: Mcat12 Date: Sun, 19 Apr 2020 14:48:18 -0400 Subject: [PATCH 2/2] Assert PUBLIC_URL is not null in getBasePath An updated type definition for `process.env` added the possibility for environment variables to be undefined. Signed-off-by: Mcat12 --- src/util/basePath.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/util/basePath.ts b/src/util/basePath.ts index 8caa571..bb0f9c4 100644 --- a/src/util/basePath.ts +++ b/src/util/basePath.ts @@ -21,6 +21,7 @@ export const getBasePath = (): string => { if (baseElement) { return new URL(baseElement.href).pathname; } else { - return process.env.PUBLIC_URL; + // PUBLIC_URL is supplied by CRA, and will never be undefined + return process.env.PUBLIC_URL!; } };