@atlaspack/fs 2.15.16-typescript-8e1995d58.0 → 2.15.16-typescript-b27501580.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaspack/fs",
3
- "version": "2.15.16-typescript-8e1995d58.0",
3
+ "version": "2.15.16-typescript-b27501580.0",
4
4
  "description": "Blazing fast, zero configuration web application bundler",
5
5
  "license": "(MIT OR Apache-2.0)",
6
6
  "publishConfig": {
@@ -10,9 +10,9 @@
10
10
  "type": "git",
11
11
  "url": "https://github.com/atlassian-labs/atlaspack.git"
12
12
  },
13
- "main": "lib/index.js",
14
- "source": "src/index.ts",
15
- "types": "index.d.ts",
13
+ "main": "./lib/index.js",
14
+ "source": "./src/index.ts",
15
+ "types": "./lib/index.d.ts",
16
16
  "engines": {
17
17
  "node": ">= 16.0.0"
18
18
  },
@@ -48,17 +48,17 @@
48
48
  }
49
49
  },
50
50
  "scripts": {
51
- "check-ts": "tsc --noEmit"
51
+ "check-ts": "tsc --emitDeclarationOnly --rootDir src"
52
52
  },
53
53
  "dependencies": {
54
- "@atlaspack/build-cache": "2.13.4-typescript-8e1995d58.0",
55
- "@atlaspack/feature-flags": "2.19.3-typescript-8e1995d58.0",
56
- "@atlaspack/logger": "2.14.14-typescript-8e1995d58.0",
57
- "@atlaspack/rust": "3.4.2-typescript-8e1995d58.0",
58
- "@atlaspack/types-internal": "2.15.3-typescript-8e1995d58.0",
59
- "@atlaspack/utils": "2.17.3-typescript-8e1995d58.0",
60
- "@atlaspack/watcher-watchman-js": "2.14.21-typescript-8e1995d58.0",
61
- "@atlaspack/workers": "2.14.21-typescript-8e1995d58.0",
54
+ "@atlaspack/build-cache": "2.13.4-typescript-b27501580.0",
55
+ "@atlaspack/feature-flags": "2.19.3-typescript-b27501580.0",
56
+ "@atlaspack/logger": "2.14.14-typescript-b27501580.0",
57
+ "@atlaspack/rust": "3.4.2-typescript-b27501580.0",
58
+ "@atlaspack/types-internal": "2.15.3-typescript-b27501580.0",
59
+ "@atlaspack/utils": "2.17.3-typescript-b27501580.0",
60
+ "@atlaspack/watcher-watchman-js": "2.14.21-typescript-b27501580.0",
61
+ "@atlaspack/workers": "2.14.21-typescript-b27501580.0",
62
62
  "@parcel/watcher": "^2.0.7",
63
63
  "graceful-fs": "^4.2.4",
64
64
  "ncp": "^2.0.0",
@@ -70,5 +70,5 @@
70
70
  "./src/NodeFS.js": "./src/NodeFS.browser.js"
71
71
  },
72
72
  "type": "commonjs",
73
- "gitHead": "8e1995d58c0a542dffa3b1fa0da3381be69fe125"
74
- }
73
+ "gitHead": "b275015805a058452afb6fb48c078ecd4de925f2"
74
+ }
package/src/NodeFS.ts CHANGED
@@ -82,7 +82,7 @@ export class NodeFS implements FileSystem {
82
82
  : watcher;
83
83
  }
84
84
 
