@ipld/dag-json
Advanced tools
Comparing version 3.0.13 to 3.0.14
@@ -33,3 +33,3 @@ import json from 'fast-json-stable-stringify' | ||
if (typeof value['/'] === 'string') { | ||
result[key] = new CID(value['/']) | ||
result[key] = CID.from(value['/']) | ||
} else if (typeof value['/'] === 'object' && value['/'].bytes) { | ||
@@ -36,0 +36,0 @@ result[key] = multibase.decode(value['/'].bytes, 'base64') |
{ | ||
"name": "@ipld/dag-json", | ||
"version": "3.0.13", | ||
"version": "3.0.14", | ||
"description": "JSON Directed Acrylic Graph for IPLD", | ||
"main": "index.js", | ||
"type": "module", | ||
@@ -11,13 +10,12 @@ "directories": { | ||
"scripts": { | ||
"build": "rollup --config rollup.config.js", | ||
"prepublishOnly": "npm run build", | ||
"lint": "standard", | ||
"test:cjs": "npm run build && mocha dist/test/test-*.cjs", | ||
"build": "npm_config_yes=true npx ipjs@latest build --tests", | ||
"publish": "npm_config_yes=true npx ipjs@latest publish", | ||
"test:cjs": "npm run build && mocha dist/cjs/node-test/test-*.js", | ||
"test:node": "hundreds mocha test/test-*.js", | ||
"test": "npm run lint && npm run test:node && npm run test:browser && npm run test:cjs", | ||
"test:browser": "polendina --cleanup test/test-*.js", | ||
"coverage": "c8 --reporter=html mocha test.js && npx st -d coverage -p 8080" | ||
"test:browser": "polendina --cleanup dist/cjs/node-test/test-*.js", | ||
"test": "npm run lint && npm run test:node && npm run test:cjs && npm run test:browser", | ||
"coverage": "c8 --reporter=html mocha test/test-*.js && npx st -d coverage -p 8080" | ||
}, | ||
"exports": { | ||
"require": "./dist/index.cjs", | ||
"import": "./index.js" | ||
@@ -37,7 +35,7 @@ }, | ||
"devDependencies": { | ||
"hundreds": "0.0.7", | ||
"mocha": "^8.0.1", | ||
"multiformats": "2.0.1", | ||
"polendina": "^1.0.0", | ||
"rollup": "^2.22.1", | ||
"hundreds": "0.0.8", | ||
"mocha": "^8.1.1", | ||
"multiformats": "3.0.0", | ||
"polendina": "^1.1.0", | ||
"rollup": "^2.26.3", | ||
"standard": "^14.3.4" | ||
@@ -44,0 +42,0 @@ }, |
'use strict' | ||
/* globals describe, it */ | ||
import main from '../index.js' | ||
import main from '@ipld/dag-json' | ||
import assert from 'assert' | ||
import multiformats from 'multiformats/basics.js' | ||
import multiformats from 'multiformats/basics' | ||
@@ -19,3 +19,3 @@ multiformats.add(main) | ||
const link = new CID('bafyreifepiu23okq5zuyvyhsoiazv2icw2van3s7ko6d3ixl5jx2yj2yhu') | ||
const link = CID.from('bafyreifepiu23okq5zuyvyhsoiazv2icw2van3s7ko6d3ixl5jx2yj2yhu') | ||
@@ -22,0 +22,0 @@ describe('basic dag-json', () => { |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
687763
9
235
0
1