diff --git a/dev/test-studio/schema/standard/portableText/simpleBlock.tsx b/dev/test-studio/schema/standard/portableText/simpleBlock.tsx index dc9dd52e3e0..004854a671a 100644 --- a/dev/test-studio/schema/standard/portableText/simpleBlock.tsx +++ b/dev/test-studio/schema/standard/portableText/simpleBlock.tsx @@ -31,7 +31,6 @@ const myStringType = defineArrayMember({ }) export default defineType({ - liveEdit: true, name: 'simpleBlock', title: 'Simple block', type: 'document', diff --git a/packages/@repo/package.bundle/src/package.bundle.ts b/packages/@repo/package.bundle/src/package.bundle.ts index 764ac5f344c..b2279926495 100644 --- a/packages/@repo/package.bundle/src/package.bundle.ts +++ b/packages/@repo/package.bundle/src/package.bundle.ts @@ -15,6 +15,7 @@ export const defaultConfig: UserConfig = { plugins: [react(), tsconfigPaths()], build: { emptyOutDir: true, + sourcemap: true, lib: { entry: {}, formats: ['es'], diff --git a/packages/@sanity/cli/package.json b/packages/@sanity/cli/package.json index 4d60fb0e7df..ca6ea391a99 100644 --- a/packages/@sanity/cli/package.json +++ b/packages/@sanity/cli/package.json @@ -68,7 +68,6 @@ "esbuild-register": "^3.5.0", "get-it": "^8.6.5", "groq-js": "^1.13.0", - "node-machine-id": "^1.1.12", "pkg-dir": "^5.0.0", "prettier": "^3.3.0", "semver": "^7.3.5", diff --git a/packages/@sanity/cli/src/cli.ts b/packages/@sanity/cli/src/cli.ts index abca613da93..67bc4f130d0 100755 --- a/packages/@sanity/cli/src/cli.ts +++ b/packages/@sanity/cli/src/cli.ts @@ -5,7 +5,6 @@ import path from 'node:path' import chalk from 'chalk' import dotenv from 'dotenv' -import {machineId} from 'node-machine-id' import resolveFrom from 'resolve-from' import {CliCommand} from './__telemetry__/cli.telemetry' @@ -85,7 +84,6 @@ export async function runCli(cliRoot: string, {cliVersion}: {cliVersion: string} ) telemetry.updateUserProperties({ - deviceId: await machineId(), runtimeVersion: process.version, runtime: detectRuntime(), cliVersion: pkg.version, diff --git a/packages/@sanity/cli/src/types.ts b/packages/@sanity/cli/src/types.ts index ac85b2d5666..46705876634 100644 --- a/packages/@sanity/cli/src/types.ts +++ b/packages/@sanity/cli/src/types.ts @@ -94,7 +94,6 @@ export interface CliBaseCommandContext { } export interface TelemetryUserProperties { - deviceId: string runtime: string runtimeVersion: string cliVersion: string diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5f73875ca7c..bfb45f06393 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -803,9 +803,6 @@ importers: groq-js: specifier: ^1.13.0 version: 1.13.0 - node-machine-id: - specifier: ^1.1.12 - version: 1.1.12 pkg-dir: specifier: ^5.0.0 version: 5.0.0 @@ -2184,11 +2181,6 @@ packages: resolution: {integrity: sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==} engines: {node: '>=6.9.0'} - '@babel/parser@7.25.3': - resolution: {integrity: sha512-iLTJKDbJ4hMvFPgQwwsVoxtHyWpKKPBrxkANrSYewDPaPpT5py5yeVkgPIJ7XYXhndxJpaA3PyALSXQ7u8e/Dw==} - engines: {node: '>=6.0.0'} - hasBin: true - '@babel/parser@7.25.6': resolution: {integrity: sha512-trGdfBdbD0l1ZPmcJ83eNxB9rbEax4ALFTF7fN386TMYbeCQbyme5cOEXQhbGXKebwGaB/J52w1mrklMcbgy6Q==} engines: {node: '>=6.0.0'} @@ -12081,7 +12073,7 @@ snapshots: '@babel/helper-compilation-targets': 7.25.2 '@babel/helper-module-transforms': 7.25.2(@babel/core@7.25.2) '@babel/helpers': 7.25.0 - '@babel/parser': 7.25.3 + '@babel/parser': 7.25.6 '@babel/template': 7.25.0 '@babel/traverse': 7.25.3 '@babel/types': 7.25.6 @@ -12269,10 +12261,6 @@ snapshots: js-tokens: 4.0.0 picocolors: 1.1.0 - '@babel/parser@7.25.3': - dependencies: - '@babel/types': 7.25.6 - '@babel/parser@7.25.6': dependencies: '@babel/types': 7.25.6 @@ -12946,14 +12934,14 @@ snapshots: '@babel/template@7.25.0': dependencies: '@babel/code-frame': 7.24.7 - '@babel/parser': 7.25.3 + '@babel/parser': 7.25.6 '@babel/types': 7.25.6 '@babel/traverse@7.25.3': dependencies: '@babel/code-frame': 7.24.7 '@babel/generator': 7.25.0 - '@babel/parser': 7.25.3 + '@babel/parser': 7.25.6 '@babel/template': 7.25.0 '@babel/types': 7.25.6 debug: 4.3.7(supports-color@9.4.0) @@ -12965,7 +12953,7 @@ snapshots: dependencies: '@babel/code-frame': 7.24.7 '@babel/generator': 7.25.0 - '@babel/parser': 7.25.3 + '@babel/parser': 7.25.6 '@babel/template': 7.25.0 '@babel/types': 7.25.6 debug: 4.3.7(supports-color@5.5.0) @@ -15836,7 +15824,7 @@ snapshots: '@types/babel__core@7.20.5': dependencies: - '@babel/parser': 7.25.3 + '@babel/parser': 7.25.6 '@babel/types': 7.25.6 '@types/babel__generator': 7.6.8 '@types/babel__template': 7.4.4 @@ -15852,7 +15840,7 @@ snapshots: '@types/babel__template@7.4.4': dependencies: - '@babel/parser': 7.25.3 + '@babel/parser': 7.25.6 '@babel/types': 7.25.6 '@types/babel__traverse@7.20.6': @@ -16417,7 +16405,7 @@ snapshots: '@vue/compiler-core@3.4.37': dependencies: - '@babel/parser': 7.25.3 + '@babel/parser': 7.25.6 '@vue/shared': 3.4.37 entities: 5.0.0 estree-walker: 2.0.2 @@ -16430,7 +16418,7 @@ snapshots: '@vue/compiler-sfc@3.4.37': dependencies: - '@babel/parser': 7.25.3 + '@babel/parser': 7.25.6 '@vue/compiler-core': 3.4.37 '@vue/compiler-dom': 3.4.37 '@vue/compiler-ssr': 3.4.37 @@ -17821,7 +17809,7 @@ snapshots: depcheck@1.4.7: dependencies: - '@babel/parser': 7.25.3 + '@babel/parser': 7.25.6 '@babel/traverse': 7.25.3 '@vue/compiler-sfc': 3.4.37 callsite: 1.0.0 @@ -18445,7 +18433,7 @@ snapshots: eslint-plugin-react-compiler@0.0.0-experimental-9ed098e-20240725(eslint@8.57.0): dependencies: '@babel/core': 7.25.2 - '@babel/parser': 7.25.3 + '@babel/parser': 7.25.6 '@babel/plugin-proposal-private-methods': 7.18.6(@babel/core@7.25.2) eslint: 8.57.0 hermes-parser: 0.20.1 @@ -20051,7 +20039,7 @@ snapshots: istanbul-lib-instrument@5.2.1: dependencies: '@babel/core': 7.25.2 - '@babel/parser': 7.25.3 + '@babel/parser': 7.25.6 '@istanbuljs/schema': 0.1.3 istanbul-lib-coverage: 3.2.2 semver: 6.3.1 @@ -20061,7 +20049,7 @@ snapshots: istanbul-lib-instrument@6.0.3: dependencies: '@babel/core': 7.25.2 - '@babel/parser': 7.25.3 + '@babel/parser': 7.25.6 '@istanbuljs/schema': 0.1.3 istanbul-lib-coverage: 3.2.2 semver: 7.6.3 diff --git a/scripts/uploadBundles.ts b/scripts/uploadBundles.ts index de62852561f..89464a09e0d 100644 --- a/scripts/uploadBundles.ts +++ b/scripts/uploadBundles.ts @@ -19,6 +19,11 @@ const corePkgs = ['sanity', '@sanity/vision'] as const const appVersion = 'v1' +const mimeTypes: Record = { + '.mjs': 'application/javascript', + '.map': 'application/json', +} + /** * Replaces all slashes with double underscores */ @@ -60,16 +65,22 @@ async function copyPackages() { packageVersions.set(pkg, version) // Convert slashes to double underscores - // Needed for `@sanity/vision` + // Needed for `@sanity/vision` and other scoped packages const cleanDir = cleanDirName(pkg) for await (const filePath of getFiles(`packages/${pkg}/dist`)) { try { const fileName = path.basename(filePath) + const ext = path.extname(fileName) + const contentType = mimeTypes[ext] + if (!contentType) { + throw new Error(`Unknown content type for file ${filePath}`) + } + const options: UploadOptions = { destination: `modules/${appVersion}/${cleanDir}/${version}/bare/${fileName}`, gzip: true, - contentType: 'application/javascript', + contentType, metadata: { // 1 year cache cacheControl: 'public, max-age=31536000, immutable',