Socket
Socket
Sign inDemoInstall

moize

Package Overview
Dependencies
2
Maintainers
2
Versions
104
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 6.1.5-beta.1 to 6.1.5

4

CHANGELOG.md
# moize CHANGELOG
## 6.1.5
- [#186](https://github.com/planttheidea/moize/issues/186) - Avoid type issues when using in project where React is unused
## 6.1.4

@@ -4,0 +8,0 @@

@@ -8,3 +8,3 @@ /* eslint-disable */

export interface MoizedReactElement {
interface MoizedReactElement {
type: any;

@@ -17,2 +17,4 @@ props: any;

* @deprecated
*
* Use `AnyFn` instead, as it is more flexible and works better with type inference.
*/

@@ -23,2 +25,8 @@ export type Fn<Arg extends any = any, Result extends any = any> = (

/**
* @deprecated
*
* This should not longer need to be explicitly used, as inference of the function
* returning the element should suffice.
*/
export type FunctionalComponent<Props extends object> = ((

@@ -25,0 +33,0 @@ props: Props

6

package.json

@@ -22,3 +22,3 @@ {

"@babel/cli": "7.20.7",
"@babel/core": "7.20.7",
"@babel/core": "7.20.12",
"@babel/plugin-proposal-class-properties": "7.18.6",

@@ -41,3 +41,3 @@ "@babel/preset-env": "7.20.2",

"babel-jest": "29.3.1",
"babel-loader": "9.1.0",
"babel-loader": "9.1.2",
"benchmark": "2.1.4",

@@ -132,3 +132,3 @@ "bluebird": "3.7.2",

"types": "./index.d.ts",
"version": "6.1.5-beta.1"
"version": "6.1.5"
}

@@ -7,3 +7,2 @@ import { copyStaticProperties } from './instance';

Moized as MoizedFunction,
MoizedReactElement,
Moizeable,

@@ -81,3 +80,3 @@ Options,

Moized.prototype.render = function (): MoizedReactElement {
Moized.prototype.render = function (): ReturnType<MoizeableFn> {
return {

@@ -90,3 +89,3 @@ $$typeof: REACT_ELEMENT_TYPE,

_owner: null,
} as MoizedReactElement;
} as ReturnType<MoizeableFn>;
};

@@ -93,0 +92,0 @@

import type {
FunctionalComponent,
GlobalStatsObject,

@@ -97,6 +96,6 @@ Moizeable,

export function getDefaultProfileName<MoizeableFn extends Moizeable>(
fn: MoizeableFn | FunctionalComponent<Record<string, unknown>>
fn: MoizeableFn
) {
return (
(fn as FunctionalComponent<Record<string, unknown>>).displayName ||
fn.displayName ||
fn.name ||

@@ -103,0 +102,0 @@ `Anonymous ${statsCache.anonymousProfileNameCounter++}`

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc