ackerapple / path-reader Goto Github PK
View Code? Open in Web Editor NEWThis project forked from fshost/node-dir
Recursive asynchronous file and directory operations for Node.js
License: MIT License
This project forked from fshost/node-dir
Recursive asynchronous file and directory operations for Node.js
License: MIT License
Hello
I am using your module in the following node js code (first version) and it works correctly in the first call, but the second one fails without any error. If I change the name of the variable that has the module path-reader (second version) then the module works correctly. I thing that there is something that has to be deleted in order to be able to use the module a second time but I don't know exactly what it is.
-- first version
` var pathReader = require('path-reader');
var result = await pathReader.promiseFiles(config.report.parameters.featuresFolder)
.catch(e=>console.error(e));
var pathReader = require('path-reader');
var result1 = await pathReader.promiseFiles(config.report.parameters.featuresFolder)
.catch(e=>console.error(e));`
-- second version
`
var pathReader = require('path-reader');
var result = await pathReader.promiseFiles(config.report.parameters.featuresFolder)
.catch(e=>console.error(e));
var pathReader = require('path-reader');
var result1 = await pathReader.promiseFiles(config.report.parameters.featuresFolder)
.catch(e=>console.error(e));
`
with visual studio code 1.28.2 and node 8.9.3
and the following launch configuration
{ "type": "node", "request": "launch", "name": "Generate Report", "cwd": "${workspaceRoot}", "protocol": "inspector", "runtimeArgs": [ "inspect" ], "program": "${workspaceFolder}/test/test.js" }
and the following package.json
`
{
"name": "multiple-cucumber-html-reporter",
"version": "1.3.0",
"description": "Generate beautifull cucumberjs reports for multiple instances (browsers / devices)",
"keywords": [
"cucumber",
"html",
"test report",
"multiple-cucumber-html-reporter",
"html report",
"json to html"
],
"main": "lib/generate-report.js",
"scripts": {
"test": "jasmine",
"unit.test.coverage": "JASMINE_CONFIG_PATH=test/unit/jasmine.json istanbul cover jasmine",
"coveralls": "cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage",
"dev": "nodemon server.js",
"test-cover": "NODE_ENV=test nyc --clean --reporter=lcov --reporter=json --reporter=text npm test "
},
"repository": {
"type": "git",
"url": "git+https://github.com/wswebcreation/multiple-cucumber-html-reporter.git"
},
"author": "wswebcreation",
"bugs": {
"url": "https://github.com/wswebcreation/multiple-cucumber-html-reporter/issues"
},
"homepage": "https://github.com/wswebcreation/multiple-cucumber-html-reporter#readme",
"dependencies": {
"adm-zip": "^0.4.7",
"async": "^2.6.1",
"bluebird": "^3.5.2",
"body-parser": "^1.18.2",
"bson": "^3.0.2",
"c21e": "^1.1.5",
"chalk": "2.4.1",
"clear-require": "^2.0.0",
"cucumber-messages": "^2.0.0",
"date-and-time": "^0.6.3",
"ejs": "^2.5.8",
"express": "^4.16.3",
"find": "^0.2.9",
"fs-extra": "^7.0.0",
"fs-promise": "^2.0.3",
"gherkin": "^5.1.0",
"helmet-csp": "^2.7.0",
"js-base64": "^2.4.9",
"json-future": "^2.1.3",
"jsonfile": "5.0.0",
"jszip": "^3.1.5",
"klaw": "^3.0.0",
"lodash": "^4.17.11",
"minimist": "^1.2.0",
"minipass": "^2.3.5",
"mkdir": "0.0.2",
"mkdirp": "^0.5.1",
"mongodb": "^3.0.5",
"opn": "^5.4.0",
"path-reader": "^1.1.0",
"proxyquire": "^2.1.0",
"recursive-readdir": "^2.2.2",
"require-and-forget": "^1.0.0",
"safe-buffer": "^5.1.2",
"tar": "^4.4.1",
"util": "^0.11.0",
"uuid": "^3.3.2",
"winston": "^3.1.0",
"yallist": "^3.0.2"
},
"devDependencies": {
"coveralls": "^3.0.2",
"istanbul": "0.4.5",
"jasmine": "^3.3.0",
"jasmine-console-reporter": "^3.1.0",
"jasmine-expect": "^3.8.4",
"nodemon": "^1.18.5",
"nyc": "^13.1.0",
"supertest": "^3.3.0"
},
"directories": {
"doc": "docs",
"lib": "lib",
"test": "test"
},
"license": "ISC"
}
`
Is it good to add {throwIfNoEntry:false}
to fs.statSync
?
PACKAGE_ROOT
in my project may contain "broken" symbolic links.
Line 207 in 1b41552
I executed 'git clone'
Next, I ran 'dir.files ()' as the path to this folder
An error such as 'TypeError: Can not read property' files 'of undefined' has occurred.
(I thinked it happens when there is a hidden folder like '.git')
So I removed '.git' and ran it again
it work fine.
needs fix
Hi! Would it be possible to define if a file will be added to the array based on a fs.stats comparison?
I would like a list of file paths filtered by mtime for example. Is there a way to do so in a callback?
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.