-
Notifications
You must be signed in to change notification settings - Fork 435
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'next' into feat/studio-manifests-cont
- Loading branch information
Showing
222 changed files
with
6,595 additions
and
3,303 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
name: Unit tests | ||
|
||
on: | ||
# Build on pushes branches that have a PR (including drafts) | ||
pull_request: | ||
# Build on commits pushed to branches without a PR if it's in the allowlist | ||
push: | ||
branches: [next] | ||
|
||
jobs: | ||
test: | ||
timeout-minutes: 60 | ||
name: Jest tests (${{ matrix.os }} / node ${{ matrix.node }}) | ||
runs-on: ${{ matrix.os }} | ||
env: | ||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | ||
TURBO_TEAM: ${{ vars.TURBO_TEAM }} | ||
continue-on-error: ${{ matrix.experimental }} | ||
|
||
strategy: | ||
# we want to know if a test fails on a specific node version | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest] | ||
node: [18, 20] | ||
experimental: [false] | ||
shardIndex: [1, 2, 3, 4] | ||
shardTotal: [4] | ||
# include: | ||
# - os: windows-latest | ||
# node: 16 | ||
# experimental: true | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
|
||
- uses: pnpm/action-setup@v4 | ||
name: Install pnpm | ||
id: pnpm-install | ||
with: | ||
run_install: false | ||
|
||
- name: Get pnpm store directory | ||
id: pnpm-cache | ||
shell: bash | ||
run: | | ||
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | ||
- name: Cache node modules | ||
id: cache-node-modules | ||
uses: actions/cache@v4 | ||
env: | ||
cache-name: cache-node-modules | ||
with: | ||
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} | ||
key: ${{ runner.os }}-pnpm-store-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
v1-${{ runner.os }}-pnpm-store-${{ env.cache-name }}- | ||
v1-${{ runner.os }}-pnpm-store- | ||
v1-${{ runner.os }}- | ||
- name: Install project dependencies | ||
run: pnpm install | ||
|
||
- name: Test | ||
id: test | ||
run: | | ||
node -v | ||
pnpm test:jest --silent --shard=${{ matrix.shardIndex}}/${{ matrix.shardTotal }} --ignoreProjects=@sanity/cli | ||
env: | ||
GITHUB_SHARD_IDENTIFIER: ${{ matrix.shardIndex }}-${{ matrix.shardTotal }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "depcheck-test", | ||
"version": "3.57.4", | ||
"version": "3.58.0", | ||
"private": true, | ||
"license": "MIT", | ||
"author": "Sanity.io <[email protected]>" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "sanity-page-building-studio", | ||
"version": "3.57.4", | ||
"version": "3.58.0", | ||
"private": true, | ||
"license": "MIT", | ||
"author": "Sanity.io <[email protected]>", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "sanity-starter-next-studio", | ||
"version": "3.57.4", | ||
"version": "3.58.0", | ||
"private": true, | ||
"license": "MIT", | ||
"author": "Sanity.io <[email protected]>", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "sanity-starter-studio", | ||
"version": "3.57.4", | ||
"version": "3.58.0", | ||
"private": true, | ||
"license": "MIT", | ||
"author": "Sanity.io <[email protected]>", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "sanity-strict-studio", | ||
"version": "3.57.4", | ||
"version": "3.58.0", | ||
"private": true, | ||
"license": "MIT", | ||
"author": "Sanity.io <[email protected]>", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "sanity-test-next-studio", | ||
"version": "3.57.4", | ||
"version": "3.58.0", | ||
"private": true, | ||
"license": "MIT", | ||
"author": "Sanity.io <[email protected]>", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "sanity-test-studio", | ||
"version": "3.57.4", | ||
"version": "3.58.0", | ||
"private": true, | ||
"license": "MIT", | ||
"author": "Sanity.io <[email protected]>", | ||
|
@@ -19,7 +19,7 @@ | |
"@portabletext/editor": "^1.1.0", | ||
"@portabletext/react": "^3.0.0", | ||
"@sanity/assist": "^3.0.2", | ||
"@sanity/block-tools": "3.57.4", | ||
"@sanity/block-tools": "3.58.0", | ||
"@sanity/client": "^6.21.3", | ||
"@sanity/color": "^3.0.0", | ||
"@sanity/google-maps-input": "^4.0.0", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/** | ||
* This tells jest which projects exists | ||
*/ | ||
import path from 'node:path' | ||
import globby from 'globby' | ||
import {resolveDirName} from '@repo/test-config/jest' | ||
|
||
const jestConfigFiles = globby.sync('*/**/jest.config.mjs', {ignore: ['**/node_modules']}) | ||
|
||
/** @type {import("jest").Config} */ | ||
export default { | ||
projects: jestConfigFiles | ||
.map((file) => path.relative(resolveDirName(import.meta.url), path.dirname(file))) | ||
.map((projectPath) => `<rootDir>/${projectPath}`), | ||
// Ignore e2e tests | ||
modulePathIgnorePatterns: ['<rootDir>/test/'], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,5 +12,5 @@ | |
"packages/groq", | ||
"packages/sanity" | ||
], | ||
"version": "3.57.4" | ||
"version": "3.58.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* eslint-disable tsdoc/syntax */ | ||
|
||
// NOTE: THIS FILE NEEDS TO REMAIN COMMONJS | ||
// It can be converted to ESM/TS when we either not use jest anymore, or node/jest runner natively supports ESM (including with import.meta etc). | ||
|
||
/** | ||
* The path mappings/aliases used by various tools in the monorepo to map imported modules to | ||
* source files in order to speed up rebuilding and avoid having a separate watcher process to build | ||
* from `src` to `lib`. | ||
* | ||
* This file is currently read by: | ||
* - Vite when running the dev server (only when running in this monorepo) | ||
* - jest when running test suite | ||
* | ||
* @type Record<string, string> | ||
*/ | ||
const devAliases = { | ||
// NOTE: do not use regex in the module expressions, | ||
// because they will be escaped by the jest config | ||
'@sanity/block-tools': '@sanity/block-tools/src', | ||
'@sanity/diff': '@sanity/diff/src', | ||
'@sanity/cli': '@sanity/cli/src', | ||
'@sanity/mutator': '@sanity/mutator/src', | ||
'@sanity/schema': '@sanity/schema/src/_exports', | ||
'@sanity/migrate': '@sanity/migrate/src/_exports', | ||
'@sanity/types': '@sanity/types/src', | ||
'@sanity/util': '@sanity/util/src/_exports', | ||
'@sanity/vision': '@sanity/vision/src', | ||
'sanity': 'sanity/src/_exports', | ||
'groq': 'groq/src/_exports.mts', | ||
} | ||
|
||
module.exports = devAliases |
Oops, something went wrong.