New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

react-uplot

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-uplot - npm Package Compare versions

Comparing version
0.0.8
to
0.0.9
+1
-1
.vscode/settings.json

@@ -14,4 +14,4 @@ {

"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
}
}
import "./Utils/Polyfills.js";
export * from "./UI/UPlot.js";
import "./Utils/Polyfills.js";
export * from "./UI/UPlot.js";

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

ignoreDoubleClick?: boolean;
}) => JSX.Element>;
}) => React.JSX.Element>;

@@ -7,4 +7,5 @@ import React, { useEffect, useRef } from "react";

// destructuring is pretty redundant (vs props.X), but is a step toward avoiding the memory-leak of data/options (see: https://github.com/facebook/react/issues/18790#issuecomment-726394247)
let { divRef, chartRef, options, data, placeLegendBelowContainer, ignoreDoubleClick } = props;
divRef = divRef !== null && divRef !== void 0 ? divRef : useRef(null);
let { divRef: _divRef_passed, chartRef, options, data, placeLegendBelowContainer, ignoreDoubleClick } = props;
const _divRefCandidate = useRef(null);
let divRef = _divRef_passed !== null && _divRef_passed !== void 0 ? _divRef_passed : _divRefCandidate;
Assert(data == null || data.every(a => { var _a; return a.length == ((_a = data[0]) === null || _a === void 0 ? void 0 : _a.length); }), () => `All data-arrays must have the same length. Got lengths: ${data.map(a => a.length).join(",")}`);

@@ -11,0 +12,0 @@ const deps = [data, options, chartRef, divRef];

@@ -0,0 +0,0 @@ export declare function E<E1, E2, E3, E4, E5, E6, E7, E8, E9, E10, E11, E12, E13, E14, E15, E16, E17, E18, E19, E20>(e1?: E1, e2?: E2, e3?: E3, e4?: E4, e5?: E5, e6?: E6, e7?: E7, e8?: E8, e9?: E9, e10?: E10, e11?: E11, e12?: E12, e13?: E13, e14?: E14, e15?: E15, e16?: E16, e17?: E17, e18?: E18, e19?: E19, e20?: E20): E1 & E2 & E3 & E4 & E5 & E6 & E7 & E8 & E9 & E10 & E11 & E12 & E13 & E14 & E15 & E16 & E17 & E18 & E19 & E20;

@@ -13,3 +13,3 @@ export function E(e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20) {

var result = [];
for (let item of items) {
for (const item of items) {
if (result.indexOf(item) == -1) {

@@ -26,5 +26,5 @@ result.push(item);

//console.log(`Assert failed) ${message}\n\nStackTrace) ${GetStackTraceStr()}`);
console.error("Assert failed) " + message);
console.error(`Assert failed) ${message}`);
debugger;
throw new Error("Assert failed) " + message);
throw new Error(`Assert failed) ${message}`);
}

@@ -42,3 +42,3 @@ export function AssertWarn(condition, messageOrMessageFunc) {

return obj;
let result = FromJSON(ToJSON(obj));
const result = FromJSON(ToJSON(obj));
if (keepPrototype == true) {

@@ -45,0 +45,0 @@ Object.setPrototypeOf(result, Object.getPrototypeOf(obj));

export declare function Log(...args: any[]): void;
export function Log(...args) {
return console.log(...args);
}

@@ -0,0 +0,0 @@ "use strict";

{
"name": "react-uplot",
"description": "ReactJS wrapper for the uPlot charting library.",
"version": "0.0.8",
"version": "0.0.9",
"author": "Venryx (https://venryx.com)",

@@ -25,8 +25,8 @@ "main": "Dist/index.js",

"peerDependencies": {
"react": "^16.0.0",
"react-dom": "^16.0.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"uplot": "^1.0.0"
},
"devDependencies": {
"@types/react": "17.0.9",
"@types/react": "^19.0.0",
"eslint": "^7.28.0",

@@ -37,5 +37,5 @@ "eslint-config-vbase": "^1.0.11",

"eslint-plugin-react": "^7.24.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"typescript": "^4.3.2",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"typescript": "^5.8.2",
"uplot": "^1.6.12"

@@ -42,0 +42,0 @@ },

@@ -12,4 +12,5 @@ import React, {useEffect, useRef} from "react";

// destructuring is pretty redundant (vs props.X), but is a step toward avoiding the memory-leak of data/options (see: https://github.com/facebook/react/issues/18790#issuecomment-726394247)
let {divRef, chartRef, options, data, placeLegendBelowContainer, ignoreDoubleClick} = props;
divRef = divRef ?? useRef<HTMLDivElement>(null);
let {divRef: _divRef_passed, chartRef, options, data, placeLegendBelowContainer, ignoreDoubleClick} = props;
const _divRefCandidate = useRef<HTMLDivElement>(null);
let divRef = _divRef_passed ?? _divRefCandidate;
Assert(data == null || data.every(a=>a.length == data[0]?.length), ()=>`All data-arrays must have the same length. Got lengths: ${data.map(a=>a.length).join(",")}`);

@@ -16,0 +17,0 @@

@@ -1,4 +0,4 @@

export function E<E1,E2,E3,E4,E5,E6,E7,E8,E9,E10,E11,E12,E13,E14,E15,E16,E17,E18,E19,E20>(
e1?:E1,e2?:E2,e3?:E3,e4?:E4,e5?:E5,e6?:E6,e7?:E7,e8?:E8,e9?:E9,e10?:E10,
e11?:E11,e12?:E12,e13?:E13,e14?:E14,e15?:E15,e16?:E16,e17?:E17,e18?:E18,e19?:E19,e20?:E20,
export function E<E1, E2, E3, E4, E5, E6, E7, E8, E9, E10, E11, E12, E13, E14, E15, E16, E17, E18, E19, E20>(
e1?:E1, e2?:E2, e3?:E3, e4?:E4, e5?:E5, e6?:E6, e7?:E7, e8?:E8, e9?:E9, e10?:E10,
e11?:E11, e12?:E12, e13?:E13, e14?:E14, e15?:E15, e16?:E16, e17?:E17, e18?:E18, e19?:E19, e20?:E20,
):E1&E2&E3&E4&E5&E6&E7&E8&E9&E10&E11&E12&E13&E14&E15&E16&E17&E18&E19&E20 {

@@ -18,3 +18,3 @@ var result = {} as any;

var result = [] as any[];
for (let item of items) {
for (const item of items) {
if (result.indexOf(item) == -1) {

@@ -33,5 +33,5 @@ result.push(item);

//console.log(`Assert failed) ${message}\n\nStackTrace) ${GetStackTraceStr()}`);
console.error("Assert failed) " + message);
console.error(`Assert failed) ${message}`);
debugger;
throw new Error("Assert failed) " + message);
throw new Error(`Assert failed) ${message}`);
}

@@ -51,4 +51,4 @@ export function AssertWarn(condition, messageOrMessageFunc?: string | Function) {

if (obj == null) return obj;
let result = FromJSON(ToJSON(obj));
const result = FromJSON(ToJSON(obj));
if (keepPrototype == true) {

@@ -77,4 +77,4 @@ Object.setPrototypeOf(result, Object.getPrototypeOf(obj));

}
if (s < min) return min;
if (s > max) return max;
if (s as number < min) return min;
if (s as number > max) return max;
return s as number;

@@ -81,0 +81,0 @@ }