Commit 68963c86 authored by Alfredo Sumaran's avatar Alfredo Sumaran

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

Upgrade from Babel 5 to Babel 6

See merge request !9072
parents 83b21c24 0a36693c
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
class FilteredSearchDropdown { class FilteredSearchDropdown {
constructor(droplab, dropdown, input, filter) { constructor(droplab, dropdown, input, filter) {
this.droplab = droplab; this.droplab = droplab;
this.hookId = input.getAttribute('data-id'); this.hookId = input && input.getAttribute('data-id');
this.input = input; this.input = input;
this.filter = filter; this.filter = filter;
this.dropdown = dropdown; this.dropdown = dropdown;
......
---
title: upgrade babel 5.8.x to babel 6.22.x
merge_request: 9072
author:
...@@ -302,3 +302,9 @@ ...@@ -302,3 +302,9 @@
:why: https://github.com/dchest/tweetnacl-js/blob/master/LICENSE :why: https://github.com/dchest/tweetnacl-js/blob/master/LICENSE
:versions: [] :versions: []
:when: 2017-01-14 20:10:57.812077000 Z :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 = { ...@@ -54,14 +54,12 @@ var config = {
exclude: /(node_modules|vendor\/assets)/, exclude: /(node_modules|vendor\/assets)/,
loader: 'babel-loader', loader: 'babel-loader',
query: { query: {
// 'use strict' was broken in sprockets-es6 due to sprockets concatination method. presets: ['es2015', 'stage-2']
// 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']
} }
}, },
{ {
test: /\.(js|es6)$/, test: /\.(js|es6)$/,
exclude: /node_modules/,
loader: 'imports-loader', loader: 'imports-loader',
query: 'this=>window' query: 'this=>window'
}, },
......
...@@ -11,9 +11,10 @@ ...@@ -11,9 +11,10 @@
"webpack-prod": "NODE_ENV=production npm run webpack" "webpack-prod": "NODE_ENV=production npm run webpack"
}, },
"dependencies": { "dependencies": {
"babel": "^5.8.38", "babel-core": "^6.22.1",
"babel-core": "^5.8.38", "babel-loader": "^6.2.10",
"babel-loader": "^5.4.2", "babel-preset-es2015": "^6.22.0",
"babel-preset-stage-2": "^6.22.0",
"bootstrap-sass": "3.3.6", "bootstrap-sass": "3.3.6",
"compression-webpack-plugin": "^0.3.2", "compression-webpack-plugin": "^0.3.2",
"d3": "3.5.11", "d3": "3.5.11",
......
...@@ -9,7 +9,7 @@ require('~/filtered_search/dropdown_user'); ...@@ -9,7 +9,7 @@ require('~/filtered_search/dropdown_user');
let dropdownUser; let dropdownUser;
beforeEach(() => { beforeEach(() => {
spyOn(gl.FilteredSearchDropdown.prototype, 'constructor').and.callFake(() => {}); spyOn(gl.DropdownUser.prototype, 'bindEvents').and.callFake(() => {});
spyOn(gl.DropdownUser.prototype, 'getProjectId').and.callFake(() => {}); spyOn(gl.DropdownUser.prototype, 'getProjectId').and.callFake(() => {});
spyOn(gl.DropdownUtils, 'getSearchInput').and.callFake(() => {}); spyOn(gl.DropdownUtils, 'getSearchInput').and.callFake(() => {});
...@@ -39,7 +39,7 @@ require('~/filtered_search/dropdown_user'); ...@@ -39,7 +39,7 @@ require('~/filtered_search/dropdown_user');
describe('config droplabAjaxFilter\'s endpoint', () => { describe('config droplabAjaxFilter\'s endpoint', () => {
beforeEach(() => { beforeEach(() => {
spyOn(gl.FilteredSearchDropdown.prototype, 'constructor').and.callFake(() => {}); spyOn(gl.DropdownUser.prototype, 'bindEvents').and.callFake(() => {});
spyOn(gl.DropdownUser.prototype, 'getProjectId').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