Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@finos/legend-shared

Package Overview
Dependencies
Maintainers
4
Versions
149
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@finos/legend-shared - npm Package Compare versions

Comparing version 10.0.34 to 10.0.35

2

lib/__test-utils__/TestUtils.d.ts

@@ -46,3 +46,3 @@ /**

*/
export declare const createMock: <T extends SuperGenericFunction>(reference?: T | undefined) => jest.Mock<T>;
export declare const createMock: <T extends SuperGenericFunction>(reference?: T) => jest.Mock<T>;
/**

@@ -49,0 +49,0 @@ * Since `jest.spyOn` has not been made global, this is just

@@ -42,4 +42,4 @@ /**

export declare const usingModelSchema: <T>(schema: ModelSchema<T>) => PropSchema;
export declare const deserializeMap: <T>(val: Record<string, T extends object ? PlainObject<T_1> : T>, itemDeserializer: (val: T extends object ? PlainObject<T_1> : T) => T) => Map<string, T>;
export declare const serializeMap: <T>(val: Map<string, T>, itemSerializer: (val: T) => T extends object ? PlainObject<T_1> : T) => PlainObject;
export declare const deserializeMap: <T>(val: Record<string, T extends object ? PlainObject<T> : T>, itemDeserializer: (val: T extends object ? PlainObject<T> : T) => T) => Map<string, T>;
export declare const serializeMap: <T>(val: Map<string, T>, itemSerializer: (val: T) => T extends object ? PlainObject<T> : T) => PlainObject;
export declare const usingConstantValueSchema: (value: unknown) => PropSchema;

@@ -59,21 +59,6 @@ /**

export declare const optionalCustomUsingModelSchema: <T>(schema: ModelSchema<T>) => PropSchema;
export declare const deserializeArray: <T>(values: unknown, itemDeserializer: (val: PlainObject<T_1>) => T, options?: {
export declare const deserializeArray: <T>(values: unknown, itemDeserializer: (val: PlainObject<T>) => T, options?: {
skipIfEmpty?: boolean;
}) => symbol | {
SKIP: boolean; /**
* Sometimes, entities coming from server which returns values which have not been set to `null`
* instead of `undefined`. This will cause `serializr` to throw.
*
* e.g.
* // in Server (Java + Jackson):
* Person person; // this will be serialized to `null` by Jackson
* (depending on the setting of the server)
*
* // in our code (TS + serializr):
* person: optional(object(Person))
*
* --> error thrown
*/
} | T[];
export declare const serializeArray: <T>(values: unknown, itemSerializer: (val: T) => T extends object ? PlainObject<T_1> : T, options?: {
}) => T[] | typeof SKIP;
export declare const serializeArray: <T>(values: unknown, itemSerializer: (val: T) => T extends object ? PlainObject<T> : T, options?: {
/**

@@ -95,18 +80,3 @@ * If the array is empty, skip serializing it (the property will not

INTERNAL__forceReturnEmptyInTest?: boolean | undefined;
}) => symbol | {
SKIP: boolean; /**
* Sometimes, entities coming from server which returns values which have not been set to `null`
* instead of `undefined`. This will cause `serializr` to throw.
*
* e.g.
* // in Server (Java + Jackson):
* Person person; // this will be serialized to `null` by Jackson
* (depending on the setting of the server)
*
* // in our code (TS + serializr):
* person: optional(object(Person))
*
* --> error thrown
*/
} | (T extends object ? PlainObject<T_1> : T)[];
}) => (T extends object ? PlainObject<T> : T)[] | typeof SKIP;
/**

@@ -121,3 +91,3 @@ * This is the idiomatic usage pattern for serialization of optional list of objects.

}) => PropSchema;
export declare const customList: <T>(serializer: (val: T) => T extends object ? PlainObject<T_1> : T, deserializer: (val: PlainObject<T_1>) => T, options?: {
export declare const customList: <T>(serializer: (val: T) => T extends object ? PlainObject<T> : T, deserializer: (val: PlainObject<T>) => T, options?: {
INTERNAL__forceReturnEmptyInTest?: boolean | undefined;

@@ -131,3 +101,3 @@ }) => PropSchema;

}) => PropSchema;
export declare const optionalCustomList: <T>(serializer: (val: T) => T extends object ? PlainObject<T_1> : T, deserializer: (val: PlainObject<T_1>) => T, options?: {
export declare const optionalCustomList: <T>(serializer: (val: T) => T extends object ? PlainObject<T> : T, deserializer: (val: PlainObject<T>) => T, options?: {
INTERNAL__forceReturnEmptyInTest?: boolean | undefined;

@@ -134,0 +104,0 @@ }) => PropSchema;

@@ -25,3 +25,3 @@ /**

export declare const isType: <T>(value: unknown, clazz: GenericClazz<T>) => value is T;
export declare const filterByType: <T>(clazz: GenericClazz<T>) => (value: unknown) => value is T;
export declare const filterByType: <T>(clazz: GenericClazz<T>) => ((value: unknown) => value is T);
export declare function assertType<T>(value: unknown, clazz: GenericClazz<T>, message?: string): asserts value is T;

@@ -28,0 +28,0 @@ export declare const guaranteeType: <T>(value: unknown, clazz: GenericClazz<T>, message?: string) => T;

@@ -59,4 +59,4 @@ /**

const DEFAULT_CLIENT_REQUEST_OPTIONS = {
mode: 'cors',
credentials: 'include',
mode: 'cors', // allow CORS - See https://developer.mozilla.org/en-US/docs/Web/API/Request/mode
credentials: 'include', // allow sending credentials to other domain
/**

@@ -248,3 +248,4 @@ * NOTE: We must set this to `follow` for the fetch to handle 3xx redirects automatically.

if (method !== HttpMethod.GET) {
baseRequestHeaders[HttpHeader.CONTENT_TYPE] = `${ContentType.APPLICATION_JSON};${CHARSET}`;
baseRequestHeaders[HttpHeader.CONTENT_TYPE] =
`${ContentType.APPLICATION_JSON};${CHARSET}`;
}

@@ -251,0 +252,0 @@ return mergeRequestHeaders(baseRequestHeaders, headers);

{
"name": "@finos/legend-shared",
"version": "10.0.34",
"version": "10.0.35",
"description": "Legend Studio shared utilities and helpers",

@@ -43,16 +43,16 @@ "keywords": [

"dependencies": {
"@braintree/sanitize-url": "6.0.4",
"@types/lodash-es": "4.17.10",
"@types/object-hash": "3.0.5",
"@types/pako": "2.0.2",
"@types/papaparse": "5.3.10",
"@types/seedrandom": "3.0.7",
"@types/uuid": "9.0.6",
"date-fns": "2.30.0",
"fuse.js": "6.6.2",
"@braintree/sanitize-url": "7.0.1",
"@types/lodash-es": "4.17.12",
"@types/object-hash": "3.0.6",
"@types/pako": "2.0.3",
"@types/papaparse": "5.3.14",
"@types/seedrandom": "3.0.8",
"@types/uuid": "9.0.8",
"date-fns": "3.6.0",
"fuse.js": "7.0.0",
"hash.js": "1.1.7",
"http-status-codes": "2.3.0",
"lodash-es": "4.17.21",
"lossless-json": "2.0.11",
"mobx": "6.10.2",
"lossless-json": "4.0.1",
"mobx": "6.12.3",
"object-hash": "3.0.0",

@@ -62,3 +62,3 @@ "pako": "2.1.0",

"pretty-format": "29.7.0",
"query-string": "8.1.0",
"query-string": "9.0.0",
"seedrandom": "3.0.5",

@@ -72,8 +72,8 @@ "serializr": "3.0.2",

"cross-env": "7.0.3",
"eslint": "8.52.0",
"eslint": "8.57.0",
"jest": "29.7.0",
"lodash": "4.17.21",
"npm-run-all": "4.1.5",
"rimraf": "5.0.5",
"typescript": "5.2.2"
"rimraf": "5.0.7",
"typescript": "5.4.5"
},

@@ -80,0 +80,0 @@ "publishConfig": {

@@ -16,6 +16,5 @@ /**

*/
import type { default as FuseType } from 'fuse.js';
export declare const FuzzySearchEngine: typeof FuseType.default;
export declare const ESM__FuzzySearchEngine: typeof FuseType.default;
export type FuzzySearchEngine<T> = FuseType.default<T>;
import Fuse from 'fuse.js';
export declare const FuzzySearchEngine: typeof Fuse;
export type FuzzySearchEngine<T> = Fuse<T>;
//# sourceMappingURL=FuzzySearch.d.ts.map

