Issue description: when using async/await keyword in code, atom-npm-install will prompt "Unexpected token" and refuse to process the dependencies in the file.
Steps to reproduce:
Create a new project folder and run npm init with default settings;
Create a new file in the created folder, and name it to index.js;
Paste the following code into index.js:
var express = require('express');
async function main() {
var a = new Promise(
(resolve, reject) => {
setTimeout(resolve, 1000, 'Hello World!');
}
);
console.log(a);
console.log(await a);
return a;
}
main();
4. Save the file and run `Npm Install: Save` from Atom command palette.
Expected result: `express` installed and added to `package.json`
Actual result: A new panel opened in Atom that says `npm install 3: Unexpected token (3:6)`
Environment:
Atom 1.25.1 x64
npm-install 4.0.4
Issue description: when using
async
/await
keyword in code,atom-npm-install
will prompt "Unexpected token" and refuse to process the dependencies in the file.Steps to reproduce:
npm init
with default settings;index.js
;index.js
:async function main() { var a = new Promise( (resolve, reject) => { setTimeout(resolve, 1000, 'Hello World!'); } ); console.log(a); console.log(await a); return a; }
main();