@sanity/pkg-utils 6.8.17 → 6.8.19-canary.0

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": "6.8.17",
3
+ "version": "6.8.19-canary.0",
4
4
  "description": "Simple utilities for modern npm packages.",
5
5
  "keywords": [
6
6
  "sanity-io",
@@ -67,14 +67,15 @@
67
67
  "browserslist": "extends @sanity/browserslist-config",
68
68
  "prettier": "@sanity/prettier-config",
69
69
  "dependencies": {
70
- "@babel/core": "^7.24.5",
71
- "@babel/types": "^7.24.5",
72
- "@microsoft/api-extractor": "7.43.7",
70
+ "@babel/core": "^7.24.6",
71
+ "@babel/preset-typescript": "^7.24.6",
72
+ "@babel/types": "^7.24.6",
73
+ "@microsoft/api-extractor": "7.43.8",
73
74
  "@microsoft/tsdoc-config": "^0.16.2",
74
75
  "@optimize-lodash/rollup-plugin": "4.0.4",
75
76
  "@rollup/plugin-alias": "^5.1.0",
76
77
  "@rollup/plugin-babel": "^6.0.4",
77
- "@rollup/plugin-commonjs": "^25.0.7",
78
+ "@rollup/plugin-commonjs": "^25.0.8",
78
79
  "@rollup/plugin-json": "^6.1.0",
79
80
  "@rollup/plugin-node-resolve": "^15.2.3",
80
81
  "@rollup/plugin-replace": "^5.0.5",
@@ -84,7 +85,7 @@
84
85
  "cac": "^6.7.14",
85
86
  "chalk": "^4.1.2",
86
87
  "chokidar": "^3.6.0",
87
- "esbuild": "^0.21.3",
88
+ "esbuild": "^0.21.4",
88
89
  "esbuild-register": "^3.5.0",
89
90
  "find-config": "^1.0.0",
90
91
  "get-latest-version": "^5.1.0",
@@ -100,7 +101,7 @@
100
101
  "prompts": "^2.4.2",
101
102
  "recast": "0.23.7",
102
103
  "rimraf": "^4.4.1",
103
- "rollup": "^4.17.2",
104
+ "rollup": "^4.18.0",
104
105
  "rollup-plugin-esbuild": "^6.1.1",
105
106
  "rxjs": "^7.8.1",
106
107
  "treeify": "^1.1.0",
@@ -123,8 +124,8 @@
123
124
  "@types/semver": "^7.5.8",
124
125
  "@types/treeify": "^1.0.3",
125
126
  "@types/uuid": "^9.0.8",
126
- "@typescript-eslint/eslint-plugin": "^7.9.0",
127
- "@typescript-eslint/parser": "^7.9.0",
127
+ "@typescript-eslint/eslint-plugin": "^7.11.0",
128
+ "@typescript-eslint/parser": "^7.11.0",
128
129
  "browserslist-to-esbuild": "2.1.1",
129
130
  "commitizen": "^4.3.0",
130
131
  "cpx": "^1.5.0",
@@ -136,7 +137,7 @@
136
137
  "eslint-plugin-simple-import-sort": "^12.1.0",
137
138
  "husky": "^8.0.3",
138
139
  "lint-staged": "^15.0.2",
139
- "npm-run-all2": "^6.1.2",
140
+ "npm-run-all2": "^6.2.0",
140
141
  "outdent": "^0.8.0",
141
142
  "rollup-plugin-visualizer": "^5.12.0",
142
143
  "semver": "^7.6.0",
@@ -144,11 +145,17 @@
144
145
  "typescript": "5.4.5",
145
146
  "vitest": "^1.6.0",
146
147
  "vitest-github-actions-reporter": "^0.11.1",
147
- "@sanity/pkg-utils": "6.8.17"
148
+ "@sanity/pkg-utils": "6.8.19-canary.0"
148
149
  },
149
150
  "peerDependencies": {
151
+ "babel-plugin-react-compiler": "*",
150
152
  "typescript": "5.4.x"
151
153
  },
154
+ "peerDependenciesMeta": {
155
+ "babel-plugin-react-compiler": {
156
+ "optional": true
157
+ }
158
+ },
152
159
  "engines": {
153
160
  "node": ">=18.17.0"
154
161
  },
@@ -72,6 +72,8 @@ export interface PkgConfigOptions {
72
72
  /** @alpha */
73
73
  babel?: {
74
74
  plugins?: BabelPluginItem[] | null | undefined
75
+ /** @alpha */
76
+ reactCompiler?: boolean
75
77
  }
76
78
  bundles?: PkgBundle[]
77
79
  /** @alpha */
@@ -95,6 +95,12 @@ export function resolveRollupConfig(
95
95
  }),
96
96
  commonjs(),
97
97
  json(),
98
+ config?.babel?.reactCompiler &&
99
+ getBabelOutputPlugin({
100
+ babelrc: false,
101
+ presets: ['@babel/preset-typescript'],
102
+ plugins: [['babel-plugin-react-compiler', {}]],
103
+ }),
98
104
  esbuild({
99
105
  jsx: config?.jsx ?? 'automatic',
100
106
  jsxFactory: config?.jsxFactory ?? 'createElement',