-
Notifications
You must be signed in to change notification settings - Fork 83
Add global export variable #18
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
Conversation
Replace bluebird dependency with smaller es6-promise library.
Update contribution doc to use CLA
Bump version to 1.0.0
Summary: This is needed for us to set up in Bower and have the SDK pulled in as a snippet. Test Plan: Unit and manual Reviewers: #oasis_team_review Differential Revision: https://phabricator.optimizely.com/D13788
Add global variable export for use in non CommonJS environments
Fix branch conflicts
"main": "index.js", | ||
"scripts": { | ||
"test": "./node_modules/.bin/mocha ./tests.js", | ||
"build": "webpack index.js dist/optimizely.min.js", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest changing this to: "build": "webpack $npm_package_main dist/optimizely.min.js",
so as to reduce the duplicate knowledge of the entrypoint. This way main
is the canonical location for defining the entrypoint and the build script doesn't need tweaked if the entrypoint is moved.
Seems that with the removal of the json-loader from the webpack config, it can be removed as a devDep, as well. |
Thanks for the suggestions @jasonkarns . Will address those in a PR into the devel branch as it would just delay this PR. |
Summary: Before this change, we were passing the host property returned from url.parse as the host option going into http.request (or https.request). The host property from url.parse includes the port when the URL contains a port. The problem is, request needs port to be passed as a separate option (not included as part of the host option). To fix, stop passing host, and replace it with hostname: url.hostname (where url.hostname excludes port), and port: url.port. References: https://nodejs.org/api/http.html#http_http_request_url_options_callback https://nodejs.org/api/url.html#url_urlobject_host https://nodejs.org/api/url.html#url_urlobject_hostname https://nodejs.org/api/url.html#url_urlobject_port Test plan: Added a regression test. Manually tested in @mikeng13's prototype datafile management branches for JS-testapp and compatibility suite.
@optimizely/fullstack-devs
Fixes #14