vscode-fs 0.1.2 → 0.1.3

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.cjs CHANGED
@@ -334,7 +334,10 @@ async function createNodeFileSystem() {
334
334
  }));
335
335
  },
336
336
  createWatcher: async (pattern, options) => {
337
- const watcher = watch(pattern.pattern, { cwd: pattern.baseUri.fsPath });
337
+ const watcher = watch(pattern.pattern, {
338
+ cwd: pattern.baseUri.fsPath,
339
+ ignored: options?.ignore
340
+ });
338
341
  return new Promise((resolve) => {
339
342
  watcher.on("ready", () => {
340
343
  const fileSystemWatcher = new NodeFileSystemWatcherImpl(watcher, options);
package/dist/index.d.cts CHANGED
@@ -231,6 +231,12 @@ interface FileSystem {
231
231
  * @default false
232
232
  */
233
233
  ignoreDeleteEvents?: boolean;
234
+ /**
235
+ * Ignore files in the results.
236
+ *
237
+ * @default []
238
+ */
239
+ ignore?: (string | RegExp)[];
234
240
  }): Promise<FileSystemWatcher>;
235
241
  /**
236
242
  * Create a writer for a file.
package/dist/index.d.mts CHANGED
@@ -231,6 +231,12 @@ interface FileSystem {
231
231
  * @default false
232
232
  */
233
233
  ignoreDeleteEvents?: boolean;
234
+ /**
235
+ * Ignore files in the results.
236
+ *
237
+ * @default []
238
+ */
239
+ ignore?: (string | RegExp)[];
234
240
  }): Promise<FileSystemWatcher>;
235
241
  /**
236
242
  * Create a writer for a file.
package/dist/index.mjs CHANGED
@@ -333,7 +333,10 @@ async function createNodeFileSystem() {
333
333
  }));
334
334
  },
335
335
  createWatcher: async (pattern, options) => {
336
- const watcher = watch(pattern.pattern, { cwd: pattern.baseUri.fsPath });
336
+ const watcher = watch(pattern.pattern, {
337
+ cwd: pattern.baseUri.fsPath,
338
+ ignored: options?.ignore
339
+ });
337
340
  return new Promise((resolve) => {
338
341
  watcher.on("ready", () => {
339
342
  const fileSystemWatcher = new NodeFileSystemWatcherImpl(watcher, options);
package/dist/vscode.cjs CHANGED
@@ -300,7 +300,10 @@ async function createNodeFileSystem() {
300
300
  }));
301
301
  },
302
302
  createWatcher: async (pattern, options) => {
303
- const watcher = watch(pattern.pattern, { cwd: pattern.baseUri.fsPath });
303
+ const watcher = watch(pattern.pattern, {
304
+ cwd: pattern.baseUri.fsPath,
305
+ ignored: options?.ignore
306
+ });
304
307
  return new Promise((resolve) => {
305
308
  watcher.on("ready", () => {
306
309
  const fileSystemWatcher = new NodeFileSystemWatcherImpl(watcher, options);
package/dist/vscode.d.cts CHANGED
@@ -231,6 +231,12 @@ interface FileSystem {
231
231
  * @default false
232
232
  */
233
233
  ignoreDeleteEvents?: boolean;
234
+ /**
235
+ * Ignore files in the results.
236
+ *
237
+ * @default []
238
+ */
239
+ ignore?: (string | RegExp)[];
234
240
  }): Promise<FileSystemWatcher>;
235
241
  /**
236
242
  * Create a writer for a file.
package/dist/vscode.d.mts CHANGED
@@ -231,6 +231,12 @@ interface FileSystem {
231
231
  * @default false
232
232
  */
233
233
  ignoreDeleteEvents?: boolean;
234
+ /**
235
+ * Ignore files in the results.
236
+ *
237
+ * @default []
238
+ */
239
+ ignore?: (string | RegExp)[];
234
240
  }): Promise<FileSystemWatcher>;
235
241
  /**
236
242
  * Create a writer for a file.
package/dist/vscode.mjs CHANGED
@@ -276,7 +276,10 @@ async function createNodeFileSystem() {
276
276
  }));
277
277
  },
278
278
  createWatcher: async (pattern, options) => {
279
- const watcher = watch(pattern.pattern, { cwd: pattern.baseUri.fsPath });
279
+ const watcher = watch(pattern.pattern, {
280
+ cwd: pattern.baseUri.fsPath,
281
+ ignored: options?.ignore
282
+ });
280
283
  return new Promise((resolve) => {
281
284
  watcher.on("ready", () => {
282
285
  const fileSystemWatcher = new NodeFileSystemWatcherImpl(watcher, options);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vscode-fs",
3
3
  "type": "module",
4
- "version": "0.1.2",
4
+ "version": "0.1.3",
5
5
  "description": "VSCode like simple、serializable and cross-platform file system utilities.",
6
6
  "author": "Naily Zero <zero@naily.cc> (https://naily.cc)",
7
7
  "license": "MIT",