Bladeren bron

refactor: Rename browser-nativefs to browser-fs-access (#2862)

Thomas Steiner 4 jaren geleden
bovenliggende
commit
b5e26ba81f
6 gewijzigde bestanden met toevoegingen van 10 en 10 verwijderingen
  1. 4 4
      package-lock.json
  2. 2 2
      package.json
  3. 1 1
      src/data/index.ts
  4. 1 1
      src/data/json.ts
  5. 1 1
      src/global.d.ts
  6. 1 1
      src/types.ts

+ 4 - 4
package-lock.json

@@ -5100,10 +5100,10 @@
       "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz",
       "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8="
     },
-    "browser-nativefs": {
-      "version": "0.12.0",
-      "resolved": "https://registry.npmjs.org/browser-nativefs/-/browser-nativefs-0.12.0.tgz",
-      "integrity": "sha512-ZCHJcQI6bBm9YjB+6wMT1nWg+/mnWnz7r3gJ8sx7RjgLtWROFq+BuD12cAncD6y45MIbUqFM8eMKXoHXOxSFxA=="
+    "browser-fs-access": {
+      "version": "0.13.0",
+      "resolved": "https://registry.npmjs.org/browser-fs-access/-/browser-fs-access-0.13.0.tgz",
+      "integrity": "sha512-qP8zFVhRQThxYgBXdlFHbzIrWb1us0G5kL2ZL0vW4BO5llKE4qBAcQsQrw4KN+6vjw8sKeWaGWJtzijfRT4N0Q=="
     },
     "browser-process-hrtime": {
       "version": "1.0.0",

+ 2 - 2
package.json

@@ -27,7 +27,7 @@
     "@types/react": "17.0.0",
     "@types/react-dom": "17.0.0",
     "@types/socket.io-client": "1.4.35",
-    "browser-nativefs": "0.12.0",
+    "browser-fs-access": "0.13.0",
     "clsx": "1.1.1",
     "firebase": "8.2.4",
     "i18next-browser-languagedetector": "6.0.1",
@@ -72,7 +72,7 @@
   },
   "jest": {
     "transformIgnorePatterns": [
-      "node_modules/(?!(roughjs|points-on-curve|path-data-parser|points-on-path|browser-nativefs)/)"
+      "node_modules/(?!(roughjs|points-on-curve|path-data-parser|points-on-path|browser-fs-access)/)"
     ],
     "resetMocks": false
   },

+ 1 - 1
src/data/index.ts

@@ -1,4 +1,4 @@
-import { fileSave } from "browser-nativefs";
+import { fileSave } from "browser-fs-access";
 import {
   copyCanvasToClipboardAsPng,
   copyTextToSystemClipboard,

+ 1 - 1
src/data/json.ts

@@ -1,4 +1,4 @@
-import { fileOpen, fileSave } from "browser-nativefs";
+import { fileOpen, fileSave } from "browser-fs-access";
 import { cleanAppStateForExport } from "../appState";
 import { MIME_TYPES } from "../constants";
 import { clearElementsForExport } from "../element";

+ 1 - 1
src/global.d.ts

@@ -85,6 +85,6 @@ type ForwardRef<T, P = any> = Parameters<
 // --------------------------------------------------------------------------—
 
 interface Blob {
-  handle?: import("browser-nativefs").FileSystemHandle;
+  handle?: import("browser-fs-acces").FileSystemHandle;
   name?: string;
 }

+ 1 - 1
src/types.ts

@@ -98,7 +98,7 @@ export type AppState = {
   offsetLeft: number;
 
   isLibraryOpen: boolean;
-  fileHandle: import("browser-nativefs").FileSystemHandle | null;
+  fileHandle: import("browser-fs-access").FileSystemHandle | null;
   collaborators: Map<string, Collaborator>;
   showStats: boolean;
   currentChartType: ChartType;