@sanity/pkg-utils 5.1.3 → 5.1.4
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/_chunks-cjs/build.cjs +3 -3
- package/dist/_chunks-cjs/check.cjs +3 -3
- package/dist/_chunks-cjs/consoleSpy.cjs +3 -3
- package/dist/_chunks-cjs/handleError.cjs +3 -3
- package/dist/_chunks-cjs/index.cjs +4 -4
- package/dist/_chunks-cjs/index.cjs.map +1 -1
- package/dist/_chunks-cjs/init.cjs +3 -3
- package/dist/_chunks-cjs/logger.cjs +3 -3
- package/dist/_chunks-cjs/watch.cjs +3 -3
- package/dist/cli.cjs +3 -3
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/node/tasks/rollup/resolveRollupConfig.ts +1 -1
|
@@ -9,10 +9,10 @@ var path = require("path");
|
|
|
9
9
|
require("prompts");
|
|
10
10
|
require("typescript");
|
|
11
11
|
var fs = require("fs"), chalk = require("chalk"), index = require("./index.cjs");
|
|
12
|
-
function
|
|
13
|
-
return e && e
|
|
12
|
+
function _interopDefaultCompat(e) {
|
|
13
|
+
return e && typeof e == "object" && "default" in e ? e : { default: e };
|
|
14
14
|
}
|
|
15
|
-
var path__default = /* @__PURE__ */
|
|
15
|
+
var path__default = /* @__PURE__ */ _interopDefaultCompat(path), fs__default = /* @__PURE__ */ _interopDefaultCompat(fs), chalk__default = /* @__PURE__ */ _interopDefaultCompat(chalk);
|
|
16
16
|
function resolveBuildTasks(ctx) {
|
|
17
17
|
const { config, cwd, pkg, target } = ctx, bundles = config?.bundles || [], tasks = [], exports2 = Object.entries(ctx.exports || {}).map(
|
|
18
18
|
([_path, exp]) => ({ _path, ...exp })
|
|
@@ -8,10 +8,10 @@ require("mkdirp");
|
|
|
8
8
|
require("prompts");
|
|
9
9
|
require("typescript");
|
|
10
10
|
var chalk = require("chalk"), treeify = require("treeify"), fs = require("fs"), prettyBytes = require("pretty-bytes");
|
|
11
|
-
function
|
|
12
|
-
return e && e
|
|
11
|
+
function _interopDefaultCompat(e) {
|
|
12
|
+
return e && typeof e == "object" && "default" in e ? e : { default: e };
|
|
13
13
|
}
|
|
14
|
-
var esbuild__default = /* @__PURE__ */
|
|
14
|
+
var esbuild__default = /* @__PURE__ */ _interopDefaultCompat(esbuild), path__default = /* @__PURE__ */ _interopDefaultCompat(path), chalk__default = /* @__PURE__ */ _interopDefaultCompat(chalk), treeify__default = /* @__PURE__ */ _interopDefaultCompat(treeify), prettyBytes__default = /* @__PURE__ */ _interopDefaultCompat(prettyBytes);
|
|
15
15
|
function getFilesize(file) {
|
|
16
16
|
const stats = fs.statSync(file);
|
|
17
17
|
return prettyBytes__default.default(stats.size);
|
|
@@ -5,10 +5,10 @@ var config = require("@sanity/browserslist-config");
|
|
|
5
5
|
require("mkdirp");
|
|
6
6
|
require("prompts");
|
|
7
7
|
var ts = require("typescript");
|
|
8
|
-
function
|
|
9
|
-
return e && e
|
|
8
|
+
function _interopDefaultCompat(e) {
|
|
9
|
+
return e && typeof e == "object" && "default" in e ? e : { default: e };
|
|
10
10
|
}
|
|
11
|
-
var path__default = /* @__PURE__ */
|
|
11
|
+
var path__default = /* @__PURE__ */ _interopDefaultCompat(path), pkgUp__default = /* @__PURE__ */ _interopDefaultCompat(pkgUp), findConfig__default = /* @__PURE__ */ _interopDefaultCompat(findConfig), chalk__default = /* @__PURE__ */ _interopDefaultCompat(chalk), fs__default = /* @__PURE__ */ _interopDefaultCompat(fs), browserslist__default = /* @__PURE__ */ _interopDefaultCompat(browserslist), config__default = /* @__PURE__ */ _interopDefaultCompat(config), ts__default = /* @__PURE__ */ _interopDefaultCompat(ts);
|
|
12
12
|
const CONFIG_FILE_NAMES = [
|
|
13
13
|
"package.config.ts",
|
|
14
14
|
"package.config.js",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var chalk = require("chalk");
|
|
3
|
-
function
|
|
4
|
-
return e && e
|
|
3
|
+
function _interopDefaultCompat(e) {
|
|
4
|
+
return e && typeof e == "object" && "default" in e ? e : { default: e };
|
|
5
5
|
}
|
|
6
|
-
var chalk__default = /* @__PURE__ */
|
|
6
|
+
var chalk__default = /* @__PURE__ */ _interopDefaultCompat(chalk);
|
|
7
7
|
function handleError(err) {
|
|
8
8
|
err instanceof Error ? console.error(chalk__default.default.red("error"), err.message) : console.error(err), process.exit(1);
|
|
9
9
|
}
|
|
@@ -26,10 +26,10 @@ require("@sanity/browserslist-config");
|
|
|
26
26
|
require("./logger.cjs");
|
|
27
27
|
require("zod");
|
|
28
28
|
require("prompts");
|
|
29
|
-
function
|
|
30
|
-
return e && e
|
|
29
|
+
function _interopDefaultCompat(e) {
|
|
30
|
+
return e && typeof e == "object" && "default" in e ? e : { default: e };
|
|
31
31
|
}
|
|
32
|
-
var chalk__default = /* @__PURE__ */
|
|
32
|
+
var chalk__default = /* @__PURE__ */ _interopDefaultCompat(chalk), path__default = /* @__PURE__ */ _interopDefaultCompat(path$1), rimraf__default = /* @__PURE__ */ _interopDefaultCompat(rimraf), ts__default = /* @__PURE__ */ _interopDefaultCompat(ts), fs__default$1 = /* @__PURE__ */ _interopDefaultCompat(fs), prettier__default = /* @__PURE__ */ _interopDefaultCompat(prettier), fs__default = /* @__PURE__ */ _interopDefaultCompat(fs$1), require$$4__default = /* @__PURE__ */ _interopDefaultCompat(require$$4), alias__default = /* @__PURE__ */ _interopDefaultCompat(alias), commonjs__default = /* @__PURE__ */ _interopDefaultCompat(commonjs), json__default = /* @__PURE__ */ _interopDefaultCompat(json), replace__default = /* @__PURE__ */ _interopDefaultCompat(replace), terser__default = /* @__PURE__ */ _interopDefaultCompat(terser), esbuild__default = /* @__PURE__ */ _interopDefaultCompat(esbuild);
|
|
33
33
|
function printExtractMessages(ctx, messages) {
|
|
34
34
|
const { cwd, logger } = ctx, warnings = messages.filter((msg) => msg.logLevel === "warning");
|
|
35
35
|
warnings.length && logger.log();
|
|
@@ -19858,7 +19858,7 @@ function resolveRollupConfig(ctx, buildTask) {
|
|
|
19858
19858
|
entryFileNames,
|
|
19859
19859
|
esModule: !0,
|
|
19860
19860
|
format,
|
|
19861
|
-
interop: "
|
|
19861
|
+
interop: "compat",
|
|
19862
19862
|
sourcemap: config?.sourcemap ?? !0,
|
|
19863
19863
|
hoistTransitiveImports: !1,
|
|
19864
19864
|
...config?.rollup?.output
|