Socket
Socket
Sign inDemoInstall

@parcel/fs

Package Overview
Dependencies
Maintainers
1
Versions
876
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@parcel/fs - npm Package Compare versions

Comparing version 2.0.0-alpha.3.1 to 2.0.0-nightly.65

12

lib/MemoryFS.js

@@ -12,3 +12,3 @@ "use strict";

var _utils = require("@parcel/utils");
var _core = require("@parcel/core");

@@ -986,6 +986,6 @@ var _package = _interopRequireDefault(require("../package.json"));

(0, _utils.registerSerializableClass)(`${_package.default.version}:MemoryFS`, MemoryFS);
(0, _utils.registerSerializableClass)(`${_package.default.version}:WorkerFS`, WorkerFS);
(0, _utils.registerSerializableClass)(`${_package.default.version}:Stat`, Stat);
(0, _utils.registerSerializableClass)(`${_package.default.version}:File`, File);
(0, _utils.registerSerializableClass)(`${_package.default.version}:Directory`, Directory);
(0, _core.registerSerializableClass)(`${_package.default.version}:MemoryFS`, MemoryFS);
(0, _core.registerSerializableClass)(`${_package.default.version}:WorkerFS`, WorkerFS);
(0, _core.registerSerializableClass)(`${_package.default.version}:Stat`, Stat);
(0, _core.registerSerializableClass)(`${_package.default.version}:File`, File);
(0, _core.registerSerializableClass)(`${_package.default.version}:Directory`, Directory);

@@ -18,2 +18,4 @@ "use strict";

var _core = require("@parcel/core");
var _watcher = _interopRequireDefault(require("@parcel/watcher"));

@@ -110,2 +112,2 @@

exports.NodeFS = NodeFS;
(0, _utils.registerSerializableClass)(`${_package.default.version}:NodeFS`, NodeFS);
(0, _core.registerSerializableClass)(`${_package.default.version}:NodeFS`, NodeFS);

@@ -8,3 +8,3 @@ "use strict";

var _utils = require("@parcel/utils");
var _core = require("@parcel/core");

@@ -179,2 +179,2 @@ var _package = _interopRequireDefault(require("../package.json"));

exports.OverlayFS = OverlayFS;
(0, _utils.registerSerializableClass)(`${_package.default.version}:OverlayFS`, OverlayFS);
(0, _core.registerSerializableClass)(`${_package.default.version}:OverlayFS`, OverlayFS);
{
"name": "@parcel/fs",
"version": "2.0.0-alpha.3.1",
"version": "2.0.0-nightly.65+53632227",
"description": "Blazing fast, zero configuration web application bundler",

@@ -19,5 +19,5 @@ "license": "MIT",

"dependencies": {
"@parcel/utils": "^2.0.0-alpha.3.1",
"@parcel/utils": "^2.0.0-nightly.65+53632227",
"@parcel/watcher": "^2.0.0-alpha.4",
"@parcel/workers": "^2.0.0-alpha.3.1",
"@parcel/workers": "^2.0.0-nightly.65+53632227",
"mkdirp": "^0.5.1",

@@ -28,3 +28,6 @@ "ncp": "^2.0.0",

},
"gitHead": "291f3e6815a1a857a6165fafb1691ceeb878b8f6"
"peerDependencies": {
"@parcel/core": "^2.0.0-alpha.3.1"
},
"gitHead": "53632227bab3382066ed9c40456f54af9fa5614c"
}

@@ -16,3 +16,3 @@ // @flow strict-local

destinationFS: FileSystem,
destination: FilePath
destination: FilePath,
) {

@@ -19,0 +19,0 @@ await destinationFS.mkdirp(destination);

@@ -8,7 +8,7 @@ // @flow

Options as WatcherOptions,
AsyncSubscription
AsyncSubscription,
} from '@parcel/watcher';
import path from 'path';
import {Readable, Writable} from 'stream';
import {registerSerializableClass} from '@parcel/utils';
import {registerSerializableClass} from '@parcel/core';
import packageJSON from '../package.json';

@@ -35,3 +35,3 @@ import WorkerFarm, {Handle} from '@parcel/workers';

entry?: Entry,
target?: FilePath
target?: FilePath,
|};

@@ -85,3 +85,3 @@

return this[fn](...args);
}
},
);

@@ -96,3 +96,3 @@ }

files: this.files,
symlinks: this.symlinks
symlinks: this.symlinks,
};

@@ -137,3 +137,3 @@ }

