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 Node regression #7545

Merged
merged 1 commit into from
Feb 5, 2019
Merged

Fix Node regression #7545

merged 1 commit into from
Feb 5, 2019

Conversation

mramato
Copy link
Contributor

@mramato mramato commented Feb 5, 2019

I introduced a bug in #7514 where Resource was broken from inside of Node.js because the built version of cesium was using a different globally defined require than Node's require. One of these days we'll have full Node testing, but this is one of the fuzzy parts of the API that we don't normally ever use via Node.

To test this, first run minifyRelease then run NODE_ENV=production node and paste the below code into the interpreter:

const Cesium = require('./index.js');
Cesium.IonResource.fromAssetId(1);

You should see { then: [Function: e] } as output. Previously it would crash with a No url error and callstack.

Resource was broken from inside of Node.js because the built version of
cesium was using a different globally defined require than Node's require.
@cesium-concierge
Copy link

Thanks for the pull request @mramato!

  • ✔️ Signed CLA found.
  • ❔ Unit tests were not updated.
    • Make sure you've updated tests to reflect your changes, added tests for any new code, and ran the code coverage tool.

Reviewers, don't forget to make sure that:

  • Cesium Viewer works.
  • Works in 2D/CV.
  • Works (or fails gracefully) in IE11.

@hpinkos
Copy link
Contributor

hpinkos commented Feb 5, 2019

Thanks @mramato

@hpinkos hpinkos merged commit 998cf0a into master Feb 5, 2019
@hpinkos hpinkos deleted the fix-node-resource branch February 5, 2019 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants