@sanity/pkg-utils 12.2.0 → 12.3.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/README.md +7 -3
- package/dist/cli.js +1 -1
- package/dist/index.d.ts +7 -6
- package/dist/index.d.ts.map +1 -1
- package/package.json +7 -2
package/README.md
CHANGED
|
@@ -188,9 +188,13 @@ pkg-utils sets up. Most Rollup plugins are also compatible.
|
|
|
188
188
|
- Type: `boolean | ReactCompilerOptions`
|
|
189
189
|
- Default: `false`
|
|
190
190
|
|
|
191
|
-
Runs
|
|
192
|
-
|
|
193
|
-
|
|
191
|
+
Runs the React Compiler on the source files before they are bundled, so published components
|
|
192
|
+
are memoized automatically. Pass `true` for the defaults, or an options object
|
|
193
|
+
(e.g. `{target: '18'}`).
|
|
194
|
+
|
|
195
|
+
`transform` picks the compiler implementation: `'babel'` (default, install
|
|
196
|
+
`babel-plugin-react-compiler`) or the experimental `'oxc'` (install `oxc-transform-react`) —
|
|
197
|
+
[details and caveats](https://github.com/sanity-io/pkg-utils/tree/main/packages/@sanity/tsdown-config#transforms-transform).
|
|
194
198
|
|
|
195
199
|
#### `runtime`
|
|
196
200
|
|
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { cac } from "cac";
|
|
2
|
-
var version = "12.
|
|
2
|
+
var version = "12.3.0";
|
|
3
3
|
const cli = cac();
|
|
4
4
|
cli.command("", "Check").alias("check").option("--strict", "Strict mode").option("--tsconfig [tsconfig]", "[string] tsconfig.json").action(async (options) => {
|
|
5
5
|
let { checkAction } = await import("./checkAction-DWSqzrZd.js");
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PkgExport, PkgExports, PkgExports as PkgExports$1 } from "@sanity/parse-package-json";
|
|
2
|
-
import { PackageBundleAnalyzerOptions, PackageBundleAnalyzerOptions as PackageBundleAnalyzerOptions$1, PackageCssOptions, PackageTsdocCustomTag, PackageTsdocCustomTag as PackageTsdocCustomTag$1, PackageTsdocOptions, PackageTsdocOptions as PackageTsdocOptions$1, PackageTsdocRuleLevel, PackageTsdocRuleLevel as PackageTsdocRuleLevel$1, PackageVanillaExtractOptions, PackageVanillaExtractOptions as PackageVanillaExtractOptions$1, ReactCompilerOptions, ReactCompilerOptions as ReactCompilerOptions$1, StyledComponentsOptions, StyledComponentsOptions as StyledComponentsOptions$1 } from "@sanity/tsdown-config";
|
|
2
|
+
import { PackageBundleAnalyzerOptions, PackageBundleAnalyzerOptions as PackageBundleAnalyzerOptions$1, PackageCssOptions, PackageTsdocCustomTag, PackageTsdocCustomTag as PackageTsdocCustomTag$1, PackageTsdocOptions, PackageTsdocOptions as PackageTsdocOptions$1, PackageTsdocRuleLevel, PackageTsdocRuleLevel as PackageTsdocRuleLevel$1, PackageVanillaExtractOptions, PackageVanillaExtractOptions as PackageVanillaExtractOptions$1, ReactCompilerBabelOptions, ReactCompilerConfigOptions, ReactCompilerOptions, ReactCompilerOptions as ReactCompilerOptions$1, ReactCompilerOxcOptions, StyledComponentsOptions, StyledComponentsOptions as StyledComponentsOptions$1 } from "@sanity/tsdown-config";
|
|
3
3
|
import { UserConfig } from "tsdown";
|
|
4
4
|
type ToggleType = "error" | "warn" | "off";
|
|
5
5
|
/**
|
|
@@ -261,10 +261,11 @@ interface PkgConfigOptions {
|
|
|
261
261
|
*/
|
|
262
262
|
plugins?: UserConfig["plugins"];
|
|
263
263
|
/**
|
|
264
|
-
* Runs
|
|
265
|
-
*
|
|
266
|
-
*
|
|
267
|
-
* `babel-plugin-react-compiler`
|
|
264
|
+
* Runs the React Compiler on the source files before they are bundled, so published
|
|
265
|
+
* components are memoized automatically. Pass `true` to use the defaults, or an options
|
|
266
|
+
* object (e.g. `{target: '18'}`). `transform` picks the implementation: `'babel'`
|
|
267
|
+
* (default, requires `babel-plugin-react-compiler`) or the experimental `'oxc'` (requires
|
|
268
|
+
* `oxc-transform-react`, the Rust port).
|
|
268
269
|
*/
|
|
269
270
|
reactCompiler?: boolean | ReactCompilerOptions$1;
|
|
270
271
|
/**
|
|
@@ -381,5 +382,5 @@ interface PkgTemplateStringOption<T = string> {
|
|
|
381
382
|
type PkgTemplateOption<T = string> = PkgTemplateStringOption<T>;
|
|
382
383
|
/** @public */
|
|
383
384
|
declare function defineTemplateOption<T>(option: PkgTemplateOption<T>): PkgTemplateOption<T>;
|
|
384
|
-
export { DEFAULT_BROWSERSLIST_QUERY, type PackageBundleAnalyzerOptions, type PackageTsdocCustomTag, type PackageTsdocOptions, type PackageTsdocRuleLevel, type PackageVanillaExtractOptions, type PkgBundle, type PkgConfigOptions, type PkgConfigProperty, type PkgConfigPropertyResolver, type PkgExport, type PkgExports, type PkgFormat, type PkgRuleLevel, type PkgRuntime, type PkgTsdocOptions, type ReactCompilerOptions, type StyledComponentsOptions, type TSDocCustomTag, defineConfig, defineTemplateOption, loadConfig };
|
|
385
|
+
export { DEFAULT_BROWSERSLIST_QUERY, type PackageBundleAnalyzerOptions, type PackageTsdocCustomTag, type PackageTsdocOptions, type PackageTsdocRuleLevel, type PackageVanillaExtractOptions, type PkgBundle, type PkgConfigOptions, type PkgConfigProperty, type PkgConfigPropertyResolver, type PkgExport, type PkgExports, type PkgFormat, type PkgRuleLevel, type PkgRuntime, type PkgTsdocOptions, type ReactCompilerBabelOptions, type ReactCompilerConfigOptions, type ReactCompilerOptions, type ReactCompilerOxcOptions, type StyledComponentsOptions, type TSDocCustomTag, defineConfig, defineTemplateOption, loadConfig };
|
|
385
386
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/node/strict.ts","../src/node/core/config/types.ts","../src/node/core/config/defineConfig.ts","../src/node/core/config/loadConfig.ts","../src/node/core/defaults.ts","../src/node/core/template/types.ts","../src/node/core/template/define.ts"],"mappings":";;;KAKK;;;;UAwCY;;;;;EAKf,sBAAsB;;;;;EAKtB,uBAAuB;;;;;;;;;EASvB,wBAAwB;;;;;EAKxB,wBAAwB;;;;;EAKxB,wBAAwB;;;;;EAKxB,cAAc;;;;;EAKd,sBAAsB;;;;;EAKtB,4BAA4B;;;;;EAK5B,kBAAkB;;;;;EAKlB,wBAAwB;;;;;EAKxB,yBAAyB;;;;;EAKzB,0BAA0B;;;;;EAK1B,6BAA6B;;;;;EAK7B,oBAAoB;;;;;EAKpB,8BAA8B;;;;;EAK9B,mBAAmB;;;;;EAKnB,sBAAsB;;;;;EAKtB,wBAAwB;;;;;EAKxB,2BAA2B;;;;;EAK3B,uBAAuB;;;;;EAKvB,sBAAsB;;;;;EAKtB,8BAA8B;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/node/strict.ts","../src/node/core/config/types.ts","../src/node/core/config/defineConfig.ts","../src/node/core/config/loadConfig.ts","../src/node/core/defaults.ts","../src/node/core/template/types.ts","../src/node/core/template/define.ts"],"mappings":";;;KAKK;;;;UAwCY;;;;;EAKf,sBAAsB;;;;;EAKtB,uBAAuB;;;;;;;;;EASvB,wBAAwB;;;;;EAKxB,wBAAwB;;;;;EAKxB,wBAAwB;;;;;EAKxB,cAAc;;;;;EAKd,sBAAsB;;;;;EAKtB,4BAA4B;;;;;EAK5B,kBAAkB;;;;;EAKlB,wBAAwB;;;;;EAKxB,yBAAyB;;;;;EAKzB,0BAA0B;;;;;EAK1B,6BAA6B;;;;;EAK7B,oBAAoB;;;;;EAKpB,8BAA8B;;;;;EAK9B,mBAAmB;;;;;EAKnB,sBAAsB;;;;;EAKtB,wBAAwB;;;;;EAKxB,2BAA2B;;;;;EAK3B,uBAAuB;;;;;EAKvB,sBAAsB;;;;;EAKtB,8BAA8B;;;KCjIpB;;KAGA;;KAGA,0BAA0B,MAAM,MAAM,MAAM;;KAG5C,kBAAkB,KAAK,0BAA0B,KAAK;;UAGjD;EACf;EACA;EACA;EACA,UAAU;;;;;;KAOA,eAAe;;;;;KAMf,iBAAiB;;;;;;;KAQjB,kBAAkB;;UAGb;EACf,UAAU;;;;;;;;;;;;;;;;;;;EAmBV,2BAA2B;;;;;;;;;EAS3B,QAAQ;;;;;;;;;;;;;;;;;;;;EAoBR,MAAM;;EAEN,SAAS;;;;;;;;EAQT,OAAO;;;;EAIP;;;;;;;EAOA,cAAc,QAAQ,YAAY;EAClC,UAAU,kBAAkB;;;;;;;;;;;EAW5B,WAAW;;;;;;;;EAQX;;;;;;;;EAQA;;;;;;;EAOA,UAAU;;;;;;;;EAQV,0BAA0B;;;;EAI1B,UAAU;EACV;;;;EAIA;;;;EAIA,gBAAgB,QAAQ;;;;;;;EAOxB,6BAA6B;EAC7B;;;;;;;EAOA,kBAAkB;;;;;;;;;;EAUlB,2BAA2B;;;;;;;EAa3B;;;;;;;;EAQA;;;;;EAKA;;;;;EAKA;;;;;EAKA;;;;;EAKA;;;;;EAKA;;;;;;;;EAQA;;;;;EAKA;;;iBCrRc,mBAAmB,UAAU,kBAAkB,eAAe,IAAI;;iBCK5D,WAAW;EAC/B;EACA;IACE,QAAQ;;cCRC;;UCMI,wBAAwB;EACvC;EACA;EACA;EACA,UAAU,MAAM,SAAS,wBAAwB;EACjD,SAAS,cAAc;EACvB,YAAY;;;KAIF,kBAAkB,cAAc,wBAAwB;;iBChBpD,qBAAqB,GAAG,QAAQ,kBAAkB,KAAK,kBAAkB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sanity/pkg-utils",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.3.0",
|
|
4
4
|
"description": "Simple utilities for modern npm packages.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"sanity-io",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"zod": "^4.4.3",
|
|
69
69
|
"zod-validation-error": "^5.0.0",
|
|
70
70
|
"@sanity/parse-package-json": "^2.3.2",
|
|
71
|
-
"@sanity/tsdown-config": "^0.
|
|
71
|
+
"@sanity/tsdown-config": "^0.26.0"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@types/find-config": "^1.0.4",
|
|
@@ -78,6 +78,7 @@
|
|
|
78
78
|
"@types/treeify": "^1.0.3",
|
|
79
79
|
"babel-plugin-react-compiler": "1.0.0",
|
|
80
80
|
"nanoexec": "^1.1.0",
|
|
81
|
+
"oxc-transform-react": "0.145.0",
|
|
81
82
|
"parse-github-url": "^1.0.4",
|
|
82
83
|
"rimraf": "^6.1.3",
|
|
83
84
|
"typescript": "7.0.2",
|
|
@@ -87,6 +88,7 @@
|
|
|
87
88
|
"peerDependencies": {
|
|
88
89
|
"@tsdown/css": "*",
|
|
89
90
|
"babel-plugin-react-compiler": "*",
|
|
91
|
+
"oxc-transform-react": "*",
|
|
90
92
|
"typescript": "6.x || 7.x"
|
|
91
93
|
},
|
|
92
94
|
"peerDependenciesMeta": {
|
|
@@ -95,6 +97,9 @@
|
|
|
95
97
|
},
|
|
96
98
|
"babel-plugin-react-compiler": {
|
|
97
99
|
"optional": true
|
|
100
|
+
},
|
|
101
|
+
"oxc-transform-react": {
|
|
102
|
+
"optional": true
|
|
98
103
|
}
|
|
99
104
|
},
|
|
100
105
|
"engines": {
|