From 0af30aa65ea26c7b99075d2723851265cbc529db Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Wed, 23 Mar 2016 23:56:46 -0700 Subject: [PATCH] Use vanilla npm shrinkwrap instead of uber/npm-shrinkwrap; fixes #18559 Ports #19604 to v3. Special thanks to @kikinteractive, @azer, and @npm. --- Gruntfile.js | 17 ----------------- package.json | 2 +- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 689b186423fa..018cdf266ad1 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -17,7 +17,6 @@ module.exports = function (grunt) { var fs = require('fs'); var path = require('path'); - var npmShrinkwrap = require('npm-shrinkwrap'); var generateGlyphiconsData = require('./grunt/bs-glyphicons-data-generator.js'); var BsLessdocParser = require('./grunt/bs-lessdoc-parser.js'); var getLessVarsData = function () { @@ -493,20 +492,4 @@ module.exports = function (grunt) { grunt.registerTask('docs-github', ['jekyll:github', 'htmlmin']); grunt.registerTask('prep-release', ['dist', 'docs', 'docs-github', 'compress']); - - // Task for updating the cached npm packages used by the Travis build (which are controlled by test-infra/npm-shrinkwrap.json). - // This task should be run and the updated file should be committed whenever Bootstrap's dependencies change. - grunt.registerTask('update-shrinkwrap', ['exec:npmUpdate', '_update-shrinkwrap']); - grunt.registerTask('_update-shrinkwrap', function () { - var done = this.async(); - npmShrinkwrap({ dev: true, dirname: __dirname }, function (err) { - if (err) { - grunt.fail.warn(err); - } - var dest = 'grunt/npm-shrinkwrap.json'; - fs.renameSync('npm-shrinkwrap.json', dest); - grunt.log.writeln('File ' + dest.cyan + ' updated.'); - done(); - }); - }); }; diff --git a/package.json b/package.json index 7443a8c7ade6..71383f2b065d 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "author": "Twitter, Inc.", "scripts": { "change-version": "node grunt/change-version.js", + "shrinkwrap": "npm shrinkwrap --dev && mv ./npm-shrinkwrap.json ./grunt/npm-shrinkwrap.json", "test": "grunt test" }, "style": "dist/css/bootstrap.css", @@ -55,7 +56,6 @@ "grunt-saucelabs": "~8.6.2", "load-grunt-tasks": "~3.4.1", "markdown-it": "^6.0.0", - "npm-shrinkwrap": "^200.4.0", "shelljs": "^0.6.0", "time-grunt": "^1.3.0" },