build: remove deepModules hackery (#9327)

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.
This commit is contained in:
Court Ewing 2016-12-01 19:52:37 -05:00 committed by GitHub
parent dd1105eceb
commit 9d79d8bc63
4 changed files with 2 additions and 26 deletions

View file

@ -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);

View file

@ -18,8 +18,6 @@ module.exports = function (grunt) {
'_build:installNpmDeps',
'_build:removePkgJsonDeps',
'clean:testsFromModules',
'clean:deepModuleBins',
'clean:deepModules',
'run:optimizeBuild',
'stop:optimizeBuild',
'_build:versionedLinks',

View file

@ -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, ' ')
);
});

View file

@ -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(',') + '}/',
};
};