From 0dffba5184c2b268eaebb21d5818989d1b98634a Mon Sep 17 00:00:00 2001 From: Alex Parish Date: Mon, 9 Dec 2024 14:02:32 +0000 Subject: [PATCH] Remove utility-types dependency (#299) --- README.md | 4 ---- package.json | 3 +-- src/withOptimizely.tsx | 3 +-- yarn.lock | 5 ----- 4 files changed, 2 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 19baebad..9cd42c59 100644 --- a/README.md +++ b/README.md @@ -537,10 +537,6 @@ License: [MIT](https://github.com/facebook/react/blob/master/LICENSE) Copyright © Facebook, Inc. and its affiliates. License: [MIT](https://github.com/facebook/react/blob/master/LICENSE) -[**utility-types**](https://github.com/piotrwitek/utility-types) -Copyright © 2016 Piotr Witek -License: [MIT](https://github.com/piotrwitek/utility-types/blob/master/LICENSE) - [**node-uuid**](https://github.com/kelektiv/node-uuid) Copyright © 2010-2016 Robert Kieffer and other contributors License: [MIT](https://github.com/kelektiv/node-uuid/blob/master/LICENSE.md) diff --git a/package.json b/package.json index ed4887f4..3dac6489 100644 --- a/package.json +++ b/package.json @@ -42,8 +42,7 @@ }, "dependencies": { "@optimizely/optimizely-sdk": "^5.3.4", - "hoist-non-react-statics": "^3.3.2", - "utility-types": "^2.1.0 || ^3.0.0" + "hoist-non-react-statics": "^3.3.2" }, "peerDependencies": { "react": ">=16.8.0" diff --git a/src/withOptimizely.tsx b/src/withOptimizely.tsx index 93cdc526..0160f175 100644 --- a/src/withOptimizely.tsx +++ b/src/withOptimizely.tsx @@ -14,7 +14,6 @@ * limitations under the License. */ import * as React from 'react'; -import { Subtract } from 'utility-types'; import { OptimizelyContextConsumer, OptimizelyContextInterface } from './Context'; import { ReactSDKClient } from './client'; @@ -26,7 +25,7 @@ export interface WithOptimizelyProps { isServerSide: boolean; } -export type WithoutOptimizelyProps

= Subtract; +export type WithoutOptimizelyProps

= Omit; export function withOptimizely

( Component: React.ComponentType

diff --git a/yarn.lock b/yarn.lock index e2ee69f8..13be85c0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4800,11 +4800,6 @@ url-parse@^1.5.3: querystringify "^2.1.1" requires-port "^1.0.0" -"utility-types@^2.1.0 || ^3.0.0": - version "3.11.0" - resolved "https://registry.yarnpkg.com/utility-types/-/utility-types-3.11.0.tgz#607c40edb4f258915e901ea7995607fdf319424c" - integrity sha512-6Z7Ma2aVEWisaL6TvBCy7P8rm2LQoPv6dJ7ecIaIixHcwfbJ0x7mWdbcwlIM5IGQxPZSFYeqRCqlOOeKoJYMkw== - uuid@^9.0.1: version "9.0.1" resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.1.tgz#e188d4c8853cc722220392c424cd637f32293f30"