Skip to content

Commit

Permalink
Remove use of deprecated npm flag
Browse files Browse the repository at this point in the history
--omit=dev was introduced in npm 7 in 2021. This will break npm 6, however this is very EOL now, so don't think this is a major issue.

Signed-off-by: Chad Wilson <chadw@thoughtworks.com>
  • Loading branch information
chadlwilson committed Sep 23, 2023
1 parent 8148ae2 commit 1b49a32
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ The plugin is authored in [Javascript](https://en.wikipedia.org/wiki/JavaScript)
Gauge is authored in golang. These are independent processes talking to each other over TCP on port GAUGE_INTERNAL_PORT (env variable) using [Protobuf](https://github.com/getgauge/gauge-proto).

##### Pre-Requisites
* [Node.js](https://nodejs.org/en/) - Version >= 12
* [Node.js](https://nodejs.org/en/) - Version >= 16
* [Npm](https://www.npmjs.com/get-npm)

##### Compiling
Expand Down
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#! /usr/bin/env node

var version = process.versions.node.split(".");
if (parseInt(version[0]) === 0 && parseInt(version[1]) < 12) {
throw new Error("gauge-js requires Node.js version 0.12+. Current version: " + process.versions.node);
if (parseInt(version[0]) < 16) {
throw new Error("gauge-js requires Node.js version 16+. Current version: " + process.versions.node);
}

var fs = require("fs"),
Expand Down
8 changes: 4 additions & 4 deletions js.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@
"windows": [
"npm",
"install",
"--production",
"--omit=dev",
"--silent"
],
"darwin": [
"npm",
"install",
"--production",
"--omit=dev",
"--silent"
],
"linux": [
"npm",
"install",
"--production",
"--omit=dev",
"--silent"
]
},
Expand All @@ -51,7 +51,7 @@
"--init"
]
},
"version": "3.0.1",
"version": "4.0.0",
"gaugeVersionSupport": {
"minimum": "1.0.7",
"maximum": ""
Expand Down
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.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gauge-js",
"version": "3.0.1",
"version": "4.0.0",
"description": "JavaScript runner for Gauge",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion scripts/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ var prepareFiles = function () {
try {
console.log("Installing dependencies...");
fs.removeSync("./node_modules");
child_process.execSync("npm install --production", { cwd: localPath() });
child_process.execSync("npm install --omit-dev", { cwd: localPath() });
} catch (err) {
console.error("Error installing dependencies: %s", err.toString());
console.error(err.stack);
Expand Down

0 comments on commit 1b49a32

Please sign in to comment.