contents: Buffer | string,
options: ?FileOptions
options: ?FileOptions,
) {

@@ -163,3 +163,3 @@ filePath = this._normalizePath(filePath);

path: filePath,
entry: this.files.get(filePath)
entry: this.files.get(filePath),
});

@@ -169,3 +169,3 @@

type: file ? 'update' : 'create',
path: filePath
path: filePath,
});

@@ -274,3 +274,3 @@ }

type: 'unlink',
path: filePath
path: filePath,
});

@@ -280,3 +280,3 @@

type: 'delete',
path: filePath
path: filePath,
});

@@ -306,3 +306,3 @@

type: 'mkdir',
path: dir
path: dir,
});

@@ -312,3 +312,3 @@

type: 'create',
path: dir
path: dir,
});

@@ -332,3 +332,3 @@

type: 'unlink',
path: filePath
path: filePath,
});

@@ -338,3 +338,3 @@

type: 'delete',
path: filePath
path: filePath,
});

@@ -350,3 +350,3 @@ }

type: 'unlink',
path: filePath
path: filePath,
});

@@ -356,3 +356,3 @@

type: 'delete',
path: dirPath
path: dirPath,
});

@@ -367,3 +367,3 @@ }

type: 'unlink',
path: filePath
path: filePath,
});

@@ -376,3 +376,3 @@ }

type: 'unlink',
path: filePath
path: filePath,
});

@@ -382,3 +382,3 @@

type: 'delete',
path: filePath
path: filePath,
});

@@ -389,3 +389,3 @@ } else if (this.files.has(filePath)) {

type: 'unlink',
path: filePath
path: filePath,
});

@@ -395,3 +395,3 @@

type: 'delete',
path: filePath
path: filePath,
});

@@ -411,3 +411,3 @@ }

type: 'mkdir',
path: destination
path: destination,
});

@@ -417,3 +417,3 @@

type: 'create',
path: destination
path: destination,
});

@@ -430,7 +430,7 @@ }

type: 'mkdir',
path: destination
path: destination,
});
this._triggerEvent({
type: 'create',
path: destName
path: destName,
});

@@ -449,3 +449,3 @@ }

path: destName,
entry: file
entry: file,
});

@@ -455,3 +455,3 @@

type: exists ? 'update' : 'create',
path: destName
path: destName,
});

@@ -488,3 +488,3 @@ }

path,
target
target,
});

@@ -543,3 +543,3 @@ }

fn: (err: ?Error, events: Array<Event>) => mixed,
opts: WatcherOptions
opts: WatcherOptions,
): Promise<AsyncSubscription> {

@@ -566,3 +566,3 @@ dir = this._normalizePath(dir);

return Promise.resolve();
}
},
});

@@ -574,3 +574,3 @@ }

snapshot: FilePath,
opts: WatcherOptions
opts: WatcherOptions,
): Promise<Array<Event>> {

@@ -583,3 +583,3 @@ let contents = await this.readFile(snapshot, 'utf8');

events = events.filter(
event => !ignore.some(i => event.path.startsWith(i + path.sep))
event => !ignore.some(i => event.path.startsWith(i + path.sep)),
);

@@ -602,3 +602,3 @@ }

fn: (err: ?Error, events: Array<Event>) => mixed,
options: WatcherOptions
options: WatcherOptions,
) {

@@ -613,3 +613,3 @@ this.fn = fn;

events = events.filter(
event => !ignore.some(i => event.path.startsWith(i + path.sep))
event => !ignore.some(i => event.path.startsWith(i + path.sep)),
);

@@ -661,3 +661,3 @@ }

this.emit('error', err);
}
},
);

@@ -683,3 +683,3 @@ }

encoding: any,
callback: (error?: Error) => void
callback: (error?: Error) => void,
) {

@@ -692,5 +692,6 @@ let c = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk, encoding);

_final(callback: (error?: Error) => void) {
this.fs
.writeFile(this.filePath, this.buffer, this.options)
.then(() => callback(), err => callback(err));
this.fs.writeFile(this.filePath, this.buffer, this.options).then(
() => callback(),
err => callback(err),
);
}

@@ -920,3 +921,3 @@

}
})
}),
]);

@@ -932,3 +933,3 @@ }

return {
id: this.id
id: this.id,
};

@@ -940,3 +941,3 @@ }

