Skip to content

Commit

Permalink
Merge branch 'edx-1351' into wider-input-support
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanl17 authored Jul 4, 2024
2 parents be229da + 4fa3f89 commit 943fd2f
Show file tree
Hide file tree
Showing 247 changed files with 1,010 additions and 20,214 deletions.
12 changes: 12 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const config = {
'plugin:react/jsx-runtime',
'prettier',
'@sanity/eslint-config-i18n',
'turbo',
],
parser: '@typescript-eslint/parser',
plugins: [
Expand Down Expand Up @@ -261,6 +262,17 @@ const config = {
'react-compiler/react-compiler': 'off',
},
},
// Don't lint Turbo undeclared process env variables in code that is used in the CLI at runtime
{
files: [
'packages/@sanity/cli/**',
'packages/sanity/src/_internal/cli/**',
'packages/sanity/playwright-ct/**',
],
rules: {
'turbo/no-undeclared-env-vars': 'off',
},
},
],
}

Expand Down
1 change: 0 additions & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
/packages/sanity/src/core/preview/ @sanity-io/studio-dx

# -- PTE --
/packages/@sanity/portable-text-editor/ @sanity-io/studio-ex
/packages/sanity/src/core/field/types/portableText/ @sanity-io/studio-ex
/packages/sanity/src/core/form/inputs/PortableText/ @sanity-io/studio-ex
/packages/sanity/src/core/form/types/blockProps.ts @sanity-io/studio-ex
Expand Down
5 changes: 0 additions & 5 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@
"matchUpdateTypes": ["minor", "patch"],
"automerge": true
},
{
"description": "Slate upgrades are handled manually as they require extensive manual testing to verify it's safe to upgrade",
"matchPackageNames": ["slate", "slate-react"],
"enabled": false
},
{
"description": "Dependency updates to examples and the root should always use the chore scope as they aren't published to npm",
"matchFileNames": ["package.json", "dev/**/package.json", "examples/**/package.json"],
Expand Down
74 changes: 0 additions & 74 deletions .github/workflows/e2e-pte.yml

This file was deleted.

3 changes: 1 addition & 2 deletions .github/workflows/testExports.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,4 @@ jobs:
run: pnpm install

- name: Check export conditions in native node ESM and CJS
# Adds the github reporter on the CI to highlight in diffs failling tests
run: pnpm test:exports -- --test-reporter spec --test-reporter-destination stdout --test-reporter node-test-github-reporter --test-reporter-destination stdout
run: pnpm test:exports
1 change: 0 additions & 1 deletion dev/aliases.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ const devAliases = {
'@sanity/diff': './packages/@sanity/diff/src',
'@sanity/cli': './packages/@sanity/cli/src',
'@sanity/mutator': './packages/@sanity/mutator/src',
'@sanity/portable-text-editor': './packages/@sanity/portable-text-editor/src',
'@sanity/schema': './packages/@sanity/schema/src/_exports',
'@sanity/migrate': './packages/@sanity/migrate/src/_exports',
'@sanity/types': './packages/@sanity/types/src',
Expand Down
2 changes: 1 addition & 1 deletion dev/depcheck-test/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "depcheck-test",
"version": "3.48.1",
"version": "3.49.0",
"private": true,
"license": "MIT",
"author": "Sanity.io <[email protected]>"
Expand Down
2 changes: 1 addition & 1 deletion dev/design-studio/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "design-studio",
"version": "3.48.1",
"version": "3.49.0",
"private": true,
"description": "Sanity Design Studio",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion dev/embedded-studio/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "embedded-studio",
"version": "3.48.1",
"version": "3.49.0",
"private": true,
"scripts": {
"build": "tsc && vite build",
Expand Down
2 changes: 1 addition & 1 deletion dev/page-building-studio/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sanity-page-building-studio",
"version": "3.48.1",
"version": "3.49.0",
"private": true,
"license": "MIT",
"author": "Sanity.io <[email protected]>",
Expand Down
2 changes: 1 addition & 1 deletion dev/page-building-studio/turbo.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://turbo.build/schema.json",
"extends": ["//"],
"pipeline": {
"tasks": {
"build": {
"outputs": ["./sanity/**", "dist/**"]
}
Expand Down
2 changes: 1 addition & 1 deletion dev/starter-next-studio/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sanity-starter-next-studio",
"version": "3.48.1",
"version": "3.49.0",
"private": true,
"license": "MIT",
"author": "Sanity.io <[email protected]>",
Expand Down
2 changes: 1 addition & 1 deletion dev/starter-studio/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sanity-starter-studio",
"version": "3.48.1",
"version": "3.49.0",
"private": true,
"license": "MIT",
"author": "Sanity.io <[email protected]>",
Expand Down
2 changes: 1 addition & 1 deletion dev/strict-studio/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sanity-strict-studio",
"version": "3.48.1",
"version": "3.49.0",
"private": true,
"license": "MIT",
"author": "Sanity.io <[email protected]>",
Expand Down
4 changes: 2 additions & 2 deletions dev/studio-e2e-testing/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "studio-e2e-testing",
"version": "3.48.1",
"version": "3.49.0",
"private": true,
"keywords": [
"sanity"
Expand All @@ -17,7 +17,7 @@
"@sanity/google-maps-input": "^4.0.0",
"@sanity/icons": "^3.0.0",
"@sanity/ui": "^2.4.0",
"@sanity/vision": "3.48.1",
"@sanity/vision": "3.49.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"sanity": "workspace:*",
Expand Down
10 changes: 10 additions & 0 deletions dev/studio-e2e-testing/turbo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"$schema": "https://turbo.build/schema.json",
"extends": ["//"],
"tasks": {
"build": {
"env": ["SANITY_E2E_PROJECT_ID", "SANITY_E2E_DATASET"],
"outputs": [".sanity/**", "dist/**"]
}
}
}
5 changes: 0 additions & 5 deletions dev/test-next-studio/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ const config = {
'@sanity/diff',
'@sanity/migrate',
'@sanity/mutator',
'@sanity/portable-text-editor',
'@sanity/schema',
'@sanity/types',
'@sanity/util',
Expand All @@ -40,9 +39,6 @@ const config = {
'@sanity/diff': requireResolve('../../packages/@sanity/diff/src/index.ts'),
'@sanity/cli': requireResolve('../../packages/@sanity/cli/src/index.ts'),
'@sanity/mutator': requireResolve('../../packages/@sanity/mutator/src/index.ts'),
'@sanity/portable-text-editor': requireResolve(
'../../packages/@sanity/portable-text-editor/src/index.ts',
),
'@sanity/schema/_internal': requireResolve(
'../../packages/@sanity/schema/src/_exports/_internal.ts',
),
Expand Down Expand Up @@ -90,7 +86,6 @@ const config = {
'@sanity/diff': '@sanity/diff/src/index.ts',
'@sanity/cli': '@sanity/cli/src/index.ts',
'@sanity/mutator': '@sanity/mutator/src/index.ts',
'@sanity/portable-text-editor': '@sanity/portable-text-editor/src/index.ts',
'@sanity/schema/_internal': '@sanity/schema/src/_exports/_internal.ts',
'@sanity/schema': '@sanity/schema/src/_exports/index.ts',
'@sanity/migrate': '@sanity/migrate/src/_exports/index.ts',
Expand Down
2 changes: 1 addition & 1 deletion dev/test-next-studio/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sanity-test-next-studio",
"version": "3.48.1",
"version": "3.49.0",
"private": true,
"license": "MIT",
"author": "Sanity.io <[email protected]>",
Expand Down
4 changes: 2 additions & 2 deletions dev/test-next-studio/turbo.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"$schema": "https://turbo.build/schema.json",
"extends": ["//"],
"pipeline": {
"tasks": {
"build": {
"env": ["NEXT_PUBLIC_SANITY_*", "NEXT_PUBLIC_VERCEL_ENV", "SANITY_*", "REACT_COMPILER"],
"env": ["REACT_COMPILER"],
"outputs": [".next/**", "!.next/cache/**", "out/**"],
"dependsOn": ["^build"]
},
Expand Down
6 changes: 3 additions & 3 deletions dev/test-studio/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sanity-test-studio",
"version": "3.48.1",
"version": "3.49.0",
"private": true,
"license": "MIT",
"author": "Sanity.io <[email protected]>",
Expand All @@ -16,12 +16,13 @@
"workshop:dev": "node -r esbuild-register scripts/workshop/dev.ts"
},
"dependencies": {
"@portabletext/editor": "^1.0.7",
"@portabletext/react": "^3.0.0",
"@react-three/cannon": "^6.5.2",
"@react-three/drei": "^9.80.1",
"@react-three/fiber": "^8.13.6",
"@sanity/assist": "^3.0.2",
"@sanity/block-tools": "3.48.1",
"@sanity/block-tools": "3.49.0",
"@sanity/client": "^6.20.0",
"@sanity/color": "^3.0.0",
"@sanity/google-maps-input": "^4.0.0",
Expand All @@ -34,7 +35,6 @@
"@sanity/locale-sv-se": "^1.0.1",
"@sanity/logos": "^2.1.2",
"@sanity/migrate": "workspace:*",
"@sanity/portable-text-editor": "workspace:*",
"@sanity/preview-url-secret": "^1.6.1",
"@sanity/react-loader": "^1.8.3",
"@sanity/tsdoc": "1.0.72",
Expand Down
31 changes: 31 additions & 0 deletions dev/test-studio/schema/debug/objectsDebug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,28 @@ const animals = defineField({
of: [animal],
})

const fieldsetArray = defineField({
type: 'array',
name: 'fieldsetArray',
title: 'Fieldset array',

fieldset: 'fieldset',

of: [
{
type: 'object',
name: 'myObject',
fields: [
{
name: 'string',
type: 'string',
title: 'String',
},
],
},
],
})

const arrayOfImages = defineField({
type: 'array',
name: 'arrayOfImages',
Expand Down Expand Up @@ -353,6 +375,14 @@ const arrayOfMixedTypes = defineField({
export const objectsDebug = defineType({
type: 'document',
name: 'objectsDebug',

fieldsets: [
{
name: 'fieldset',
title: 'Fieldset',
},
],

fields: [
{
name: 'title',
Expand All @@ -361,6 +391,7 @@ export const objectsDebug = defineType({
animals,
arrayOfMixedTypes,
body,
fieldsetArray,
objectWithArray,
arrayOfAnonymousObjects,
arrayOfImages,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {type OnPasteFn, type PortableTextBlock} from '@portabletext/editor'
import {htmlToBlocks} from '@sanity/block-tools'
import {type OnPasteFn, type PortableTextBlock} from '@sanity/portable-text-editor'
import {useCallback, useMemo} from 'react'
import {PortableTextInput, type PortableTextInputProps, type PortableTextMarker} from 'sanity'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {type PortableTextBlock} from '@portabletext/editor'
import {CommentIcon} from '@sanity/icons'
import {type PortableTextBlock} from '@sanity/portable-text-editor'
import {Box, Button, Popover, Stack, Text, TextArea} from '@sanity/ui'
import {type ChangeEvent, useCallback, useState} from 'react'
import {type RenderBlockActionsCallback} from 'sanity'
Expand Down
2 changes: 1 addition & 1 deletion dev/test-studio/turbo.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://turbo.build/schema.json",
"extends": ["//"],
"pipeline": {
"tasks": {
"build": {
"outputs": [".sanity/**", "dist/**", "workshop/scopes.js"]
}
Expand Down
1 change: 0 additions & 1 deletion dev/tsconfig.dev.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"@sanity/cli": ["./packages/@sanity/cli/src/index.ts"],
"@sanity/codegen": ["./packages/@sanity/codegen/src/_exports/index.ts"],
"@sanity/mutator": ["./packages/@sanity/mutator/src/index.ts"],
"@sanity/portable-text-editor": ["./packages/@sanity/portable-text-editor/src/index.ts"],
"@sanity/schema/*": ["./packages/@sanity/schema/src/_exports/*"],
"@sanity/schema": ["./packages/@sanity/schema/src/_exports/index.ts"],
"@sanity/migrate": ["./packages/@sanity/migrate/src/_exports/index.ts"],
Expand Down
2 changes: 1 addition & 1 deletion examples/blog-studio/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "blog-studio",
"version": "3.48.1",
"version": "3.49.0",
"private": true,
"description": "Content studio running with schema from the blog init template",
"keywords": [
Expand Down
Loading

0 comments on commit 943fd2f

Please sign in to comment.