Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@amritk/helpers

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@amritk/helpers - npm Package Compare versions

Comparing version
0.7.0
to
0.7.1
+1
-1
package.json
{
"name": "@amritk/helpers",
"version": "0.7.0",
"version": "0.7.1",
"description": "Shared utilities for the mjst code generation ecosystem.",

@@ -5,0 +5,0 @@ "type": "module",

@@ -93,2 +93,17 @@ import { describe, expect, it, vi } from 'vitest'

it('handles circular refs (A → B → A) without infinite looping', () => {
const schema = {
properties: { root: { $ref: '#/$defs/a' } },
$defs: {
a: { type: 'object', properties: { b: { $ref: '#/$defs/b' } } },
b: { type: 'object', properties: { a: { $ref: '#/$defs/a' } } },
},
}
const nodes = collect(schema, 'Document')
// Both defs are visited exactly once each despite the cycle.
expect(nodes.map((n) => n.filename)).toEqual(['document', 'a', 'b'])
})
it('reuses cached resolution across repeated walks of the same schema object', () => {

@@ -95,0 +110,0 @@ // The second walk should produce the same nodes from the per-root cache,