contents: Buffer | string,
options: ?FileOptions
options: ?FileOptions,
) {

@@ -943,0 +944,0 @@ super.writeFile(filePath, contents, options);

@@ -7,3 +7,3 @@ // @flow

Options as WatcherOptions,
AsyncSubscription
AsyncSubscription,
} from '@parcel/watcher';

@@ -15,3 +15,4 @@

import rimraf from 'rimraf';
import {registerSerializableClass, promisify} from '@parcel/utils';
import {promisify} from '@parcel/utils';
import {registerSerializableClass} from '@parcel/core';
import watcher from '@parcel/watcher';

@@ -66,3 +67,3 @@ import packageJSON from '../package.json';

fn: (err: ?Error, events: Array<Event>) => mixed,
opts: WatcherOptions
opts: WatcherOptions,
): Promise<AsyncSubscription> {

@@ -75,3 +76,3 @@ return watcher.subscribe(dir, fn, opts);

snapshot: FilePath,
opts: WatcherOptions
opts: WatcherOptions,
): Promise<Array<Event>> {

@@ -84,3 +85,3 @@ return watcher.getEventsSince(dir, snapshot, opts);

snapshot: FilePath,
opts: WatcherOptions
opts: WatcherOptions,
): Promise<void> {

@@ -87,0 +88,0 @@ await watcher.writeSnapshot(dir, snapshot, opts);

@@ -7,6 +7,6 @@ // @flow

Options as WatcherOptions,
AsyncSubscription
AsyncSubscription,
} from '@parcel/watcher';
import {registerSerializableClass} from '@parcel/utils';
import {registerSerializableClass} from '@parcel/core';
import packageJSON from '../package.json';

@@ -66,3 +66,3 @@

writable: this.writable,
readable: this.readable
readable: this.readable,
};

@@ -77,3 +77,3 @@ }

destination,
await this.writable.readFile(source)
await this.writable.readFile(source),
);

@@ -83,3 +83,3 @@ } else {

destination,
await this.readable.readFile(source)
await this.readable.readFile(source),
);

@@ -151,3 +151,3 @@ }

fn: (err: ?Error, events: Array<Event>) => mixed,
opts: WatcherOptions
opts: WatcherOptions,
): Promise<AsyncSubscription> {

@@ -160,3 +160,3 @@ let writableSubscription = await this.writable.watch(dir, fn, opts);

await readableSubscription.unsubscribe();
}
},
};

@@ -168,3 +168,3 @@ }

snapshot: FilePath,
opts: WatcherOptions
opts: WatcherOptions,
): Promise<Array<Event>> {

@@ -174,3 +174,3 @@ let writableEvents = await this.writable.getEventsSince(

snapshot,
opts
opts,
);

@@ -180,3 +180,3 @@ let readableEvents = await this.readable.getEventsSince(

snapshot,
opts
opts,
);

@@ -189,3 +189,3 @@ return [...writableEvents, ...readableEvents];

snapshot: FilePath,
opts: WatcherOptions
opts: WatcherOptions,
): Promise<void> {

@@ -192,0 +192,0 @@ await this.writable.writeSnapshot(dir, snapshot, opts);

@@ -8,3 +8,3 @@ // @flow

Options as WatcherOptions,
AsyncSubscription
AsyncSubscription,
} from '@parcel/watcher';

@@ -25,3 +25,3 @@

contents: Buffer | string,
options: ?FileOptions
options: ?FileOptions,
): Promise<void>;

@@ -31,3 +31,3 @@ copyFile(

destination: FilePath,
flags?: number
flags?: number,
): Promise<void>;

@@ -38,3 +38,3 @@ stat(filePath: FilePath): Promise<$Shape<Stats>>;

path: FilePath,
opts?: {withFileTypes?: false, ...}
opts?: {withFileTypes?: false, ...},
): Promise<FilePath[]>;

@@ -59,3 +59,3 @@ readdir(path: FilePath, opts: {withFileTypes: true, ...}): Promise<Dirent[]>;

fn: (err: ?Error, events: Array<Event>) => mixed,
opts: WatcherOptions
opts: WatcherOptions,
): Promise<AsyncSubscription>;

@@ -65,3 +65,3 @@ getEventsSince(

snapshot: FilePath,
opts: WatcherOptions
opts: WatcherOptions,
): Promise<Array<Event>>;

@@ -71,3 +71,3 @@ writeSnapshot(

snapshot: FilePath,
opts: WatcherOptions
opts: WatcherOptions,
): Promise<void>;

@@ -74,0 +74,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc