Pārlūkot izejas kodu

uppy: add a decoy `Core` export to warn users about the renaming (#4085)

Antoine du Hamel 2 gadi atpakaļ
vecāks
revīzija
cf2e025f90
1 mainītis faili ar 7 papildinājumiem un 0 dzēšanām
  1. 7 0
      packages/uppy/index.mjs

+ 7 - 0
packages/uppy/index.mjs

@@ -1,6 +1,13 @@
 // Core
 export { default as Uppy, debugLogger } from '@uppy/core'
 
+/**
+ * @deprecated Use `Uppy` instead of `Core`
+ */
+export function Core () {
+  throw new Error('Core has been renamed to Uppy')
+}
+
 // Utilities
 export * as server from '@uppy/companion-client'