@sanity/export 5.0.0 → 5.0.1
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 +1 -1
- package/src/export.js +16 -0
package/package.json
CHANGED
package/src/export.js
CHANGED
|
@@ -4,6 +4,7 @@ import {tmpdir} from 'node:os'
|
|
|
4
4
|
import {join as joinPath} from 'node:path'
|
|
5
5
|
import {PassThrough} from 'node:stream'
|
|
6
6
|
import {finished, pipeline} from 'node:stream/promises'
|
|
7
|
+
import {deprecate} from 'node:util'
|
|
7
8
|
import {constants as zlib} from 'node:zlib'
|
|
8
9
|
|
|
9
10
|
import archiver from 'archiver'
|
|
@@ -317,3 +318,18 @@ function getDocumentInputStream(options) {
|
|
|
317
318
|
|
|
318
319
|
throw new Error(`Invalid mode: ${options.mode}`)
|
|
319
320
|
}
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* Alias for `exportDataset`, for backwards compatibility.
|
|
324
|
+
* Use named `exportDataset` instead.
|
|
325
|
+
*
|
|
326
|
+
* @deprecated Default export is deprecated and will be removed in a future release. Use named "exportDataset" function instead.
|
|
327
|
+
* @public
|
|
328
|
+
*/
|
|
329
|
+
export default deprecate(
|
|
330
|
+
function deprecatedExport(opts) {
|
|
331
|
+
return exportDataset(opts)
|
|
332
|
+
},
|
|
333
|
+
`Default export of "@sanity/export" is deprecated and will be removed in a future release. Please use the named "exportDataset" function instead.`,
|
|
334
|
+
'DEP_SANITY_EXPORT_DEFAULT',
|
|
335
|
+
)
|