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

fix compatibility with @babel/core option check when inputSourceMap null #538

Merged
merged 1 commit into from
Feb 25, 2018

Conversation

Delagen
Copy link
Contributor

@Delagen Delagen commented Nov 13, 2017

Please Read the CONTRIBUTING Guidelines
In particular the portion on Commit Message Formatting

Please check if the PR fulfills these requirements

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

What is the current behavior? (You can also link to an open issue here)
Assertion in @babel/core package when file come from another loader without sourceMap
In my case val-loader with only code option.
https://github.com/babel/babel/blob/master/packages/babel-core/src/config/option-assertions.js#L71

What is the new behavior?
No errors on compilation.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information:

@danez
Copy link
Member

danez commented Jan 7, 2018

Sorry for the late reply. So this fails if inputSourceMap is null? Do I understand this correctly?

Can you please add a comment describing why we need to default to null, because I already see that in a year someone might remove it because it is not common to default to undefined. :)

@Delagen
Copy link
Contributor Author

Delagen commented Jan 8, 2018

@danez Yes. Because babel-core only check for undefined, and throw exception if it null. I'll test it with latest versions and comment if issue still present

@Delagen
Copy link
Contributor Author

Delagen commented Jan 8, 2018

@danez Seems latest builds of @babel/core does not affected, so I close it for now.

@Delagen Delagen closed this Jan 8, 2018
@Delagen Delagen reopened this Jan 15, 2018
@Delagen
Copy link
Contributor Author

Delagen commented Jan 15, 2018

Again get error Module build failed: Error: .inputSourceMap must be a boolean, object, or undefined

@danez
Copy link
Member

danez commented Feb 25, 2018

Thanks

@danez danez merged commit 23b3b97 into babel:master Feb 25, 2018
@danez danez mentioned this pull request Feb 25, 2018
@Delagen
Copy link
Contributor Author

Delagen commented Feb 25, 2018

@danez
Copy link
Member

danez commented Feb 25, 2018

Yeah i noticed that, not sure why it cannot be null. @loganfsmyth

This fix fix should work for now.

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.

2 participants