v4.4.1
4.4.1 (2024-02-13)
Quick Info (Excel Export)
this new release is mainly targeting @slickgrid-universal/excel-export
🚀
We are migrating from excel-builder.js to a new fork Excel-Builder-Vanilla
, the approach is a very similar to what I have done previously with multiple-select-vanilla
, which is to create new forks of the project, and it is all about modernizing the project. This migration brings a lot of goodies by using this new Excel-Builder-Vanilla
, it was rewritten in TypeScript, dropped Q
(replaced by regular Promise
), dropped Lodash
(now uses native code) and finally replaced JSZip
with fflate
which itself also has an ESM build giving us Tree Shaking and it is also giving us better perf by using Web Workers (when using CSP, you might need to adjust your CSP rules). Why the switch? The reason is mainly to be ESM ready because technologies are evolving and ESM is really the future (the next release of ViteJS is also expected to drop CJS (CommonJS) support). The switch has other benefits too, the most noticeable one being the large decrease of its build size (that is because we dropped Q
and Lodash
).
You might be wondering, why not switch to a more popular library like SheetJS
or ExcelJS
? Well, believe or not, all these projects are still written as CJS with no foreseeable support to ESM builds. For that reason you cannot take advantage of proper Tree Shaking which mean that whoever rely on these projects, are in fact downloading their entire (large) library and all their dependencies. We certainly don't need all of these features (ie: we only want to build an Excel, not read it), all we need is to export to Excel and this is exactly what Excel-Builder-Vanilla
is giving us in an ESM build and it is also extremely small since it's only targeting Excel file creation. 🏗️
Below are the migrating advantages to Excel-Builder-Vanilla
- rewritten in TypeScript (providing us with TS Types (
d.ts
) - dropped very old dependencies that are no longer necessary (
Q
andLodash
) - switched from
JSZip
tofflate
(has ESM support with Tree Shaking and also better perf by using Web Workers) - big decrease in the final build size (our standalone build (.zip), used in Salesforce, dropped by almost 10%)
No breaking change, the changes required were all internal and are totally transparent to the developers since the API is exactly the same as before, the only difference will be your build size decrease ;)
For a very customized view of what you can do with Excel-Builder and Slickgrid-Universal, take a look at the Example 2, try to group by any column and then Export to Excel to see the very customized Excel output.
Note that if you had a JSZip
path defined in your tsconfig.json
, you can now remove it. that is because we migrated to fflate
and it doesn't require any special config.
{
"compilerOptions": {
- "paths": {
- "jszip": [
- "node_modules/jszip/dist/jszip.min.js"
- ]
- }
}
}
Bug Fixes
- ci: disable Husky when pushing new release (#1390) (6f9372e) - by @ghiscoding
- core: replace
any
types by valid types (#1378) (02c4bc1) - by @ghiscoding - demo: change trading demo full screen z-index lower than ms-select (1f4a9ac) - by @ghiscoding
- deps: update all non-major dependencies (#1381) (2562352) - by @renovate-bot
- mouse cell selection with active editor (#1382) (17549b8) - by @zewa666
- publish: do not npm publish
tsconfig.tsbuildinfo
(#1373) (9223338) - by @ghiscoding - common: make "ctrl + c" great again (#1379) (3bf59e) - by @zewa666
Features
- ExcelExport: migrate to Excel-Export-Vanilla (ESM) (#1383) (f3838b3) - by @ghiscoding