@fcostarodrigo/walk
Advanced tools
Comparing version 5.0.0 to 5.0.1
{ | ||
"name": "@fcostarodrigo/walk", | ||
"version": "5.0.0", | ||
"version": "5.0.1", | ||
"description": "Transverse files recursively", | ||
@@ -31,19 +31,43 @@ "main": "src/walk.js", | ||
}, | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"@types/jest": "^25.2.1", | ||
"@types/node": "^13.13.0", | ||
"eslint": "^6.8.0", | ||
"eslint-config-airbnb-base": "^14.1.0", | ||
"eslint-config-prettier": "^6.10.1", | ||
"eslint-plugin-import": "^2.20.2", | ||
"eslint-plugin-jest": "^23.8.2", | ||
"eslint-plugin-prettier": "^3.1.2", | ||
"eslint-plugin-tsc": "^1.2.0", | ||
"husky": "^4.2.5", | ||
"jest": "^25.3.0", | ||
"lint-staged": "^10.1.3", | ||
"prettier": "^2.0.4", | ||
"typescript": "^3.8.3" | ||
"@types/jest": "^26.0.15", | ||
"@types/node": "^14.14.2", | ||
"eslint": "^7.12.0", | ||
"eslint-config-airbnb-base": "^14.2.0", | ||
"eslint-config-prettier": "^6.14.0", | ||
"eslint-plugin-import": "^2.22.1", | ||
"eslint-plugin-jest": "^24.1.0", | ||
"eslint-plugin-prettier": "^3.1.4", | ||
"eslint-plugin-tsc": "^2.0.0", | ||
"husky": "^4.3.0", | ||
"jest": "^26.6.1", | ||
"lint-staged": "^10.4.2", | ||
"prettier": "^2.1.2", | ||
"typescript": "^4.0.3" | ||
}, | ||
"dependencies": {}, | ||
"eslintConfig": { | ||
"extends": [ | ||
"airbnb-base", | ||
"plugin:jest/recommended", | ||
"prettier" | ||
], | ||
"plugins": [ | ||
"prettier", | ||
"jest", | ||
"tsc" | ||
], | ||
"rules": { | ||
"no-continue": "off", | ||
"no-await-in-loop": "off", | ||
"no-restricted-syntax": "off", | ||
"prettier/prettier": "error", | ||
"tsc/config": [ | ||
"error", | ||
{ | ||
"configFile": "tsconfig.json" | ||
} | ||
] | ||
} | ||
}, | ||
"husky": { | ||
@@ -53,3 +77,15 @@ "hooks": { | ||
} | ||
}, | ||
"lint-staged": { | ||
"*.{yaml,yml,json,md}": [ | ||
"prettier --write" | ||
], | ||
"*.{js,jsx,mjs}": [ | ||
"eslint src --fix", | ||
"jest --findRelatedTests" | ||
] | ||
}, | ||
"prettier": { | ||
"trailingComma": "all" | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
const fs = require("fs"); | ||
const fs = require("fs").promises; | ||
const path = require("path"); | ||
@@ -14,3 +14,3 @@ | ||
try { | ||
const files = await fs.promises.readdir(root); | ||
const files = await fs.readdir(root); | ||
@@ -17,0 +17,0 @@ if (listFolders) { |
/** @typedef {{promises: { readdir: jest.Mock}}} MockedFs */ | ||
const fs = /** @type {MockedFs} */ (/** @type {unknown} */ (require("fs"))); | ||
const fs = require("fs").promises; | ||
const walk = require("./walk"); | ||
const mockReaddir = /** @type {jest.MockedFunction<typeof fs.readdir>} */ (fs.readdir); | ||
jest.mock("fs", () => ({ promises: { readdir: jest.fn() } })); | ||
@@ -11,5 +13,5 @@ | ||
const error = new Error(); | ||
fs.promises.readdir.mockRejectedValueOnce(error); | ||
mockReaddir.mockRejectedValueOnce(error); | ||
return expect(walk().next()).rejects.toBe(error); | ||
}); | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6455
106
12