Détail du package

typeson-registry-sca-reverter

brettz930MIT0.8.0

Revert to older form of typeson-registry Structured Cloning Algorithm representation

typeson-registry, typeson, indexeddb, indexeddbshim

readme

typeson-registry-sca-reverter

Dependencies devDependencies npm License

Version 4.0.0 of IndexedDBShim uses a later version of typeson-registry's Structured Cloning Algorithm serialization/parsing format by default.

This small utility allows IndexedDBShim databases created under version 3.0.0 (and thus the earlier typeson-registry format) to be used with version 4.0.0 of IndexedDBShim. (It should also be usable for converting back typeson-registry storage for non-IndexedDBShim uses as well.)

Note that it does not prevent new types added to typeson-registry/IndexedDBShim from being usable (e.g., BigInt), so data stored under the converted form will not be usable on older versions of IndexedDBShim, but it does allow data stored under older versions of IndexedDBShim to continue to be read.

You must set config early, e.g., within the call to setGlobalVars in the non-invasive distribution of IndexedDBShim.

Note that while the code was mostly the same as that working previously within IndexedDBShim, some code has been added without testing, so you ought to do your own testing to confirm.

setGlobalVars(null, {
  registerSCA: typesonRegistrySCAReverter
});

Or you may set the config before any indexedDB calls:

shimIndexedDB.__setConfig({
  registerSCA: typesonRegistrySCAReverter
});
// Safe to use indexedDB now...

To-dos

  1. Add tests

changelog

CHANGES for typeson-registry-sca-reverter

0.8.0

  • Build: Update per latest devDeps.
  • Maintenance: Use recommended "json" extension in Babel file
  • Linting: As per latest ash-nazg
  • npm: Change to non-deprecated @rollup/plugin-commonjs
  • npm: Update devDeps.

0.7.0

  • Build: Update as per latest devDeps.
  • Linting: As per latest ash-nazg/ESLint 7
  • npm: Update rollup-plugin-babel to @rollup/plugin-babel and make explicit babelHelpers as bundled
  • npm: Update devDeps

0.6.0

  • Build: Update
  • npm: Update devDeps

0.5.0

  • Build: Use updated Rollup plugin API; use latest typeson-registry
  • npm: Switch to non-deprecated @rollup/plugin-node-resolve
  • npm: Update devDeps

0.4.0

  • Fix: dist had not been updated
  • Linting (ESLint): Use ash-nazg; use a recommended extension (js), check MD and HTML
  • Maintenance: Add .editorconfig
  • npm: Bump devDeps
  • npm: Bump to 0.3.1

0.3.0

  • Enhancement: Handle still newer typeon-registry version of arrayNonindexKeys

0.2.1

  • Fix: Ensure sparseUndefined is spread into array
  • Linting (ESLint): Report unused directives
  • npm: Update devDeps

0.2.0

  • Enhancement: Support conversion of to-be-released typeson-registry format
  • Linting (Markdown): Fix format
  • Docs: Indicate usable for non-IndexedDBShim uses; indicate new types may still be added
  • npm: Indicate no tests currently

0.1.1

  • npm: Fix main and module

0.1.0

  • Initial commit