Skip to content

Commit

Permalink
build: bump to Node 8.x and minimal eslint configuration (wix#722)
Browse files Browse the repository at this point in the history
  • Loading branch information
noomorph authored and rotemmiz committed May 12, 2018
1 parent ff8f430 commit 62da778
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 416 deletions.
404 changes: 6 additions & 398 deletions detox/.eslintrc

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion detox/.nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.10.0
8
12 changes: 4 additions & 8 deletions detox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,16 @@
"build": "scripts/build.sh",
"lint": "eslint src",
"unit": "jest --coverage --verbose",
"pretest": "npm run lint",
"test": "npm run unit",
"unit:watch": "jest --watch",
"prepublish": "npm run build",
"postinstall": "scripts/postinstall.sh"
},
"devDependencies": {
"eslint": "^4.11.0",
"eslint-config-prettier": "2.5.0",
"eslint-plugin-jest": "^20.0.3",
"eslint-plugin-prettier": "2.2.0",
"eslint-plugin-promise": "^3.4.2",
"eslint-plugin-react": "^7.1.0",
"eslint-plugin-react-native": "^3.1.0",
"eslint-plugin-node": "^6.0.1",
"jest": "22.x.x",
"minimist": "^1.2.0",
"mockdate": "^2.0.1",
"prettier": "1.7.0"
},
Expand All @@ -50,14 +45,15 @@
"get-port": "^2.1.0",
"ini": "^1.3.4",
"lodash": "^4.14.1",
"minimist": "^1.2.0",
"npmlog": "^4.0.2",
"shell-utils": "^1.0.9",
"tail": "^1.2.3",
"telnet-client": "0.15.3",
"ws": "^1.1.1"
},
"engines": {
"node": ">=7.6"
"node": ">=8.3.0"
},
"jest": {
"roots": [
Expand Down
2 changes: 1 addition & 1 deletion detox/src/devices/Device.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class Device {
const _bundleId = bundleId || this._bundleId;
if (this._isAppInBackground(params, _bundleId)) {
if (hasPayload) {
await this.deviceDriver.deliverPayload({...params, delayPayload: true});
await this.deviceDriver.deliverPayload({...params, delayPayload: true});
}
}

Expand Down
2 changes: 1 addition & 1 deletion docs/Guide.Contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: Contributing

## Prerequisites

### Install `node` v7.6 or higher (to support async-await natively)
### Install `node` v8.3.0 or higher

```
brew install node
Expand Down
4 changes: 2 additions & 2 deletions docs/Introduction.GettingStarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ Homebrew is a package manager for macOS, we'll need it to install other command
#### 2. Install [Node.js](https://nodejs.org/en/)

Node is the JavaScript runtime Detox will run on. **Install Node 7.6.0 or above for native async-await support**
Node is the JavaScript runtime Detox will run on. **Install Node 8.3.0 or above**

```sh
brew update && brew install node
```

> TIP: Verify it works by typing in terminal `node -v` to output current node version, should be higher than 7.6.0
> TIP: Verify it works by typing in terminal `node -v` to output current node version, should be 8.3.0 or higher
#### 3. Install [appleSimUtils](https://github.com/wix/AppleSimulatorUtils)

Expand Down
4 changes: 2 additions & 2 deletions docs/Troubleshooting.RunningTests.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ child_process.js:531
throw err;
```

**Solution:** This error means that your version of Node does not support `async-await` syntax. You should do one of the two:
**Solution:** This error means that your version of Node does not support `async-await` syntax. You should do the following:

1. Update Node to a version **higher than 7.6.0**, these versions will provide native support for async-await.
1. Update Node to a version **8.3.0 or higher**.

<br>

Expand Down
4 changes: 2 additions & 2 deletions examples/demo-native-ios/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

* make sure you have Xcode installed (tested with v8.1-8.2)
* iPhone 7 Plus simulator is installed
* make sure you have node installed (`brew install node`, node 7.6.0 and up is prefered, for native async-await support)
* make sure you have node installed (`brew install node`, node 8.3.0 and up is prefered, for native async-await support)

### Step 1: Npm install
* Make sure you're in folder `examples/demo-native-ios`
Expand All @@ -25,4 +25,4 @@
```sh
detox test --configuration ios.sim.release
```
This action will open a new simulator and run the tests on it.
This action will open a new simulator and run the tests on it.
2 changes: 1 addition & 1 deletion examples/demo-react-native/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
## Requirements

* Make sure you have Xcode installed (tested with Xcode 8.1-8.2).
* make sure you have node installed (`brew install node`, node 7.6.0 and up is required for native async-await support, otherwise you'll have to babel the tests).
* make sure you have node installed (`brew install node`, node 8.3.0 and up is required for native async-await support, otherwise you'll have to babel the tests).
* Make sure you have react-native dependencies installed:
* react-native-cli is installed (`npm install -g react-native-cli`)
* watchman is installed (`brew install watchman`)
Expand Down

0 comments on commit 62da778

Please sign in to comment.