Skip to content

Commit

Permalink
build: remove deepModules hackery (elastic#9330)
Browse files Browse the repository at this point in the history
Backports PR elastic#9327

**Commit 1:**
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.

* Original sha: 19fcc93
* Authored by Court Ewing <[email protected]> on 2016-12-02T00:13:13Z
Former-commit-id: 3c264cd
  • Loading branch information
elastic-jasper authored and epixa committed Dec 2, 2016
1 parent c3ef30a commit 4dae087
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 26 deletions.
18 changes: 1 addition & 17 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 0 additions & 2 deletions tasks/build/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ module.exports = function (grunt) {
'_build:installNpmDeps',
'_build:removePkgJsonDeps',
'clean:testsFromModules',
'clean:deepModuleBins',
'clean:deepModules',
'run:optimizeBuild',
'stop:optimizeBuild',
'_build:versionedLinks',
Expand Down
5 changes: 1 addition & 4 deletions tasks/build/package_json.js
Original file line number Diff line number Diff line change
@@ -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');
Expand All @@ -22,7 +19,7 @@ module.exports = function (grunt) {
engines: {
node: pkg.engines.node
},
dependencies: defaults({}, pkg.dependencies, deepModules)
dependencies: pkg.dependencies
}, null, ' ')
);
});
Expand Down
3 changes: 0 additions & 3 deletions tasks/config/clean.js
Original file line number Diff line number Diff line change
@@ -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(',') + '}/',
};
};

0 comments on commit 4dae087

Please sign in to comment.