filesystem-sandbox 1.32.0 → 1.33.0

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/dist/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
- declare const _exports: any;
2
- export = _exports;
1
+ export * from "./filesystem-sandbox";
2
+ export * from "./index";
3
+ export * from "./uuid";
package/dist/index.js CHANGED
@@ -1,2 +1,20 @@
1
1
  "use strict";
2
- module.exports = require("./dist");
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ // this is a generated file: do not edit
18
+ __exportStar(require("./filesystem-sandbox"), exports);
19
+ __exportStar(require("./index"), exports);
20
+ __exportStar(require("./uuid"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "filesystem-sandbox",
3
- "version": "1.32.0",
3
+ "version": "1.33.0",
4
4
  "description": "JavaScript module to provide filesystem sandboxes for testing",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -10,11 +10,12 @@
10
10
  "index.d.ts"
11
11
  ],
12
12
  "scripts": {
13
- "pretest": "rimraf .jest-cache",
13
+ "pretest": "npm run clear-jest-cache",
14
14
  "test": "jest",
15
- "posttest": "rimraf .jest-cache",
15
+ "posttest": "npm run clear-jest-cache",
16
+ "clear-jest-cache": "node -e \"require('fs').rmSync('.jest-cache', { recursive: true, force: true })\"",
16
17
  "prebuild": "run-p clean-dist generate-index",
17
- "clean-dist": "rimraf dist",
18
+ "clean-dist": "node -e \"require('fs').rmSync('dist', { recursive: true, force: true })\"",
18
19
  "generate-index": "node generate-index.js",
19
20
  "build": "run-p tsc lint",
20
21
  "autobuild": "nodemon -V -w src -w tests -e ts -x \"run-s -s build autobuild-message\"",
@@ -51,16 +52,22 @@
51
52
  "expect-more-jest": "^5.1.0",
52
53
  "jest": "^28.1.1",
53
54
  "lodash": "^4.17.15",
54
- "nodemon": "^2.0.4",
55
- "rimraf": "^6.1.4",
55
+ "nodemon": "^3.1.14",
56
+ "npm-run-all2": "^9.1.0",
57
+ "semver": "^7.8.6",
56
58
  "ts-jest": "^28.0.4",
57
59
  "tslint": "^6.1.2",
58
60
  "typescript": "^4.6.2",
59
- "yafs": "^1.48.0",
60
- "zarro": "^1.199.0"
61
+ "zarro": "^2.3.14"
61
62
  },
62
63
  "dependencies": {
63
64
  "debug": "^4.4.1",
64
- "pure-uuid": "^1.6.2"
65
+ "pure-uuid": "^1.6.2",
66
+ "yafs": "^1.48.0"
67
+ },
68
+ "overrides": {
69
+ "nodemon": {
70
+ "minimatch": "^11.0.8"
71
+ }
65
72
  }
66
- }
73
+ }
@@ -1 +0,0 @@
1
- export {};
@@ -1,31 +0,0 @@
1
- "use strict";
2
- // this helper script was copied in from newts to automatically
3
- // generate your index.ts in your src folder. Once that is transpiled,
4
- // you'll get an index.js and index.d.ts in the dist folder and the
5
- // initially-generated index.js and index.d.ts in the base of your
6
- // package will defer to these, providing for a clean import of
7
- // everything exported from base files in your src folder
8
- const path = require("path");
9
- const fs = require("fs");
10
- function readdir(at) {
11
- return new Promise((resolve, reject) => {
12
- fs.readdir(at, (err, result) => err ? reject(err) : resolve(result));
13
- });
14
- }
15
- function writeFile(at, contents) {
16
- return new Promise((resolve, reject) => {
17
- fs.writeFile(at, contents, { encoding: "utf-8" }, err => err ? reject(err) : resolve());
18
- });
19
- }
20
- (async () => {
21
- const cwdContents = await readdir(".");
22
- if (cwdContents.indexOf("src") === -1) {
23
- throw new Error("No local 'src' folder -- nothing to do");
24
- }
25
- const tsFiles = (await readdir("src"))
26
- .filter(f => f.match(/\.ts$/)), target = path.resolve(path.join("src", "index.ts")), output = tsFiles.sort()
27
- .map(f => `export * from "./${f.replace(/\.ts$/, "")}";`)
28
- .join("\n");
29
- await writeFile(target, `// this is a generated file: do not edit\n${output}\n`);
30
- console.log(`Updated index at: ${target}`);
31
- })();
@@ -1,13 +0,0 @@
1
- export const automock: boolean;
2
- export const cacheDirectory: string;
3
- export const clearMocks: boolean;
4
- export const maxWorkers: number;
5
- export const preset: string;
6
- export const resetMocks: boolean;
7
- export const resetModules: boolean;
8
- export const setupFilesAfterEnv: string[];
9
- export const testEnvironment: string;
10
- export const transform: {
11
- "^.+\\.(t|j)s$": string;
12
- };
13
- export const transformIgnorePatterns: string[];
@@ -1,138 +0,0 @@
1
- "use strict";
2
- // For a detailed explanation regarding each configuration property, visit:
3
- // https://jestjs.io/docs/en/configuration.html
4
- module.exports = {
5
- // All imported modules in your tests should be mocked automatically
6
- automock: false,
7
- // Stop running tests after `n` failures
8
- // bail: 0,
9
- // The directory where Jest should store its cached dependency information
10
- cacheDirectory: ".jest-cache",
11
- // Automatically clear mock calls and instances between every test
12
- clearMocks: true,
13
- // Indicates whether the coverage information should be collected while executing the test
14
- // collectCoverage: false,
15
- // An array of glob patterns indicating a set of files for which coverage information should be collected
16
- // collectCoverageFrom: undefined,
17
- // The directory where Jest should output its coverage files
18
- // coverageDirectory: undefined,
19
- // An array of regexp pattern strings used to skip coverage collection
20
- // coveragePathIgnorePatterns: [
21
- // "\\\\node_modules\\\\"
22
- // ],
23
- // A list of reporter names that Jest uses when writing coverage reports
24
- // coverageReporters: [
25
- // "json",
26
- // "text",
27
- // "lcov",
28
- // "clover"
29
- // ],
30
- // An object that configures minimum threshold enforcement for coverage results
31
- // coverageThreshold: undefined,
32
- // A path to a custom dependency extractor
33
- // dependencyExtractor: undefined,
34
- // Make calling deprecated APIs throw helpful error messages
35
- // errorOnDeprecated: false,
36
- // Force coverage collection from ignored files using an array of glob patterns
37
- // forceCoverageMatch: [],
38
- // A path to a module which exports an async function that is triggered once before all test suites
39
- // globalSetup: undefined,
40
- // A path to a module which exports an async function that is triggered once after all test suites
41
- // globalTeardown: undefined,
42
- // A set of global variables that need to be available in all test environments
43
- // globals: {},
44
- // The maximum amount of workers used to run your tests. Can be specified as % or a number. E.g. maxWorkers: 10% will use 10% of your CPU amount + 1 as the maximum worker number. maxWorkers: 2 will use a maximum of 2 workers.
45
- maxWorkers: 2,
46
- // An array of directory names to be searched recursively up from the requiring module's location
47
- // moduleDirectories: [
48
- // "node_modules"
49
- // ],
50
- // An array of file extensions your modules use
51
- // moduleFileExtensions: [
52
- // "js",
53
- // "json",
54
- // "jsx",
55
- // "ts",
56
- // "tsx",
57
- // "node"
58
- // ],
59
- // A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module
60
- // moduleNameMapper: {},
61
- // An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader
62
- // modulePathIgnorePatterns: [],
63
- // Activates notifications for test results
64
- // notify: false,
65
- // An enum that specifies notification mode. Requires { notify: true }
66
- // notifyMode: "failure-change",
67
- // A preset that is used as a base for Jest's configuration
68
- preset: "ts-jest",
69
- // Run tests from one or more projects
70
- // projects: undefined,
71
- // Use this configuration option to add custom reporters to Jest
72
- // reporters: undefined,
73
- // Automatically reset mock state between every test
74
- resetMocks: true,
75
- // Reset the module registry before running each individual test
76
- resetModules: true,
77
- // A path to a custom resolver
78
- // resolver: undefined,
79
- // Automatically restore mock state between every test
80
- // restoreMocks: false,
81
- // The root directory that Jest should scan for tests and modules within
82
- // rootDir: undefined,
83
- // A list of paths to directories that Jest should use to search for files in
84
- // roots: [
85
- // "<rootDir>"
86
- // ],
87
- // Allows you to use a custom runner instead of Jest's default test runner
88
- // runner: "jest-runner",
89
- // The paths to modules that run some code to configure or set up the testing environment before each test
90
- // setupFiles: [],
91
- // A list of paths to modules that run some code to configure or set up the testing framework before each test
92
- setupFilesAfterEnv: [
93
- "<rootDir>/tests/setup.ts"
94
- ],
95
- // A list of paths to snapshot serializer modules Jest should use for snapshot testing
96
- // snapshotSerializers: [],
97
- // The test environment that will be used for testing
98
- testEnvironment: "node",
99
- // Options that will be passed to the testEnvironment
100
- // testEnvironmentOptions: {},
101
- // Adds a location field to test results
102
- // testLocationInResults: false,
103
- // The glob patterns Jest uses to detect test files
104
- // testMatch: [
105
- // "**/__tests__/**/*.[jt]s?(x)",
106
- // "**/?(*.)+(spec|test).[tj]s?(x)"
107
- // ],
108
- // An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
109
- // testPathIgnorePatterns: [
110
- // "\\\\node_modules\\\\"
111
- // ],
112
- // The regexp pattern or array of patterns that Jest uses to detect test files
113
- // testRegex: [],
114
- // This option allows the use of a custom results processor
115
- // testResultsProcessor: undefined,
116
- // This option allows use of a custom test runner
117
- // testRunner: "jasmine2",
118
- // This option sets the URL for the jsdom environment. It is reflected in properties such as location.href
119
- // testURL: "http://localhost",
120
- // Setting this value to "fake" allows the use of fake timers for functions such as "setTimeout"
121
- // timers: "real",
122
- // A map from regular expressions to paths to transformers
123
- transform: {
124
- "^.+\\.(t|j)s$": "ts-jest"
125
- },
126
- // An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
127
- transformIgnorePatterns: [
128
- "node_modules/(?!@faker-js).+"
129
- ],
130
- // An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them
131
- // unmockedModulePathPatterns: undefined,
132
- // Indicates whether each individual test should be reported during the run
133
- // verbose: undefined,
134
- // An array of regexp patterns that are matched against all source file paths before re-running tests in watch mode
135
- // watchPathIgnorePatterns: [],
136
- // Whether to use watchman for file crawling
137
- // watchman: true,
138
- };
@@ -1,3 +0,0 @@
1
- export * from "./filesystem-sandbox";
2
- export * from "./index";
3
- export * from "./uuid";
package/dist/src/index.js DELETED
@@ -1,20 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- // this is a generated file: do not edit
18
- __exportStar(require("./filesystem-sandbox"), exports);
19
- __exportStar(require("./index"), exports);
20
- __exportStar(require("./uuid"), exports);
File without changes
File without changes