Conversation
rgcl
commented
Jun 20, 2026
Owner
- Rewrite main.js -> index.js as plain CJS (drop AMD/UMD wrapper)
- Add index.mjs ESM re-export for dual-module support
- Add index.d.ts TypeScript declarations
- Fix string deduplication bug: encode before dictionary lookup
- Serialize Date as ISO 8601 string instead of producing {}
- Use Array.isArray() directly, remove instanceof Array
- Remove dead code: _indexOfDictionary, _indexOf IE8 polyfill
- Dictionary uses objects for O(1) lookup (from merged PR Improve packing performance #27)
- Replace Makefile + .travis.yml with npm scripts + GitHub Actions (Node 18/20/22)
- Remove package.js (Dojo/Volo artifact)
- Modernize package.json: license, repository URL, engines >=14, exports field
- Migrate tests to assert.strict, drop expect.js, add Date and round-trip cases
- Update all Sapienlab references to SASUD, update contact email
- Rewrite README: remove Travis/volo/AMD, add ESM example, Web Worker note
- Rewrite main.js -> index.js as plain CJS (drop AMD/UMD wrapper)
- Add index.mjs ESM re-export for dual-module support
- Add index.d.ts TypeScript declarations
- Fix string deduplication bug: encode before dictionary lookup
- Serialize Date as ISO 8601 string instead of producing {}
- Use Array.isArray() directly, remove instanceof Array
- Remove dead code: _indexOfDictionary, _indexOf IE8 polyfill
- Dictionary uses objects for O(1) lookup (from merged PR #27)
- Replace Makefile + .travis.yml with npm scripts + GitHub Actions (Node 18/20/22)
- Remove package.js (Dojo/Volo artifact)
- Modernize package.json: license, repository URL, engines >=14, exports field
- Migrate tests to assert.strict, drop expect.js, add Date and round-trip cases
- Update all Sapienlab references to SASUD, update contact email
- Rewrite README: remove Travis/volo/AMD, add ESM example, Web Worker note
Reposition jsonpack as a URL-safe JSON serializer sitting between encodeURIComponent (fast, expands data) and lz-string (best compression, slow decode). Add benchmark charts, when-to-use guidance, and bundle size.
Add TOKEN_DATE (-6) to the packed format. During pack, Date instances
are stored as ISO strings in the dictionary and marked with a sentinel
in the structure section. During unpack, the sentinel triggers
new Date(dictionary[index]) restoring the original type.
Previously: pack({d: new Date()}) -> unpack -> {d: 'ISO string'}
Now: pack({d: new Date()}) -> unpack -> {d: Date instance}
Old packed strings (without Date tokens) remain fully compatible.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.