Comparing version 4.4.1 to 4.4.2
# Change Log | ||
## 4.4.2 | ||
* Throw if item content is invalid in config (thanks @mutantcornholio, see [#221][#221]) | ||
* Use const in readme (thanks @denar90, see [#222][#222]) | ||
## 4.4.1 | ||
* Document that tests are run on Node 8.x as well. | ||
## 4.4.0 | ||
@@ -198,1 +207,3 @@ | ||
[#210]: https://github.com/tschaub/mock-fs/pull/210 | ||
[#221]: https://github.com/tschaub/mock-fs/pull/221 | ||
[#222]: https://github.com/tschaub/mock-fs/pull/222 |
@@ -253,3 +253,3 @@ 'use strict'; | ||
var name, i, ii; | ||
for ((i = 0), (ii = parts.length); i < ii; ++i) { | ||
for (i = 0, ii = parts.length; i < ii; ++i) { | ||
name = parts[i]; | ||
@@ -256,0 +256,0 @@ while (item instanceof SymbolicLink) { |
@@ -60,3 +60,3 @@ 'use strict'; | ||
var i, ii, name, candidate; | ||
for ((i = 0), (ii = parts.length); i < ii; ++i) { | ||
for (i = 0, ii = parts.length; i < ii; ++i) { | ||
name = parts[i]; | ||
@@ -142,3 +142,3 @@ candidate = directory.getItem(name); | ||
item = obj(); | ||
} else { | ||
} else if (typeof obj === 'object') { | ||
// directory with more to populate | ||
@@ -149,2 +149,4 @@ item = new Directory(); | ||
} | ||
} else { | ||
throw new Error('Unsupported type: ' + typeof obj + ' of item ' + name); | ||
} | ||
@@ -182,3 +184,3 @@ /** | ||
var i, ii, name, candidate; | ||
for ((i = 0), (ii = parts.length - 1); i < ii; ++i) { | ||
for (i = 0, ii = parts.length - 1; i < ii; ++i) { | ||
name = parts[i]; | ||
@@ -185,0 +187,0 @@ candidate = directory.getItem(name); |
{ | ||
"name": "mock-fs", | ||
"description": "A configurable mock file system. You know, for testing.", | ||
"version": "4.4.1", | ||
"version": "4.4.2", | ||
"main": "lib/index.js", | ||
@@ -28,4 +28,4 @@ "homepage": "https://github.com/tschaub/mock-fs", | ||
"scripts": { | ||
"lint:fix": "eslint --fix benchmarks lib test", | ||
"pretest": "eslint benchmarks lib test", | ||
"lint": "eslint benchmarks lib test", | ||
"pretest": "npm run lint", | ||
"test": "mocha --recursive test", | ||
@@ -36,8 +36,8 @@ "bench": "bench benchmarks" | ||
"bench-it": "0.4.0", | ||
"chai": "3.5.0", | ||
"eslint": "^3.19.0", | ||
"eslint-config-tschaub": "^7.0.0", | ||
"mocha": "3.1.2", | ||
"rimraf": "2.5.4", | ||
"semver": "^5.3.0" | ||
"chai": "^4.1.2", | ||
"eslint": "^4.8.0", | ||
"eslint-config-tschaub": "^8.0.0", | ||
"mocha": "^4.0.1", | ||
"rimraf": "^2.6.2", | ||
"semver": "^5.4.1" | ||
}, | ||
@@ -44,0 +44,0 @@ "eslintConfig": { |
@@ -10,3 +10,3 @@ # `mock-fs` | ||
```js | ||
var mock = require('mock-fs'); | ||
const mock = require('mock-fs'); | ||
@@ -13,0 +13,0 @@ mock({ |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
8
88293
23
2479
1