@lvce-editor/file-system-process 5.9.0 → 5.10.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.
Files changed (2) hide show
  1. package/dist/index.js +1 -6
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1868,16 +1868,12 @@ const getFolderSize = async uri => {
1868
1868
  return total;
1869
1869
  };
1870
1870
 
1871
- const fileWacherEvents = Object.create(null);
1872
1871
  const setupWatcher = async (watcherId, uri, onChange) => {
1873
1872
  try {
1874
1873
  const path = fileURLToPath(uri);
1875
1874
  // TODO
1876
1875
  const watcher = fs.watch(path, {});
1877
- const watcherEvents = [];
1878
- fileWacherEvents[watcherId] = watcherEvents;
1879
- for await (const event of watcher) {
1880
- watcherEvents.push(event);
1876
+ for await (const _event of watcher) {
1881
1877
  onChange();
1882
1878
  }
1883
1879
  } catch (error) {
@@ -1891,7 +1887,6 @@ const setupWatcher = async (watcherId, uri, onChange) => {
1891
1887
  // TODO when socket closes, dispose file watcher for this socket
1892
1888
  const watchFile = async (socket, watcherId, uri) => {
1893
1889
  assertUri(uri);
1894
- fileWacherEvents[watcherId] = [];
1895
1890
  // TODO await promise?
1896
1891
  const onChange = () => {
1897
1892
  // TODO handle error
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/file-system-process",
3
- "version": "5.9.0",
3
+ "version": "5.10.0",
4
4
  "description": "File System Process",
5
5
  "keywords": [
6
6
  "Lvce Editor",