forked from wmsmacdonald/vcdiff-decoder
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We expose an ES module version of the library for module bundlers to use, and generate a CommonJS version for Node. The motivation is that, for [1] I want to re-export this library from ably-js as a tree-shakable module. Tree-shakability requires that we use ES modules. I’ve output the Node bundle to a new `build` directory, since I don’t know whether the `dist` directory has some special meaning for the `ably-env deploy` script and so didn’t want to put non-CDN stuff in there. The version of Node that the README tells us to use does not support ES modules, so we generate a CommonJS bundle for the tests to use, which includes all of the internal components so that they can be tested. I tested these changes for regressions by: 1. running `npm run grunt -- test:node` 2. running `npm run grunt -- test:browser:local` 3. generating an NPM package using `npm pack`, installing it in ably-js, and running the delta tests there [1] ably/ably-js#1492
- Loading branch information
1 parent
b81c5ed
commit 9d8aeb8
Showing
16 changed files
with
97 additions
and
79 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,5 @@ node_modules | |
npm-debug.log | ||
local.log | ||
browserstack.err | ||
test/build/ | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
const vcdiffDecoder = require('../../../'); | ||
|
||
import errors from '../../../lib/errors'; | ||
import VCDiff from '../../../lib/vcdiff'; | ||
import * as TypedArray from '../../../lib/typed_array_util'; | ||
import instructions from '../../../lib/instructions'; | ||
import deserializeInteger from '../../../lib/deserialize/integer'; | ||
import deserializeDelta from '../../../lib/deserialize/delta'; | ||
import NearCache from '../../../lib/address_caches/near'; | ||
import SameCache from '../../../lib/address_caches/same'; | ||
|
||
export { | ||
vcdiffDecoder, | ||
errors, | ||
VCDiff, | ||
TypedArray, | ||
instructions, | ||
deserializeInteger, | ||
deserializeDelta, | ||
NearCache, | ||
SameCache, | ||
} |