@sanity/pkg-utils 4.2.4 → 4.2.6
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-CUmkS_Ms.cjs → build-BxYgJfQq.cjs} +2 -2
- package/dist/_chunks/{build-CUmkS_Ms.cjs.map → build-BxYgJfQq.cjs.map} +1 -1
- package/dist/_chunks/{buildAction-CK-kav0n.cjs → buildAction-KZkR53RZ.cjs} +2 -2
- package/dist/_chunks/{buildAction-CK-kav0n.cjs.map → buildAction-KZkR53RZ.cjs.map} +1 -1
- package/dist/_chunks/{index-BHQsZTim.cjs → index-RwgAZs-y.cjs} +6 -4
- package/dist/_chunks/{index-BHQsZTim.cjs.map → index-RwgAZs-y.cjs.map} +1 -1
- package/dist/_chunks/{watch-D-f4W93t.cjs → watch-JoaJL851.cjs} +2 -2
- package/dist/_chunks/{watch-D-f4W93t.cjs.map → watch-JoaJL851.cjs.map} +1 -1
- package/dist/_chunks/{watchAction-Dkh6tUKf.cjs → watchAction-DcoHeR8f.cjs} +2 -2
- package/dist/_chunks/{watchAction-Dkh6tUKf.cjs.map → watchAction-DcoHeR8f.cjs.map} +1 -1
- package/dist/cli.cjs +3 -3
- package/dist/index.cjs +3 -3
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/src/node/tasks/rollup/resolveRollupConfig.ts +4 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sanity/pkg-utils",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.6",
|
|
4
4
|
"description": "Simple utilities for modern npm packages.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"sanity-io",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"dependencies": {
|
|
63
63
|
"@babel/core": "^7.23.9",
|
|
64
64
|
"@babel/types": "^7.23.9",
|
|
65
|
-
"@microsoft/api-extractor": "^7.40.
|
|
65
|
+
"@microsoft/api-extractor": "^7.40.5",
|
|
66
66
|
"@microsoft/tsdoc-config": "^0.16.2",
|
|
67
67
|
"@rollup/plugin-alias": "^5.1.0",
|
|
68
68
|
"@rollup/plugin-babel": "^6.0.4",
|
|
@@ -131,9 +131,9 @@
|
|
|
131
131
|
"rollup-plugin-visualizer": "^5.12.0",
|
|
132
132
|
"ts-node": "^10.9.2",
|
|
133
133
|
"typescript": "^5.3.3",
|
|
134
|
-
"vitest": "^1.3.
|
|
134
|
+
"vitest": "^1.3.1",
|
|
135
135
|
"vitest-github-actions-reporter": "^0.11.1",
|
|
136
|
-
"@sanity/pkg-utils": "4.2.
|
|
136
|
+
"@sanity/pkg-utils": "4.2.6"
|
|
137
137
|
},
|
|
138
138
|
"peerDependencies": {
|
|
139
139
|
"typescript": "^4.7 || ^5"
|
|
@@ -98,6 +98,8 @@ export function resolveRollupConfig(
|
|
|
98
98
|
jsxImportSource: config?.jsxImportSource ?? 'react',
|
|
99
99
|
target,
|
|
100
100
|
tsconfig: ctx.ts.configPath || 'tsconfig.json',
|
|
101
|
+
treeShaking: true,
|
|
102
|
+
minifySyntax: minify,
|
|
101
103
|
}),
|
|
102
104
|
Array.isArray(config?.babel?.plugins) &&
|
|
103
105
|
getBabelOutputPlugin({
|
|
@@ -106,14 +108,14 @@ export function resolveRollupConfig(
|
|
|
106
108
|
}),
|
|
107
109
|
minify &&
|
|
108
110
|
terser({
|
|
109
|
-
compress:
|
|
111
|
+
compress: {directives: false},
|
|
110
112
|
output: {
|
|
111
113
|
comments: (_node, comment) => {
|
|
112
114
|
const text = comment.value
|
|
113
115
|
const type = comment.type
|
|
114
116
|
|
|
115
117
|
// Check if this is a multiline comment
|
|
116
|
-
if (type
|
|
118
|
+
if (type === 'comment2') {
|
|
117
119
|
// Keep licensing comments
|
|
118
120
|
return /@preserve|@license|@cc_on/i.test(text)
|
|
119
121
|
}
|