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

globby

Package Overview
Dependencies
Maintainers
3
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

globby - npm Package Compare versions

Comparing version 5.0.0 to 6.0.0

23

index.js

@@ -6,3 +6,2 @@ 'use strict';

var glob = require('glob');
var arrify = require('arrify');
var pify = require('pify');

@@ -16,6 +15,18 @@

function isString(value) {
return typeof value === 'string';
}
function assertPatternsInput(patterns) {
if (!patterns.every(isString)) {
throw new TypeError('patterns must be a string or an array of strings');
}
}
function generateGlobTasks(patterns, opts) {
patterns = Array.isArray(patterns) ? patterns : [patterns];
assertPatternsInput(patterns);
var globTasks = [];
patterns = arrify(patterns);
opts = objectAssign({

@@ -50,4 +61,10 @@ cache: Object.create(null),

module.exports = function (patterns, opts) {
var globTasks = generateGlobTasks(patterns, opts);
var globTasks;
try {
globTasks = generateGlobTasks(patterns, opts);
} catch (err) {
return Promise.reject(err);
}
return Promise.all(globTasks.map(function (task) {

@@ -54,0 +71,0 @@ return globP(task.pattern, task.opts);

3

package.json
{
"name": "globby",
"version": "5.0.0",
"version": "6.0.0",
"description": "Extends `glob` with support for multiple patterns and exposes a Promise API",

@@ -56,3 +56,2 @@ "license": "MIT",

"array-union": "^1.0.1",
"arrify": "^1.0.0",
"glob": "^7.0.3",

@@ -59,0 +58,0 @@ "object-assign": "^4.0.1",

@@ -45,3 +45,3 @@ # globby [![Build Status](https://travis-ci.org/sindresorhus/globby.svg?branch=master)](https://travis-ci.org/sindresorhus/globby)

Note that you should avoid running the same tasks multiple times as they contain a file system cache. Instead, create a new tasks list to ensure that file system changes are taken in consideration.
Note that you should avoid running the same tasks multiple times as they contain a file system cache. Instead, run this method each time to ensure file system changes are taken into consideration.

@@ -48,0 +48,0 @@ #### patterns

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