Skip to content

Commit

Permalink
refactor(core): remove _internalBrowser
Browse files Browse the repository at this point in the history
  • Loading branch information
ricokahler committed Apr 12, 2024
1 parent 301130b commit 9d20164
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
3 changes: 1 addition & 2 deletions packages/sanity/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@
"!**/__test__/**",
"!**/__tests__/**",
"!**/__workshop__/**",
"_internalBrowser.js",
"desk.js",
"presentation.js",
"router.js",
Expand All @@ -120,7 +119,7 @@
"scripts": {
"build": "pkg-utils build --check --clean",
"check:types": "tsc",
"clean": "rimraf _internal.js _internalBrowser.js cli.js desk.js migrate.js presentation.js router.js structure.js lib",
"clean": "rimraf _internal.js cli.js desk.js migrate.js presentation.js router.js structure.js lib",
"coverage": "jest --coverage",
"lint": "eslint .",
"prepublishOnly": "turbo run build",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ function sortModulesBySize(chunks: ChunkStats[]): ChunkModule[] {
}

function formatModuleSizes(modules: ChunkModule[]): string {
const lines = []
const lines: string[] = []
for (const mod of modules) {
lines.push(` - ${formatModuleName(mod.name)} (${formatSize(mod.renderedLength)})`)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ import {useWorkspace} from '../../../../workspace'
/** By default the API will return 0 = all fields */
const DEFAULT_API_FIELD_DEPTH = 0

/**
* @internal
* @hidden
*/
export interface PartialIndexSettings {
partialIndexSettings: {
maxFieldDepth: number
Expand Down Expand Up @@ -46,7 +50,10 @@ function fetchMaxDepth({client}: {client: SanityClient}): Observable<PartialInde

const cachedSettings: Map<string, Observable<PartialIndexSettings>> = new Map()

/** @internal */
/**
* @internal
* @hidden
*/
export function useSearchMaxFieldDepth(overrideClient?: SanityClient): number {
const isEnabled = useWorkspace().search?.unstable_partialIndexing?.enabled
const workspaceClient = useClient(DEFAULT_STUDIO_CLIENT_OPTIONS)
Expand Down
2 changes: 1 addition & 1 deletion packages/sanity/turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"extends": ["//"],
"pipeline": {
"build": {
"outputs": ["lib/**", "_internalBrowser.js", "desk.js", "presentation.js", "router.js", "structure.js"]
"outputs": ["lib/**", "desk.js", "presentation.js", "router.js", "structure.js"]
}
}
}

0 comments on commit 9d20164

Please sign in to comment.