-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Fix namespaced object export when default is the only one available #4058
Merged
Commits on Nov 14, 2024
-
This allows us to work with a more go way of working with conditional branching.
Configuration menu - View commit details
-
Copy full SHA for 68a2440 - Browse repository at this point
Copy the full SHA 68a2440View commit details -
Add conversion from default to namspaced object
If no named exports are available, we want to try and convert the default export to named exports. This allows users to work with namespaced objects even through the module hasn't been setup to work in that way. This is how node works too.
Configuration menu - View commit details
-
Copy full SHA for efb0611 - Browse repository at this point
Copy the full SHA efb0611View commit details -
Configuration menu - View commit details
-
Copy full SHA for ac530c6 - Browse repository at this point
Copy the full SHA ac530c6View commit details -
Update to work with nil check over len
This is to stay consistent with other areas of the codebase (e.g. toESModuleExports). There could be a valid case where we want named to be an empty slice and default be non-nil, and not use this feature to convert from default to namespace exports.
Configuration menu - View commit details
-
Copy full SHA for 241af93 - Browse repository at this point
Copy the full SHA 241af93View commit details -
It needs to be of length 0 to allow for append from 0.
Configuration menu - View commit details
-
Copy full SHA for 134399b - Browse repository at this point
Copy the full SHA 134399bView commit details -
Update to work with ToObject instead of cast
This is a better and safer way to work with an interface{} type when we need to retrieve the property values from the object. Since the underlying type of Default could be anything, including a sobek.Value, it's better to retrieve it as a sobek.Object instead of a casting.
Configuration menu - View commit details
-
Copy full SHA for 296f8c2 - Browse repository at this point
Copy the full SHA 296f8c2View commit details -
This will allow us to create other tests under the StarImport domain.
Configuration menu - View commit details
-
Copy full SHA for 502376b - Browse repository at this point
Copy the full SHA 502376bView commit details -
Configuration menu - View commit details
-
Copy full SHA for b301b49 - Browse repository at this point
Copy the full SHA b301b49View commit details -
Configuration menu - View commit details
-
Copy full SHA for f492b40 - Browse repository at this point
Copy the full SHA f492b40View commit details
Commits on Nov 15, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 37a78c6 - Browse repository at this point
Copy the full SHA 37a78c6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 636484f - Browse repository at this point
Copy the full SHA 636484fView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.