New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@front10/utils

Package Overview
Dependencies
Maintainers
5
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@front10/utils - npm Package Compare versions

Comparing version 0.100.2 to 0.101.0

8

CHANGELOG.md

@@ -6,2 +6,10 @@ # Change Log

# [0.101.0](https://gitlab.com/front10-dev/front10-helpers/compare/v0.100.3...v0.101.0) (2021-07-28)
**Note:** Version bump only for package @front10/utils
# [0.100.0](https://gitlab.com/front10-dev/front10-helpers/compare/v0.99.1...v0.100.0) (2021-06-14)

@@ -8,0 +16,0 @@

1

dist/declarations/src/dataSources.d.ts

@@ -15,2 +15,3 @@ export declare function isPromise(result: Promise<unknown> | unknown): result is Promise<unknown>;

};
export declare const defaultDataSource: DataSourceFn<any, any>;
export declare const paginatedDataSource: <T>(data: T[], response?: Response | undefined) => DataSourceFn<any, DataSet<T>>;

@@ -17,0 +18,0 @@ declare type DataSources<Props, Result> = DataSourceFn<Props, DataSet<Result>> | DataSet<Result> | Result[] | string;

4

package.json
{
"name": "@front10/utils",
"version": "0.100.2",
"version": "0.101.0",
"description": "Helpers for front10 components",

@@ -58,3 +58,3 @@ "author": "Front10",

},
"gitHead": "8da18e935f9f760599b47f6f7b70eea6ba9c61a1"
"gitHead": "1fd813577ba6e6f3b7c09c7377b8c5d61d7e2cc9"
}

@@ -53,2 +53,11 @@ import * as React from "react";

export const defaultDataSource: DataSourceFn<any, any> = ({
integrationSettings: { url, ...integrationSettings },
}) => {
const searchParams = new URLSearchParams(integrationSettings);
return fetch(`${url}?${searchParams.toString()}`).then((response) =>
response.json()
);
};
export const paginatedDataSource = <T>(

@@ -113,3 +122,6 @@ data: T[],

const fn = getDataSource(transformedDataSource);
if (typeof transformedDataSource === "string") {
if (
typeof transformedDataSource === "string" ||
typeof transformedDataSource === "function"
) {
const fnData = async ({ query, ...props }: any) => {

@@ -126,5 +138,7 @@ const result = await fn(props);

const [key] = React.useState(() =>
typeof dataSource === "string" ? dataSource : nanoid()
);
const [key] = React.useState(() => {
if (typeof dataSource === "string") return dataSource;
if (props.integrationSettings?.url) return "";
return nanoid();
});

@@ -131,0 +145,0 @@ return useInfiniteQuery(

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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