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

recrawl

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

recrawl - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

src/fs.ts

4

lib/fs.js

@@ -0,3 +1,5 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const fs = require("fs");
const tslib_1 = require("tslib");
const fs = tslib_1.__importStar(require("fs"));
exports.localFs = {

@@ -4,0 +6,0 @@ readdir: async (name) => fs.readdirSync(name),

@@ -0,6 +1,9 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const relative_1 = require("@cush/relative");
const fs = require("fs");
const glob_regex_1 = require("glob-regex");
const path = require("path");
const fs = tslib_1.__importStar(require("fs"));
const glob_regex_1 = tslib_1.__importDefault(require("glob-regex"));
const slash_1 = tslib_1.__importDefault(require("slash"));
const path = tslib_1.__importStar(require("path"));
const fs_1 = require("./fs");

@@ -27,3 +30,3 @@ const { S_IFMT, S_IFLNK, S_IFDIR } = fs.constants;

return async (root, arg) => {
root = path.resolve(root) + path.sep;
root = slash_1.default(path.resolve(root)) + '/';
let each;

@@ -65,3 +68,3 @@ let files;

depth++;
await crawl(file + path.sep);
await crawl(file + '/');
depth--;

@@ -87,3 +90,3 @@ }

/** Tests true for absolute paths and globs starting with two asterisks. */
const globAllRE = new RegExp(`(?:\\${path.sep}|\\*\\*)`);
const globAllRE = /(?:\/|\*\*)/;
/** Merge regular expressions together. */

@@ -97,3 +100,3 @@ const matchAny = (patterns) => new RegExp(`^(?:${patterns.join('|')})$`);

function compileGlob(glob, root) {
if (glob[0] == path.sep) {
if (glob[0] == '/') {
glob = glob.slice(1);

@@ -108,3 +111,3 @@ }

if (root)
glob = path.join(root, glob);
glob = path.posix.join(root, glob);
return glob_regex_1.default.replace(glob);

@@ -158,3 +161,3 @@ }

do {
let target = await fs.readlink(link);
let target = slash_1.default(await fs.readlink(link));
if (path.isAbsolute(target)) {

@@ -171,3 +174,3 @@ name = null;

// This code path is faster.
name = relative_1.default(name, target);
name = relative_1.relative(name, target);
link = root + name;

@@ -174,0 +177,0 @@ }

@@ -0,2 +1,3 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=types.js.map
{
"name": "recrawl",
"version": "2.0.0",
"version": "2.0.1",
"main": "lib/recrawl.js",

@@ -10,7 +10,9 @@ "license": "MIT",

"lint": "tslint -p .",
"prepare": "yarn build",
"test": "jest"
},
"dependencies": {
"@cush/relative": "^0.1.0",
"@cush/relative": "^1.0.0",
"glob-regex": "^0.3.0",
"slash": "^3.0.0",
"tslib": "^1.9.3"

@@ -29,3 +31,4 @@ },

"files": [
"lib"
"lib",
"src"
],

@@ -32,0 +35,0 @@ "keywords": [

# recrawl
[![npm](https://img.shields.io/npm/v/recrawl.svg)](https://www.npmjs.com/package/recrawl)
[![ci](https://github.com/aleclarson/recrawl/actions/workflows/release.yml/badge.svg)](https://github.com/aleclarson/recrawl/actions/workflows/release.yml)
[![codecov](https://codecov.io/gh/aleclarson/recrawl/branch/master/graph/badge.svg)](https://codecov.io/gh/aleclarson/recrawl)
[![Bundle size](https://badgen.net/bundlephobia/min/recrawl)](https://bundlephobia.com/result?p=recrawl)
[![Code style: Prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://paypal.me/alecdotbiz)
Collect the descendants of a directory.

@@ -4,0 +11,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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