Comparing version
{ | ||
"name": "numcodecs", | ||
"author": "Trevor James Manz", | ||
"version": "0.2.2", | ||
"version": "0.3.0", | ||
"description": "Buffer compression and transformation codecs for use in data storage and communication applications.", | ||
"types": "index.d.ts", | ||
"main": "index.js", | ||
"module": "index.js", | ||
"author": "Trevor Manz", | ||
"license": "MIT", | ||
"type": "module", | ||
"exports": { | ||
".": "./index.js", | ||
"./gzip": "./gzip.js", | ||
"./zlib": "./zlib.js", | ||
"./blosc": "./blosc.js", | ||
"./lz4": "./lz4.js", | ||
"./zstd": "./zstd.js" | ||
}, | ||
"sideEffects": false, | ||
@@ -23,11 +13,2 @@ "repository": { | ||
}, | ||
"scripts": { | ||
"build": "tsc --emitDeclarationOnly --declaration --outDir dist && rollup -c", | ||
"postbuild": "cp package.json dist && cp README.md dist", | ||
"prebuild": "rm -rf dist", | ||
"format": "prettier --write src/**/*.ts test/**/*.js", | ||
"lint": "prettier --check src src/**/*.ts test/**/*.js", | ||
"test": "npm run build && node test/index.test.js", | ||
"test:prod": "npm run lint && npm test | tap-set-exit" | ||
}, | ||
"keywords": [ | ||
@@ -39,18 +20,52 @@ "zarr", | ||
], | ||
"engines": { | ||
"node": ">=12" | ||
"files": [ | ||
"dist" | ||
], | ||
"exports": { | ||
".": { | ||
"types": "./dist/index.d.ts", | ||
"import": "./dist/index.js" | ||
}, | ||
"./gzip": { | ||
"types": "./dist/gzip.d.t.s", | ||
"import": "./dist/gzip.js" | ||
}, | ||
"./zlib": { | ||
"types": "./dist/zlib.d.ts", | ||
"import": "./dist/zlib.js" | ||
}, | ||
"./blosc": { | ||
"types": "./dist/blosc.d.ts", | ||
"import": "./dist/blosc.js" | ||
}, | ||
"./lz4": { | ||
"types": "./dist/lz4.d.ts", | ||
"import": "./dist/lz4.js" | ||
}, | ||
"./zstd": { | ||
"types": "./dist/zstd.d.ts", | ||
"import": "./dist/zstd.js" | ||
} | ||
}, | ||
"license": "MIT", | ||
"scripts": { | ||
"prepare": "npm run build", | ||
"build": "tsc --emitDeclarationOnly --declaration --outDir dist && node build", | ||
"typecheck": "tsc --noEmit", | ||
"prebuild": "rm -rf dist", | ||
"format": "prettier --write src/**/*.ts test/**/*.js", | ||
"lint": "prettier --check src src/**/*.ts test/**/*.js", | ||
"test": "node test/index.test.js | tap-set-exit" | ||
}, | ||
"dependencies": { | ||
"fflate": "^0.8.0" | ||
}, | ||
"devDependencies": { | ||
"@rollup/plugin-node-resolve": "^11.2.0", | ||
"@types/emscripten": "^1.39.5", | ||
"@types/pako": "^1.0.1", | ||
"esbuild": "^0.12.11", | ||
"pako": "^2.0.3", | ||
"prettier": "^2.2.1", | ||
"rollup": "^2.40.0", | ||
"rollup-plugin-esbuild": "^4.5.0", | ||
"@changesets/cli": "^2.26.2", | ||
"@svitejs/changesets-changelog-github-compact": "^1.1.0", | ||
"@types/emscripten": "^1.39.7", | ||
"esbuild": "^0.19.2", | ||
"prettier": "^3.0.1", | ||
"tap-set-exit": "^1.1.1", | ||
"typescript": "^4.2.2", | ||
"zora": "^4.0.2" | ||
"typescript": "^5.1.6", | ||
"zora": "^5.2.0" | ||
}, | ||
@@ -57,0 +72,0 @@ "prettier": { |
@@ -18,3 +18,3 @@ # numcodecs.js | ||
const codec = new Blosc(); | ||
const codec = new Blosc(); | ||
// or Blosc.fromConfig({ clevel: 5, cname: 'lz4', shuffle: Blosc.SHUFFLE, blocksize: 0 }); | ||
@@ -43,4 +43,4 @@ | ||
This project is an incomplete TypeScript implementation of the buffer compression library | ||
[`numcodecs`](https://github.com/zarr-developers/numcodecs). The following codecs | ||
This project is an incomplete TypeScript implementation of the buffer compression library | ||
[`numcodecs`](https://github.com/zarr-developers/numcodecs). The following codecs | ||
are currently supported: | ||
@@ -57,3 +57,3 @@ | ||
Each compressor is bundled as the default export of separate code-split submodules. | ||
Each compressor is bundled as the default export of separate code-split submodules. | ||
This makes it easy to import each module independently in your applications or from | ||
@@ -83,3 +83,3 @@ a ESM-friendly CDN like [skypack](https://www.skypack.dev/). | ||
```bash | ||
$ git clone https://github.com/manzt/numcodecs.js.git | ||
$ git clone https://github.com/manzt/numcodecs.js.git | ||
$ cd numcodecs.js | ||
@@ -89,3 +89,3 @@ $ npm install && npm run test | ||
The `<codec_name>.js` + `<codec_name>.wasm` source for each WASM-based codec are | ||
The `<codec_name>.js` + `<codec_name>.wasm` source for each WASM-based codec are | ||
generated with [Docker](https://www.docker.com/) with the following commands: | ||
@@ -98,10 +98,14 @@ | ||
### Changelogs | ||
### Publishing | ||
For changes to be reflected in package changelogs, run `npx changeset` and | ||
follow the prompts. | ||
```bash | ||
$ npm version [<newversion> | major | minor | patch] | ||
$ npm run build # bundles source & copies README.md + package.json to dist/ | ||
$ cd dist | ||
$ npm publish | ||
``` | ||
> **Note** not every PR requires a changeset. Since changesets are focused on | ||
> releases and changelogs, changes to the repository that don't effect these | ||
> won't need a changeset (e.g., documentation, tests). | ||
### Release | ||
The [Changesets GitHub action](https://github.com/changesets/action) will create | ||
and update a PR that applies changesets and publishes new versions. |
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
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
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
8
-27.27%17
6.25%106
3.92%953356
-8.13%1
Infinity%6307
-45.42%3
50%3
Infinity%5
150%+ Added
+ Added