Commit 7389b8a
committed
refactor: consolidate schema validation under @socketsecurity/lib/schema
Remove the duplicate `@socketsecurity/lib/validation/validate-schema`
export, which shipped one release ago (5.20.0) as a single-file
validator + parser. The newer `@socketsecurity/lib/schema/*` split
(validate / parse / types, added 10c4077) supersedes it: identical
`validateSchema` / `parseSchema` signatures, better module layout,
dedicated `@socketsecurity/lib/schema/types` for the shared type
surface, and full test coverage.
Changes:
- `src/ipc.ts` — switch internal `parseSchema` import from
`./validation/validate-schema` to `./schema/parse`.
- Delete `src/validation/validate-schema.ts` (267 LOC) and its test
file. The sibling `src/validation/json-parser.ts` and
`src/validation/types.ts` stay — json-parser still uses the
local `Schema` + `SafeJsonParseOptions` types.
- `package.json`, `docs/api-index.md` — regenerated; the
`./validation/validate-schema` export is gone.
Consumers migrating: change
import { validateSchema, parseSchema } from '@socketsecurity/lib/validation/validate-schema'
to
import { validateSchema } from '@socketsecurity/lib/schema/validate'
import { parseSchema } from '@socketsecurity/lib/schema/parse'1 parent edaf9f8 commit 7389b8a
5 files changed
Lines changed: 5 additions & 423 deletions
File tree
- docs
- src
- validation
- test/unit/validation
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
675 | 675 | | |
676 | 676 | | |
677 | 677 | | |
678 | | - | |
679 | | - | |
680 | | - | |
681 | | - | |
682 | 678 | | |
683 | 679 | | |
684 | 680 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
This file was deleted.
0 commit comments