@sanity/pkg-utils 2.3.13-canary.1 → 2.3.14
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/{build-fabfa3af.cjs → build-bf3729c7.cjs} +2 -2
- package/dist/_chunks/{build-fabfa3af.cjs.map → build-bf3729c7.cjs.map} +1 -1
- package/dist/_chunks/{buildAction-dae78abb.cjs → buildAction-e721d08b.cjs} +2 -2
- package/dist/_chunks/{buildAction-dae78abb.cjs.map → buildAction-e721d08b.cjs.map} +1 -1
- package/dist/_chunks/{index-1811ae9f.cjs → index-c026daa9.cjs} +5 -23
- package/dist/_chunks/index-c026daa9.cjs.map +1 -0
- package/dist/_chunks/{watch-4e565bee.cjs → watch-d7a9e8b7.cjs} +2 -2
- package/dist/_chunks/{watch-4e565bee.cjs.map → watch-d7a9e8b7.cjs.map} +1 -1
- package/dist/_chunks/{watchAction-a5721084.cjs → watchAction-06f283b6.cjs} +2 -2
- package/dist/_chunks/{watchAction-a5721084.cjs.map → watchAction-06f283b6.cjs.map} +1 -1
- package/dist/cli.cjs +3 -3
- package/dist/index.cjs +3 -3
- package/dist/index.d.ts +0 -5
- package/dist/index.js +4 -21
- package/dist/index.js.map +1 -1
- package/package.json +2 -3
- package/src/node/core/config/types.ts +0 -5
- package/src/node/tasks/rollup/resolveRollupConfig.ts +4 -10
- package/src/node/tasks/rollup/rollupTask.ts +0 -20
- package/dist/_chunks/index-1811ae9f.cjs.map +0 -1
package/dist/index.js
CHANGED
|
@@ -32,7 +32,6 @@ import { nodeResolve } from '@rollup/plugin-node-resolve';
|
|
|
32
32
|
import replace from '@rollup/plugin-replace';
|
|
33
33
|
import terser from '@rollup/plugin-terser';
|
|
34
34
|
import esbuild from 'rollup-plugin-esbuild';
|
|
35
|
-
import preserveDirectives from 'rollup-plugin-preserve-directives';
|
|
36
35
|
import esbuild$1 from 'esbuild';
|
|
37
36
|
import treeify from 'treeify';
|
|
38
37
|
import prettyBytes from 'pretty-bytes';
|
|
@@ -1458,10 +1457,10 @@ function resolveRollupConfig(ctx, buildTask) {
|
|
|
1458
1457
|
modules: false
|
|
1459
1458
|
}]]
|
|
1460
1459
|
}), minify && terser({
|
|
1461
|
-
compress:
|
|
1460
|
+
compress: {
|
|
1462
1461
|
// Needed until https://github.com/terser/terser/issues/1320 is fixed
|
|
1463
1462
|
directives: false
|
|
1464
|
-
}
|
|
1463
|
+
},
|
|
1465
1464
|
output: {
|
|
1466
1465
|
comments: (_node, comment) => {
|
|
1467
1466
|
const text = comment.value;
|
|
@@ -1472,9 +1471,7 @@ function resolveRollupConfig(ctx, buildTask) {
|
|
|
1472
1471
|
return false;
|
|
1473
1472
|
}
|
|
1474
1473
|
}
|
|
1475
|
-
})
|
|
1476
|
-
// Allows marking export files with `'use client'` at the top
|
|
1477
|
-
(config == null ? void 0 : config.preserveModuleDirectives) && preserveDirectives()].filter(Boolean);
|
|
1474
|
+
})].filter(Boolean);
|
|
1478
1475
|
const userPlugins = (_c = config == null ? void 0 : config.rollup) == null ? void 0 : _c.plugins;
|
|
1479
1476
|
const plugins = Array.isArray(userPlugins) ? defaultPlugins.concat(userPlugins) : resolveConfigProperty((_d = config == null ? void 0 : config.rollup) == null ? void 0 : _d.plugins, defaultPlugins);
|
|
1480
1477
|
return {
|
|
@@ -1531,8 +1528,7 @@ function resolveRollupConfig(ctx, buildTask) {
|
|
|
1531
1528
|
interop: "compat",
|
|
1532
1529
|
minifyInternalExports: minify,
|
|
1533
1530
|
sourcemap: (_ref11 = config == null ? void 0 : config.sourcemap) !== null && _ref11 !== void 0 ? _ref11 : true,
|
|
1534
|
-
hoistTransitiveImports: false
|
|
1535
|
-
preserveModules: (config == null ? void 0 : config.preserveModuleDirectives) ? true : false
|
|
1531
|
+
hoistTransitiveImports: false
|
|
1536
1532
|
}
|
|
1537
1533
|
};
|
|
1538
1534
|
}
|
|
@@ -1598,19 +1594,6 @@ async function execPromise(ctx, task) {
|
|
|
1598
1594
|
const bundle = await rollup({
|
|
1599
1595
|
...inputOptions,
|
|
1600
1596
|
onwarn(warning) {
|
|
1601
|
-
var _a;
|
|
1602
|
-
if (
|
|
1603
|
-
// Ignore the directive warning until the preserveDirectives plugin does it automatically: https://github.com/Ephem/rollup-plugin-preserve-directives#rollup-plugin-preserve-directives-warning
|
|
1604
|
-
warning.message.includes('Module level directives cause errors when bundled, "use client" in')) {
|
|
1605
|
-
if (!((_a = ctx.config) == null ? void 0 : _a.preserveModuleDirectives)) {
|
|
1606
|
-
consoleSpy.messages.push({
|
|
1607
|
-
type: "warn",
|
|
1608
|
-
code: warning.code,
|
|
1609
|
-
args: ["".concat(warning.message, " You can preserve it by setting \"preserveModuleDirectives: true\" in your \"package.config.ts\"")]
|
|
1610
|
-
});
|
|
1611
|
-
}
|
|
1612
|
-
return;
|
|
1613
|
-
}
|
|
1614
1597
|
consoleSpy.messages.push({
|
|
1615
1598
|
type: "warn",
|
|
1616
1599
|
code: warning.code,
|