Comments (7)
I've merged the PR, it will be released next week. If there are still issues with other build tools, please re-open, but afaict the eval
calls are hidden & handled properly now.
from mui-x.
I've opened #10329 to fix the issue. I've been able to reproduce & fix the issue for vite
. I wasn't able to observe the issue for webpack
or esbuild
. If someone wants to provide more details for those bundlers please do so.
from mui-x.
I think we can work around that by adding another real closure around and passing arguments instead of closure values.
@romgrk I have tried this:
const x = 1;
(() => {
console.log(eval('x'));
})();
It prints something random: "Symbol(react.responder)"
and esbuild is still in de-optimization mode (the most important to fix IMHO).
It looks like we must pick between one of these:
- (0, eval)('x')
- new Function('x')
- no eval
- find a way to hide eval from these minifiers, so they keep optimizing the production bundle
from mui-x.
Hello there, I've faced it also using vitejs when building.
It cause issues with minifying
Hope it can add to the issue.
from mui-x.
Hello everyone!
Within gridFilterUtils.ts the following line of code
// Fixes https://github.com/mui/mui-x/issues/10056
const global = (typeof window === 'undefined' ? globalThis : window) as any;
causes the following error with jest
/Users/projects/hub-app/node_modules/@mui/x-data-grid/node/hooks/features/filter/gridFilterUtils.js:15
const global = typeof window === 'undefined' ? globalThis : window;
^
SyntaxError: Identifier 'global' has already been declared
at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:537:17)
at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:579:25)
at Object.<anonymous> (node_modules/@mui/x-data-grid/node/hooks/features/filter/useGridFilter.js:24:24)
would it be possible to rename this variable?
from mui-x.
Sure, that's something we can do. Just out of curiosity, did you report this to jest? Sounds more like a bug on their side.
from mui-x.
No but I can let them know! Yeah does seem pretty weird, you can limit the scopes when using jest but global is set by default
from mui-x.
Related Issues (20)
- [data grid] Full featured CRUD example issues HOT 1
- [data grid] Missing `cellMouseLeave` in `apiRef.subscribeEvent` HOT 6
- [data grid] how to update column header titles when switching language without reseting data-grid state HOT 11
- [data grid] issue with using sx in GridToolbarColumnsButton HOT 3
- [data grid] What is the best way to modify the toolbar menus ? HOT 3
- [data grid] Stale Cache for filter items > 5 HOT 1
- [data grid] All grouped rows collapses when rows updating (by state, not by updateRows) HOT 2
- [fields] Handle form submit on `Enter` click with "v7" fields
- [charts] Transparent fills in area line charts overlap causing color mixing issues HOT 1
- [DateRangePicker] Stop forcing initial focus on the first section
- [data grid] slotProps ColumnsManagement is not working HOT 5
- [data grid] Noisy warning, Accessing element.ref was removed in React 19 HOT 3
- [data grid] Detail panel for focused row is "sticky" when scrolling HOT 4
- [charts] Support multiple values for border radius on bar charts
- [pickers] Add a default AM or PM to the time picker HOT 3
- [data grid] Custom Columns: How to improve usability of the Date Picker in a narrow column HOT 6
- [data grid] Unable to override default props/styling for Header HOT 2
- [pickers][DatePicker] change borderRadius of selected day for dateCalendar HOT 10
- [charts] Can we have horizontal Gauge Chart? HOT 7
- [data grid] Row grouping does not work with nested row values HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mui-x.