@sanity/cli-build 6.3.1 → 6.4.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.
@@ -1,4 +1,3 @@
1
- // eslint-disable-next-line import-x/no-unresolved
2
1
  import { init, parse } from 'cjs-module-lexer';
3
2
  /** Memoizes the (Wasm) lexer initialization across calls. */ let lexerReady;
4
3
  /**
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/actions/build/getCjsNamedExports.ts"],"sourcesContent":["// eslint-disable-next-line import-x/no-unresolved\nimport {init, parse} from 'cjs-module-lexer'\n\n/** Memoizes the (Wasm) lexer initialization across calls. */\nlet lexerReady: Promise<void> | undefined\n\n/**\n * Matches a string that can be used both as `export const <name>` and\n * `import {<name>}`. Names that fail this (reserved words, string-literal export\n * names) are not importable by name, so they are safely skipped.\n */\nconst VALID_IDENTIFIER = /^[A-Za-z_$][A-Za-z0-9_$]*$/\n\n/**\n * Statically extracts the named exports of a CommonJS module source, without\n * executing it, using `cjs-module-lexer` (the same detector Node.js core uses\n * to expose CommonJS named exports to ESM importers).\n *\n * The vendor build uses this to learn which named bindings each CommonJS entry\n * must re-expose as real ESM exports once Rolldown has lowered it to ESM (see\n * `createVendorNamedExportsPlugin`). Executing the module is intentionally\n * avoided so that bundles which touch DOM globals at evaluation time (e.g.\n * `react-dom`) cannot break the build.\n *\n * @param source - The CommonJS module source code.\n * @param label - Identifier used in error messages (e.g. the chunk name).\n * @returns De-duplicated, importable identifier names, excluding `default` and\n * `__esModule`.\n * @throws If the module re-exports another module (`module.exports = require(...)`);\n * transitive re-export resolution is not supported by the vendor build.\n * @internal\n */\nexport async function getCjsNamedExports(source: string, label: string): Promise<string[]> {\n lexerReady ??= init()\n await lexerReady\n\n const {exports, reexports} = parse(source)\n\n if (reexports.length > 0) {\n throw new Error(\n `Unexpected CommonJS re-exports in '${label}': ${reexports.join(', ')}. ` +\n `Transitive re-export resolution is not supported by the vendor build.`,\n )\n }\n\n return [...new Set(exports)].filter(\n (name) => name !== 'default' && name !== '__esModule' && VALID_IDENTIFIER.test(name),\n )\n}\n"],"names":["init","parse","lexerReady","VALID_IDENTIFIER","getCjsNamedExports","source","label","exports","reexports","length","Error","join","Set","filter","name","test"],"mappings":"AAAA,kDAAkD;AAClD,SAAQA,IAAI,EAAEC,KAAK,QAAO,mBAAkB;AAE5C,2DAA2D,GAC3D,IAAIC;AAEJ;;;;CAIC,GACD,MAAMC,mBAAmB;AAEzB;;;;;;;;;;;;;;;;;;CAkBC,GACD,OAAO,eAAeC,mBAAmBC,MAAc,EAAEC,KAAa;IACpEJ,eAAeF;IACf,MAAME;IAEN,MAAM,EAACK,OAAO,EAAEC,SAAS,EAAC,GAAGP,MAAMI;IAEnC,IAAIG,UAAUC,MAAM,GAAG,GAAG;QACxB,MAAM,IAAIC,MACR,CAAC,mCAAmC,EAAEJ,MAAM,GAAG,EAAEE,UAAUG,IAAI,CAAC,MAAM,EAAE,CAAC,GACvE,CAAC,qEAAqE,CAAC;IAE7E;IAEA,OAAO;WAAI,IAAIC,IAAIL;KAAS,CAACM,MAAM,CACjC,CAACC,OAASA,SAAS,aAAaA,SAAS,gBAAgBX,iBAAiBY,IAAI,CAACD;AAEnF"}
1
+ {"version":3,"sources":["../../../src/actions/build/getCjsNamedExports.ts"],"sourcesContent":["import {init, parse} from 'cjs-module-lexer'\n\n/** Memoizes the (Wasm) lexer initialization across calls. */\nlet lexerReady: Promise<void> | undefined\n\n/**\n * Matches a string that can be used both as `export const <name>` and\n * `import {<name>}`. Names that fail this (reserved words, string-literal export\n * names) are not importable by name, so they are safely skipped.\n */\nconst VALID_IDENTIFIER = /^[A-Za-z_$][A-Za-z0-9_$]*$/\n\n/**\n * Statically extracts the named exports of a CommonJS module source, without\n * executing it, using `cjs-module-lexer` (the same detector Node.js core uses\n * to expose CommonJS named exports to ESM importers).\n *\n * The vendor build uses this to learn which named bindings each CommonJS entry\n * must re-expose as real ESM exports once Rolldown has lowered it to ESM (see\n * `createVendorNamedExportsPlugin`). Executing the module is intentionally\n * avoided so that bundles which touch DOM globals at evaluation time (e.g.\n * `react-dom`) cannot break the build.\n *\n * @param source - The CommonJS module source code.\n * @param label - Identifier used in error messages (e.g. the chunk name).\n * @returns De-duplicated, importable identifier names, excluding `default` and\n * `__esModule`.\n * @throws If the module re-exports another module (`module.exports = require(...)`);\n * transitive re-export resolution is not supported by the vendor build.\n * @internal\n */\nexport async function getCjsNamedExports(source: string, label: string): Promise<string[]> {\n lexerReady ??= init()\n await lexerReady\n\n const {exports, reexports} = parse(source)\n\n if (reexports.length > 0) {\n throw new Error(\n `Unexpected CommonJS re-exports in '${label}': ${reexports.join(', ')}. ` +\n `Transitive re-export resolution is not supported by the vendor build.`,\n )\n }\n\n return [...new Set(exports)].filter(\n (name) => name !== 'default' && name !== '__esModule' && VALID_IDENTIFIER.test(name),\n )\n}\n"],"names":["init","parse","lexerReady","VALID_IDENTIFIER","getCjsNamedExports","source","label","exports","reexports","length","Error","join","Set","filter","name","test"],"mappings":"AAAA,SAAQA,IAAI,EAAEC,KAAK,QAAO,mBAAkB;AAE5C,2DAA2D,GAC3D,IAAIC;AAEJ;;;;CAIC,GACD,MAAMC,mBAAmB;AAEzB;;;;;;;;;;;;;;;;;;CAkBC,GACD,OAAO,eAAeC,mBAAmBC,MAAc,EAAEC,KAAa;IACpEJ,eAAeF;IACf,MAAME;IAEN,MAAM,EAACK,OAAO,EAAEC,SAAS,EAAC,GAAGP,MAAMI;IAEnC,IAAIG,UAAUC,MAAM,GAAG,GAAG;QACxB,MAAM,IAAIC,MACR,CAAC,mCAAmC,EAAEJ,MAAM,GAAG,EAAEE,UAAUG,IAAI,CAAC,MAAM,EAAE,CAAC,GACvE,CAAC,qEAAqE,CAAC;IAE7E;IAEA,OAAO;WAAI,IAAIC,IAAIL;KAAS,CAACM,MAAM,CACjC,CAACC,OAASA,SAAS,aAAaA,SAAS,gBAAgBX,iBAAiBY,IAAI,CAACD;AAEnF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sanity/cli-build",
3
- "version": "6.3.1",
3
+ "version": "6.4.0",
4
4
  "description": "Internal Sanity package for building studios and apps",
5
5
  "keywords": [
6
6
  "cli",
@@ -52,12 +52,12 @@
52
52
  "dependencies": {
53
53
  "@oclif/core": "^4.11.14",
54
54
  "@rolldown/plugin-babel": "^0.2.3",
55
- "@sanity/cli-core": "^3.7.0",
55
+ "@sanity/cli-core": "^3.8.0",
56
56
  "@sanity/generate-help-url": "^4.0.0",
57
- "@sanity/schema": "^6.12.0",
57
+ "@sanity/schema": "^6.15.0",
58
58
  "@sanity/telemetry": "^1.1.0",
59
- "@sanity/types": "^6.12.0",
60
- "@sanity/workbench-cli": "^2.4.3",
59
+ "@sanity/types": "^6.15.0",
60
+ "@sanity/workbench-cli": "^2.5.2",
61
61
  "@vitejs/plugin-react": "^6.1.1",
62
62
  "chokidar": "^5.0.0",
63
63
  "cjs-module-lexer": "^2.2.1",
@@ -72,17 +72,17 @@
72
72
  "react": "^19.2.7",
73
73
  "react-is": "^19.2.7",
74
74
  "semver": "^7.8.1",
75
- "vite": "^8.2.2",
75
+ "vite": "^8.3.0",
76
76
  "zod": "^4.5.2"
77
77
  },
78
78
  "devDependencies": {
79
79
  "@eslint/compat": "^2.1.0",
80
80
  "@repo/package.config": "0.0.1",
81
81
  "@repo/tsconfig": "3.70.0",
82
- "@sanity/cli-test": "17.0.0",
82
+ "@sanity/cli-test": "18.0.0",
83
83
  "@sanity/eslint-config-cli": "^1.1.3",
84
84
  "@sanity/pkg-utils": "^12.3.4",
85
- "@sanity/ui": "^3.5.4",
85
+ "@sanity/ui": "^4.2.1",
86
86
  "@swc/cli": "^0.8.1",
87
87
  "@swc/core": "^1.15.43",
88
88
  "@types/jsdom": "^28.0.3",
@@ -99,7 +99,7 @@
99
99
  "magic-string": "^0.30.21",
100
100
  "oxc-transform-react": "^0.147.0",
101
101
  "publint": "^0.3.21",
102
- "sanity": "^6.12.0",
102
+ "sanity": "^6.15.0",
103
103
  "styled-components": "^6.4.3",
104
104
  "typescript": "^6.0.3",
105
105
  "vitest": "^4.1.11"
@@ -107,7 +107,7 @@
107
107
  "peerDependencies": {
108
108
  "babel-plugin-react-compiler": "*",
109
109
  "oxc-transform-react": "*",
110
- "sanity": "^6.12.0"
110
+ "sanity": "^6.15.0"
111
111
  },
112
112
  "peerDependenciesMeta": {
113
113
  "babel-plugin-react-compiler": {