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

@mui/utils

Package Overview
Dependencies
Maintainers
11
Versions
115
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mui/utils - npm Package Compare versions

Comparing version 6.1.0 to 6.1.1-dev.20240919-130050-82a6448768

12

esm/useId/useId.js

@@ -5,2 +5,4 @@ 'use client';

let globalId = 0;
// TODO React 17: Remove `useGlobalId` once React 17 support is removed
function useGlobalId(idOverride) {

@@ -22,4 +24,8 @@ const [defaultId, setDefaultId] = React.useState(idOverride);

// downstream bundlers may remove unnecessary concatenation, but won't remove toString call -- Workaround for https://github.com/webpack/webpack/issues/14814
const maybeReactUseId = React['useId'.toString()];
// See https://github.com/mui/material-ui/issues/41190#issuecomment-2040873379 for why
const safeReact = {
...React
};
const maybeReactUseId = safeReact.useId;
/**

@@ -32,2 +38,3 @@ *

export default function useId(idOverride) {
// React.useId() is only available from React 17.0.0.
if (maybeReactUseId !== undefined) {

@@ -37,2 +44,3 @@ const reactId = maybeReactUseId();

}
// TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler

@@ -39,0 +47,0 @@ // eslint-disable-next-line react-hooks/rules-of-hooks -- `React.useId` is invariant at runtime.

2

index.js
/**
* @mui/utils v6.1.0
* @mui/utils v6.1.1-dev.20240919-130050-82a6448768
*

@@ -4,0 +4,0 @@ * @license MIT

/**
* @mui/utils v6.1.0
* @mui/utils v6.1.1-dev.20240919-130050-82a6448768
*

@@ -4,0 +4,0 @@ * @license MIT

@@ -5,2 +5,4 @@ 'use client';

let globalId = 0;
// TODO React 17: Remove `useGlobalId` once React 17 support is removed
function useGlobalId(idOverride) {

@@ -22,4 +24,8 @@ const [defaultId, setDefaultId] = React.useState(idOverride);

// downstream bundlers may remove unnecessary concatenation, but won't remove toString call -- Workaround for https://github.com/webpack/webpack/issues/14814
const maybeReactUseId = React['useId'.toString()];
// See https://github.com/mui/material-ui/issues/41190#issuecomment-2040873379 for why
const safeReact = {
...React
};
const maybeReactUseId = safeReact.useId;
/**

@@ -32,2 +38,3 @@ *

export default function useId(idOverride) {
// React.useId() is only available from React 17.0.0.
if (maybeReactUseId !== undefined) {

@@ -37,2 +44,3 @@ const reactId = maybeReactUseId();

}
// TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler

@@ -39,0 +47,0 @@ // eslint-disable-next-line react-hooks/rules-of-hooks -- `React.useId` is invariant at runtime.

{
"name": "@mui/utils",
"version": "6.1.0",
"version": "6.1.1-dev.20240919-130050-82a6448768",
"private": false,

@@ -16,3 +16,3 @@ "author": "MUI Team",

"type": "git",
"url": "https://github.com/mui/material-ui.git",
"url": "git+https://github.com/mui/material-ui.git",
"directory": "packages/mui-utils"

@@ -35,3 +35,3 @@ },

"react-is": "^18.3.1",
"@mui/types": "^7.2.16"
"@mui/types": "^7.2.17"
},

@@ -38,0 +38,0 @@ "peerDependencies": {

@@ -11,2 +11,4 @@ "use strict";

let globalId = 0;
// TODO React 17: Remove `useGlobalId` once React 17 support is removed
function useGlobalId(idOverride) {

@@ -28,4 +30,8 @@ const [defaultId, setDefaultId] = React.useState(idOverride);

// downstream bundlers may remove unnecessary concatenation, but won't remove toString call -- Workaround for https://github.com/webpack/webpack/issues/14814
const maybeReactUseId = React['useId'.toString()];
// See https://github.com/mui/material-ui/issues/41190#issuecomment-2040873379 for why
const safeReact = {
...React
};
const maybeReactUseId = safeReact.useId;
/**

@@ -38,2 +44,3 @@ *

function useId(idOverride) {
// React.useId() is only available from React 17.0.0.
if (maybeReactUseId !== undefined) {

@@ -43,2 +50,3 @@ const reactId = maybeReactUseId();

}
// TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler

@@ -45,0 +53,0 @@ // eslint-disable-next-line react-hooks/rules-of-hooks -- `React.useId` is invariant at runtime.

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