Datauri Versions Save

Generate Data-URI scheme via terminal or node.js

v4.1.0

2 years ago

v4.0.0

2 years ago

Breaking changes

  • Minimum support is now Node 10+, please use datauri 3 for previous versions.

  • CSS

    • rename class config to className

    • rename background-size config to backgroundSize

    • Isolate getCSS in datauri/css submodule

      Before (getCSS function)

      const datauri = require('datauri');
      
      datauri('test/myfile.png', (err, content, meta) => {
       meta.getCSS({
          class: "myClass",
          'background-size': true,
          width: true,
          height: true
        }));
      });
      

      After (datauri/css)

      const datauriCSS = require('datauri/css');
      
      await datauriCSS('test/myfile.png', {
        className: "myClass",
        backgroundSize: true,
        width: true,
        height: true
      });
      
  • CLI

    • fs promises instead of Sync function

    • background-size flag renamed to backgroundSize

    • class flag renamed to className

      Before

      datauri brand.png --css --class=MyNewClass --background-size
      

      After

      datauri brand.png --css --className=MyNewClass --backgroundSize
      

Dev experience

  • Migrate TravisCI to Github actions
  • create devcontainer file for Github Codespaces
  • format code with prettier
  • master branch renamed to main

Performance tweaks

  • CSS parser runs a single fs read operation
  • datauri parser by default do not use any external dependencies because image-size is now isolated in datauri/css submodule.
  • uses Node.js fs native promises instead of factoring it with utils

v3.0.0

4 years ago

Fixes #21 #24

New Feature

  • Typescript support

Changes

  • datauri is no longer a class, but a promise based function
  • Stream/Event was removed in lieu of promise async/await
  • encodeSync was moved to datauri/sync
  • Minimum support is now Node 8+

More info: https://npmjs.com/datauri

v2.0.0

5 years ago

A sorry moment :see_no_evil:

First of all, I have to say sorry for taking that long to release this update. I had big problems last year which compromised my entire schedule.

What's new

  • Drop support for deprecated and old Node.js versions.
    • 0.12
    • 0.10
  • Remove babel build for module, use only Node.js 4+ code instead.
  • Fix #13, since none file is compiled into /lib/old folder
  • Fix #26 and update mimer https://github.com/data-uri/mimer/releases/tag/v1.0.0
  • Webpack compatibility. Fix #20, since #!/usr/bin/env node only runs in cli script.
  • Update dependencies to avoid warnings and bring security patches
  • Love is in the air

What's coming next

https://github.com/data-uri/datauri/issues/19

v1.1.0

6 years ago

Remove potential REDOS vulnerability from mimer https://github.com/data-uri/mimer/releases/tag/v0.3.0

v1.0.5

7 years ago

v1.0.3

8 years ago

Fix build encoding

v1.0.4

8 years ago

Fix NPM meta data description

v1.0.2

8 years ago

Doc tweaks for module, client and github readme. Big thanks to @zenorocha

v1.0.1

8 years ago

Fix client dependency mismatch.