New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

flow-annotation-check

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flow-annotation-check - npm Package Compare versions

Comparing version 1.8.1 to 1.9.0

15

package.json
{
"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": {

27

README.md
# 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.

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc