Skip to content

Commit 22c3e44

Browse files
committed
We don't need to verify npm version
We have defaulted to using npm that installed as part of the script dependancies. This is to increase predictability on what version of npm was used to install atom dependencies
1 parent 36562ea commit 22c3e44

File tree

2 files changed

+1
-23
lines changed

2 files changed

+1
-23
lines changed

script/config.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
'use strict';
55

6-
const fs = require('fs');
76
const path = require('path');
87
const spawnSync = require('./lib/spawn-sync');
98

@@ -77,7 +76,7 @@ function getAppName(channel) {
7776
return channel === 'stable'
7877
? 'Atom'
7978
: `Atom ${process.env.ATOM_CHANNEL_DISPLAY_NAME ||
80-
channel.charAt(0).toUpperCase() + channel.slice(1)}`;
79+
channel.charAt(0).toUpperCase() + channel.slice(1)}`;
8180
}
8281

8382
function getExecutableName(channel, appName) {

script/lib/verify-machine-requirements.js

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,8 @@
33
const childProcess = require('child_process');
44
const path = require('path');
55

6-
const CONFIG = require('../config');
7-
86
module.exports = function(ci) {
97
verifyNode();
10-
// verifyNpm(ci);
118
verifyPython();
129
};
1310

@@ -24,24 +21,6 @@ function verifyNode() {
2421
}
2522
}
2623

27-
function verifyNpm(ci) {
28-
const stdout = childProcess.execFileSync(
29-
CONFIG.getNpmBinPath(ci),
30-
['--version'],
31-
{ env: process.env }
32-
);
33-
const fullVersion = stdout.toString().trim();
34-
const majorVersion = fullVersion.split('.')[0];
35-
const oldestMajorVersionSupported = ci ? 6 : 3;
36-
if (majorVersion >= oldestMajorVersionSupported) {
37-
console.log(`Npm:\tv${fullVersion}`);
38-
} else {
39-
throw new Error(
40-
`npm v${oldestMajorVersionSupported}+ is required to build Atom. npm v${fullVersion} was detected.`
41-
);
42-
}
43-
}
44-
4524
function verifyPython() {
4625
// This function essentially re-implements node-gyp's "find-python.js" library,
4726
// but in a synchronous, bootstrap-script-friendly way.

0 commit comments

Comments
 (0)