-
Notifications
You must be signed in to change notification settings - Fork 83
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
refactor: Convert entry points to es module and create minified bundles #445
Merged
+997
−1,322
Merged
Changes from 13 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
0ac6a76
Cleaned up other PR by fayyaz
zashraf1985 b89eed7
finalized the code
fayyazarshad 5e07a49
added buble-loader to transpile es6 code for karma
zashraf1985 f3613ec
did some cleanup
zashraf1985 cb49cc5
cleaned up index.browser.js
zashraf1985 4f520cc
cleaned up node entry
zashraf1985 c6b3b62
cleaned up react native entry
zashraf1985 5cea14d
cleaned up test files
zashraf1985 32972e1
Merge branch 'master' into zeeshan/esmodule-conversion-entrypoints
zashraf1985 a6ffcbc
cleaned up rollup and package json
zashraf1985 03d5fee
incorporated review feedback
zashraf1985 ba997a1
Merge branch 'master' into zeeshan/esmodule-conversion-entrypoints
zashraf1985 69c2c7e
removed unused dependencies
zashraf1985 363814c
Added karma-chrome-launcher again to enable local testing
zashraf1985 7db4f75
removed hardcoded testapp branch from travis
zashraf1985 b51fe4c
changed es6 property shorthand to its full form to support es5
zashraf1985 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,8 +70,8 @@ jobs: | |
before_script: | ||
- mkdir $HOME/travisci-tools && pushd $HOME/travisci-tools && git init && git pull https://[email protected]/optimizely/travisci-tools.git && popd | ||
script: | ||
- CLIENT=node $HOME/travisci-tools/trigger-script-with-status-update.sh | ||
- CLIENT=browser $HOME/travisci-tools/trigger-script-with-status-update.sh | ||
- CLIENT=node TESTAPP_BRANCH=fayyaz/added-support-for-es6 $HOME/travisci-tools/trigger-script-with-status-update.sh | ||
- CLIENT=browser TESTAPP_BRANCH=fayyaz/added-support-for-es6 $HOME/travisci-tools/trigger-script-with-status-update.sh | ||
after_success: travis_terminate 0 | ||
- <<: *integrationtest | ||
stage: 'Benchmarking tests' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/** | ||
* Copyright 2016-2019, Optimizely | ||
* Copyright 2016-2020 Optimizely | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
|
@@ -13,19 +13,17 @@ | |
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
var logging = require('@optimizely/js-sdk-logging'); | ||
var configValidator = require('./utils/config_validator'); | ||
var eventProcessor = require('@optimizely/js-sdk-event-processor'); | ||
var Optimizely = require('./optimizely'); | ||
var optimizelyFactory = require('./index.browser'); | ||
var packageJSON = require('../package.json'); | ||
var testData = require('./tests/test_data'); | ||
var eventProcessor = require('@optimizely/js-sdk-event-processor'); | ||
var eventProcessorConfigValidator = require('./utils/event_processor_config_validator'); | ||
|
||
var chai = require('chai'); | ||
var assert = chai.assert; | ||
var sinon = require('sinon'); | ||
import { assert } from 'chai'; | ||
import sinon from 'sinon'; | ||
import * as logging from '@optimizely/js-sdk-logging'; | ||
import * as eventProcessor from '@optimizely/js-sdk-event-processor'; | ||
|
||
import Optimizely from './optimizely'; | ||
import testData from './tests/test_data'; | ||
import packageJSON from '../package.json'; | ||
import optimizelyFactory from './index.browser'; | ||
import configValidator from './utils/config_validator'; | ||
import eventProcessorConfigValidator from './utils/event_processor_config_validator'; | ||
|
||
var LocalStoragePendingEventsDispatcher = eventProcessor.LocalStoragePendingEventsDispatcher; | ||
|
||
|
@@ -57,7 +55,6 @@ describe('javascript-sdk', function() { | |
sinon.stub(configValidator, 'validate'); | ||
|
||
xhr = sinon.useFakeXMLHttpRequest(); | ||
global.XMLHttpRequest = xhr; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this line not necessary? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It looked redundant and removing it did not affect any tests. |
||
requests = []; | ||
xhr.onCreate = function(req) { | ||
requests.push(req); | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Oops, I missed this. @zashraf1985 don't use the property shorthand here. This is not ES5-compatible. Needs to be
enums: enums
.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.
This is Done