Skip to content

Releases: dmester/jdenticon

Version 3.3.0

10 May 10:00
c894f54
Compare
Choose a tag to compare

Improvements:

  • Moved automatic rendering to DOMContentLoaded or window.onload event to make the initial rendering more reliable (#54)

Version 3.2.0

07 Aug 11:47
ba8f23b
Compare
Choose a tag to compare

Improvements:

  • Support for using Jdenticon from TypeScript with module resolution set to Node16.
  • New exports for explicitly picking a bundle:
    • Importing jdenticon/browser will ensure the browser bundle is used.
    • Importing jdenticon/node will ensure the Node.js bundle is used.

Version 3.1.1

14 Aug 18:05
dc54b02
Compare
Choose a tag to compare

Improvement:

  • Fixed type error when using Jdenticon with v16 of @type/node (#45).

Version 3.1.0

12 Dec 14:16
Compare
Choose a tag to compare

Bug fixes:

  • Webpack 5 was always picking node implementation. #39

Improvements:

  • Slightly smaller builds due to replacement of minifier (Terser is now being used).

Version 3.0.1

03 Aug 17:05
Compare
Choose a tag to compare

Fixes in TypeScript typings:

  • Allow using the Jdenticon package without adding "dom" to "lib" in tsconfig.json.
  • Node typings do no longer leak from the Jdenticon package.

Version 3.0.0

01 Aug 16:44
Compare
Choose a tag to compare

Breaking changes

  • The exported file for bundlers does no longer automatically render icons at startup. You need to call any of the update methods from your code to render icons. You can also choose to import "jdenticon/standalone" instead of "jdenticon" to keep the old behavior. If you are importing jdenticon.js or jdenticon.min.js you donät have to do anything.
  • The default padding of drawIcon is now 0.08 from the previous default 0. This was changed to remove code for backward compatibility, and to harmonize the API.
  • TypeScript: Jdenticon interfaces must be imported when using the Jdenticon module bundle. The interfaces are no longer declared in the global namespace. The UMD bundle (used when importing "jdenticon/standalone") still declares the interfaces in the global namespace.

Changes

  • New methods updateSvg() and updateCanvas(). These only contain references to the logics needed for each element type, providing better code optimization opportunities. They are now preferred over update() where the element type is known.
  • An ES bundle is now provided. Just import the "jdenticon" package and the bundler will choose the ES bundle when possible. This will improve code optimizations hopefully causing smaller builds.
  • configure() is a new method for providing a default style configuration. This plays nicer when imported as an ES module, than the old config property, which was made read-only by the ES import statement.
  • jdenticon.config is deprecated. Use the global jdenticon_config variable or jdenticon.configure() method instead.

Bug fixes

  • The typings of the update() method were incorrectly only accepting HTMLElement. An <svg> element (SVGSVGElement) is not an HTMLElement. Now Element is accepted.
  • update() incorrectly rendered SVG data in any element with a tag name containing svg, instead of being exactly svg.

Version 2.2.0

13 Jul 13:22
Compare
Choose a tag to compare

Improvements:

  • TypeScript typings are now bundled in NPM package.
  • New configuration property padding.
  • The padding parameter of API methods has been replaced with a config parameter. For backward compatibility a padding value is still allowed as value to the config parameter.
  • Added CLI tool.
  • jdenticon.drawIcon is now also available on Node for usage with canvas compatible packages.
  • Updated universal module definition.

Version 2.1.1

22 Dec 10:27
Compare
Choose a tag to compare

Bug fix:

  • An exception was thrown when generating large PNG icons on Node 10.x.

Version 2.1.0

15 Apr 18:00
Compare
Choose a tag to compare

Changes:

  • Setting jdenticon_config.saturation directly is now deprecated. Use jdenticon_config.saturation.color instead.

Improvements:

  • New jdenticon_config style options: saturation.color, saturation.grayscale and hues.
  • New jdenticon_config option replaceMode which has the following values:
    • "once" - icons are replaced once upon page load. This is the default value and how Jdenticon has always behaved.
    • "never" - no icons are replaced automatically. Good for folks who have written their own components for triggering icon updates.
    • "observe" - icons are replaced upon page load, and the DOM is then monitored for new identicons. This mode is useful in applications where new icons are inserted dynamically into the page, e.g. by using React or Angular.
  • Source maps are now provided for jdenticon.min.js.

Bug fixes:

  • No icon was rendered when a falsy value was passed to jdenticon.update.
  • Smaller circles were rendered very badly to PNG in smaller sizes (changes in the dependency canvas-renderer).
  • Padding is now rounded instead of truncated to nearest integer to avoid floating point rounding errors.

Version 2.0.0

12 Mar 19:54
Compare
Choose a tag to compare

Breaking changes:

  • Now licensed under the MIT license. This change was done to simplify using Jdenticon in businesses utilizing list of allowed open source licenses.

Improvements:

  • Improved performance for the toPng function when running on Node.js. Benchmarks have shown performance boosts up to 50%.
  • New option backColor for configuring background color of generated icons.
  • Added padding parameter to the drawIcon method.