flow-annotation-check
Advanced tools
Comparing version 1.8.1 to 1.9.0
{ | ||
"name": "flow-annotation-check", | ||
"version": "1.8.1", | ||
"version": "1.9.0", | ||
"description": "Check your files for the presence of the `@flow` and `@flow weak` annotations", | ||
@@ -23,2 +23,5 @@ "author": { | ||
"main": "./lib/flow-annotation-check.js", | ||
"engines": { | ||
"node": "^8 || >=10" | ||
}, | ||
"bin": { | ||
@@ -34,4 +37,4 @@ "flow-annotation-check": "./bin/flow-annotation-check.js" | ||
"babel-plugin-transform-object-rest-spread": "^6.20.2", | ||
"glob": "7.1.1", | ||
"load-pkg": "^3.0.1" | ||
"glob": "7.1.3", | ||
"load-pkg": "^4.0.0" | ||
}, | ||
@@ -43,6 +46,6 @@ "devDependencies": { | ||
"codecov": "^3.0.0", | ||
"flow-bin": "^0.71.0", | ||
"flow-coverage-report": "^0.4.0", | ||
"flow-bin": "^0.81.0", | ||
"flow-coverage-report": "^0.6.0", | ||
"flow-typed": "^2.1.1", | ||
"jest": "^21.0.0" | ||
"jest": "^22.1.4" | ||
}, | ||
@@ -49,0 +52,0 @@ "scripts": { |
# flow-annotation-check | ||
[![Current Version](https://img.shields.io/npm/v/flow-annotation-check.svg)](https://www.npmjs.com/package/flow-annotation-check) [![Build Status](https://travis-ci.org/ryan953/flow-annotation-check.svg?branch=master)](https://travis-ci.org/ryan953/flow-annotation-check) [![codecov](https://codecov.io/gh/ryan953/flow-annotation-check/branch/master/graph/badge.svg)](https://codecov.io/gh/ryan953/flow-annotation-check) | ||
[![Current Version](https://img.shields.io/npm/v/flow-annotation-check.svg)](https://www.npmjs.com/package/flow-annotation-check) | ||
![node](https://img.shields.io/node/v/flow-annotation-check.svg) [![Build Status](https://travis-ci.org/ryan953/flow-annotation-check.svg?branch=master)](https://travis-ci.org/ryan953/flow-annotation-check) [![codecov](https://codecov.io/gh/ryan953/flow-annotation-check/branch/master/graph/badge.svg)](https://codecov.io/gh/ryan953/flow-annotation-check) | ||
[![Greenkeeper badge](https://badges.greenkeeper.io/ryan953/flow-annotation-check.svg)](https://greenkeeper.io/) | ||
@@ -25,9 +27,9 @@ | ||
```javascript | ||
const flowAnnotationCheck = require('flow-annotation-check'); | ||
import genReport, {genCheckFlowStatus, genValidate} from 'flow-annotation-check'; | ||
``` | ||
The most useful methods are: | ||
The most useful public methods are: | ||
- `genReport(folder: string, config: Config): Promise<Array<FileReport>>` | ||
- `getStatus(filePath: string): Promise<FlowStatus>` | ||
- `genCheckFlowStatus(flowPath: string, filePath: string): Promise<FlowStatus>` | ||
@@ -57,6 +59,8 @@ The types involved are: | ||
This is a convenience method to make working with globs and mapping over `getStatus` easier. Each file is tested serially in order to avoid setting really long timeouts that lock up the flow server. | ||
This is a convenience method to make working with globs and mapping over `genCheckFlowStatus` easier. Each file is tested serially in order to avoid setting really long timeouts that lock up the flow server. | ||
```javascript | ||
flowAnnotationCheck.genReport( | ||
import genReport from 'flow-annotation-check'; | ||
genReport( | ||
'~/path/to/project', | ||
@@ -75,9 +79,11 @@ { | ||
#### getStatus(filePath) | ||
#### genCheckFlowStatus(flowPath, filePath) | ||
If you're checking one file at a time then go ahead and call `getStatus` directly. This takes a string that will be passed directly into `flow` on the command line. | ||
If you're checking one file at a time then go ahead and call `genCheckFlowStatus` directly. This takes a string that will be passed directly into the `flow` binary you specify. If flow is installed in your project, or on your system path then pass `'flow'` as the first argument. | ||
```javascript | ||
import {genCheckFlowStatus} from 'flow-annotation-check'; | ||
const file = '~/path/to/project/src/main.js'; | ||
flowAnnotationCheck.getStatus(file).then((status) => { | ||
genCheckFlowStatus('flow', file).then((status) => { | ||
console.log(`The status of ${file} is ${status}`); | ||
@@ -122,2 +128,3 @@ }); | ||
* `-o`, `--output` Choose from either `text`, `csv`, `junit`, or `html` format. | ||
* `--show-summary` Include a summary of the data in the `--output` stream, does not apply to `junit` format. | ||
@@ -158,3 +165,3 @@ Setting `--exclude` will override the defaults. So don't forget to ignore `node_modules/**/*.js` in addition to project specific folders. | ||
In addition to the `--output` flag there are other flags that will return the report in different formats and save it directly to a file for you. You can set `--html-file`, `--csv-file` or `--junit-file` and each one will create a file containing the respective report. This is useful for getting the report in multiple formats at the same time. | ||
In addition to the `--output` flag there are other flags that will return the report in different formats and save it directly to a file for you. You can set `--html-file`, `--csv-file`, `--junit-file` or `--summary-file` and each one will create a file containing the respective report. This is useful for getting the report in multiple formats at the same time. Try them all at once! | ||
@@ -161,0 +168,0 @@ For example, it is desirable for CI logs to not have any extra markup and use the default `text` format with the `-o` flag. But at the same time possible to use the `--junit-file` flag to feed some data into jenkins for tracking over time. |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
209
1
11174
3
3
2
+ Addedexpand-tilde@2.0.2(transitive)
+ Addedfind-file-up@2.0.1(transitive)
+ Addedfind-pkg@2.0.0(transitive)
+ Addedglob@7.1.3(transitive)
+ Addedglobal-modules@1.0.0(transitive)
+ Addedglobal-prefix@1.0.2(transitive)
+ Addedis-windows@1.0.2(transitive)
+ Addedload-pkg@4.0.0(transitive)
+ Addedresolve-dir@1.0.1(transitive)
- Removedexpand-tilde@1.2.2(transitive)
- Removedfind-file-up@0.1.3(transitive)
- Removedfind-pkg@0.1.2(transitive)
- Removedfs-exists-sync@0.1.0(transitive)
- Removedglob@7.1.1(transitive)
- Removedglobal-modules@0.2.3(transitive)
- Removedglobal-prefix@0.1.5(transitive)
- Removedis-windows@0.2.0(transitive)
- Removedload-pkg@3.0.1(transitive)
- Removedos-homedir@1.0.2(transitive)
- Removedresolve-dir@0.1.1(transitive)
Updatedglob@7.1.3
Updatedload-pkg@^4.0.0