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

Removing babel-polyfill #268

Merged
merged 8 commits into from
Mar 11, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions dev/start.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,14 @@ function serv() {
const message = debounce(stats => {

const statistics = stats.toString({
assets: false,
colors: true,
cached: true,
reasons: false,
source: false,
version: false,
hash: false,
timings: false,
chunks: false,
children: false
chunkModules: false,
errorDetails: true
});

const uri = `http://localhost:${PORT}/`;
Expand Down
10 changes: 2 additions & 8 deletions karma.conf-coverage.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,11 @@ const wpConfig = merge(webpackConfig, {
loaders: [
{
test: /\.js$/,
loader: 'babel-istanbul-loader',
use: 'babel-istanbul-loader',
exclude: /(bower_components|node_modules)/
}
]
},

debug: false,
cache: false,
watch: false

}
});

module.exports = function(config) {
Expand Down Expand Up @@ -124,4 +119,3 @@ module.exports = function(config) {

});
};

7 changes: 1 addition & 6 deletions karma.conf-debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@ const wpConfig = merge(webpackConfig, {
}
},

devtool: 'inline-source-map',

debug: true,
cache: false,
watch: true
devtool: 'inline-source-map'

});

Expand Down Expand Up @@ -115,4 +111,3 @@ module.exports = function(config) {

});
};

8 changes: 2 additions & 6 deletions karma.conf-sauce-labs.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,13 @@ const wpConfig = merge(webpackConfig, {
loaders: [
{
test: /\.js$/,
loader: 'babel-istanbul-loader',
use: 'babel-istanbul-loader',
exclude: /(bower_components|node_modules)/
}
]
},

devtool: 'inline-source-map',

debug: false,
cache: false,
watch: false
devtool: 'inline-source-map'

});

Expand Down
7 changes: 1 addition & 6 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@ const wpConfig = merge(webpackConfig, {
}
},

devtool: 'inline-source-map',

debug: false,
cache: false,
watch: false
devtool: 'inline-source-map'

});

Expand Down Expand Up @@ -114,4 +110,3 @@ module.exports = function(config) {

});
};

