Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix peerDependencies of flow-bin package #52

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

tyger
Copy link

@tyger tyger commented Jul 31, 2017

SemVer behaviour is different in case major version of package is 0 (it's considered to be a pre-release version) so ^0.39.0 only corresponds to '0.39.0', which limits you from using any newer version of flow-bin. Required version is changed to allow all newer version up to 1.0

tyger added 3 commits July 31, 2017 10:46
`SemVer` behaviour is different in case major version of package is 0 (it's considered to be a pre-release version) so `^0.39.0` only corresponds to '0.39.0', which limits you from using any newer version of `flow-bin`. Required version is changed to allow all newer version up to `1.0`
Fix peerDependencies of `flow-bin` package
Added `flow-bin` as devDependency in order to pass tests.
should.equal(stringError, true);
should.equal(iterationError, true);
should.equal(stringError, true, 'Error with string type is not found.');
should.equal(iterationError, true, 'Error with interaction is not found.');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long.

@@ -24,7 +24,7 @@ console.log = function () {
Array.prototype.slice.call(arguments).forEach(function (arg) {
if (/string/.test(arg)) stringError = true;
if (/Required/.test(arg)) moduleError = true;
if (/iteration/.test(arg)) iterationError = true;
if (/must be an object/.test(arg)) iterationError = true;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expected '{' and instead saw 'iterationError'.

@tyger
Copy link
Author

tyger commented Sep 26, 2017

@charliedowler Any thoughts about ^^^?

@@ -202,7 +202,7 @@ module.exports = function (options={}) {
}

return through.obj(Flow, function () {
var end = () => {
const end = () => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).

this.push(file);
callback();
};

isFileSuitable(file).then(() => {
var hasPragma = hasJsxPragma(file.contents.toString());
const hasPragma = hasJsxPragma(file.contents.toString());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).

@@ -173,13 +173,13 @@ module.exports = function (options={}) {

function Flow(file, enc, callback) {

var _continue = () => {
const _continue = () => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).

var defers = servers.map(function(_path) {
var deferred = Q.defer();
const defers = servers.map(function (_path) {
const deferred = Q.defer();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).

@@ -158,8 +158,8 @@ function isFileSuitable(file) {
}

function killServers() {
var defers = servers.map(function(_path) {
var deferred = Q.defer();
const defers = servers.map(function (_path) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).


var dat = "";
let dat = '';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'let' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).

command,
...opts,
'/' + path.relative('/', _path),
'--json'
];

var stream = childProcess.spawn(getFlowBin(), args);
const stream = childProcess.spawn(getFlowBin(), args);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).

servers.push(path.dirname(_path));
return 'check';
})() : 'status';

var args = [
const args = [
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).


var command = opts.length || options.killFlow ? (() => {
const command = opts.length || options.killFlow ? (() => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).


var opts = optsToArgs(options);
const opts = optsToArgs(options);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).

@@ -58,38 +58,38 @@ function getFlowBin() {
}

function executeFlow(_path, options) {
var deferred = Q.defer();
const deferred = Q.defer();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).

@@ -38,7 +38,7 @@ function fatalError(stderr) {
}

function optsToArgs(opts) {
var args = [];
const args = [];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).

var servers = [];
var passed = true;
const servers = [];
let passed = true;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'let' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).


/**
* Flow check initialises a server per folder when run,
* we can store these paths and kill them later if need be.
*/
var servers = [];
var passed = true;
const servers = [];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).

const logSymbols = require('log-symbols');
const childProcess = require('child_process');
//const chalk = require('chalk');
const reporter = require('flow-reporter');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).

var chalk = require('chalk');
var reporter = require('flow-reporter');
const Q = require('q');
const fs = require('fs');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
'require' is not defined.

var childProcess = require('child_process');
var chalk = require('chalk');
var reporter = require('flow-reporter');
const Q = require('q');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
'require' is not defined.

@@ -1,3 +1,4 @@
declare module 'log-symbols' {
declare var success : string;
declare var warning : string;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expected an assignment or function call and instead saw an expression.
Missing semicolon.
Unrecoverable syntax error. (60% scanned).

@@ -1,4 +1,5 @@
declare module "gulp-util" {
declare function beep(val:any, cb:any): void;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'function closure expressions' is only available in Mozilla JavaScript extensions (use moz option).
'val' is defined but never used.
Expected ')' to match '(' from line 2 and instead saw ':'.
Expected '}' to match '{' from line 1 and instead saw ':'.
Expected an assignment or function call and instead saw an expression.
Expected an identifier and instead saw ')'.
Expected an identifier and instead saw ','.
Expected an identifier and instead saw ';'.
Function declarations should not be placed in blocks. Use a function expression or move the statement to the top of the outer function.
Label 'cb' on any statement.
Missing semicolon.

@@ -1,3 +1,29 @@
declare module 'child_process' {
declare function execFile(command: string, args: string[], callback: any) : void;

declare type child_process$execFileCallback = (error: ?child_process$Error, stdout: Buffer, stderr: Buffer) => void;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
'error' is defined but never used.
Expected ')' to match '{b}' from line 3 and instead saw ':'.
Expected '=>' and instead saw '?'.
Expected '}' to match '{' from line 1 and instead saw ':'.
Expected an assignment or function call and instead saw an expression.
Identifier 'child_process$Error' is not in camel case.
Identifier 'child_process$execFileCallback' is not in camel case.
Line is too long.
Missing semicolon.
Unrecoverable syntax error. (10% scanned).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants