Releases: data-uri/datauri
Releases · data-uri/datauri
v4.1.0
v4.0.0
Breaking changes
-
Minimum support is now Node 10+, please use datauri 3 for previous versions.
-
CSS
-
rename
class
config toclassName
-
rename
background-size
config tobackgroundSize
-
Isolate
getCSS
indatauri/css
submoduleBefore (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 tobackgroundSize
-
class
flag renamed toclassName
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
Typescript support
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 todatauri/sync
- Minimum support is now Node 8+
More info: https://npmjs.com/datauri
2.0 is here
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
- 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
v1.1.0
Remove potential REDOS vulnerability from mimer
https://github.com/data-uri/mimer/releases/tag/v0.3.0
New data-uri org and project members
v1.0.5 1.0.5
v1.0.4
v1.0.3
v1.0.2
Doc tweaks for module, client and github readme. Big thanks to @zenorocha