@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sanity/pkg-utils",
3
- "version": "4.2.4",
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.3",
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.0",
134
+ "vitest": "^1.3.1",
135
135
  "vitest-github-actions-reporter": "^0.11.1",
136
- "@sanity/pkg-utils": "4.2.4"
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: true,
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 == 'comment2') {
118
+ if (type === 'comment2') {
117
119
  // Keep licensing comments
118
120
  return /@preserve|@license|@cc_on/i.test(text)
119
121
  }