Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge v2 draft branch in master fr v6 release #189

Open
wants to merge 91 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
fc7e116
find() -> findValue()
asolove Dec 16, 2013
28cc8da
findLast() -> findLastValue()
asolove Dec 16, 2013
ea5fdb9
Fix docs for find -> findValue
asolove Dec 16, 2013
9dee1fc
ObservePropertyChanges proposed interface
kriskowal Oct 11, 2013
77826a9
Normalize property change observer argument order
kriskowal Jan 3, 2014
cfefefe
Preliminary property change implementation shift
kriskowal Jan 6, 2014
6c80714
Factor dispatch code into observer method
kriskowal Jan 6, 2014
06bb036
Test manual property change dispatch
kriskowal Jan 20, 2014
7bff2cc
Further advancements on property change observers
kriskowal Jan 21, 2014
68f0b15
Support preventPropertyObserver
kriskowal Jan 26, 2014
ad0a2bd
Finish refactoring of listeners to observers
kriskowal Jan 27, 2014
71b54e1
Update goals and future work
kriskowal Jan 31, 2014
35b695a
Merge master and observe branches
kriskowal Jan 31, 2014
c32707f
Update all collections for new change observers
kriskowal Jan 31, 2014
5b46572
Add queue
kriskowal Jan 28, 2014
6fd4b9d
Implement range change dispatch on Queue
kriskowal Jan 28, 2014
42f0980
Failing spec for equals of undefined/null
kriskowal Jan 31, 2014
b383200
Fix for Object.equals for null and undefined
kriskowal Jan 31, 2014
3348378
Upgrade Queue to Deque
kriskowal Feb 2, 2014
4732a7f
Implement {peek,poke}{,Back} on Array shim
kriskowal Feb 2, 2014
06519a6
Document Deque
kriskowal Feb 2, 2014
7935c8a
Reimplement Iterator
kriskowal Feb 3, 2014
7e6504c
Merge observe into v1
kriskowal Feb 3, 2014
ae1f7ba
Merge ES6 iterators into v1
kriskowal Feb 3, 2014
18b205d
Merge Deque into v1
kriskowal Feb 3, 2014
10f99b1
Update Deque for new observers
kriskowal Feb 3, 2014
9e15bec
Introduce iterator recount
kriskowal Feb 3, 2014
24049a9
Revise iterator documentation
kriskowal Feb 3, 2014
7e2c9b6
Add change observer documentation
kriskowal Feb 3, 2014
2bf654f
Merge ES6-style Iterator documentation
kriskowal Feb 3, 2014
3a2cbf1
Remove script form
kriskowal Feb 3, 2014
1cd985f
Merge pull request #42
kriskowal Feb 3, 2014
0e9c885
Remove obsolete change listener structure.
kriskowal Feb 3, 2014
f38e395
Remove obsolete minification script
kriskowal Feb 3, 2014
140d4a1
Update demos
kriskowal Feb 3, 2014
64c1ffe
Optimize Deque push and unshift
kriskowal Feb 4, 2014
361b669
Merge changes to Deque into v2
kriskowal Feb 4, 2014
aaf3425
Update future work
kriskowal Feb 4, 2014
8bc57af
Reimplement some and every in terms of iterate
kriskowal Feb 5, 2014
799daad
Remove support for `any` and `all`.
kriskowal Feb 5, 2014
bc1508f
Make copy re versions consistent in README
kriskowal Feb 5, 2014
e05c747
Less clever with iterator wrapping
kriskowal Feb 5, 2014
bcdfcb2
Refactor tests for Jasminum or Jasmine
kriskowal Feb 14, 2014
d40e942
Migrate expect toNotBe to not.toBe
kriskowal Mar 17, 2014
b8fd603
Use Jasminum PhantomJS to for browser tests
kriskowal Mar 18, 2014
05d2c8c
Fix generic map filter
kriskowal Mar 5, 2014
f5568a4
Add failing test for dictionary map change observers
kriskowal Mar 18, 2014
63fe35f
Fix map change dispatch on Dict
kriskowal Mar 18, 2014
44905ef
Rename maxLength to capacity
kriskowal Mar 17, 2014
d1438a7
Let getDefault to be overridden on the prototype
kriskowal Mar 18, 2014
d5ba9d2
Support iteration of null or undefined
kriskowal Mar 17, 2014
5debcec
Eliminate use of closure for Lru Map observer
kriskowal Mar 17, 2014
453ed4f
Fix Object.equals for structurally similar cycles
kriskowal Mar 18, 2014
beb9fb8
Fix Object.clone of functions
kriskowal Mar 18, 2014
296721e
Fix splice start truncation for observed arrays
kriskowal Mar 18, 2014
3ca52f7
Various swap and splice fixes
kriskowal Mar 18, 2014
a9185ae
Refine compare
kriskowal Mar 19, 2014
30f4aee
Update dependencies
kriskowal Mar 19, 2014
9c1b083
Version 2.0.0
kriskowal Mar 20, 2014
da230ef
Version 2.0.1
kriskowal Mar 20, 2014
bb14323
Fix SortedArray length update on push pop
kriskowal Apr 3, 2014
f63e028
Iterate maps and objects properly
kriskowal May 16, 2014
717ab52
Remove deprecated map items method
kriskowal May 16, 2014
8cc1ad4
Take beter care to use swap instead of splice
kriskowal May 16, 2014
dd3a303
Fix initial state check for property observers
kriskowal May 16, 2014
7d5e278
Ensure that v2 does not get published to npm as latest
kriskowal May 16, 2014
63df92f
Allow object holes to be treated as undefined
kriskowal May 16, 2014
705d553
Fix #64
cbarrick Apr 3, 2014
d77cc24
Make heaps update length on delete
cbarrick Apr 8, 2014
e72ade1
Fix length getting out of sync when deleting from an empty heap
cbarrick Apr 9, 2014
1b6a02c
Always use swap for splice
kriskowal May 16, 2014
ec42c0a
Phantom is not yet ready for Jasminum.
kriskowal May 16, 2014
b3463a2
Update change log
kriskowal Apr 10, 2014
1bafc92
Disable Node.js v0.8 integration tests
kriskowal Apr 10, 2014
b3fb532
Add test case for #66
cbarrick Apr 12, 2014
743a264
Add initial LFU
Stuk Apr 22, 2014
19aea89
Add LfuMap
Stuk Apr 22, 2014
0ae10d2
Make LfuSet variables more descriptive
Stuk Apr 23, 2014
4323b8e
Update readme to contain Lfu{Set, Map}
Stuk Apr 23, 2014
600781a
Port LFU to v2 branch conventions
kriskowal May 16, 2014
a41067b
Generalize Set specs for alternate iteration order
kriskowal Apr 24, 2014
aa0d3f0
Re-enable LfuSet Set specs
kriskowal May 16, 2014
9968762
Update change log and checklist for 1.1.0
kriskowal Apr 24, 2014
455e795
Update find methods to account for wrong assumption about splay
trevordixon May 15, 2014
cda098a
Add tests for SortedSet find* methods
May 16, 2014
ac7dd38
Add analytics
Stuk Jun 9, 2014
5574d0b
Only patch Array clear if it doesn't exist
kriskowal Jul 13, 2014
7c674d4
Relax coupling to global shims.
kriskowal Sep 8, 2014
4697b42
merge v2 branch
hthetiot Dec 7, 2017
cf16845
merge .travis and add npm run lint
hthetiot Dec 7, 2017
bbf9df0
attempt at fix this.iterate undefined
hthetiot Dec 7, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
language: node_js
node_js:
- "4.8.0"
- "4."
- "6"
- "8"
script: npm run $COMMAND
env:
- COMMAND=lint
- COMMAND=test
notifications:
irc:
Expand Down
82 changes: 82 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,88 @@
ignoring the argument.
- Fixes `Array#clone` cycle detection.

