Skip to content

Commit 64d89e3

Browse files
committed
Fix use of ES6 features not available in Node 4
Object destructuring and use of let/const without 'use strict' is not supported in node 4. Tests did not fail because of probably forgotten removal of babel in mocha.opts
1 parent e4824d0 commit 64d89e3

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@
4040
"source-map-support": "^0.4.0"
4141
},
4242
"devDependencies": {
43-
"babel-core": "^6.10.4",
44-
"babel-preset-es2015": "^6.9.0",
4543
"chai": "^3.5.0",
4644
"chai-as-promised": "^5.2.0",
4745
"fs-promise": "^0.5.0",

src/fastboot-headers.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
// Partially implements Headers from the Fetch API
24
// https://developer.mozilla.org/en-US/docs/Web/API/Headers
35
function FastBootHeaders(headers) {

src/fastboot-info.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var RSVP = require('rsvp');
24
var FastBootRequest = require('./fastboot-request');
35
var FastBootResponse = require('./fastboot-response');
@@ -16,7 +18,8 @@ var FastBootResponse = require('./fastboot-response');
1618
function FastBootInfo(request, response, options) {
1719

1820
this.deferredPromise = RSVP.resolve();
19-
let { hostWhitelist, metadata } = options;
21+
let hostWhitelist = options.hostWhitelist;
22+
let metadata = options.metadata;
2023
if (request) {
2124
this.request = new FastBootRequest(request, hostWhitelist);
2225
}

test/mocha.opts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
--require test/support/common
2-
--compilers js:babel-core/register
32
--timeout 10000

0 commit comments

Comments
 (0)