Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

father

Package Overview
Dependencies
Maintainers
1
Versions
234
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

father - npm Package Compare versions

Comparing version 0.6.14 to 0.7.0

4

HISTORY.md

@@ -5,2 +5,6 @@ # History

## 0.7.0
**Change** option: ignore -> skip
## 0.6.14

@@ -7,0 +11,0 @@

14

lib/package.js

@@ -24,4 +24,4 @@ 'use strict';

// ignore file or package when parseFiles
ignore: []
// skip file or package when parseFiles, and won't exist in deps
skip: []
};

@@ -182,2 +182,6 @@

var fileDeps = getFileDeps(data, ext, options)
.filter(function(item) {
// skip file or package
return options.skip.indexOf(item) === -1;
})
.map(function(item) {

@@ -192,8 +196,6 @@ if (!util.isRelative(item)) return item;

fileDeps.forEach(function(name) {
deps.push(name);
// dependent packages
if (!util.isRelative(name)) {
var pkg_ = pkg.dependencies[name];
if (!~options.ignore.indexOf(name) && !pkg_) {
if (!pkg.dependencies[name]) {
throw new Error(name + ' not found but required');

@@ -204,2 +206,4 @@ }

deps.push(name);
// relative files

@@ -206,0 +210,0 @@ name = util.resolvePath(name, src);

{
"name": "father",
"version": "0.6.14",
"version": "0.7.0",
"description": "A package parser that can resolve self and dependencies, supporting spm, component.",

@@ -5,0 +5,0 @@ "main": "index",

@@ -166,3 +166,3 @@ # father [![Build Status](https://travis-ci.org/popomore/father.png?branch=master)](https://travis-ci.org/popomore/father) [![Coverage Status](https://coveralls.io/repos/popomore/father/badge.png?branch=master)](https://coveralls.io/r/popomore/father?branch=master)

### ignore
### skip

@@ -174,10 +174,18 @@ ```

If you don't want to parse package b, you can specify ignore. And it won't parse the dependencies of b.
If you want to skip file or package, you can specify skip. And it won't parse b and won't exist in dependencies.
```
new Package('path/to/package', {
ignore: ['b']
skip: ['b']
});
```
yield
```
define('a', [], function(require) {
require('b')
});
```
## Custom

@@ -184,0 +192,0 @@

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