From be6ff7a7f9e238b23dcdb8b0559141490c6dd513 Mon Sep 17 00:00:00 2001 From: Elastic Jasper Date: Sat, 10 Sep 2016 09:04:38 -0400 Subject: [PATCH] Backport PR #8209 --------- **Commit 1:** [optimizer] move to querystring-browser package for up-to-date api Webpack automatically injects libraries to support many node.js APIs in the browser using the https://github.com/webpack/node-libs-browser package. This package uses https://github.com/mike-spainhower/querystring for the querystring module, but that module hasn't been updated in 4 years and doesn't support the modern querystring api. This change points to the https://github.com/mathiasvr/querystring package instead, which is up to date (specifically it supports the `encodeURIComponent` option of [`querystring.stringify`](https://nodejs.org/api/querystring.html#querystring_querystring_stringify_obj_sep_eq_options). * Original sha: 1030689f4a0bc1d96794d81602670a53688eea42 * Authored by spalger on 2016-09-09T21:10:50Z --- package.json | 13 +++++++------ src/ui/ui_bundler_env.js | 3 ++- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index cdf59dbb01681a..6799048d8f82d4 100644 --- a/package.json +++ b/package.json @@ -91,6 +91,7 @@ "babel-loader": "5.3.2", "babel-runtime": "5.8.38", "bluebird": "2.9.34", + "body-parser": "1.12.0", "boom": "2.8.0", "brace": "0.5.1", "bunyan": "1.7.1", @@ -109,6 +110,7 @@ "extract-text-webpack-plugin": "0.8.2", "file-loader": "0.8.4", "font-awesome": "4.4.0", + "glob": "5.0.13", "glob-all": "3.0.1", "good-squeeze": "2.1.0", "gridster": "0.5.6", @@ -133,8 +135,11 @@ "mkdirp": "0.5.1", "moment": "2.13.0", "moment-timezone": "0.5.4", + "node-fetch": "1.3.2", "node-uuid": "1.4.7", "papaparse": "4.1.2", + "pegjs": "0.9.0", + "querystring-browser": "1.0.4", "raw-loader": "0.5.1", "request": "2.61.0", "rimraf": "2.4.3", @@ -144,6 +149,7 @@ "semver": "5.1.0", "style-loader": "0.12.3", "tar": "2.2.0", + "tinygradient": "0.3.0", "trunc-html": "1.0.2", "trunc-text": "1.0.2", "url-loader": "0.5.6", @@ -151,12 +157,7 @@ "webpack": "1.12.15", "webpack-directory-name-as-main": "1.0.0", "whatwg-fetch": "0.9.0", - "wreck": "6.2.0", - "body-parser": "1.12.0", - "glob": "5.0.13", - "node-fetch": "1.3.2", - "pegjs": "0.9.0", - "tinygradient": "0.3.0" + "wreck": "6.2.0" }, "devDependencies": { "@elastic/eslint-config-kibana": "0.0.3", diff --git a/src/ui/ui_bundler_env.js b/src/ui/ui_bundler_env.js index 9b2c52c55d4460..7aa49cd54694a1 100644 --- a/src/ui/ui_bundler_env.js +++ b/src/ui/ui_bundler_env.js @@ -46,7 +46,8 @@ module.exports = class UiBundlerEnv { // webpack aliases, like require paths, mapping a prefix to a directory this.aliases = { ui: fromRoot('src/ui/public'), - test_harness: fromRoot('src/test_harness/public') + test_harness: fromRoot('src/test_harness/public'), + querystring: 'querystring-browser', }; // map of which plugins created which aliases