Skip to content
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

support serialize undefined #54

Merged
merged 4 commits into from Aug 29, 2019
Merged

support serialize undefined #54

merged 4 commits into from Aug 29, 2019

Conversation

nqdy666
Copy link
Contributor

@nqdy666 nqdy666 commented Aug 26, 2019

I confirm that this contribution is made under the terms of the license found in the root directory of this repository's source tree and that I have the authority necessary to make this contribution on behalf of its copyright owner.

@okuryu
Copy link
Collaborator

@okuryu okuryu commented Aug 27, 2019

Hmm, could you add tests?

index.js Outdated
@@ -134,15 +146,15 @@ module.exports = function serialize(obj, options) {
if (typeof str !== 'string') {
return String(str);
}

Copy link
Collaborator

@okuryu okuryu Aug 28, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I think the indent is unnecessary.

okuryu
okuryu approved these changes Aug 29, 2019
Copy link
Collaborator

@okuryu okuryu left a comment

👍

@okuryu okuryu merged commit 356987f into yahoo:master Aug 29, 2019
1 check passed
@okuryu
Copy link
Collaborator

@okuryu okuryu commented Aug 29, 2019

published serialize-javascript@1.9.0. Thanks!

TrySound referenced this issue in TrySound/rollup-plugin-uglify Aug 30, 2019
* Reject sourcemap before sending it to uglify

At some point today, our builds started failing with a sourcemap error
from this lib. Running the tests here makes it replicable:

```
  ● allow to disable source maps

    DefaultsError: `sourcemap` is not a supported option

      at DefaultsError.get (eval at <anonymous> (node_modules/uglify-js/tools/node.js:20:1), <anonymous>:71:23)
```

This fixes the error by rejecting the option uglify is now rejecting
before the whole thing crashes.

* Use delete to mutate options object instead of a new copy

* Upgrade serialize-javascript
@src-code
Copy link

@src-code src-code commented Aug 30, 2019

I believe this change introduced a regression, will open an issue

@src-code
Copy link

@src-code src-code commented Aug 30, 2019

#57

okuryu added a commit that referenced this issue Sep 4, 2019
okuryu added a commit that referenced this issue Sep 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants