-
-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add ESM support for named exports
* fix variety of missing imports in both TS and CJS endpoints * add exports testing * renaming `Set` to `set` to avoid conflicts in CSJ endpoint and harmonize with other endpoints Signed-off-by: Jérôme Benoit <[email protected]>
- Loading branch information
Jérôme Benoit
authored
Feb 2, 2024
1 parent
346ff4a
commit f23da93
Showing
21 changed files
with
614 additions
and
99 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 |
---|---|---|
@@ -1 +1 @@ | ||
test/*.ts | ||
test/exports/dist/ |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
var SIZE = 100000 | ||
var SIZE = 100000; | ||
|
||
function Wrapper() { | ||
this.array = new Float64Array(SIZE); | ||
|
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,67 @@ | ||
/** | ||
* Mnemonist Library Endpoint (ESM) | ||
* ================================= | ||
* | ||
* Exporting every data structure through a unified endpoint. | ||
*/ | ||
import * as set from './set.js'; | ||
import {default as FibonacciHeap} from './fibonacci-heap.js'; | ||
const MinFibonacciHeap = FibonacciHeap.MinFibonacciHeap; | ||
const MaxFibonacciHeap = FibonacciHeap.MaxFibonacciHeap; | ||
import {default as Heap} from './heap.js'; | ||
const MinHeap = Heap.MinHeap; | ||
const MaxHeap = Heap.MaxHeap; | ||
import {default as SuffixArray} from './suffix-array.js'; | ||
const GeneralizedSuffixArray = SuffixArray.GeneralizedSuffixArray; | ||
import {default as Vector} from './vector.js'; | ||
const Uint8Vector = Vector.Uint8Vector; | ||
const Uint8ClampedVector = Vector.Uint8ClampedVector; | ||
const Int8Vector = Vector.Int8Vector; | ||
const Uint16Vector = Vector.Uint16Vector; | ||
const Int16Vector = Vector.Int16Vector; | ||
const Uint32Vector = Vector.Uint32Vector; | ||
const Int32Vector = Vector.Int32Vector; | ||
const Float32Vector = Vector.Float32Vector; | ||
const Float64Vector = Vector.Float64Vector; | ||
const PointerVector = Vector.PointerVector; | ||
|
||
export {default as BiMap} from './bi-map.js'; | ||
export {default as BitSet} from './bit-set.js'; | ||
export {default as BitVector} from './bit-vector.js'; | ||
export {default as BloomFilter} from './bloom-filter.js'; | ||
export {default as BKTree} from './bk-tree.js'; | ||
export {default as CircularBuffer} from './circular-buffer.js'; | ||
export {default as DefaultMap} from './default-map.js'; | ||
export {default as DefaultWeakMap} from './default-weak-map.js'; | ||
export {default as FixedDeque} from './fixed-deque.js'; | ||
export {default as StaticDisjointSet} from './static-disjoint-set.js'; | ||
export {FibonacciHeap, MinFibonacciHeap, MaxFibonacciHeap}; | ||
export {default as FixedReverseHeap} from './fixed-reverse-heap.js'; | ||
export {default as FuzzyMap} from './fuzzy-map.js'; | ||
export {default as FuzzyMultiMap} from './fuzzy-multi-map.js'; | ||
export {default as HashedArrayTree} from './hashed-array-tree.js'; | ||
export {Heap, MinHeap, MaxHeap}; | ||
export {default as StaticIntervalTree} from './static-interval-tree.js'; | ||
export {default as InvertedIndex} from './inverted-index.js'; | ||
export {default as KDTree} from './kd-tree.js'; | ||
export {default as LinkedList} from './linked-list.js'; | ||
export {default as LRUCache} from './lru-cache.js'; | ||
export {default as LRUCacheWithDelete} from './lru-cache-with-delete.js'; | ||
export {default as LRUMap} from './lru-map.js'; | ||
export {default as LRUMapWithDelete} from './lru-map-with-delete.js'; | ||
export {default as MultiMap} from './multi-map.js'; | ||
export {default as MultiSet} from './multi-set.js'; | ||
export {default as PassjoinIndex} from './passjoin-index.js'; | ||
export {default as Queue} from './queue.js'; | ||
export {default as FixedStack} from './fixed-stack.js'; | ||
export {default as Stack} from './stack.js'; | ||
export {SuffixArray, GeneralizedSuffixArray}; | ||
export {set}; | ||
export {default as SparseQueueSet} from './sparse-queue-set.js'; | ||
export {default as SparseMap} from './sparse-map.js'; | ||
export {default as SparseSet} from './sparse-set.js'; | ||
export {default as SymSpell} from './symspell.js'; | ||
export {default as Trie} from './trie.js'; | ||
export {default as TrieMap} from './trie-map.js'; | ||
export {Vector, Uint8Vector, Uint8ClampedVector, Int8Vector, Uint16Vector, Int16Vector, Uint32Vector, Int32Vector, Float32Vector, Float64Vector, PointerVector}; | ||
export {default as VPTree} from './vp-tree.js'; |
Oops, something went wrong.