Skip to content

Commit

Permalink
Revert "Block extra dev dependencies for now (#13731)"
Browse files Browse the repository at this point in the history
This reverts commit 49de059.
  • Loading branch information
mjroghelia committed Oct 26, 2020
1 parent d2863a1 commit 2967398
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions make-util.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ var buildNodeTask = function (taskPath, outDir) {
// verify no dev dependencies
// we allow a TS dev-dependency to indicate a task should use a different TS version
var packageJson = JSON.parse(fs.readFileSync(packageJsonPath).toString());
var devDeps = packageJson.devDependencies ? Object.keys(packageJson.devDependencies).length : 0;
var devDeps = packageJson.devDependencies ? Object.keys(packageJson.devDependencies).length != 0 : 0;
if (devDeps == 1 && packageJson.devDependencies["typescript"]) {
var version = packageJson.devDependencies["typescript"];
if (!allowedTypescriptVersions.includes(version)) {
Expand All @@ -170,7 +170,7 @@ var buildNodeTask = function (taskPath, outDir) {
overrideTscPath = path.join(taskPath, "node_modules", "typescript");
console.log(`Detected Typescript version: ${version}`);
} else if (devDeps >= 1) {
fail('The package.json should not contain dev dependencies other than typescript. Move the dev dependencies into a package.json file under the Tests sub-folder. Offending package.json: ' + packageJsonPath);
fail('The package.json should not contain dev dependencies. Move the dev dependencies into a package.json file under the Tests sub-folder. Offending package.json: ' + packageJsonPath);
}

run('npm install');
Expand Down

0 comments on commit 2967398

Please sign in to comment.