pwd-fs 3.1.3 → 3.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/src/index.d.ts +3 -5
- package/lib/src/index.js +21 -0
- package/lib/src/powered-file-system.d.ts +2 -1
- package/lib/{powered-file-system.js → src/powered-file-system.js} +58 -54
- package/lib/{recurse-io-sync.js → src/recurse-io-sync.js} +25 -27
- package/lib/{recurse-io.js → src/recurse-io.js} +31 -33
- package/lib/test/__fmock.js +40 -0
- package/lib/test/append.spec.js +58 -0
- package/lib/test/bitmask.spec.js +26 -0
- package/lib/test/chmod.spec.js +62 -0
- package/lib/test/chown.spec.js +68 -0
- package/lib/test/constructor.spec.js +17 -0
- package/lib/test/copy.spec.js +80 -0
- package/lib/test/mkdir.spec.js +90 -0
- package/lib/test/read.spec.js +73 -0
- package/lib/test/readdir.spec.js +70 -0
- package/lib/test/remove.spec.js +63 -0
- package/lib/test/rename.spec.js +66 -0
- package/lib/test/stat.spec.js +76 -0
- package/lib/test/symlink.spec.js +74 -0
- package/lib/test/test.spec.js +60 -0
- package/lib/test/write.spec.js +82 -0
- package/package.json +7 -14
- package/readme.md +10 -8
- package/src/index.ts +4 -26
- package/src/powered-file-system.ts +22 -20
- package/{__tests__ → test}/append.spec.ts +2 -3
- package/{__tests__ → test}/chmod.spec.ts +2 -3
- package/{__tests__ → test}/chown.spec.ts +2 -4
- package/{__tests__ → test}/constructor.spec.ts +1 -1
- package/{__tests__ → test}/copy.spec.ts +2 -3
- package/{__tests__ → test}/mkdir.spec.ts +2 -1
- package/{__tests__ → test}/read.spec.ts +2 -3
- package/{__tests__ → test}/readdir.spec.ts +3 -4
- package/{__tests__ → test}/remove.spec.ts +3 -3
- package/{__tests__ → test}/rename.spec.ts +2 -2
- package/{__tests__ → test}/stat.spec.ts +2 -3
- package/{__tests__ → test}/symlink.spec.ts +3 -3
- package/{__tests__ → test}/test.spec.ts +1 -3
- package/{__tests__ → test}/write.spec.ts +2 -2
- package/tsconfig.json +5 -5
- package/jest.config.ts +0 -14
- package/lib/index.js +0 -24
- package/rollup.config.js +0 -16
- /package/lib/{__tests__ → test}/__fmock.d.ts +0 -0
- /package/lib/{__tests__ → test}/append.spec.d.ts +0 -0
- /package/lib/{__tests__ → test}/bitmask.spec.d.ts +0 -0
- /package/lib/{__tests__ → test}/chmod.spec.d.ts +0 -0
- /package/lib/{__tests__ → test}/chown.spec.d.ts +0 -0
- /package/lib/{__tests__ → test}/constructor.spec.d.ts +0 -0
- /package/lib/{__tests__ → test}/copy.spec.d.ts +0 -0
- /package/lib/{__tests__ → test}/mkdir.spec.d.ts +0 -0
- /package/lib/{__tests__ → test}/read.spec.d.ts +0 -0
- /package/lib/{__tests__ → test}/readdir.spec.d.ts +0 -0
- /package/lib/{__tests__ → test}/remove.spec.d.ts +0 -0
- /package/lib/{__tests__ → test}/rename.spec.d.ts +0 -0
- /package/lib/{__tests__ → test}/stat.spec.d.ts +0 -0
- /package/lib/{__tests__ → test}/symlink.spec.d.ts +0 -0
- /package/lib/{__tests__ → test}/test.spec.d.ts +0 -0
- /package/lib/{__tests__ → test}/write.spec.d.ts +0 -0
- /package/{__tests__ → test}/__fmock.ts +0 -0
- /package/{__tests__ → test}/bitmask.spec.ts +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import assert from 'node:assert';
|
|
2
2
|
import fs from 'node:fs';
|
|
3
3
|
import Chance from 'chance';
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
4
|
+
import { expect } from 'expect';
|
|
5
|
+
import { Iframe, fmock, restore } from './__fmock';
|
|
6
|
+
import { pfs } from '../src';
|
|
6
7
|
|
|
7
8
|
describe('symlink(src, use [, options])', () => {
|
|
8
|
-
const pfs = new PoweredFileSystem();
|
|
9
9
|
const chance = new Chance();
|
|
10
10
|
|
|
11
11
|
beforeEach(() => {
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import assert from 'node:assert';
|
|
2
|
-
import fs from 'node:fs';
|
|
3
2
|
import Chance from 'chance';
|
|
4
3
|
import { fmock, restore } from './__fmock';
|
|
5
|
-
import
|
|
4
|
+
import { pfs } from '../src';
|
|
6
5
|
|
|
7
6
|
describe('test(src[, options])', () => {
|
|
8
|
-
const pfs = new PoweredFileSystem();
|
|
9
7
|
const chance = new Chance();
|
|
10
8
|
|
|
11
9
|
beforeEach(() => {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import assert from 'node:assert';
|
|
2
2
|
import fs from 'node:fs';
|
|
3
3
|
import Chance from 'chance';
|
|
4
|
+
import { expect } from 'expect';
|
|
4
5
|
import { fmock, restore } from './__fmock';
|
|
5
|
-
import
|
|
6
|
+
import { pfs } from '../src';
|
|
6
7
|
|
|
7
8
|
describe('write(src, data[, options])', () => {
|
|
8
|
-
const pfs = new PoweredFileSystem();
|
|
9
9
|
const chance = new Chance();
|
|
10
10
|
|
|
11
11
|
beforeEach(() => {
|
package/tsconfig.json
CHANGED
|
@@ -3,17 +3,17 @@
|
|
|
3
3
|
"lib": [
|
|
4
4
|
"es2022"
|
|
5
5
|
],
|
|
6
|
-
"module": "
|
|
6
|
+
"module": "CommonJS",
|
|
7
7
|
"target": "es2022",
|
|
8
8
|
"moduleResolution": "node",
|
|
9
|
+
"resolveJsonModule": true,
|
|
9
10
|
"esModuleInterop": true,
|
|
10
11
|
"allowSyntheticDefaultImports": true,
|
|
11
12
|
"strict": true,
|
|
12
13
|
"useUnknownInCatchVariables": false,
|
|
13
14
|
"declaration": true,
|
|
15
|
+
"noEmitOnError": true,
|
|
16
|
+
"noUnusedLocals": false,
|
|
14
17
|
"outDir": "lib"
|
|
15
|
-
}
|
|
16
|
-
"exclude": [
|
|
17
|
-
"jest.config.ts"
|
|
18
|
-
]
|
|
18
|
+
}
|
|
19
19
|
}
|
package/jest.config.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { JestConfigWithTsJest } from 'ts-jest';
|
|
2
|
-
|
|
3
|
-
const config: JestConfigWithTsJest = {
|
|
4
|
-
verbose: true,
|
|
5
|
-
collectCoverage: false,
|
|
6
|
-
errorOnDeprecated: true,
|
|
7
|
-
maxWorkers: 1,
|
|
8
|
-
testMatch: [
|
|
9
|
-
'**/__tests__/**/*.spec.ts'
|
|
10
|
-
],
|
|
11
|
-
preset: 'ts-jest'
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export default config;
|
package/lib/index.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var poweredFileSystem = require('./powered-file-system.js');
|
|
6
|
-
|
|
7
|
-
// const pfs = new PoweredFileSystem();
|
|
8
|
-
// export const test = pfs.test;
|
|
9
|
-
// export const stat = pfs.stat;
|
|
10
|
-
// export const chmod = pfs.chmod;
|
|
11
|
-
// export const chown = pfs.chown;
|
|
12
|
-
// export const symlink = pfs.symlink;
|
|
13
|
-
// export const copy = pfs.copy;
|
|
14
|
-
// export const rename = pfs.rename;
|
|
15
|
-
// export const remove = pfs.remove;
|
|
16
|
-
// export const read = pfs.read;
|
|
17
|
-
// export const write = pfs.write;
|
|
18
|
-
// export const append = pfs.append;
|
|
19
|
-
// export const readdir = pfs.readdir;
|
|
20
|
-
// export const mkdir = pfs.mkdir;
|
|
21
|
-
const bitmask = poweredFileSystem.PoweredFileSystem.bitmask;
|
|
22
|
-
|
|
23
|
-
exports.default = poweredFileSystem.PoweredFileSystem;
|
|
24
|
-
exports.bitmask = bitmask;
|
package/rollup.config.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import typescript from '@rollup/plugin-typescript';
|
|
2
|
-
import { nodeResolve } from '@rollup/plugin-node-resolve';
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
input: './src/index.ts',
|
|
6
|
-
output: {
|
|
7
|
-
preserveModules: true,
|
|
8
|
-
exports: 'named',
|
|
9
|
-
dir: 'lib',
|
|
10
|
-
format: 'cjs'
|
|
11
|
-
},
|
|
12
|
-
plugins: [
|
|
13
|
-
nodeResolve(),
|
|
14
|
-
typescript()
|
|
15
|
-
]
|
|
16
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|