@absolunet/fss
Advanced tools
Comparing version 1.6.2 to 1.7.0
@@ -93,2 +93,3 @@ //-------------------------------------------------------- | ||
get removePattern() { return misc.removePattern; } | ||
get existsCase() { return misc.existsCase; } | ||
@@ -95,0 +96,0 @@ } |
@@ -6,5 +6,5 @@ //-------------------------------------------------------- | ||
const gracefulFs = require('graceful-fs'); | ||
const ow = require('ow'); | ||
const utils = require('./helpers/utils'); | ||
const gracefulFs = require('graceful-fs'); | ||
const { default: ow } = require('ow'); | ||
const utils = require('./helpers/utils'); | ||
@@ -11,0 +11,0 @@ |
@@ -6,4 +6,4 @@ //-------------------------------------------------------- | ||
const ow = require('ow'); | ||
const utils = require('./helpers/utils'); | ||
const { default: ow } = require('ow'); | ||
const utils = require('./helpers/utils'); | ||
@@ -10,0 +10,0 @@ |
@@ -6,5 +6,5 @@ //-------------------------------------------------------- | ||
const JSON5 = require('json5'); | ||
const ow = require('ow'); | ||
const utils = require('./helpers/utils'); | ||
const JSON5 = require('json5'); | ||
const { default: ow } = require('ow'); | ||
const utils = require('./helpers/utils'); | ||
@@ -11,0 +11,0 @@ |
@@ -6,9 +6,11 @@ //-------------------------------------------------------- | ||
const deleteEmpty = require('delete-empty'); | ||
const junk = require('junk'); | ||
const klaw = require('klaw-sync'); | ||
const minimatch = require('minimatch'); | ||
const ow = require('ow'); | ||
const path = require('path'); | ||
const rimraf = require('rimraf'); | ||
const deleteEmpty = require('delete-empty'); | ||
const gracefulFs = require('graceful-fs'); | ||
const junk = require('junk'); | ||
const klaw = require('klaw-sync'); | ||
const minimatch = require('minimatch'); | ||
const { default: ow } = require('ow'); | ||
const path = require('path'); | ||
const rimraf = require('rimraf'); | ||
const { trueCasePathSync } = require('true-case-path'); | ||
@@ -34,5 +36,5 @@ | ||
}) | ||
.filter(({ path: curr, stats }) => { | ||
const file = curr.split(path.sep).pop(); | ||
const relative = curr.substring(rootPath.length + 1); | ||
.filter(({ path: current, stats }) => { | ||
const file = current.split(path.sep).pop(); | ||
const relative = current.slice(rootPath.length + 1); | ||
@@ -46,3 +48,3 @@ return ( | ||
.map((item) => { | ||
return fullPath ? item.path : item.path.substring(rootPath.length + 1); | ||
return fullPath ? item.path : item.path.slice(rootPath.length + 1); | ||
}) | ||
@@ -67,2 +69,13 @@ ; | ||
existsCase(pathToCheck) { | ||
ow(pathToCheck, ow.string.nonEmpty); | ||
if (gracefulFs.existsSync(pathToCheck)) { | ||
return path.resolve(pathToCheck) === trueCasePathSync(pathToCheck); | ||
} | ||
return false; | ||
} | ||
} | ||
@@ -69,0 +82,0 @@ |
@@ -6,6 +6,6 @@ //-------------------------------------------------------- | ||
const ow = require('ow'); | ||
const xml2js = require('xml2js'); | ||
const xml2jsParser = require('xml2js-parser'); | ||
const utils = require('./helpers/utils'); | ||
const { default: ow } = require('ow'); | ||
const xml2js = require('xml2js'); | ||
const xml2jsParser = require('xml2js-parser'); | ||
const utils = require('./helpers/utils'); | ||
@@ -12,0 +12,0 @@ |
@@ -6,9 +6,9 @@ //-------------------------------------------------------- | ||
const ow = require('ow'); | ||
const yaml = require('js-yaml'); | ||
const utils = require('./helpers/utils'); | ||
const { default: ow } = require('ow'); | ||
const yaml = require('js-yaml'); | ||
const utils = require('./helpers/utils'); | ||
const write = (file, object) => { | ||
utils.writeMaybeCompressedFile(file, yaml.safeDump(object)); | ||
utils.writeMaybeCompressedFile(file, yaml.dump(object)); | ||
}; | ||
@@ -26,3 +26,3 @@ | ||
return yaml.safeLoad(utils.readMaybeCompressedFile(file)); | ||
return yaml.load(utils.readMaybeCompressedFile(file)); | ||
} | ||
@@ -29,0 +29,0 @@ |
{ | ||
"name": "@absolunet/fss", | ||
"version": "1.6.2", | ||
"version": "1.7.0", | ||
"description": "graceful-fs / fs-extra sync wrapper with goodies", | ||
@@ -32,3 +32,3 @@ "definition": "", | ||
"engines": { | ||
"node": ">= 12.11.1" | ||
"node": ">= 12" | ||
}, | ||
@@ -38,14 +38,15 @@ "main": "index.js", | ||
"delete-empty": "^3.0.0", | ||
"fs-extra": "^8.1.0", | ||
"graceful-fs": "^4.2.2", | ||
"js-yaml": "^3.13.1", | ||
"json5": "^2.1.1", | ||
"fs-extra": "^9.1.0", | ||
"graceful-fs": "^4.2.6", | ||
"js-yaml": "^4.0.0", | ||
"json5": "^2.2.0", | ||
"junk": "^3.1.0", | ||
"klaw-sync": "^6.0.0", | ||
"minimatch": "^3.0.4", | ||
"ow": "^0.13.2", | ||
"rimraf": "^3.0.0", | ||
"xml2js": "^0.4.22", | ||
"ow": "^0.23.0", | ||
"rimraf": "^3.0.2", | ||
"true-case-path": "^2.2.1", | ||
"xml2js": "^0.4.23", | ||
"xml2js-parser": "^1.1.1" | ||
} | ||
} |
@@ -180,2 +180,10 @@ # @absolunet/fss | ||
<!-- existsCase --> | ||
### existsCase(path) | ||
Almost the same as `fss.exists`, except that it also validates the case-sensitivity of the path. | ||
<br> | ||
<!-- fchmod --> | ||
@@ -182,0 +190,0 @@ ### fchmod |
Sorry, the diff of this file is not supported yet
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
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
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
30660
342
839
13
1
+ Addedtrue-case-path@^2.2.1
+ Added@sindresorhus/is@4.6.0(transitive)
+ Addedargparse@2.0.1(transitive)
+ Addedat-least-node@1.0.0(transitive)
+ Addedcallsites@3.1.0(transitive)
+ Addeddot-prop@6.0.1(transitive)
+ Addedfs-extra@9.1.0(transitive)
+ Addedis-obj@2.0.0(transitive)
+ Addedjs-yaml@4.1.0(transitive)
+ Addedjsonfile@6.1.0(transitive)
+ Addedlodash.isequal@4.5.0(transitive)
+ Addedow@0.23.1(transitive)
+ Addedtrue-case-path@2.2.1(transitive)
+ Addedtype-fest@1.4.0(transitive)
+ Addeduniversalify@2.0.1(transitive)
+ Addedvali-date@1.0.0(transitive)
- Removedargparse@1.0.10(transitive)
- Removedesprima@4.0.1(transitive)
- Removedfs-extra@8.1.0(transitive)
- Removedjs-yaml@3.14.1(transitive)
- Removedjsonfile@4.0.0(transitive)
- Removedow@0.13.2(transitive)
- Removedsprintf-js@1.0.3(transitive)
- Removedtype-fest@0.5.2(transitive)
- Removeduniversalify@0.1.2(transitive)
Updatedfs-extra@^9.1.0
Updatedgraceful-fs@^4.2.6
Updatedjs-yaml@^4.0.0
Updatedjson5@^2.2.0
Updatedow@^0.23.0
Updatedrimraf@^3.0.2
Updatedxml2js@^0.4.23