Files
sim/apps/docs/package.json
T
Waleed 588b8ce270 improvement(audits): enforce console, helper, render-path, persist, and deployment-flag rules (#8559)
* chore(lint): ban console in runtime code with Biome noConsole

Runtime code logs through createLogger from @sim/logger. Scripts, CLIs,
script-migrations, the logger itself, SDK examples, and tests keep console
as their interface. Autofix is disabled so lint --unsafe never silently
deletes a console call.

* refactor(utils): replace inline toError, isRecordLike, omit, and truncate idioms with @sim/utils helpers

* refactor(ui): lazy-init object refs and use size-* for equal height and width

useRef(new X()) built a throwaway X on every render; the refs now
lazy-init through ??= as sim-react-performance.md prescribes. Equal
h-N w-N pairs become size-N per sim-styling.md.

* improvement(audits): extend check:utils to the remaining written idioms

Adds toError, isRecordLike, filterUndefined, omit, truncate, and
escapeRegExp idioms from CLAUDE.md, plus render-path rules: ES2023
array methods in browser code, useRef(new X()), and h-N w-N pairs.

* improvement(audits): require an explicit partialize on every zustand persist

sim-stores.md requires persist to whitelist durable fields; check:zustand-v5
now fails on a persist with no partialize or one that spreads the whole
state. canvas-mode was the one store without it.

* improvement(audits): flag deployment-shape env-flags imports in client settings surfaces

check:client-boundary now fails when a 'use client' module under the
workspace, organization, or standalone settings surfaces imports isHosted,
isBillingEnabled, isChatEnabled, or an enterprise feature flag from
env-flags instead of reading the seeded deployment shape.

* docs(agents): name the check that enforces the common-utilities list

* docs(agents): scope the check:utils note to the forms it bans

* perf(audits): gate backreference patterns in check:utils behind literal prefilters

The h-N/w-N, toError, and truncate patterns backtrack from every word
boundary; a cheap literal test per file keeps the scan at ~1s of CPU.

* refactor(ui): lazy-init useRef containers the nested-generic pattern missed

Allocate Map/Set ref containers once instead of on every render, and drop the
redundant processedRemovalIds alias in the toast provider.

* improvement(audits): close detector gaps in check:utils and the deployment-shape rule

- check:utils: match useRef(new X()) with nested generics, honor utils-lint-allow
  above formatter-wrapped statements, drop h-screen/w-screen from the size-N rule,
  and skip server-only App Router files in the ES2023 rule
- deployment-shape rule: cover stores/, hooks/, blocks/ and surface hooks, read
  namespace imports, derive the flag list from deployment-shape.ts, parse long
  import clauses whole, and allowlist the panel store's module-init isChatEnabled
- zustand persist message names the hoisted-options escape
- biome: allow console in *.integration.ts, *.spec.ts, and desktop e2e

* improvement(audits): share the directive classifier and simplify check:utils

- move leadingDirective/directiveOn into scripts/source-kind.ts; check:utils uses it
  instead of its own 'use client' regex, and multi-line block-comment headers now parse
- replace the deployment-shape allowlist with a client-boundary-allow annotation on
  the panel store's isChatEnabled import
- exempt all of packages/utils/src by prefix (drops the stale retry.test.ts entry)
- build both truncate patterns from one shared fragment and prefilter
- add literal prefilters to isRecordLike, fromEntries, and useRef patterns and
  memoize prefilter results per file
- trim the deployment-shape rationale to a CLAUDE.md pointer

* refactor: drop isRecordLike pass-through wrappers and return audioLevels directly

useSpeechToText returns its stable, in-place-filled Float32Array instead of a
nullable ref; MicButton and the composer, search, and user-input props follow.

* improvement(audits): ban ES2023 array methods repo-wide, catch whole-state partialize, strip inline directive comments

* improvement(audits): follow aliased persist imports, require strict !== for filterUndefined, state the .with scope
2026-10-02 01:16:25 -07:00

56 lines
1.6 KiB
JSON

{
"name": "docs",
"version": "0.0.0",
"private": true,
"license": "Apache-2.0",
"scripts": {
"dev": "bun run dev:cache:cap && next dev --port 3001",
"dev:cache:cap": "bun run ../../scripts/prune-turbopack-cache.ts",
"dev:clean": "rm -rf .next/dev/cache",
"build": "fumadocs-mdx && NODE_OPTIONS='--max-old-space-size=8192' next build",
"start": "next start",
"postinstall": "fumadocs-mdx",
"test": "vitest run",
"type-check": "fumadocs-mdx && tsc --noEmit",
"lint": "biome check --write --unsafe .",
"lint:check": "biome check .",
"format": "biome format --write .",
"format:check": "biome format ."
},
"dependencies": {
"@sim/db": "workspace:*",
"@sim/emcn": "workspace:*",
"@sim/logger": "workspace:*",
"@sim/utils": "workspace:*",
"@sim/workflow-renderer": "workspace:*",
"@xyflow/react": "12.11.3",
"class-variance-authority": "^0.7.1",
"drizzle-orm": "^0.45.2",
"fumadocs-core": "16.8.5",
"fumadocs-mdx": "14.3.2",
"fumadocs-openapi": "10.8.1",
"fumadocs-ui": "16.8.5",
"next": "16.3.6",
"next-themes": "^0.4.6",
"react": "19.2.4",
"react-dom": "19.2.4",
"remark-breaks": "^4.0.0",
"shiki": "4.3.1",
"framer-motion": "^12.5.0",
"zod": "4.3.6"
},
"devDependencies": {
"@sim/tsconfig": "workspace:*",
"@tailwindcss/postcss": "^4.0.12",
"@types/node": "24.2.1",
"@types/react": "^19.1.2",
"@types/react-dom": "^19.0.4",
"gray-matter": "^4.0.3",
"jsdom": "^26.0.0",
"postcss": "^8.5.3",
"tailwindcss": "^4.0.12",
"typescript": "^7.0.2",
"vitest": "^5.0.1"
}
}