-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not access prototype, callee, caller & arguments properties #239
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! At 4 items being compared now, can you switch to using an array instead? Can you also please check the contributing doc for formatting your commit message?
@Strate - are you able to provide a minimal environment that this occurs (cjs/esm? browser/node? which version?)? I'm thinking of a change more like this, which I'd like to confirm first: const stdClassProps = Object.getOwnPropertyNames(class Test{});
Object.getOwnPropertyNames(Jsep)
.filter(prop => !stdClassProps.includes(prop) && jsep[prop] === undefined)
.forEach((m) => {
jsep[m] = Jsep[m];
}); |
any update on this? we encountered the same issue with React Native. would be very nice if this issue could be resolved. |
@bladerunner2020 - are you able to follow up on my last comment? Are you able to provide a minimal reproduceable environment so I can confirm the proposed change instead? |
Comparing 4 items is more effective, than performing linear lookup in array. Would be very good if this library keep performance-focused |
I will try prepare it later this week. |
I created a minimal reproducible environment - https://github.com/bladerunner2020/jsep-expo-239. To reproduce the issue you have to install Android emulator. There is a link to instruction how to do this in the readme. |
NOTE: I could on reproduce this as an issue in Android StrictMode (not JS or React StrictMode) fixes #239
## [1.3.9](v1.3.8...v1.3.9) (2024-07-12) ### Bug Fixes * add types add/remove/removeAll functions ([b4a5b1a](b4a5b1a)), closes [#238](#238) * add types for SequenceExpressions ([d0cf015](d0cf015)), closes [#261](#261) * detect unexpected ] in expression "[1,2][]" ([70b8ea6](70b8ea6)), closes [#256](#256) * do not access prototype ([037d1db](037d1db)), closes [#239](#239) * throwError return type ([e0df539](e0df539)), closes [#252](#252) * update Array elements typing ([097ae12](097ae12))
🎉 This issue has been resolved in version 1.3.9 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Im tried to use this library in react-native with Hermes JS engine enabled, and got errors.
Trying to access
caller
,callee
,arguments
properties retults to TypeError: Restricted in strict modeRelated links:
facebook/react-native#34868
axios/axios#4998 (comment)
axios/axios#5231
axios/axios#5152