Releases: usnistgov/h5wasm
Releases · usnistgov/h5wasm
v0.4.3
v0.4.3 2022-05-24
Added
to_array
method on Dataset and Attribute classes: returns nested array of values with dimensions matchingshape
. Auto-converts all values to JSON-compatible types (BigInt -> Number, TypedArray -> Array)- auto-convert h5py-style boolean datasets (where datatype = ENUM {FALSE:0, TRUE:1}) to JS booleans
- automated testing of code with Github Action
Fixed
- enum_type.members is now an object {[name: string]: value: number}
(previous implementation with Array could have wrong name order)
v0.4.2
v0.4.2 2022-05-10
Added
- extended metadata for ENUM type (including names of members)
Fixed
- Typings for metadata on attributes and datasets
v0.4.1
v0.4.1 2022-05-02
Added
- Minimal handling of reading datatype H5T_ENUM (treats as integer base type)
Fixed
- All strings now truncated at first null byte before decoding
- Fixed memory leaks from opening dtype and plist objects
- Singleton values (shape = []) were being returned as length-1 array due to logic error, now fixed
v0.4.0
v0.4.0 2022-04-28
Changed
- POSSIBLY BREAKING: nodejs target is compiled as ESM instead of CommonJs
- default export is now an object, which can help when
import *
is discouragedexport const h5wasm = { File, Group, Dataset, ready, ACCESS_MODES } export default h5wasm;
ready
export now returnsPromise<H5Module>
- recommended access to filesystem is by
const { FS } = await h5wasm.ready;
Added
- VLEN string writing and reading test
- TypeScript types added for Attribute
- Full metadata added to Attribute in addition to dtype and shape
v0.3.2
v0.3.2 2022-04-12
Fixed
- TypeScript
strict
mode checking enabled for build - all TypeScript type errors resolved
- unused portions of the
EmscriptenModule
interface that raise errors in nodejs builds are removed (both of these depend on dom definitions)- preinitializedWebGLContext: WebGLRenderingContext;
- onCustomMessage(event: MessageEvent): void;
v0.3.1
v0.3.1 2022-03-31
Added
Group.get_type(path)
will now returnH5G_LINK (3)
if path is a dangling soft linkH5G_UDLINK (4)
if path is a user-defined (e.g. external) link
Group.get(path)
will now returnBrokenSoftLink(target: string)
if the path is a dangling soft linkExternalLink(filename: string, obj_path: string)
if the path is an external linkundefined
if the path is a user-defined link that is not an external link.
v0.3.0
v0.3.0 2022-03-23
Changed
- compiled with
-s SINGLE_FILE
to embed WASM in output .js file (for compatibility with bundlers) - using external build of libhdf5 from https://github.com/usnistgov/libhdf5-wasm
v0.2.2
v0.2.2 2022-02-16
Added
- IDBFS adapter added to ESM module
Changed
- license statement expanded
To use IDBFS:
// create a local mount of the IndexedDB filesystem:
hdf5.FS.mount(hdf5.FS.filesystems.IDBFS, {}, "/home/web_user")
// to read from the browser IndexedDB into the active filesystem:
hdf5.FS.syncfs(true, (e) => {console.log(e)});
// to push all current files in /home/web_user to IndexedDB, e.g. when closing your application:
hdf5.FS.syncfs(false, (e) => {console.log(e)})
v0.2.1
v0.2.1 2022-02-04
Fixed
- Writing of Float64 datasets was broken, and is now working
- Guessed shape of simple string values is fixed so that this will work:
f.create_attribute("my_attr", "a string value");
- Group.prototype.create_dataset now returns type Dataset (ts)
v0.2.0
v0.2.0 2022-01-25
Added
- Typescript definitions (src/hdf5_hl.d.ts)
- Support for reading and processing HDF5 Array datatype
- esm and nodejs modules both offer
ready
Promise, which can be awaited before working with the module (addresses #5) - minimal set of tests (
npm test
)
Changed
- POSSIBLY BREAKING: local paths to modules are changed
- esm: ./dist/esm/hdf5_hl.js
- node (CJS): ./dist/node/hdf5_hl.js
- Build step added (esm and nodejs modules both built from Typescript source)
- Build artifacts no longer available from
dist
branch, will be uploaded as .tgz archive (output of npm pack) to releases