Cscott has uploaded a new change for review. https://gerrit.wikimedia.org/r/210791
Change subject: Update code to unify the package.json ...................................................................... Update code to unify the package.json Use core-js and the latest prfun, and a specific version of semver. Change-Id: I6a40d7b1e3f31173416f3ea0953b8ca17202c885 --- M Makefile M package.json M unify-package-json.js 3 files changed, 24 insertions(+), 13 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/ocg-collection refs/changes/91/210791/1 diff --git a/Makefile b/Makefile index 2b05f49..ea77c09 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ core: export LINK=g++ rm -f ./package.json - npm install prfun semver + npm install core-js@0.9.x prfun@2.1.x semver@4.1.x ./unify-package-json.js npm install npm update diff --git a/package.json b/package.json index fd1c938..4ca28e7 100644 --- a/package.json +++ b/package.json @@ -7,9 +7,9 @@ }, "dependencies": { "commander": "~2.5.0", + "core-js": "~0.9.1", "domino": "~1.0.17", - "es6-shim": "~0.20.2", - "prfun": "~1.0.1", + "prfun": "~2.1.1", "readable-stream": "~1.0.0", "request": "~2.47.0", "rimraf": "~2.2.2", @@ -34,9 +34,9 @@ "gelf-stream": "~0.2.4" }, "devDependencies": { - "jshint": "~2.5.0", + "jshint": "~2.6.3", "mocha": "~2.0.1", - "request": "~2.47.0", - "mw-ocg-bundler": "wikimedia/mediawiki-extensions-Collection-OfflineContentGenerator-bundler#master" + "npm-travis": "~1.0.0", + "request": "~2.47.0" } } \ No newline at end of file diff --git a/unify-package-json.js b/unify-package-json.js index 74254f2..479f818 100755 --- a/unify-package-json.js +++ b/unify-package-json.js @@ -11,17 +11,26 @@ * library (since we want to use fancy non-standard Promise features). */ +var haveAllPackages = true; +['core-js','prfun','semver'].forEach(function(pkg) { + try { + require(pkg); + } catch (err) { + console.err( "The '"+pkg+"' library could not be loaded. Please `npm install "+pkg+"`" ); + haveAllPackages = false; + } +}); +if (!haveAllPackages) { + process.exit(1); +} + +require('core-js'); // for Map/Set var child_process = require( 'child_process' ), semver = require( 'semver' ), fs = require( 'fs' ), path = require( 'path' ), - util = require( 'util' ); - -try { - require('prfun'); -} catch ( err ) { - console.err( "The 'prfun' library could not be loaded. Please `npm install prfun`") -} + util = require( 'util' ), + Promise = require( 'prfun' ); function findPackageJson() { var readdir = Promise.promisify(fs.readdir, false, fs); @@ -94,6 +103,8 @@ optdeps = iterate( 'optionalDependencies', packageObjs ); console.info( 'Unifying unified development dependencies' ); glodevdeps = iterate( 'devDependencies', packageObjs ); + // Hack around the 'mw-ocg-bundler' dev dependency; don't make it global + delete glodevdeps['mw-ocg-bundler']; return { 'dependencies': glodeps, -- To view, visit https://gerrit.wikimedia.org/r/210791 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6a40d7b1e3f31173416f3ea0953b8ca17202c885 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/ocg-collection Gerrit-Branch: wmf-deploy Gerrit-Owner: Cscott <canan...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits