@sanity/pkg-utils 4.2.7 → 4.2.8

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.
Files changed (23) hide show
  1. package/dist/_chunks/{build-Dvr5eKKV.cjs → build-VF8OGFWI.cjs} +3 -3
  2. package/dist/_chunks/{build-Dvr5eKKV.cjs.map → build-VF8OGFWI.cjs.map} +1 -1
  3. package/dist/_chunks/{buildAction-BqdY-x5D.cjs → buildAction-BqCNrElB.cjs} +2 -2
  4. package/dist/_chunks/{buildAction-BqdY-x5D.cjs.map → buildAction-BqCNrElB.cjs.map} +1 -1
  5. package/dist/_chunks/{check-BSN1yLfm.cjs → check-BYmzjjzq.cjs} +2 -2
  6. package/dist/_chunks/{check-BSN1yLfm.cjs.map → check-BYmzjjzq.cjs.map} +1 -1
  7. package/dist/_chunks/{checkAction-CplEAcgR.cjs → checkAction-BH_mZd8d.cjs} +2 -2
  8. package/dist/_chunks/{checkAction-CplEAcgR.cjs.map → checkAction-BH_mZd8d.cjs.map} +1 -1
  9. package/dist/_chunks/{consoleSpy-1_g1SPGc.cjs → consoleSpy-CHoeHT4P.cjs} +2 -2
  10. package/dist/_chunks/{consoleSpy-1_g1SPGc.cjs.map → consoleSpy-CHoeHT4P.cjs.map} +1 -1
  11. package/dist/_chunks/{index-Dxhh31D_.cjs → index-DGGGzGO4.cjs} +6 -3
  12. package/dist/_chunks/{index-Dxhh31D_.cjs.map → index-DGGGzGO4.cjs.map} +1 -1
  13. package/dist/_chunks/{watch-Dqp3kWd_.cjs → watch-5pC_s_sw.cjs} +3 -3
  14. package/dist/_chunks/{watch-Dqp3kWd_.cjs.map → watch-5pC_s_sw.cjs.map} +1 -1
  15. package/dist/_chunks/{watchAction-4vv-wSLV.cjs → watchAction-DU24xubH.cjs} +2 -2
  16. package/dist/_chunks/{watchAction-4vv-wSLV.cjs.map → watchAction-DU24xubH.cjs.map} +1 -1
  17. package/dist/cli.cjs +4 -4
  18. package/dist/index.cjs +1 -1
  19. package/dist/index.js +5 -2
  20. package/dist/index.js.map +1 -1
  21. package/package.json +3 -3
  22. package/src/node/resolveBuildContext.ts +6 -4
  23. package/src/node/tasks/rollup/resolveRollupConfig.ts +3 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sanity/pkg-utils",
3
- "version": "4.2.7",
3
+ "version": "4.2.8",
4
4
  "description": "Simple utilities for modern npm packages.",
5
5
  "keywords": [
6
6
  "sanity-io",
@@ -71,7 +71,7 @@
71
71
  "@rollup/plugin-node-resolve": "^15.2.3",
72
72
  "@rollup/plugin-replace": "^5.0.5",
73
73
  "@rollup/plugin-terser": "^0.4.4",
74
- "@sanity/browserslist-config": "^1.0.2",
74
+ "@sanity/browserslist-config": "^1.0.3",
75
75
  "browserslist": "^4.23.0",
76
76
  "cac": "^6.7.14",
77
77
  "chalk": "^4.1.2",
@@ -133,7 +133,7 @@
133
133
  "typescript": "^5.3.3",
134
134
  "vitest": "^1.3.1",
135
135
  "vitest-github-actions-reporter": "^0.11.1",
136
- "@sanity/pkg-utils": "4.2.7"
136
+ "@sanity/pkg-utils": "4.2.8"
137
137
  },
138
138
  "peerDependencies": {
139
139
  "typescript": "^4.7 || ^5"
@@ -42,10 +42,12 @@ export async function resolveBuildContext(options: {
42
42
 
43
43
  /* eslint-disable padding-line-between-statements */
44
44
  let browserslist = pkg.browserslist
45
- if (strict && !browserslist) {
46
- logger.warn(
47
- 'Could not detect a `browserslist` property in `package.json`, using default configuration. Add `"browserslist": "extends @sanity/browserslist-config"` to silence this warning.',
48
- )
45
+ if (!browserslist) {
46
+ if (strict) {
47
+ logger.warn(
48
+ 'Could not detect a `browserslist` property in `package.json`, using default configuration. Add `"browserslist": "extends @sanity/browserslist-config"` to silence this warning.',
49
+ )
50
+ }
49
51
  browserslist = DEFAULT_BROWSERSLIST_QUERY
50
52
  }
51
53
  const targetVersions = browserslistToEsbuild(browserslist)
@@ -100,6 +100,9 @@ export function resolveRollupConfig(
100
100
  tsconfig: ctx.ts.configPath || 'tsconfig.json',
101
101
  treeShaking: true,
102
102
  minifySyntax: config?.minify !== false,
103
+ supported: {
104
+ 'template-literal': true,
105
+ },
103
106
  }),
104
107
  Array.isArray(config?.babel?.plugins) &&
105
108
  getBabelOutputPlugin({