diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cedbd57d4..dfe1b6698 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,40 +1,4 @@ # Contributing to `memfs` -To get started, download the project to your machine: - - git clone https://github.com/streamich/memfs - cd memfs - -Start from the `develop` branch: - - git checkout develop - git checkout -b your-feature - -Install dependencies: - - npm install - -Also, you probably want to use the latest Node.js version and `ts-node` -to be able to run TypeScript files: - - npm install -g ts-node - -While developing your feature you can create a demo file and place it -in `demo/feature.ts`, run it like this: - - ts-node demo/feature.ts - -Don't forget to write unit tests for you feature, test files have `.test.ts` -extension. - -Run tests using this command: - - npm run test-coverage-ts - -Also make sure that your test cases cover your new code well. - -When done, build the project: - - npm run build - -Submit a pull request into the `develop` branch. +1. Use [Angular convention](https://github.com/angular/angular/blob/master/CONTRIBUTING.md#-commit-message-guidelines) for commit messages. +2. Add tests for for code you add. diff --git a/src/volume.ts b/src/volume.ts index 2408ce6af..28071c46c 100644 --- a/src/volume.ts +++ b/src/volume.ts @@ -4,14 +4,13 @@ import {Node, Link, File, Stats} from "./node"; import {Buffer} from 'buffer'; import setImmediate from './setImmediate'; import process from './process'; -const extend = require('fast-extend'); -const errors = require('./internal/errors'); import setTimeoutUnref, {TSetTimeout} from "./setTimeoutUnref"; import {Readable, Writable} from 'stream'; -const util = require('util'); import {constants} from "./constants"; import {EventEmitter} from "events"; -import {ReadStream, WriteStream} from "fs"; +import errors = require('./internal/errors'); +import extend = require('fast-extend'); +import util = require('util'); const {O_RDONLY, O_WRONLY, O_RDWR, O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND, O_DIRECTORY, O_NOATIME, O_NOFOLLOW, O_SYNC, O_DIRECT, O_NONBLOCK, @@ -1016,7 +1015,7 @@ export class Volume { fd = id as number; } else { const steps = filenameToSteps(id as string); - const link: Link = this.getResolvedLink(steps); + const link: Link = this.getResolvedLink(steps); if(link) { const node = link.getNode();