From 19fcc93ad3a6b97fea30a8f837d5256675aaf3b8 Mon Sep 17 00:00:00 2001 From: Court Ewing Date: Thu, 1 Dec 2016 19:13:13 -0500 Subject: [PATCH] build: remove deepModules hackery The deepModules hacks in the build system were added to support the long paths that resulted from npm2, but npm3 fundamentally addresses that problem, so deepModules is no longer necessary. In practical terms, npm3 shouldn't ever cause path lengths to become so long that they trigger path length problems on certain operating systems. --- Gruntfile.js | 18 +----------------- tasks/build/index.js | 2 -- tasks/build/package_json.js | 5 +---- tasks/config/clean.js | 3 --- 4 files changed, 2 insertions(+), 26 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index d4246608d8d21..6c025cd1b94a0 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -49,23 +49,7 @@ module.exports = function (grunt) { '!<%= src %>/core_plugins/timelion/vendor_components/**/*.js', '!<%= src %>/fixtures/**/*.js', '!<%= root %>/test/fixtures/scenarios/**/*.js' - ], - deepModules: { - 'caniuse-db': '1.0.30000265', - 'chalk': '1.1.0', - 'glob': '4.5.3', - 'har-validator': '1.8.0', - 'json5': '0.4.0', - 'loader-utils': '0.2.11', - 'micromatch': '2.2.0', - 'postcss-normalize-url': '2.1.1', - 'postcss-reduce-idents': '1.0.2', - 'postcss-unique-selectors': '1.0.0', - 'postcss-minify-selectors': '1.4.6', - 'postcss-single-charset': '0.3.0', - 'regenerator': '0.8.36', - 'readable-stream': '2.1.0' - } + ] }; grunt.config.merge(config); diff --git a/tasks/build/index.js b/tasks/build/index.js index 1fa50df44073c..84eb30a21c0c1 100644 --- a/tasks/build/index.js +++ b/tasks/build/index.js @@ -18,8 +18,6 @@ module.exports = function (grunt) { '_build:installNpmDeps', '_build:removePkgJsonDeps', 'clean:testsFromModules', - 'clean:deepModuleBins', - 'clean:deepModules', 'run:optimizeBuild', 'stop:optimizeBuild', '_build:versionedLinks', diff --git a/tasks/build/package_json.js b/tasks/build/package_json.js index a9038a2dd6d5b..2b58a4353f942 100644 --- a/tasks/build/package_json.js +++ b/tasks/build/package_json.js @@ -1,8 +1,5 @@ module.exports = function (grunt) { - let { defaults } = require('lodash'); - let pkg = grunt.config.get('pkg'); - let deepModules = grunt.config.get('deepModules'); grunt.registerTask('_build:packageJson', function () { const { sha, number, version } = grunt.config.get('build'); @@ -22,7 +19,7 @@ module.exports = function (grunt) { engines: { node: pkg.engines.node }, - dependencies: defaults({}, pkg.dependencies, deepModules) + dependencies: pkg.dependencies }, null, ' ') ); }); diff --git a/tasks/config/clean.js b/tasks/config/clean.js index 4128505fd189e..096ffae86cdf9 100644 --- a/tasks/config/clean.js +++ b/tasks/config/clean.js @@ -1,11 +1,8 @@ module.exports = function (grunt) { - let modules = Object.keys(grunt.config.get('deepModules')); return { build: 'build', target: 'target', screenshots: 'test/screenshots/session', testsFromModules: 'build/kibana/node_modules/**/{test,tests}/**', - deepModuleBins: 'build/kibana/node_modules/*/node_modules/**/.bin/{' + modules.join(',') + '}', - deepModules: 'build/kibana/node_modules/*/node_modules/**/{' + modules.join(',') + '}/', }; };