From 0396ec287dd1894088c05d88285fcc14edc09a17 Mon Sep 17 00:00:00 2001 From: Espen Hovlandsdal Date: Wed, 25 Sep 2024 09:23:27 -0700 Subject: [PATCH 1/4] chore: enable source maps for package bundles (#7540) --- .../@repo/package.bundle/src/package.bundle.ts | 1 + scripts/uploadBundles.ts | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) 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/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', From de9c29b6b7fa5e53433e34fa17630a893a6eb102 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rge=20N=C3=A6ss?= Date: Wed, 25 Sep 2024 19:33:39 +0200 Subject: [PATCH 2/4] chore(cli): remove reliance on node-machine-id (#7545) --- packages/@sanity/cli/package.json | 1 - packages/@sanity/cli/src/cli.ts | 2 -- packages/@sanity/cli/src/types.ts | 1 - pnpm-lock.yaml | 3 --- 4 files changed, 7 deletions(-) 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 2eb67589ed3..abd85ca190a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -800,9 +800,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 From 9848f2069405e5d06f82a61a902f141e53099493 Mon Sep 17 00:00:00 2001 From: "ecospark[bot]" <128108030+ecospark[bot]@users.noreply.github.com> Date: Wed, 25 Sep 2024 11:03:50 -0700 Subject: [PATCH 3/4] chore(deps): dedupe pnpm-lock.yaml (#7544) Co-authored-by: ecospark[bot] <128108030+ecospark[bot]@users.noreply.github.com> --- pnpm-lock.yaml | 33 ++++++++++++--------------------- 1 file changed, 12 insertions(+), 21 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index abd85ca190a..c31b61dbb42 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -2178,11 +2178,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'} @@ -12072,7 +12067,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 @@ -12260,10 +12255,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 @@ -12937,14 +12928,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) @@ -12956,7 +12947,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) @@ -15827,7 +15818,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 @@ -15843,7 +15834,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': @@ -16408,7 +16399,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 @@ -16421,7 +16412,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 @@ -17807,7 +17798,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 @@ -18431,7 +18422,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 @@ -20037,7 +20028,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 @@ -20047,7 +20038,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 From 7aed0c07cc673d43e748fa887e8f2881e9ec8f60 Mon Sep 17 00:00:00 2001 From: RitaDias Date: Thu, 26 Sep 2024 09:18:43 +0200 Subject: [PATCH 4/4] chore(form): revert changes in schema that were meant to have been deleted (#7549) --- dev/test-studio/schema/standard/portableText/simpleBlock.tsx | 1 - 1 file changed, 1 deletion(-) 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',