Skip to content

Update dependency datauri to v4#61

Open
renovate[bot] wants to merge 1 commit into
masterfrom
renovate/datauri-4.x
Open

Update dependency datauri to v4#61
renovate[bot] wants to merge 1 commit into
masterfrom
renovate/datauri-4.x

Conversation

@renovate
Copy link
Copy Markdown

@renovate renovate Bot commented Apr 15, 2026

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
datauri ^1.1.0^4.0.0 age adoption passing confidence

Release Notes

data-uri/datauri (datauri)

v4.1.0

Compare Source

v4.0.1

Compare Source

v4.0.0

Compare Source

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)
    ```tsx
    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)
    ```tsx
    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
    ```bash
    datauri brand.png --css --class=MyNewClass --background-size
    ```
After
    ```bash
    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: Typescript support

Compare Source

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: 2.0 is here

Compare Source

A sorry moment 🙈

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

What's coming next

#​19


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants