diff --git a/package-lock.json b/package-lock.json index 9c9956e589..26b626496e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11997,7 +11997,7 @@ }, "node_modules/mongodb-tools": { "version": "1.2.0", - "resolved": "git+ssh://git@github.com/mongodb-js/mongodb-tools.git#0d1a90f49796c41f6d47c7c7999fe384014a16a0", + "resolved": "https://github.com/mongodb-js/mongodb-tools.git#0d1a90f49796c41f6d47c7c7999fe384014a16a0", "integrity": "sha512-DNJJQYg1/VcE4gNP7zpKeWGIezwcpkI8XzG4YFL3WybY6cuKWMz3d1CIp3uKKEpva1qOHk2LI8mKWJX1Vpw4Sg==", "dev": true, "license": "Apache-2.0", @@ -29837,7 +29837,7 @@ } }, "mongodb-tools": { - "version": "git+ssh://git@github.com/mongodb-js/mongodb-tools.git#0d1a90f49796c41f6d47c7c7999fe384014a16a0", + "version": "https://github.com/mongodb-js/mongodb-tools.git#0d1a90f49796c41f6d47c7c7999fe384014a16a0", "integrity": "sha512-DNJJQYg1/VcE4gNP7zpKeWGIezwcpkI8XzG4YFL3WybY6cuKWMz3d1CIp3uKKEpva1qOHk2LI8mKWJX1Vpw4Sg==", "dev": true, "from": "mongodb-tools@github:mongodb-js/mongodb-tools#0d1a90f49796c41f6d47c7c7999fe384014a16a0", diff --git a/postinstall.js b/postinstall.js index fef1fb31ff..17a55aaea3 100644 --- a/postinstall.js +++ b/postinstall.js @@ -1,9 +1,14 @@ const pkg = require('./package.json'); +const fs = require('fs').promises; const version = parseFloat(process.version.substr(1)); const minimum = parseFloat(pkg.engines.node.match(/\d+/g).join('.')); -module.exports = function () { +module.exports = async function () { + // support node 14 + const lockFile = await fs.readFile('./package-lock.json').then(res => res.toString()); + const file = lockFile.split('git+ssh://git@github.com/mongodb-js/mongodb-tools.git').join('https://github.com/mongodb-js/mongodb-tools.git'); + await fs.writeFile('./package-lock.json', file); const openCollective = ` 1111111111 1111111111111111