41 changes: 21 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,21 +61,22 @@
"license": "MIT",
"devDependencies": {
"animate.css": "^3.5.2",
"autoprefixer": "^6.7.2",
"babel-cli": "^6.22.2",
"babel-core": "^6.22.1",
"autoprefixer": "^6.7.3",
"babel": "^6.23.0",
"babel-cli": "^6.23.0",
"babel-core": "^6.23.1",
"babel-eslint": "7.1.1",
"babel-istanbul-loader": "0.1.0",
"babel-loader": "^6.2.10",
"babel-plugin-transform-class-properties": "^6.22.0",
"babel-plugin-transform-object-assign": "^6.8.0",
"babel-preset-es2015": "^6.22.0",
"babel-loader": "^6.3.1",
"babel-plugin-transform-object-assign": "^6.22.0",
"babel-preset-latest": "^6.22.0",
"babel-preset-stage-0": "^6.5.0",
"babel-register": "^6.22.0",
"babel-register": "^6.23.0",
"babel-runtime": "^6.22.0",
"chalk": "^1.1.1",
"cheerio": "0.22.0",
"chokidar": "1.6.1",
"copyfiles": "^1.0.0",
"copyfiles": "^1.2.0",
"cross-env": "^3.1.4",
"css-loader": "0.26.1",
"dateformat": "2.0.0",
Expand All @@ -84,8 +85,9 @@
"del": "2.2.2",
"eslint": "^3.15.0",
"eslint-config-availity": "^2.0.2",
"exports-loader": "^0.6.4",
"expose-loader": "^0.7.3",
"extract-text-webpack-plugin": "1.0.1",
"extract-text-webpack-plugin": "^2.1.0",
"file-loader": "^0.10.0",
"gh-pages": "0.12.0",
"globby": "6.1.0",
Expand All @@ -96,17 +98,17 @@
"isparta-loader": "^2.0.0",
"jasmine-core": "2.5.2",
"json-loader": "0.5.4",
"karma": "^1.4.1",
"karma-chrome-launcher": "2.0.0",
"karma-coverage": "1.1.1",
"karma": "^1.5.0",
"karma-chrome-launcher": "^2.0.0",
"karma-coverage": "^1.1.1",
"karma-fixture": "0.2.6",
"karma-jasmine": "^1.1.0",
"karma-notify-reporter": "1.0.1",
"karma-phantomjs-launcher": "1.0.2",
"karma-sauce-launcher": "1.1.0",
"karma-sinon": "1.0.5",
"karma-sourcemap-loader": "0.3.7",
"karma-spec-reporter": "0.0.26",
"karma-spec-reporter": "0.0.30",
"karma-webpack": "^2.0.2",
"karma-webpack-error-reporter": "0.0.3",
"less": "^2.7.2",
Expand Down Expand Up @@ -135,16 +137,17 @@
"ora": "^1.1.0",
"phantomjs-prebuilt": "^2.1.14",
"postcss-loader": "^1.2.2",
"require-relative": "^0.8.7",
"sass-loader": "^6.0.0",
"sinon": "^1.17.7",
"slugify": "^1.1.0",
"stat-mode": "0.2.2",
"style-loader": "0.13.1",
"syntax-highlighting": "github:atelierbram/syntax-highlighting",
"url-loader": "0.5.7",
"webpack": "1.13.3",
"webpack": "^2.2.1",
"webpack-bundle-analyzer": "^2.2.2",
"webpack-dev-server": "1.16.2",
"webpack-dev-server": "^2.3.0",
"webpack-merge": "^2.6.1",
"webpack-notifier": "^1.5.0",
"yargs": "^6.6.0"
Expand All @@ -161,14 +164,12 @@
"bootstrap": "^3.3.7",
"bootstrap-datepicker": "^1.6.4",
"jquery": "^3.0.0",
"lodash.assign": "^4.2.0",
"lodash.debounce": "^4.0.8",
"lodash.find": "^4.6.0",
"lodash.findindex": "^4.6.0",
"lodash.isempty": "^4.4.0",
"lodash.isregexp": "^4.0.1",
"lodash.isstring": "^4.0.1",
"lodash.isundefined": "^3.0.1",
"lodash.matches": "^4.6.0",
"lodash.merge": "^4.6.0",
"lodash.union": "^4.6.0",
"moment": "^2.0.0",
"select2": "^3.5.2-browserify",
Expand Down
3 changes: 1 addition & 2 deletions src/core/analytics/config-provider.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import angular from 'angular';
import ngModule from '../module';
import merge from 'lodash.merge';

const CONFIG = {
VIRTUAL_PAGE_TRACKING: true,
Expand All @@ -27,7 +26,7 @@ class AvAnalyticsConfigProvider {
}

set(options) {
merge(this.options, options);
angular.merge(this.options, options);
}

$get() {
Expand Down
8 changes: 5 additions & 3 deletions src/core/analytics/exceptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,12 @@ class AvExceptionAnalyticsProvider {
const length = stacktrace.stack.length;

for (let i = 0; i < length; i++) {
let iMessage = i.toString();
while (iMessage.length < 2) {
iMessage = '0' + iMessage;
}
message += [
`[${i.toString().padStart(2, '0')}] `,
`[${iMessage}] `,
stacktrace.stack[i].func,
' ',
stacktrace.stack[i].url,
Expand Down Expand Up @@ -167,5 +171,3 @@ ngModule.config( $provide => {
ngModule.run( avExceptionAnalytics => avExceptionAnalytics.init());

export default ngModule;


6 changes: 2 additions & 4 deletions src/core/api/organizations.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import merge from 'lodash.merge';

import angular from 'angular';
import ngModule from '../module';

const OrganizationResourceFactory = function(AvApiResource, avUsersResource) {
Expand All @@ -26,7 +25,7 @@ const OrganizationResourceFactory = function(AvApiResource, avUsersResource) {
};

// merge in params with user ID
const queryConfig = merge({}, params, config);
const queryConfig = angular.merge({}, params, config);

return this.query(queryConfig);
}
Expand All @@ -48,4 +47,3 @@ const OrganizationResourceFactory = function(AvApiResource, avUsersResource) {
ngModule.factory('avOrganizationsResource', OrganizationResourceFactory);

export default ngModule;

6 changes: 2 additions & 4 deletions src/core/api/providers.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import merge from 'lodash.merge';

import angular from 'angular';
import ngModule from '../module';

const ProvidersResourceFactory = function(AvApiResource) {
Expand All @@ -26,7 +25,7 @@ const ProvidersResourceFactory = function(AvApiResource) {
};

// merge in params with user ID
const queryConfig = merge({}, params, config);
const queryConfig = angular.merge({}, params, config);

return this.query(queryConfig);
}
Expand All @@ -39,4 +38,3 @@ const ProvidersResourceFactory = function(AvApiResource) {
ngModule.factory('avProvidersResource', ProvidersResourceFactory);

export default ngModule;

8 changes: 4 additions & 4 deletions src/core/authorizations/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import angular from 'angular';
import union from 'lodash.union';
import find from 'lodash.find';

import ngModule from '../module';
import '../api';
Expand Down Expand Up @@ -60,7 +61,7 @@ const AvUserAuthorizationsFactory = ($q, $log, avUserPermissionsResource) => {
}

return this.getPermissions([permissionId])
.then(permissions => permissions.find(permission => permission.id === permissionId));
.then(permissions => find(permissions, ['id', permissionId]));
}

getPermissions(permissionIds) {
Expand All @@ -86,8 +87,7 @@ const AvUserAuthorizationsFactory = ($q, $log, avUserPermissionsResource) => {
getPayers(permissionId, organizationId) {

return this.getPermission(permissionId).then(permission => {

const organization = permission.organizations.find(thisPermission => thisPermission.id === organizationId);
const organization = find(permission.organizations, ['id', organizationId]);

if (organization && organization.resources) {
return organization.resources;
Expand All @@ -106,7 +106,7 @@ const AvUserAuthorizationsFactory = ($q, $log, avUserPermissionsResource) => {
const result = permissionIds.map(permissionId => {

const key = {id: permissionId};
let permission = permissions.find(thisPermission => thisPermission.id === permissionId);
let permission = find(permissions, ['id', permissionId]);
permission = permission ? self.convert(permission) : self.convert(key);
return permission;

Expand Down
3 changes: 1 addition & 2 deletions src/core/messages/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import angular from 'angular';
import $ from 'jquery';
import debounce from 'lodash.debounce';
import isString from 'lodash.isstring';

import ngModule from '../module';
import './constants';
Expand Down Expand Up @@ -145,7 +144,7 @@ class AvMessageProvider {

try {

const message = isString(payload) ? payload : JSON.stringify(payload);
const message = angular.isString(payload) ? payload : JSON.stringify(payload);
this.postMessage(message, this.domain());

} catch (err) {
Expand Down
2 changes: 1 addition & 1 deletion src/core/validation/validators/npi.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ ngModule.factory('avValNpi', avValUtils => {
}

const firstDigit = npi.charAt(0);
if (!['1', '2', '3', '4'].includes(firstDigit)) {
if ('1234'.indexOf(firstDigit) < 0) {
return false;
}

Expand Down
1 change: 0 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'babel-polyfill';
import './core';
import './ui';

Expand Down
1 change: 0 additions & 1 deletion src/specs.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* eslint no-var: 0 */
require('babel-polyfill');
require('bootstrap');
require('availity-uikit');
require('angular');
Expand Down
Loading