Node 8 (WIP) (#9946)

* start upgrade to node 8

* upgrade travis

* improve travis

* Remove bluebird, babel (except for modules) from server (WIP) (#9947)

* remove bluebird, babel from server (except for modules)

* fixes

* fix path

* fix path

* fix export

* fix export

* fix test

* fix tests

* remove plugin for transform-object-rest-spread since it is supported in node8

* babel: correct syntax rest spread

* remove bluebird

* update migrations archive readme

* fix package-lock.json

* fix typo

* add package-loc
This commit is contained in:
Matteo Pagliazzi
2018-03-15 19:59:36 +01:00
committed by GitHub
parent b1b1e512f5
commit cb42a31c43
68 changed files with 786 additions and 1536 deletions

View File

@@ -1,7 +1,6 @@
/* eslint-disable global-require */
import moment from 'moment';
import nconf from 'nconf';
import Bluebird from 'bluebird';
import requireAgain from 'require-again';
import { recoverCron, cron } from '../../../../../website/server/libs/cron';
import { model as User } from '../../../../../website/server/models/user';
@@ -1363,7 +1362,7 @@ describe('recoverCron', () => {
});
it('throws an error if user cannot be found', async () => {
execStub.returns(Bluebird.resolve(null));
execStub.returns(Promise.resolve(null));
try {
await recoverCron(status, locals);
@@ -1374,8 +1373,8 @@ describe('recoverCron', () => {
});
it('increases status.times count and reruns up to 4 times', async () => {
execStub.returns(Bluebird.resolve({_cronSignature: 'RUNNING_CRON'}));
execStub.onCall(4).returns(Bluebird.resolve({_cronSignature: 'NOT_RUNNING'}));
execStub.returns(Promise.resolve({_cronSignature: 'RUNNING_CRON'}));
execStub.onCall(4).returns(Promise.resolve({_cronSignature: 'NOT_RUNNING'}));
await recoverCron(status, locals);
@@ -1384,7 +1383,7 @@ describe('recoverCron', () => {
});
it('throws an error if recoverCron runs 5 times', async () => {
execStub.returns(Bluebird.resolve({_cronSignature: 'RUNNING_CRON'}));
execStub.returns(Promise.resolve({_cronSignature: 'RUNNING_CRON'}));
try {
await recoverCron(status, locals);