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 issue/61: split('/n') does not work on Windows #89

Merged
merged 3 commits into from
May 30, 2017

Conversation

dnalborczyk
Copy link
Contributor

@dnalborczyk dnalborczyk commented May 29, 2017

this should fix #61

@apollo-cla
Copy link

@dnalborczyk: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Meteor Contributor Agreement here: https://contribute.meteor.com/

src/index.js Outdated
@@ -1,3 +1,4 @@
const os = require('os');
Copy link
Contributor

Choose a reason for hiding this comment

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

@dnalborczyk will this work in the browser environment? Does webpack polyfill this when prepublish is run?

Copy link
Contributor Author

@dnalborczyk dnalborczyk May 29, 2017

Choose a reason for hiding this comment

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

the 'os' module does work in webpack. it's using: https://github.com/webpack/node-libs-browser, which in turn uses: https://github.com/CoderPuppy/os-browserify. that being said, I'm not so sure anymore if that is the right approach for src/index.js, since the new line escape sequence is always '\n', no matter which browser. though if src/index.js is only meant to run from within webpack, it might as well be fine. I can also revert the PR for src/index.js if it's more suitable ...

@jnwng
Copy link
Contributor

jnwng commented May 29, 2017 via email

@dnalborczyk
Copy link
Contributor Author

dnalborczyk commented May 29, 2017

I reverted the changes, though I thought src/index.js is running in the browser exclusively?

@jnwng
Copy link
Contributor

jnwng commented May 30, 2017

src/index will get compiled and dist/index will get sent to clients to parse GraphQL documents at runtime. the only time that this gets called on the server at compile-time is when used with the webpack loader (which is loader.js)

thank you @dnalborczyk!

@jnwng jnwng merged commit 70e77d9 into apollographql:master May 30, 2017
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.

split('/n') does not work on Windows
3 participants