Registry / devops / glob-fs-dotfiles

glob-fs-dotfiles

JSON →
library0.1.6jsnpmunverified

A middleware package for glob-fs that automatically ignores dotfiles (files and directories starting with a dot) during file globbing. Version 0.1.6 is the latest and only release. It was originally a built-in middleware for glob-fs but can be used directly when the default middleware stack is disabled. Key differentiators: provides fine-grained control over dotfile handling via options like 'dot', 'dotdirs', 'dotfiles'. The package is part of the glob-fs ecosystem but is deprecated in favor of glob-fs's built-in support.

npm install glob-fs-dotfiles
INSTALL
IMPORT
SIG · GLOB-FS-DOTFILES
G
glob-fs-dotfiles
devopsjavascriptv0.1.6
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

dotfiles
import dotfiles from 'glob-fs-dotfiles';
const dotfiles = require('glob-fs-dotfiles');
ESM import works if using bundler/Node supporting ESM, but package is CommonJS-only. Use require for Node < 14.
default
const dotfiles = require('glob-fs-dotfiles');
import { dotfiles } from 'glob-fs-dotfiles';
No named export; only default export available.
dotfiles function
var glob = require('glob-fs')({}).use(require('glob-fs-dotfiles')());
var glob = require('glob-fs')({}).use(require('glob-fs-dotfiles'));
dotfiles() returns a middleware function; calling it is required.

Shows require and use of glob-fs-dotfiles middleware with glob-fs, including disabling built-ins for explicit control.

var dotfiles = require('glob-fs-dotfiles'); var glob = require('glob-fs')({ builtins: false }) // disable built-ins .use(dotfiles()) // apply dotfiles middleware .readdir('*', function(err, files) { if (err) console.error(err); else console.log(files); });
Debug
Known issues
deprecatedPackage is deprecated; functionality is built into glob-fs as default middleware.
fix
Use glob-fs without this package; dotfiles are ignored by default. Or if you need to include them, use options.dot: true in glob-fs.
affects: *
gotchaMust be used with glob-fs; standalone usage not possible.
fix
Ensure glob-fs is installed and you create a glob-fs instance before using this middleware.
affects: *
gotchaRequires calling dotfiles() as a function to get the middleware, not the exported value itself.
fix
Use .use(dotfiles()) instead of .use(dotfiles).
affects: *
breakingIf you want to include dotfiles, you must pass options to the middleware: dotfiles({dot: true}).
fix
Use dotfiles({dot: true}) to include dotfiles; otherwise they are ignored.
affects: *
Errors
Common errors & fixes
TypeError: glob.use is not a function
glob-fs not imported correctly or not installed; glob.use is undefined.
fix
Install glob-fs: npm install glob-fs --save and require it before using .use().
Error: Must be used with glob-fs
This middleware is not used in the context of glob-fs.
fix
Create a glob-fs instance first: var glob = require('glob-fs')(options); glob.use(require('glob-fs-dotfiles')());
Error: Expected a function, but got something else in middleware
Forgot to call dotfiles() as a function; passed the exported value directly.
fix
Change .use(require('glob-fs-dotfiles')) to .use(require('glob-fs-dotfiles')())
Upgrade
Version history
0.1.6latest on npm
Audit
Dependencies
glob-fsrequiredRequired as the file globbing engine and middleware consumer
Agent activity
2 hits · last 30 days
node
2
Resources
glob-fs-dotfiles — npm install glob-fs-dotfiles · libregistry