@@ -16,19 +16,4 @@ /**

*/
/**
* Previously, these exports rely on ES module interop to expose `default` export
* properly. But since we use `ESM` for Typescript resolution now, we lose this
* so we have to workaround by importing these and re-export them from CJS
*
* TODO: remove these when the package properly work with Typescript's nodenext
* module resolution
*
* @workaround ESM
* See https://github.com/microsoft/TypeScript/issues/49298
*/
import Fuse from './CJS__Fuse.cjs';
export const FuzzySearchEngine = Fuse.Fuse.default;
// NOTE: due to the way we export the constructor of `FuzzySearchEngine`, when we run this with ESM
// we can remove this workaround once Fuse supports ESM
// See https://github.com/krisk/Fuse/pull/727
export const ESM__FuzzySearchEngine = Fuse.Fuse;
import Fuse from 'fuse.js';
export const FuzzySearchEngine = Fuse;
//# sourceMappingURL=FuzzySearch.js.map
{
"name": "@finos/legend-shared",
"version": "10.0.34",
"version": "10.0.35",
"description": "Legend Studio shared utilities and helpers",

@@ -43,16 +43,16 @@ "keywords": [

"dependencies": {
"@braintree/sanitize-url": "6.0.4",
"@types/lodash-es": "4.17.10",
"@types/object-hash": "3.0.5",
"@types/pako": "2.0.2",
"@types/papaparse": "5.3.10",
"@types/seedrandom": "3.0.7",
"@types/uuid": "9.0.6",
"date-fns": "2.30.0",
"fuse.js": "6.6.2",
"@braintree/sanitize-url": "7.0.1",
"@types/lodash-es": "4.17.12",
"@types/object-hash": "3.0.6",
"@types/pako": "2.0.3",
"@types/papaparse": "5.3.14",
"@types/seedrandom": "3.0.8",
"@types/uuid": "9.0.8",
"date-fns": "3.6.0",
"fuse.js": "7.0.0",
"hash.js": "1.1.7",
"http-status-codes": "2.3.0",
"lodash-es": "4.17.21",
"lossless-json": "2.0.11",
"mobx": "6.10.2",
"lossless-json": "4.0.1",
"mobx": "6.12.3",
"object-hash": "3.0.0",

@@ -62,3 +62,3 @@ "pako": "2.1.0",

"pretty-format": "29.7.0",
"query-string": "8.1.0",
"query-string": "9.0.0",
"seedrandom": "3.0.5",

@@ -69,11 +69,11 @@ "serializr": "3.0.2",

"devDependencies": {
"@finos/legend-dev-utils": "2.1.3",
"@finos/legend-dev-utils": "2.1.5",
"@jest/globals": "29.7.0",
"cross-env": "7.0.3",
"eslint": "8.52.0",
"eslint": "8.57.0",
"jest": "29.7.0",
"lodash": "4.17.21",
"npm-run-all": "4.1.5",
"rimraf": "5.0.5",
"typescript": "5.2.2"
"rimraf": "5.0.7",
"typescript": "5.4.5"
},

@@ -80,0 +80,0 @@ "publishConfig": {

@@ -189,6 +189,6 @@ /**

: forceReturnEmptyInTest
? []
: options?.skipIfEmpty
? SKIP
: [];
? []
: options?.skipIfEmpty
? SKIP
: [];
}

@@ -195,0 +195,0 @@ return forceReturnEmptyInTest ? [] : SKIP;

@@ -65,4 +65,4 @@ /**

: error instanceof Error
? error.message
: error,
? error.message
: error,
);

@@ -69,0 +69,0 @@ this.name = name;

@@ -228,4 +228,4 @@ /**

: value > 1
? `${value} ${pluralForm ?? `${label}s`}`
: `1 ${label}`;
? `${value} ${pluralForm ?? `${label}s`}`
: `1 ${label}`;

@@ -232,0 +232,0 @@ export const quantifyList = (

@@ -314,5 +314,4 @@ /**

if (method !== HttpMethod.GET) {
baseRequestHeaders[
HttpHeader.CONTENT_TYPE
] = `${ContentType.APPLICATION_JSON};${CHARSET}`;
baseRequestHeaders[HttpHeader.CONTENT_TYPE] =
`${ContentType.APPLICATION_JSON};${CHARSET}`;
}

@@ -319,0 +318,0 @@ return mergeRequestHeaders(baseRequestHeaders, headers);

@@ -17,23 +17,6 @@ /**

/**
* Previously, these exports rely on ES module interop to expose `default` export
* properly. But since we use `ESM` for Typescript resolution now, we lose this
* so we have to workaround by importing these and re-export them from CJS
*
* TODO: remove these when the package properly work with Typescript's nodenext
* module resolution
*
* @workaround ESM
* See https://github.com/microsoft/TypeScript/issues/49298
*/
import Fuse from './CJS__Fuse.cjs';
import type { default as FuseType } from 'fuse.js';
import Fuse from 'fuse.js';
export const FuzzySearchEngine = Fuse.Fuse.default;
// NOTE: due to the way we export the constructor of `FuzzySearchEngine`, when we run this with ESM
// we can remove this workaround once Fuse supports ESM
// See https://github.com/krisk/Fuse/pull/727
export const ESM__FuzzySearchEngine =
Fuse.Fuse as unknown as typeof FuzzySearchEngine;
export const FuzzySearchEngine = Fuse;
// eslint-disable-next-line @typescript-eslint/no-redeclare
export type FuzzySearchEngine<T> = FuseType.default<T>;
export type FuzzySearchEngine<T> = Fuse<T>;

@@ -26,3 +26,19 @@ {

"tsBuildInfoFile": "./build/prod.tsbuildinfo",
"rootDir": "./src"
"rootDir": "./src",
"moduleResolution": "nodenext",
"moduleDetection": "force",
"isolatedModules": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"preserveConstEnums": true,
"incremental": true,
"useDefineForClassFields": true,
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"strictBindCallApply": true,
"strictPropertyInitialization": true,
"alwaysStrict": true,
"useUnknownInCatchVariables": true
},

@@ -62,4 +78,3 @@ "references": [

"./src/search/FuzzySearch.ts",
"./src/search/FuzzySearchAdvancedConfigState.ts",
"./src/search/CJS__Fuse.cts"
"./src/search/FuzzySearchAdvancedConfigState.ts"
],

@@ -69,4 +84,3 @@ "include": [

"src/**/*.tsx",
"src/**/*.json",
"src/search/CJS__Fuse.cts"
"src/**/*.json"
],

@@ -73,0 +87,0 @@ "exclude": [

@@ -26,3 +26,19 @@ {

"tsBuildInfoFile": "./build/package.tsbuildinfo",
"rootDir": "./"
"rootDir": "./",
"moduleResolution": "nodenext",
"moduleDetection": "force",
"isolatedModules": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"preserveConstEnums": true,
"incremental": true,
"useDefineForClassFields": true,
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"strictBindCallApply": true,
"strictPropertyInitialization": true,
"alwaysStrict": true,
"useUnknownInCatchVariables": true
},

@@ -29,0 +45,0 @@ "files": [

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc