gemini-testing / glob-extra Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
node v12.16.1
https://github.com/gemini-testing/glob-extra/blob/master/lib/utils.js#L12
(await isFile('some-sock.sock')) === false
OS: Windows 10.
4.0.0:
node
> const globExtra = require('../lib/index');
> globExtra.expandPaths(['C:\\some_file.txt']).then(a => console.log(a));
[ 'C:/some_file.txt' ]
4.0.1:
node
> const globExtra = require('../lib/index');
> globExtra.expandPaths(['C:\\some_file.txt']).then(a => console.log(a));
[]
This makes Gemini and Hermione unusable.
If we pass array with one or more invalid path
they just just skipped. It may be an issue because after calling require('glob-extra').expandPaths
we don't know how many paths are not valid or is there any?
const paths = getArrayFromUserInput(); // ['./right/path/but/with/typoo/5.js', './path/that/do/not/exist/1.js', './path/to/two/or/three/files/*'];
const resolved = require('glob-extra').expandPaths()paths;
functionThatUserExpectsWorkOnFiveLinksButWorksOnFour(paths);
Make new option options.errorOnNoMatch
that will throw error it any of array's path do not match file.
// glob-extra/lib/index.js:11
const getFilesByMask = (pattern, options) => {
const files = fg.sync(pattern, options);
if (options.errorOnNoMatch && files.length == 0) {
throw new Error('Could not match any files with given patten: ' + pattern);
}
return Promise.resolve(files);
};
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.