Comparing version
{ | ||
"name": "@ipld/car", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Content Addressable aRchive format reader and writer", | ||
@@ -13,3 +13,3 @@ "main": "./cjs/car.js", | ||
"build:js": "ipjs build --tests --main && npm run build:copy", | ||
"build:copy": "cp -a tsconfig.json *.js *.ts lib/ test/ dist/", | ||
"build:copy": "mkdir -p dist/examples/ && cp -a tsconfig.json *.js *.ts lib/ test/ dist/ && cp examples/*.* dist/examples/", | ||
"build:types": "npm run build:copy && cd dist && tsc --build", | ||
@@ -22,3 +22,3 @@ "prepublishOnly": "npm run build", | ||
"test:cjs:browser": "polendina --cleanup dist/cjs/browser-test/test-*.js", | ||
"test": "npm run lint && npm run test:node && npm run test:cjs", | ||
"test": "npm run lint && npm run test:node && npm run test:cjs && npm run test --prefix examples/", | ||
"coverage": "c8 --reporter=html --reporter=text mocha test/test-*.js && npx st -d coverage -p 8888", | ||
@@ -47,3 +47,3 @@ "docs": "jsdoc4readme --readme --description-only lib/reader*.js lib/indexed-reader.js lib/iterator.js lib/indexer.js lib/writer.js" | ||
"@types/mocha": "^8.2.2", | ||
"@types/node": "^14.14.41", | ||
"@types/node": "^15.0.2", | ||
"@typescript-eslint/eslint-plugin": "^4.22.0", | ||
@@ -65,3 +65,3 @@ "@typescript-eslint/parser": "^4.22.0", | ||
"@types/varint": "^6.0.0", | ||
"multiformats": "^7.0.0", | ||
"multiformats": "^8.0.3", | ||
"varint": "^6.0.0" | ||
@@ -68,0 +68,0 @@ }, |
@@ -28,4 +28,4 @@ # @ipld/car | ||
import { CarReader, CarWriter } from '@ipld/car' | ||
import raw from 'multiformats/codecs/raw' | ||
import CID from 'multiformats/cid' | ||
import * as raw from 'multiformats/codecs/raw' | ||
import { CID } from 'multiformats/cid' | ||
import { sha256 } from 'multiformats/hashes/sha2' | ||
@@ -74,2 +74,4 @@ | ||
See the [examples](./examples) directory for more. | ||
## Usage | ||
@@ -81,2 +83,9 @@ | ||
Please be aware that `@ipld/car` **does not validate** that block data matches | ||
the paired CIDs when reading a CAR. See the | ||
[verify-car.js](./examples/verify-car.js) example for one possible approach to | ||
validating blocks as they are read. Any CID verification requires that the hash | ||
function that was used to generate the CID be available, the CAR format does | ||
not restrict the allowable multihashes. | ||
### [`CarReader`](#CarReader) | ||
@@ -83,0 +92,0 @@ |
@@ -43,5 +43,5 @@ { | ||
"cjs", | ||
"example*.js" | ||
"examples" | ||
], | ||
"compileOnSave": false | ||
} |
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
678444
79.96%164
2.5%16778
67.29%716
1.27%42
2.44%1
Infinity%- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
Updated