memfs
Advanced tools
Comparing version 2.5.10 to 2.5.11
@@ -6,7 +6,7 @@ # Relative paths | ||
You can also use *relative* paths but the gotcha is that then `memfs` needs | ||
to somehow resolve those relative paths to absolute paths. `memfs` will use | ||
the value of `process.cwd()` to resolve the absolute paths. The problem is | ||
to somehow resolve those relative paths into absolute paths. `memfs` will use | ||
the value of `process.cwd()` to resolve the relative paths. The problem is | ||
that `process.cwd()` specifies the *current working directory* of your | ||
on-disk filesystem and you will probably not have that directory available in | ||
`memfs`. | ||
on-disk filesystem and you will probably not have that directory available in your | ||
`memfs` volume. | ||
@@ -13,0 +13,0 @@ The best solution is to always use absolute paths. Alternatively, you can use |
@@ -42,1 +42,2 @@ "use strict"; | ||
module.exports = __assign({}, module.exports, exports.fs); | ||
module.exports.semantic = true; |
@@ -21,3 +21,3 @@ "use strict"; | ||
*/ | ||
var Node = (function (_super) { | ||
var Node = /** @class */ (function (_super) { | ||
__extends(Node, _super); | ||
@@ -217,3 +217,3 @@ function Node(ino, perm) { | ||
*/ | ||
var Link = (function (_super) { | ||
var Link = /** @class */ (function (_super) { | ||
__extends(Link, _super); | ||
@@ -323,3 +323,3 @@ function Link(vol, parent, name) { | ||
*/ | ||
var File = (function () { | ||
var File = /** @class */ (function () { | ||
/** | ||
@@ -411,3 +411,3 @@ * Open a Link-Node pair. `node` is provided separately as that might be a different node | ||
*/ | ||
var Stats = (function () { | ||
var Stats = /** @class */ (function () { | ||
function Stats() { | ||
@@ -414,0 +414,0 @@ // User ID and group ID. |
@@ -15,3 +15,3 @@ "use strict"; | ||
var node_1 = require("./node"); | ||
var ObjectStore = (function () { | ||
var ObjectStore = /** @class */ (function () { | ||
function ObjectStore(obj) { | ||
@@ -39,3 +39,3 @@ this.obj = obj; | ||
var key = function (type, id) { return "memfs." + namespace + "." + type + "." + id; }; | ||
var NodeLocalStorage = (function (_super) { | ||
var NodeLocalStorage = /** @class */ (function (_super) { | ||
__extends(NodeLocalStorage, _super); | ||
@@ -67,3 +67,3 @@ function NodeLocalStorage() { | ||
}(node_1.Node)); | ||
var LinkLocalStorage = (function (_super) { | ||
var LinkLocalStorage = /** @class */ (function (_super) { | ||
__extends(LinkLocalStorage, _super); | ||
@@ -87,3 +87,3 @@ function LinkLocalStorage() { | ||
}(node_1.Link)); | ||
return (function (_super) { | ||
return /** @class */ (function (_super) { | ||
__extends(VolumeLocalStorage, _super); | ||
@@ -90,0 +90,0 @@ function VolumeLocalStorage() { |
{ | ||
"name": "memfs", | ||
"version": "2.5.10", | ||
"version": "2.5.11", | ||
"description": "In-memory file-system with Node's fs API.", | ||
@@ -28,24 +28,23 @@ "main": "lib/index.js", | ||
"fast-extend": "0.0.2", | ||
"fs-monkey": "^0.2.1" | ||
"fs-monkey": "^0.3.0" | ||
}, | ||
"devDependencies": { | ||
"jest": "^21.1.0", | ||
"jest": "21.2.1", | ||
"jest-cli": "22.1.4", | ||
"jest-tap-reporter": "1.7.0", | ||
"ts-jest": "^21.0.1", | ||
"mocha": "3.4.2", | ||
"chai": "4.1.0", | ||
"typescript": "2.4.2", | ||
"ts-jest": "21.2.4", | ||
"typescript": "2.6.2", | ||
"ts-node": "3.3.0", | ||
"babel-cli": "6.24.1", | ||
"babel-cli": "6.26.0", | ||
"babel-preset-es2015": "6.24.1", | ||
"gulp": "3.9.1", | ||
"gulp-typescript": "3.2.1", | ||
"source-map-support": "0.4.15", | ||
"nyc": "11.1.0", | ||
"watch": "^1.0.0", | ||
"@types/node": "8.0.17", | ||
"@types/jest": "^21.1.1" | ||
"gulp-typescript": "3.2.3", | ||
"semantic-release": "12.2.2", | ||
"rimraf": "2.6.2", | ||
"@types/node": "9.3.0", | ||
"@types/jest": "22.0.1" | ||
}, | ||
"scripts": { | ||
"build": "npm run build-ts && npm run build-js", | ||
"clean": "rimraf lib types", | ||
"build": "npm run clean && npm run build-ts && npm run build-js", | ||
"build-ts": "gulp build-ts", | ||
@@ -56,3 +55,4 @@ "build-js": "babel src --out-dir lib", | ||
"test:watch": "jest --watch", | ||
"watch": "watch 'npm run build' ./src" | ||
"watch": "watch 'npm run build' ./src", | ||
"semantic-release": "semantic-release pre && npm publish && semantic-release post" | ||
}, | ||
@@ -69,5 +69,4 @@ "jest": { | ||
}, | ||
"testRegex": ".*/__tests__/.*\\.(test|spec)\\.(jsx?|tsx?)$", | ||
"reporters": ["jest-tap-reporter"] | ||
"testRegex": ".*/__tests__/.*\\.(test|spec)\\.(jsx?|tsx?)$" | ||
} | ||
} |
@@ -7,3 +7,3 @@ # memfs 2.0 | ||
- 100% of Node's `fs` API implemented, see *API Status* | ||
- 100% of Node's `fs` API implemented, see [*API Status*](./docs/api-status.md) | ||
- Stores files in memory, in `Buffer`s | ||
@@ -24,3 +24,3 @@ - Throws same* errors as Node.js | ||
### Usage | ||
## Usage | ||
@@ -53,4 +53,4 @@ ```js | ||
```js | ||
vol.writeFileSync('/script.sh', '#! /bin/bash'); | ||
vol.toJSON(); // {"/script.sh": "#! /bin/bash"} | ||
vol.writeFileSync('/script.sh', 'sudo rm -rf *'); | ||
vol.toJSON(); // {"/script.sh": "sudo rm -rf *"} | ||
``` | ||
@@ -137,4 +137,4 @@ | ||
# License | ||
## License | ||
[Unlicense](./LICENSE) - public domain. |
@@ -50,1 +50,3 @@ import {Stats} from './node'; | ||
module.exports = {...module.exports, ...fs}; | ||
module.exports.semantic = true; |
// Here we mock the global `process` variable in case we are not in Node's environment. | ||
interface IProcess { | ||
export interface IProcess { | ||
getuid(): number, | ||
@@ -5,0 +5,0 @@ getgid(): number, |
@@ -7,8 +7,16 @@ { | ||
"noImplicitAny": false, | ||
"sourceMap": false | ||
"sourceMap": false, | ||
"declaration": true, | ||
"declarationDir": "./types", | ||
"outDir": "./lib" | ||
}, | ||
"exclude": [ | ||
"demo", | ||
"src/__tests__", | ||
"node_modules", | ||
"lib" | ||
], | ||
"include": [ | ||
"src" | ||
] | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
248263
14
53
6013
+ Addedfs-monkey@0.3.3(transitive)
- Removedfs-monkey@0.2.2(transitive)
Updatedfs-monkey@^0.3.0