Skip to content

Commit

Permalink
Merge pull request #1069 from mjschock/STENCIL-3672
Browse files Browse the repository at this point in the history
STENCIL-3672 - Upgrade dependencies
  • Loading branch information
mjschock authored Oct 9, 2017
2 parents c758e6d + 9f4433a commit cf348aa
Show file tree
Hide file tree
Showing 19 changed files with 87 additions and 74 deletions.
15 changes: 14 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,23 @@
2,
4
],
"complexity": 1,
"no-alert": 0,
"consistent-return": 0,
"max-len": 0,
"import/first": 0,
"no-mixed-operators": 0,
"class-methods-use-this": 0,
"no-template-curly-in-string": 0,
"no-underscore-dangle": 0,
"prefer-spread": 0,
"no-plusplus": 0,
"no-restricted-syntax": 0,
"no-prototype-builtins": 0,
"no-useless-escape": 0,
"global-require": 0,
"newline-per-chained-call": 0,
"arrow-parens": 0,
"prefer-destructuring": 0
},
"env": {
"es6": true,
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
- Update product UPC when options with different UPC are selected [#1089](https://github.com/bigcommerce/cornerstone/pull/1089)
- Do not scale product thumbnail images [#1094](https://github.com/bigcommerce/cornerstone/pull/1094)
- Lazy load carousel images [#1090](https://github.com/bigcommerce/cornerstone/pull/1090)
- Theme Editor menu item updates for ease of use [#1091] (https://github.com/bigcommerce/cornerstone/pull/1091)
- Theme Editor menu item updates for ease of use [#1091](https://github.com/bigcommerce/cornerstone/pull/1091)
- Upgrades all dependencies except for Foundation and jQuery [#1069](https://github.com/bigcommerce/cornerstone/pull/1069)

## 1.9.3 (2017-09-19)
- Fixes image overlapping details on product page and Quick View on small viewports [#1067](https://github.com/bigcommerce/cornerstone/pull/1067)
Expand Down
2 changes: 1 addition & 1 deletion assets/js/test-unit/theme/common/faceted-search.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ describe('FacetedSearch', () => {
expect(facetedSearch.getMoreFacetResults).toHaveBeenCalledWith($navList);
});

it('should collapse facet items if they are expaned', function() {
it('should collapse facet items if they are expanded', function() {
facetedSearch.collapsedFacetItems = [];
facetedSearch.toggleFacetItems($navList);

Expand Down
8 changes: 4 additions & 4 deletions assets/js/theme/account.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ export default class Account extends PageManager {

if ($invoiceButton.length) {
$invoiceButton.on('click', () => {
const left = screen.availWidth / 2 - 450;
const top = screen.availHeight / 2 - 320;
const left = window.screen.availWidth / 2 - 450;
const top = window.screen.availHeight / 2 - 320;
const url = $invoiceButton.data('print-invoice');

window.open(url, 'orderInvoice', `width=900,height=650,left=${left},top=${top},scrollbars=1`);
Expand Down Expand Up @@ -78,7 +78,7 @@ export default class Account extends PageManager {
$('[data-delete-address]').on('submit', (event) => {
const message = $(event.currentTarget).data('delete-address');

if (!confirm(message)) {
if (!window.confirm(message)) {
event.preventDefault();
}
});
Expand Down Expand Up @@ -223,7 +223,7 @@ export default class Account extends PageManager {
passwordSelector,
password2Selector,
this.passwordRequirements,
true
true,
);
}

Expand Down
4 changes: 2 additions & 2 deletions assets/js/theme/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export default class Auth extends PageManager {
newPasswordValidator,
passwordSelector,
password2Selector,
this.passwordRequirements
this.passwordRequirements,
);
}

Expand Down Expand Up @@ -150,7 +150,7 @@ export default class Auth extends PageManager {
createAccountValidator,
passwordSelector,
password2Selector,
this.passwordRequirements
this.passwordRequirements,
);
}

Expand Down
4 changes: 2 additions & 2 deletions assets/js/theme/cart/shipping-estimator.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export default class ShippingEstimator {
selector: `${this.shippingEstimator} select[name="shipping-country"]`,
validate: (cb, val) => {
const countryId = Number(val);
const result = countryId !== 0 && !isNaN(countryId);
const result = countryId !== 0 && !Number.isNaN(countryId);

cb(result);
},
Expand Down Expand Up @@ -158,7 +158,7 @@ export default class ShippingEstimator {
clickEvent.preventDefault();

utils.api.cart.submitShippingQuote(quoteId, () => {
location.reload();
window.location.reload();
});
});
});
Expand Down
2 changes: 1 addition & 1 deletion assets/js/theme/catalog.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Url from 'url';

export default class CatalogPage extends PageManager {
onSortBySubmit(event) {
const url = Url.parse(location.href, true);
const url = Url.parse(window.location.href, true);
const queryParams = $(event.currentTarget).serialize().split('=');

url.query[queryParams[0]] = queryParams[1];
Expand Down
8 changes: 3 additions & 5 deletions assets/js/theme/common/collapsible.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,11 +228,9 @@ export default function collapsibleFactory(selector = `[data-${PLUGIN_KEY}]`, ov
return cachedCollapsible;
}

const targetId = prependHash(
$toggle.data(PLUGIN_KEY) ||
$toggle.data(`${PLUGIN_KEY}-target`) ||
$toggle.attr('href')
);
const targetId = prependHash($toggle.data(PLUGIN_KEY) ||
$toggle.data(`${PLUGIN_KEY}-target`) ||
$toggle.attr('href'));
const options = _.extend(optionsFromData($toggle), overrideOptions);
const collapsible = new Collapsible($toggle, $(targetId), options);

Expand Down
6 changes: 3 additions & 3 deletions assets/js/theme/common/faceted-search.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ class FacetedSearch {
const id = $navList.attr('id');

// Toggle depending on `collapsed` flag
if (_.contains(this.collapsedFacetItems, id)) {
if (_.includes(this.collapsedFacetItems, id)) {
this.getMoreFacetResults($navList);

return true;
Expand Down Expand Up @@ -363,7 +363,7 @@ class FacetedSearch {
}

onSortBySubmit(event) {
const url = Url.parse(location.href, true);
const url = Url.parse(window.location.href, true);
const queryParams = $(event.currentTarget).serialize().split('=');

url.query[queryParams[0]] = queryParams[1];
Expand All @@ -381,7 +381,7 @@ class FacetedSearch {
return;
}

const url = Url.parse(location.href);
const url = Url.parse(window.location.href);
const queryParams = decodeURI($(event.currentTarget).serialize());

urlUtils.goToUrl(Url.format({ pathname: url.pathname, search: `?${queryParams}` }));
Expand Down
4 changes: 2 additions & 2 deletions assets/js/theme/common/product-details.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,12 @@ export default class ProductDetails {
if (_.isPlainObject(image)) {
const zoomImageUrl = utils.tools.image.getSrc(
image.data,
this.context.themeSettings.zoom_size
this.context.themeSettings.zoom_size,
);

const mainImageUrl = utils.tools.image.getSrc(
image.data,
this.context.themeSettings.product_size
this.context.themeSettings.product_size,
);

this.imageGallery.setAlternateImage({
Expand Down
1 change: 0 additions & 1 deletion assets/js/theme/compare.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import $ from 'jquery';
import swal from 'sweetalert2';

export default class Compare extends PageManager {

loaded() {
const message = this.context.compareRemoveMessage;

Expand Down
2 changes: 1 addition & 1 deletion assets/js/theme/gift-certificate.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export default class GiftCertificate extends PageManager {
validate: (cb) => {
const val = $purchaseForm.find('input[name="certificate_theme"]:checked').val();

cb(typeof(val) === 'string');
cb(typeof (val) === 'string');
},
errorMessage: this.context.certTheme,
},
Expand Down
2 changes: 1 addition & 1 deletion assets/js/theme/global/compare-products.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default function (urlContext) {
const $compareLink = $('a[data-compare-nav]');

if ($checked.length !== 0) {
products = _.map($checked, (element) => element.value);
products = _.map($checked, element => element.value);

updateCounterNav(products, $compareLink, urlContext);
}
Expand Down
2 changes: 1 addition & 1 deletion assets/js/theme/product.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { classifyForm } from './common/form-utils';
export default class Product extends PageManager {
constructor(context) {
super(context);
this.url = location.href;
this.url = window.location.href;
this.$reviewLink = $('[data-reveal-id="modal-review-form"]');
}

Expand Down
2 changes: 0 additions & 2 deletions assets/js/theme/product/image-gallery.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import 'jquery-zoom';
import _ from 'lodash';

export default class ImageGallery {

constructor($gallery) {
this.$mainImage = $gallery.find('[data-image-gallery-main]');
this.$selectableImages = $gallery.find('[data-image-gallery-item]');
Expand Down Expand Up @@ -81,5 +80,4 @@ export default class ImageGallery {
bindEvents() {
this.$selectableImages.on('click', this.selectNewImage.bind(this));
}

}
6 changes: 3 additions & 3 deletions assets/js/theme/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default class Search extends CatalogPage {
}

showProducts() {
const url = urlUtils.replaceParams(location.href, {
const url = urlUtils.replaceParams(window.location.href, {
section: 'product',
});

Expand All @@ -46,7 +46,7 @@ export default class Search extends CatalogPage {
}

showContent() {
const url = urlUtils.replaceParams(location.href, {
const url = urlUtils.replaceParams(window.location.href, {
section: 'content',
});

Expand All @@ -60,7 +60,7 @@ export default class Search extends CatalogPage {
loaded() {
const $searchForm = $('[data-advanced-search-form]');
const $categoryTreeContainer = $searchForm.find('[data-search-category-tree]');
const url = Url.parse(location.href, true);
const url = Url.parse(window.location.href, true);
const treeData = [];
this.$productListingContainer = $('#product-listing-container');
this.$facetedSearchContainer = $('#faceted-search-container');
Expand Down
2 changes: 1 addition & 1 deletion assets/js/theme/wishlist.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default class WishList extends PageManager {
*/
wishlistDeleteConfirm() {
$('body').on('click', '[data-wishlist-delete]', (event) => {
const confirmed = confirm(this.context.wishlistDelete);
const confirmed = window.confirm(this.context.wishlistDelete);

if (confirmed) {
return true;
Expand Down
86 changes: 45 additions & 41 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,58 +5,62 @@
"private": true,
"author": "BigCommerce",
"license": "MIT",
"dependencies": {
"@bigcommerce/stencil-utils": "^1.0.7",
"async": "^2.5.0",
"babel-polyfill": "^6.26.0",
"fastclick": "^1.0.6",
"foundation-sites": "^5.5.3",
"html5-history-api": "^4.2.7",
"jquery": "^2.2.4",
"jquery-zoom": "^1.7.15",
"jstree": "vakata/jstree",
"lazysizes": "3.0.0",
"lodash": "^4.17.4",
"nod-validate": "^2.0.12",
"pace": "hubspot/pace#a03f1f1de62c9cea6c88b2267b8d7a83858b6cb6",
"slick-carousel": "^1.8.1",
"sweetalert2": "^6.10.1"
},
"devDependencies": {
"@bigcommerce/citadel": "^2.15.1",
"@bigcommerce/stencil-utils": "1.0.5",
"async": "^1.5.2",
"babel-core": "^6.23.1",
"babel-eslint": "^7.1.1",
"babel-loader": "^6.3.2",
"babel-core": "^6.26.0",
"babel-eslint": "^8.0.1",
"babel-loader": "^7.1.2",
"babel-plugin-dynamic-import-webpack": "^1.0.1",
"babel-plugin-lodash": "^3.2.11",
"babel-plugin-syntax-dynamic-import": "^6.18.0",
"babel-plugin-transform-regenerator": "^6.22.0",
"babel-plugin-transform-regenerator": "^6.26.0",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-polyfill": "^6.23.0",
"babel-preset-env": "^1.2.2",
"babel-preset-es2015": "^6.24.0",
"babel-preset-es2017": "^6.22.0",
"clean-webpack-plugin": "^0.1.16",
"core-js": "^2.4.1",
"clean-webpack-plugin": "^0.1.17",
"core-js": "^2.5.0",
"es6-shim": "^0.35.3",
"eslint-config-airbnb": "^6.0.2",
"fastclick": "^1.0.6",
"foundation-sites": "^5.5.3",
"grunt": "^0.4.5",
"grunt-eslint": "^18.0.0",
"grunt-karma": "^0.12.2",
"grunt-scss-lint": "^0.3.8",
"grunt-svgstore": "^0.5.0",
"html5-history-api": "^4.2.7",
"eslint": "^4.8.0",
"eslint-config-airbnb": "^16.0.0",
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-jsx-a11y": "^6.0.2",
"eslint-plugin-react": "^7.4.0",
"grunt": "^1.0.1",
"grunt-eslint": "^20.0.0",
"grunt-karma": "^2.0.0",
"grunt-scss-lint": "^0.5.0",
"grunt-svgstore": "^1.0.0",
"jasmine-core": "^2.2.0",
"jquery": "^2.2.1",
"jquery-zoom": "^1.7.15",
"jstree": "vakata/jstree",
"karma": "^0.13.22",
"karma-babel-preprocessor": "6.0.1",
"karma-coverage": "0.2.7",
"karma-es6-shim": "0.2.3",
"karma-jasmine": "0.3.7",
"karma-phantomjs-launcher": "1.0.0",
"karma": "^1.7.0",
"karma-babel-preprocessor": "^7.0.0",
"karma-coverage": "^1.1.1",
"karma-es6-shim": "^1.0.0",
"karma-jasmine": "^1.1.0",
"karma-phantomjs-launcher": "^1.0.4",
"karma-sourcemap-loader": "0.3.7",
"karma-verbose-reporter": "0.0.2",
"karma-webpack": "^2.0.2",
"lazysizes": "3.0.0",
"load-grunt-config": "0.17.1",
"lodash": "^3.5.0",
"karma-verbose-reporter": "0.0.6",
"karma-webpack": "^2.0.4",
"load-grunt-config": "^0.19.2",
"lodash-webpack-plugin": "^0.11.2",
"nod-validate": "^2.0.12",
"pace": "hubspot/pace#a03f1f1de62c9cea6c88b2267b8d7a83858b6cb6",
"regenerator-runtime": "^0.10.3",
"slick-carousel": "1.5.5",
"sweetalert2": "^6.6.5",
"regenerator-runtime": "^0.11.0",
"time-grunt": "^1.2.2",
"uglify-js": "^2.8.14",
"webpack": "^2.2.1"
"uglify-js": "^3.0.28",
"webpack": "^3.6.0"
}
}
2 changes: 1 addition & 1 deletion templates/components/common/icons/icon-defs.html

Large diffs are not rendered by default.

0 comments on commit cf348aa

Please sign in to comment.