From 1875fbad41f2a3dda8f610f5dcd180c6205b73d3 Mon Sep 17 00:00:00 2001 From: Brad Zacher Date: Mon, 11 May 2020 13:04:50 -0700 Subject: [PATCH] fix(experimental-utils): remove accidental dep on json-schema (#2010) --- .../experimental-utils/src/json-schema.ts | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/packages/experimental-utils/src/json-schema.ts b/packages/experimental-utils/src/json-schema.ts index 05b0909ecdc..8e11b8b3caa 100644 --- a/packages/experimental-utils/src/json-schema.ts +++ b/packages/experimental-utils/src/json-schema.ts @@ -1,2 +1,24 @@ +// Note - @types/json-schema@7.0.4 added some function declarations to the type package +// If we do export *, then it will also export these function declarations. +// This will cause typescript to not scrub the require from the build, breaking anyone who doesn't have it as a dependency + // eslint-disable-next-line import/no-extraneous-dependencies -export * from 'json-schema'; +export { + JSONSchema4, + JSONSchema4Type, + JSONSchema4TypeName, + JSONSchema4Version, + JSONSchema6, + JSONSchema6Definition, + JSONSchema6Type, + JSONSchema6TypeName, + JSONSchema6Version, + JSONSchema7, + JSONSchema7Array, + JSONSchema7Definition, + JSONSchema7Type, + JSONSchema7TypeName, + JSONSchema7Version, + ValidationError, + ValidationResult, +} from 'json-schema';