## v2.0.0 :warning: BACKWARD INCOMPATIBLE

- Iterators have been reimplemented with an ES6 alike interface.
- Change observers have been reimplemented with an FRB alike interface.
- Removes support for `any` and `all`. Use `some(Boolean)` or
`every(Boolean)`.

## v1.1.0

- Adds an LfuSet, a set useful as a cache with a least-frequently-used
eviction strategy.
- Fixes array `set` and `swap` for indexes outside the bounds of the existing
array, for both observed and unobserved arrays.

## v1.0.2

- Refinements on `Object.equals` and `Object.compare`. These are not
necessarily backward compatible, but should be a strict improvement:
- `Object.compare` will now return +/- Infinity for inequal strings,
rather than +/- 1 which imply that the distance between any two inequal
strings is always 1. `Object.compare` for numbers is suitable for finding
the magnitude of the difference as well as the direction.
- `Object.compare` and `Object.equals` will now delegate to either non-null,
non-undefined argument if the other argument is null or undefined.
This allows objects to be constructed that will identify themselves
as equivalent to null or undefined, for example `Any` types, useful for
testing.
- `Object.equals` will only compare object literals derrived directly from the
`Object.prototype`. All other objects that do not implement `compare` are
incomparable.
- First attempt at fixing `set`, `swap`, and `splice`, later fixed in v1.0.3.
`splice` must truncate the `start` index to the array length. `swap` and
`set` should not.

## v1.0.1

- Bug fix for filter on map-like collections.

## v1.0.0 :cake:

- Adds a Deque type based on a circular buffer of exponential
capacity. (@petkaantonov)
- Implements `peek`, `peekBack`, `poke`, and `pokeBack` on array
shim for Deque “isomorphism”.
- Fixes the cases where a change listener is added or removed during
change dispatch. Neither listener will be informed until the next
change. (@asolove)
- The property change listener system has been altered such that
once a thunk has been installed on an object, it will not be
removed, in order to avoid churn. Once a property has been
observed, it is likely to be observed again.
- Fixes `Object.equals` for comparing NaN to itself, which should
report `true` such that collections that use `Object.equals` to
identify values are able to find `NaN`. Previously, `NaN` could
get stuck in a collection permanently.
- In abstract, Collections previously identified duck types by
looking only at the prototype chain, ignoring owned properties.
Thus, an object could distinguish a property name that was being
used as a key of a record, from the same property name that was
being used as a method name. To improve performance and to face
the reality that oftentimes an owned property is in fact a method,
Collections no longer observe this distinction. That is, if an
object has a function by the appropriate name, either by ownership
or inheritance, it will be recognized as a method of a duck type.
This particularly affects `Object.equals`, which should be much
faster now.
- Fixes `Object.equals` such that property for property comparison
between objects only happens if they both descend directly from
`Object.prototype`. Previously, objects would be thus compared if
they both descended from the same prototype.
- Accommodate *very* large arrays with the `swap` shim. Previously,
the size of an array swap was limited by the size of the
JavaScript run-time stack. (@francoisfrisch)
- Fixes `splice` on an array when given a negative start index.
(@stuk)
- Some methods accept an optional `equals` or `index` argument
that may or may not be supported by certain collections, like
`find` on a `SortedSet` versus a `List`. Collections that do not
support this argument will now throw an error instead of silently
ignoring the argument.
- Fixes `Array#clone` cycle detection.

## v0.2.2

- `one` now returns a consistent value between changes of a sorted
Expand Down
Loading