Skip to content

ci: Fix failing Node 14 workflow #8379

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion postinstall.js
Original file line number Diff line number Diff line change
@@ -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://[email protected]/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
Expand Down