fast-json-stringify
Advanced tools
Comparing version 5.0.5 to 5.0.6
@@ -58,3 +58,3 @@ 'use strict' | ||
const schemaId = ref.slice(0, hashIndex) || location.schemaId | ||
const jsonPointer = ref.slice(hashIndex) | ||
const jsonPointer = ref.slice(hashIndex) || '#' | ||
@@ -61,0 +61,0 @@ const schemaRef = schemaId + jsonPointer |
{ | ||
"name": "fast-json-stringify", | ||
"version": "5.0.5", | ||
"version": "5.0.6", | ||
"description": "Stringify your JSON at max speed", | ||
@@ -36,3 +36,3 @@ "main": "index.js", | ||
"devDependencies": { | ||
"@sinclair/typebox": "^0.23.3", | ||
"@sinclair/typebox": "^0.24.9", | ||
"benchmark": "^2.1.4", | ||
@@ -39,0 +39,0 @@ "cli-select": "^1.1.2", |
@@ -1929,1 +1929,28 @@ 'use strict' | ||
}) | ||
test('should resolve absolute $refs', (t) => { | ||
t.plan(1) | ||
const externalSchema = { | ||
FooSchema: { | ||
$id: 'FooSchema', | ||
type: 'object', | ||
properties: { | ||
type: { | ||
anyOf: [ | ||
{ type: 'string', const: 'bar' }, | ||
{ type: 'string', const: 'baz' } | ||
] | ||
} | ||
} | ||
} | ||
} | ||
const schema = { $ref: 'FooSchema' } | ||
const object = { type: 'bar' } | ||
const stringify = build(schema, { schema: externalSchema }) | ||
const output = stringify(object) | ||
t.equal(output, JSON.stringify(object)) | ||
}) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
314419
11702
5