BigW Consortium Gitlab

Commit 42cce7d1 by Alfredo Sumaran Committed by Regis

Merge branch 'upgrade-babel-v6' into 'master'

Upgrade from Babel 5 to Babel 6 See merge request !9072
parent 8f4ad1da
......@@ -4,7 +4,7 @@
class FilteredSearchDropdown {
constructor(droplab, dropdown, input, filter) {
this.droplab = droplab;
this.hookId = input.getAttribute('data-id');
this.hookId = input && input.getAttribute('data-id');
this.input = input;
this.filter = filter;
this.dropdown = dropdown;
......
---
title: upgrade babel 5.8.x to babel 6.22.x
merge_request: 9072
author:
......@@ -302,3 +302,9 @@
:why: https://github.com/dchest/tweetnacl-js/blob/master/LICENSE
:versions: []
:when: 2017-01-14 20:10:57.812077000 Z
- - :approve
- wordwrap
- :who: Mike Greiling
:why: https://github.com/substack/node-wordwrap/blob/0.0.3/LICENSE
:versions: []
:when: 2017-02-08 20:17:13.084968000 Z
......@@ -54,14 +54,12 @@ var config = {
exclude: /(node_modules|vendor\/assets)/,
loader: 'babel-loader',
query: {
// 'use strict' was broken in sprockets-es6 due to sprockets concatination method.
// many es5 strict errors which were never caught ended up in our es6 assets as a result.
// this hack is necessary until they can be fixed.
blacklist: ['useStrict']
presets: ['es2015', 'stage-2']
}
},
{
test: /\.(js|es6)$/,
exclude: /node_modules/,
loader: 'imports-loader',
query: 'this=>window'
},
......
......@@ -11,9 +11,10 @@
"webpack-prod": "NODE_ENV=production npm run webpack"
},
"dependencies": {
"babel": "^5.8.38",
"babel-core": "^5.8.38",
"babel-loader": "^5.4.2",
"babel-core": "^6.22.1",
"babel-loader": "^6.2.10",
"babel-preset-es2015": "^6.22.0",
"babel-preset-stage-2": "^6.22.0",
"bootstrap-sass": "3.3.6",
"compression-webpack-plugin": "^0.3.2",
"d3": "3.5.11",
......
......@@ -9,7 +9,7 @@ require('~/filtered_search/dropdown_user');
let dropdownUser;
beforeEach(() => {
spyOn(gl.FilteredSearchDropdown.prototype, 'constructor').and.callFake(() => {});
spyOn(gl.DropdownUser.prototype, 'bindEvents').and.callFake(() => {});
spyOn(gl.DropdownUser.prototype, 'getProjectId').and.callFake(() => {});
spyOn(gl.DropdownUtils, 'getSearchInput').and.callFake(() => {});
......@@ -39,7 +39,7 @@ require('~/filtered_search/dropdown_user');
describe('config droplabAjaxFilter\'s endpoint', () => {
beforeEach(() => {
spyOn(gl.FilteredSearchDropdown.prototype, 'constructor').and.callFake(() => {});
spyOn(gl.DropdownUser.prototype, 'bindEvents').and.callFake(() => {});
spyOn(gl.DropdownUser.prototype, 'getProjectId').and.callFake(() => {});
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment