From 9f073ad25cedda407220fd143912a601e0223805 Mon Sep 17 00:00:00 2001 From: Leo Lamprecht Date: Tue, 10 Jan 2017 18:48:56 +0100 Subject: [PATCH] Use async-to-gen for all Node versions --- bin/now | 9 ++------- bin/now-alias | 2 +- bin/now-certs | 2 +- bin/now-deploy | 2 +- bin/now-dns | 2 +- bin/now-domains | 2 +- bin/now-list | 3 +-- bin/now-remove | 2 +- bin/now-secrets | 2 +- package.json | 1 - 10 files changed, 10 insertions(+), 17 deletions(-) diff --git a/bin/now b/bin/now index 1650075..42675cc 100755 --- a/bin/now +++ b/bin/now @@ -1,22 +1,17 @@ -#!/bin/bash -// >&/dev/null; exec node $(node -p "process.version[1] >= 7 ? '--harmony-async-await' : '--lazy'") $0 $@ -// vi:syntax=javascript +#!/usr/bin/env node // Native const {resolve} = require('path') // Packages const nodeVersion = require('node-version') -const isAsyncSupported = require('is-async-supported') const updateNotifier = require('update-notifier') // Ours const {error} = require('../lib/error') const pkg = require('../package') -if (!isAsyncSupported()) { - require('async-to-gen/register') -} +require('async-to-gen/register') if (nodeVersion.major < 6) { error('Now requires at least version 6 of Node. Please upgrade!') diff --git a/bin/now-alias b/bin/now-alias index c9f4fc4..e53da28 100755 --- a/bin/now-alias +++ b/bin/now-alias @@ -1,4 +1,4 @@ -#!/usr/bin/env node --harmony-async-await +#!/usr/bin/env node // Packages const chalk = require('chalk') diff --git a/bin/now-certs b/bin/now-certs index fd9b1cc..43d854a 100755 --- a/bin/now-certs +++ b/bin/now-certs @@ -1,4 +1,4 @@ -#!/usr/bin/env node --harmony-async-await +#!/usr/bin/env node // Native const path = require('path') diff --git a/bin/now-deploy b/bin/now-deploy index decaad1..cbe4d7e 100755 --- a/bin/now-deploy +++ b/bin/now-deploy @@ -1,4 +1,4 @@ -#!/usr/bin/env node --harmony-async-await +#!/usr/bin/env node // Native const {resolve} = require('path') diff --git a/bin/now-dns b/bin/now-dns index 04b72af..a27027d 100755 --- a/bin/now-dns +++ b/bin/now-dns @@ -1,4 +1,4 @@ -#!/usr/bin/env node --harmony-async-await +#!/usr/bin/env node // Packages const chalk = require('chalk') diff --git a/bin/now-domains b/bin/now-domains index 277e552..16e27ab 100755 --- a/bin/now-domains +++ b/bin/now-domains @@ -1,4 +1,4 @@ -#!/usr/bin/env node --harmony-async-await +#!/usr/bin/env node // Packages const chalk = require('chalk') diff --git a/bin/now-list b/bin/now-list index 5069197..7c175d3 100755 --- a/bin/now-list +++ b/bin/now-list @@ -1,5 +1,4 @@ -#!/usr/bin/env node --harmony-async-await - +#!/usr/bin/env node // Packages const fs = require('fs-promise') diff --git a/bin/now-remove b/bin/now-remove index 816f84c..cbb445b 100755 --- a/bin/now-remove +++ b/bin/now-remove @@ -1,4 +1,4 @@ -#!/usr/bin/env node --harmony-async-await +#!/usr/bin/env node // Packages const minimist = require('minimist') diff --git a/bin/now-secrets b/bin/now-secrets index 280c6f9..ec93151 100755 --- a/bin/now-secrets +++ b/bin/now-secrets @@ -1,4 +1,4 @@ -#!/usr/bin/env node --harmony-async-await +#!/usr/bin/env node // Packages const chalk = require('chalk') diff --git a/package.json b/package.json index 4e5cddd..b2105e5 100644 --- a/package.json +++ b/package.json @@ -72,7 +72,6 @@ "graceful-fs": "^4.1.11", "ignore": "^3.2.0", "ini": "^1.3.4", - "is-async-supported": "^1.2.0", "is-url": "^1.2.2", "minimist": "^1.2.0", "ms": "^0.7.2",