Breaking changes, which may affect downstream projects are marked with a
- Replace legacy Rollup
jsnext:main
with now standardmodule
(#91) ⚠️ Drop support for Node 4
- Provide shrink as a public method (#90)
⚠️ shelf-pack is now a scoped package under the @mapbox namespace
- Remember original size of free bins and use that for packing free space (#29)
- Avoid id collisions by updating
maxId
if a numericid
is supplied (#28) - Skip free bins if they are more wasteful than free shelves (#25)
- Prefer numeric Bin ids over strings (3x perf boost)
⚠️ Remove conveniencewidth
,height
properties from Bin object, use onlyw
,h
- Reference counting (see #20 or README)
- Each bin now gets a unique id. An id can be passed as optional param to the
packOne()
function, otherwise a numeric id will be generated. - Bins are automatically reference counted (i.e. a newly packed Bin will have a
refcount
of 1). - Functions
ref(bin)
andunref(bin)
track which bins are being used. - When a Bin's
refcount
decrements to 0, the Bin will be marked as free, and its space may be reused by the packing code.
- Each bin now gets a unique id. An id can be passed as optional param to the
- Release as ES6 module alongside UMD build, add
jsnext:main
topackage.json