85
- createWriteStream(filePath: string, options: any): Writable {
85
+ createWriteStream(filePath: string, options?: any): Writable {
86
86
  // Make createWriteStream atomic
87
87
  let tmpFilePath = getTempFilePath(filePath);
88
88
  let failed = false;
package/index.d.ts DELETED
@@ -1,379 +0,0 @@
1
- import type {FileSystem, FilePath} from '@atlaspack/types-internal';
2
- import type {Event} from '@parcel/watcher';
3
- import type WorkerFarm from '@atlaspack/workers';
4
-
5
- export type {
6
- FileSystem,
7
- FileOptions,
8
- ReaddirOptions,
9
- Stats,
10
- Encoding,
11
- Dirent,
12
- } from '@atlaspack/types-internal';
13
-
14
- export function ncp(
15
- sourceFS: FileSystem,
16
- source: FilePath,
17
- destinationFS: FileSystem,
18
- destination: FilePath,
19
- filter?: (filePath: FilePath) => boolean,
20
- ): Promise<void>;
21
-
22
- export class NodeFS implements FileSystem {
23
- constructor();
24
- readFile(filePath: FilePath): Promise<Buffer>;
25
- readFile(filePath: FilePath, encoding: Encoding): Promise<string>;
26
- readFileSync(filePath: FilePath): Buffer;
27
- readFileSync(filePath: FilePath, encoding: Encoding): string;
28
- writeFile(
29
- filePath: FilePath,
30
- contents: Buffer | string,
31
- options?: FileOptions | null | undefined,
32
- ): Promise<void>;
33
- copyFile(
34
- source: FilePath,
35
- destination: FilePath,
36
- flags?: number,
37
- ): Promise<void>;
38
- stat(filePath: FilePath): Promise<Stats>;
39
- statSync(filePath: FilePath): Stats;
40
- readdir(
41
- path: FilePath,
42
- opts?: {
43
- withFileTypes?: false;
44
- },
45
- ): Promise<FilePath[]>;
46
- readdir(
47
- path: FilePath,
48
- opts: {
49
- withFileTypes: true;
50
- },
51
- ): Promise<Dirent[]>;
52
- readdirSync(
53
- path: FilePath,
54
- opts?: {
55
- withFileTypes?: false;
56
- },
57
- ): FilePath[];
58
- readdirSync(
59
- path: FilePath,
60
- opts: {
61
- withFileTypes: true;
62
- },
63
- ): Dirent[];
64
- symlink(target: FilePath, path: FilePath): Promise<void>;
65
- unlink(path: FilePath): Promise<void>;
66
- realpath(path: FilePath): Promise<FilePath>;
67
- realpathSync(path: FilePath): FilePath;
68
- exists(path: FilePath): Promise<boolean>;
69
- existsSync(path: FilePath): boolean;
70
- mkdirp(path: FilePath): Promise<void>;
71
- rimraf(path: FilePath): Promise<void>;
72
- ncp(source: FilePath, destination: FilePath): Promise<void>;
73
- createReadStream(
74
- path: FilePath,
75
- options?: FileOptions | null | undefined,
76
- ): Readable;
77
- createWriteStream(
78
- path: FilePath,
79
- options?: FileOptions | null | undefined,
80
- ): Writable;
81
- cwd(): FilePath;
82
- chdir(dir: FilePath): void;
83
- watch(
84
- dir: FilePath,
85
- fn: (err: Error | null | undefined, events: Array<Event>) => unknown,
86
- opts: WatcherOptions,
87
- ): Promise<AsyncSubscription>;
88
- getEventsSince(
89
- dir: FilePath,
90
- snapshot: FilePath,
91
- opts: WatcherOptions,
92
- ): Promise<Array<Event>>;
93
- writeSnapshot(
94
- dir: FilePath,
95
- snapshot: FilePath,
96
- opts: WatcherOptions,
97
- ): Promise<void>;
98
- findAncestorFile(
99
- fileNames: Array<string>,
100
- fromDir: FilePath,
101
- root: FilePath,
102
- ): FilePath | null | undefined;
103
- findNodeModule(
104
- moduleName: string,
105
- fromDir: FilePath,
106
- ): FilePath | null | undefined;
107
- findFirstFile(filePaths: Array<FilePath>): FilePath | null | undefined;
108
- }
109
-
110
- export class MemoryFS implements FileSystem {
111
- constructor(farm: WorkerFarm);
112
- readFile(filePath: FilePath): Promise<Buffer>;
113
- readFile(filePath: FilePath, encoding: Encoding): Promise<string>;
114
- readFileSync(filePath: FilePath): Buffer;
115
- readFileSync(filePath: FilePath, encoding: Encoding): string;
116
- writeFile(
117
- filePath: FilePath,
118
- contents: Buffer | string,
119
- options?: FileOptions | null | undefined,
120
- ): Promise<void>;
121
- copyFile(
122
- source: FilePath,
123
- destination: FilePath,
124
- flags?: number,
125
- ): Promise<void>;
126
- stat(filePath: FilePath): Promise<Stats>;
127
- statSync(filePath: FilePath): Stats;
128
- readdir(
129
- path: FilePath,
130
- opts?: {
131
- withFileTypes?: false;
132
- },
133
- ): Promise<FilePath[]>;
134
- readdir(
135
- path: FilePath,
136
- opts: {
137
- withFileTypes: true;
138
- },
139
- ): Promise<Dirent[]>;
140
- readdirSync(
141
- path: FilePath,
142
- opts?: {
143
- withFileTypes?: false;
144
- },
145
- ): FilePath[];
146
- readdirSync(
147
- path: FilePath,
148
- opts: {
149
- withFileTypes: true;
150
- },
151
- ): Dirent[];
152
- symlink(target: FilePath, path: FilePath): Promise<void>;
153
- unlink(path: FilePath): Promise<void>;
154
- realpath(path: FilePath): Promise<FilePath>;
155
- realpathSync(path: FilePath): FilePath;
156
- exists(path: FilePath): Promise<boolean>;
157
- existsSync(path: FilePath): boolean;
158
- mkdirp(path: FilePath): Promise<void>;
159
- rimraf(path: FilePath): Promise<void>;
160
- ncp(source: FilePath, destination: FilePath): Promise<void>;
161
- createReadStream(
162
- path: FilePath,
163
- options?: FileOptions | null | undefined,
164
- ): Readable;
165
- createWriteStream(
166
- path: FilePath,
167
- options?: FileOptions | null | undefined,
168
- ): Writable;
169
- cwd(): FilePath;
170
- chdir(dir: FilePath): void;
171
- watch(
172
- dir: FilePath,
173
- fn: (err: Error | null | undefined, events: Array<Event>) => unknown,
174
- opts: WatcherOptions,
175
- ): Promise<AsyncSubscription>;
176
- getEventsSince(
177
- dir: FilePath,
178
- snapshot: FilePath,
179
- opts: WatcherOptions,
180
- ): Promise<Array<Event>>;
181
- writeSnapshot(
182
- dir: FilePath,
183
- snapshot: FilePath,
184
- opts: WatcherOptions,
185
- ): Promise<void>;
186
- findAncestorFile(
187
- fileNames: Array<string>,
188
- fromDir: FilePath,
189
- root: FilePath,
190
- ): FilePath | null | undefined;
191
- findNodeModule(
192
- moduleName: string,
193
- fromDir: FilePath,
194
- ): FilePath | null | undefined;
195
- findFirstFile(filePaths: Array<FilePath>): FilePath | null | undefined;
196
- }
197
-
198
- export class OverlayFS implements FileSystem {
199
- constructor(writable: FileSystem, readable: FileSystem);
200
- readFile(filePath: FilePath): Promise<Buffer>;
201
- readFile(filePath: FilePath, encoding: Encoding): Promise<string>;
202
- readFileSync(filePath: FilePath): Buffer;
203
- readFileSync(filePath: FilePath, encoding: Encoding): string;
204
- writeFile(
205
- filePath: FilePath,
206
- contents: Buffer | string,
207
- options?: FileOptions | null | undefined,
208
- ): Promise<void>;
209
- copyFile(
210
- source: FilePath,
211
- destination: FilePath,
212
- flags?: number,
213
- ): Promise<void>;
214
- stat(filePath: FilePath): Promise<Stats>;
215
- statSync(filePath: FilePath): Stats;
216
- readdir(
217
- path: FilePath,
218
- opts?: {
219
- withFileTypes?: false;
220
- },
221
- ): Promise<FilePath[]>;
222
- readdir(
223
- path: FilePath,
224
- opts: {
225
- withFileTypes: true;
226
- },
227
- ): Promise<Dirent[]>;
228
- readdirSync(
229
- path: FilePath,
230
- opts?: {
231
- withFileTypes?: false;
232
- },
233
- ): FilePath[];
234
- readdirSync(
235
- path: FilePath,
236
- opts: {
237
- withFileTypes: true;
238
- },
239
- ): Dirent[];
240
- symlink(target: FilePath, path: FilePath): Promise<void>;
241
- unlink(path: FilePath): Promise<void>;
242
- realpath(path: FilePath): Promise<FilePath>;
243
- realpathSync(path: FilePath): FilePath;
244
- exists(path: FilePath): Promise<boolean>;
245
- existsSync(path: FilePath): boolean;
246
- mkdirp(path: FilePath): Promise<void>;
247
- rimraf(path: FilePath): Promise<void>;
248
- ncp(source: FilePath, destination: FilePath): Promise<void>;
249
- createReadStream(
250
- path: FilePath,
251
- options?: FileOptions | null | undefined,
252
- ): Readable;
253
- createWriteStream(
254
- path: FilePath,
255
- options?: FileOptions | null | undefined,
256
- ): Writable;
257
- cwd(): FilePath;
258
- chdir(dir: FilePath): void;
259
- watch(
260
- dir: FilePath,
261
- fn: (err: Error | null | undefined, events: Array<Event>) => unknown,
262
- opts: WatcherOptions,
263
- ): Promise<AsyncSubscription>;
264
- getEventsSince(
265
- dir: FilePath,
266
- snapshot: FilePath,
267
- opts: WatcherOptions,
268
- ): Promise<Array<Event>>;
269
- writeSnapshot(
270
- dir: FilePath,
271
- snapshot: FilePath,
272
- opts: WatcherOptions,
273
- ): Promise<void>;
274
- findAncestorFile(
275
- fileNames: Array<string>,
276
- fromDir: FilePath,
277
- root: FilePath,
278
- ): FilePath | null | undefined;
279
- findNodeModule(
280
- moduleName: string,
281
- fromDir: FilePath,
282
- ): FilePath | null | undefined;
283
- findFirstFile(filePaths: Array<FilePath>): FilePath | null | undefined;
284
- }
285
-
286
- interface NodeVCSAwareFSOptions {
287
- gitRepoPath: null | FilePath;
288
- excludePatterns: Array<string>;
289
- logEventDiff: null | ((watcherEvents: Event[], vcsEvents: Event[]) => void);
290
- }
291
-
292
- export class NodeVCSAwareFS implements FileSystem {
293
- constructor(options: NodeVCSAwareFSOptions);
294
- readFile(filePath: FilePath): Promise<Buffer>;
295
- readFile(filePath: FilePath, encoding: Encoding): Promise<string>;
296
- readFileSync(filePath: FilePath): Buffer;
297
- readFileSync(filePath: FilePath, encoding: Encoding): string;
298
- writeFile(
299
- filePath: FilePath,
300
- contents: Buffer | string,
301
- options?: FileOptions | null | undefined,
302
- ): Promise<void>;
303
- copyFile(
304
- source: FilePath,
305
- destination: FilePath,
306
- flags?: number,
307
- ): Promise<void>;
308
- stat(filePath: FilePath): Promise<Stats>;
309
- statSync(filePath: FilePath): Stats;
310
- readdir(
311
- path: FilePath,
312
- opts?: {
313
- withFileTypes?: false;
314
- },
315
- ): Promise<FilePath[]>;
316
- readdir(
317
- path: FilePath,
318
- opts: {
319
- withFileTypes: true;
320
- },
321
- ): Promise<Dirent[]>;
322
- readdirSync(
323
- path: FilePath,
324
- opts?: {
325
- withFileTypes?: false;
326
- },
327
- ): FilePath[];
328
- readdirSync(
329
- path: FilePath,
330
- opts: {
331
- withFileTypes: true;
332
- },
333
- ): Dirent[];
334
- symlink(target: FilePath, path: FilePath): Promise<void>;
335
- unlink(path: FilePath): Promise<void>;
336
- realpath(path: FilePath): Promise<FilePath>;
337
- realpathSync(path: FilePath): FilePath;
338
- exists(path: FilePath): Promise<boolean>;
339
- existsSync(path: FilePath): boolean;
340
- mkdirp(path: FilePath): Promise<void>;
341
- rimraf(path: FilePath): Promise<void>;
342
- ncp(source: FilePath, destination: FilePath): Promise<void>;
343
- createReadStream(
344
- path: FilePath,
345
- options?: FileOptions | null | undefined,
346
- ): Readable;
347
- createWriteStream(
348
- path: FilePath,
349
- options?: FileOptions | null | undefined,
350
- ): Writable;
351
- cwd(): FilePath;
352
- chdir(dir: FilePath): void;
353
- watch(
354
- dir: FilePath,
355
- fn: (err: Error | null | undefined, events: Array<Event>) => unknown,
356
- opts: WatcherOptions,
357
- ): Promise<AsyncSubscription>;
358
- getEventsSince(
359
- dir: FilePath,
360
- snapshot: FilePath,
361
- opts: WatcherOptions,
362
- ): Promise<Array<Event>>;
363
- writeSnapshot(
364
- dir: FilePath,
365
- snapshot: FilePath,
366
- opts: WatcherOptions,
367
- ): Promise<void>;
368
- findAncestorFile(
369
- fileNames: Array<string>,
370
- fromDir: FilePath,
371
- root: FilePath,
372
- ): FilePath | null | undefined;
373
- findNodeModule(
374
- moduleName: string,
375
- fromDir: FilePath,
376
- ): FilePath | null | undefined;
377
- findFirstFile(filePaths: Array<FilePath>): FilePath | null | undefined;
378
- setGitRepoPath(gitRepoPath: FilePath | null): void;
379
- }