Socket
Socket
Sign inDemoInstall

ignore

Package Overview
Dependencies
0
Maintainers
1
Versions
88
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.3.10 to 4.0.0

index.js

6

index.d.ts

@@ -36,7 +36,11 @@ interface Ignore {

interface Options {
ignorecase?: boolean
}
/**
* Creates new ignore manager.
*/
declare function ignore(): Ignore
declare function ignore(options?: Options): Ignore
export default ignore

35

package.json
{
"name": "ignore",
"version": "3.3.10",
"version": "4.0.0",
"description": "Ignore is a manager and filter for .gitignore rules.",
"main": "./ignore.js",
"files": [
"ignore.js",
"legacy.js",
"index.js",
"index.d.ts"

@@ -12,7 +12,10 @@ ],

"prepublish": "npm run build",
"build": "babel -o ignore.js index.js",
"tsc": "tsc ./test/ts/simple.ts",
"test": "npm run tsc && npm run build && istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec ./test/ignore.js && codecov",
"test-no-cov": "npm run tsc && npm run build && mocha --reporter spec ./test/ignore.js",
"cov-report": "istanbul report"
"build": "babel -o legacy.js index.js",
"test:lint": "eslint .",
"test:tsc": "tsc ./test/ts/simple.ts",
"test:git": "tap test/git-check-ignore.js",
"test:ignore": "tap test/ignore.js --coverage",
"test-no-cov": "npm run test:lint && npm run test:tsc && tap test/*.js --coverage",
"test": "npm run test-no-cov",
"posttest": "tap --coverage-report=text-lcov && codecov"
},

@@ -45,14 +48,18 @@ "repository": {

"babel-cli": "^6.26.0",
"babel-preset-es2015": "^6.24.1",
"chai": "~1.7.2",
"babel-preset-env": "^1.7.0",
"codecov": "^3.0.2",
"istanbul": "^0.4.5",
"eslint": "^5.0.0-rc.0",
"eslint-config-airbnb-base": "^12.1.0",
"eslint-plugin-import": "^2.12.0",
"mkdirp": "^0.5.1",
"mocha": "~1.13.0",
"pre-suf": "^1.0.4",
"pre-suf": "^1.1.0",
"rimraf": "^2.6.2",
"spawn-sync": "^1.0.15",
"spawn-sync": "^2.0.0",
"tap": "^12.0.1",
"tmp": "0.0.33",
"typescript": "^2.9.2"
},
"engines": {
"node": ">= 4"
}
}

@@ -49,2 +49,4 @@ <table><thead>

Since `4.0.0`, ignore will no longer support `node < 6`, to use in node < 6, `require('ignore/legacy')`.
## Table Of Main Contents

@@ -61,3 +63,3 @@

```js
const ignore = require('ignore')
import ignore from 'ignore'
const ig = ignore().add(['.abc/*', '!.abc/d/'])

@@ -145,3 +147,3 @@ ```

```js
const fs = require('fs')
import fs from 'fs'

@@ -223,3 +225,3 @@ if (fs.existsSync(filename)) {

```js
const glob = require('glob')
import glob from 'glob'

@@ -253,12 +255,15 @@ glob('**', {

****
## Upgrade 3.x -> 4.x
## Contributing
Since `4.0.0`, `ignore` will no longer support node < 6, to use `ignore` in node < 6:
The code of `node-ignore` is based on es6 and babel, but babel and its preset is not included in the `dependencies` field of package.json, so that the installation process of test cases will not fail in older versions of node.
```js
var ignore = require('ignore/legacy')
```
So use `bash install.sh` to install dependencies and `bash test.sh` to run test cases in your local machine.
****
#### Collaborators
- [whitecolor](https://github.com/whitecolor) *Alex*
- [SamyPesse](https://github.com/SamyPesse) *Samy Pessé*

@@ -268,1 +273,4 @@ - [azproduction](https://github.com/azproduction) *Mikhail Davydov*

- [JanMattner](https://github.com/JanMattner) *Jan Mattner*
- [ntwb](https://github.com/ntwb) *Stephen Edgar*
- [kasperisager](https://github.com/kasperisager) *Kasper Isager*
- [sandersn](https://github.com/sandersn) *Nathan Shively-Sanders*
SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc