Skip to content
This repository has been archived by the owner on Nov 4, 2020. It is now read-only.

Releases: shouldjs/should.js

13.1.3

28 Oct 11:14
@btd btd
Compare
Choose a tag to compare

13.1.2

28 Oct 11:13
@btd btd
Compare
Choose a tag to compare

Revert in ts definition default export back to that was in 13.0.0

13.1.1

28 Oct 11:13
@btd btd
Compare
Choose a tag to compare

.rejecteWith in ts definition was missing return type

13.1.0

20 Sep 14:09
@btd btd
Compare
Choose a tag to compare

New

  1. Now all zero argument assertions throw TypeError in case any argument passed to them.
  2. Aliased .fulfill/.fulfilledWith to .resolve/.resolvedWith

Fixes

  1. TS definition fixed to allow such imports:
import should from 'should';

13.0.1

06 Sep 14:49
@btd btd
Compare
Choose a tag to compare

Add back missing umd build in root of package

13.0.0

06 Sep 14:48
@btd btd
Compare
Choose a tag to compare

Breaking changes

  1. Removed .enumerable, .enumerables (deprecated since 11.2.0)
  2. Fix for #150

New

Added Typescript bindings (still considering this as beta as i am TS newbie)

Better Map Set equality

28 Aug 13:59
@btd btd
Compare
Choose a tag to compare

Map/Set/WeakMap/WeakSet equality checks

User @BridgeAR pointed to a number of bugs and inconcistency in Map/Set/WeakMap/WeakSet checks. To fix all this things, i switched map and set equality checks to do key checks defined in standard instead of value checks.
Typical example that was working before this release:

const m1 = new Map([[{ a: 1 }, 11]]);
const m2 = new Map([[{ a: 1 }, 11]]);

m1.should.be.eql(m2)

And not this example is breaking. At first view it is a bit unclear why it should not be so. Consider another example:

const m1 = new Map([[{}, 11], [{}, 12]]);
const m2 = new Map([[{}, 11], [{}, 12]]);

m1.should.be.eql(m2)

This example is not that clear if it should assert or not, right? (it should).

As Map and Set (as their weak equavalents) allows to use any type value/ref as key, perfectly equal by value (what should.js do) {} and {} is not equal by reference. In should.js i am always trying to limit users to do not shoot themselfs in their foots and just do right thing if possible and when possible. That is why both examples will throw assertions starting 12.0.0.

Consistency in bundles

For the long time (probably several years now) browser bundle and node bundle has little differences in globals.
To make them sync i am doing such changes to bundles:

  1. Browser bundle will not contain window.Should any more (with capital S). It was deprecated for the long time. Just use window.should as is.
  2. Node bundle change global.should to be should function instead of getter attached to Object.prototype.