Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: migrate from node-archiver to fflate to zip standalone SF bundle #1387

Merged
merged 4 commits into from
Feb 12, 2024

Conversation

ghiscoding
Copy link
Owner

@ghiscoding ghiscoding commented Feb 12, 2024

  • remove old node-archiver implementation
  • the main reason to use fflate instead of node-archiver is because our new Excel-Builder-Vanilla dependency uses fflate and also because fflate is ESM and node-archiver is not and it also didn't receive any update in a while, so even if the compress file is slightly larger switching to fflate is still an improvement and doesn't really matter for Salesforce usage.
  • new bundled zip file was also tested in Salesforce
  • NOTE: the new zip file is compatible with the previous implementation BUT it is a bit larger when using fflate
    • 18Kb larger => old: 533Kb, new: 551Kb
  • the larger file size was discussed and explained in fflate GitHub Discussion: How to use zlib to compress multiple files? 101arrowz/fflate#195
    • it is within acceptable 1% range of possible variance

- remove old node-archiver implementation
- NOTE: the new zip file is compatible with the previous implementation BUT it is a bit larger when using `fflate` (about 20Kb larger)
- the larger file was explained in `fflate` GitHub Discussion: 101arrowz/fflate#195
- the main reason to use `fflate` instead of `node-archiver` is because our new `Excel-Builder-Vanilla` repo uses `fflate` and also because `fflate` is ESM and `node-archiver` is not and wasn't updated in a while, so even if the zip is slightly larger switching to fflate is still an improvement and doesn't really matter for Salesforce
- new bundled zip file was also tested in Salesforce
- commitlint should accept multiple lines since I don't care about the PR body content but I do care about the PR title though
@ghiscoding ghiscoding changed the title chore: migrate from node-archiver to fflate to zip standalone vanilla bundle for SF chore: migrate from node-archiver to fflate to zip standalone SF bundle Feb 12, 2024
Copy link

codecov bot commented Feb 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (f37a7fc) 99.8% compared to head (33e1daa) 99.8%.

Additional details and impacted files
@@          Coverage Diff           @@
##           master   #1387   +/-   ##
======================================
  Coverage    99.8%   99.8%           
======================================
  Files         199     199           
  Lines       21557   21557           
  Branches     6937    6937           
======================================
  Hits        21493   21493           
  Misses         64      64           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ghiscoding ghiscoding merged commit 4ed241b into master Feb 12, 2024
12 checks passed
@ghiscoding ghiscoding deleted the chore/replace-node-archiver-with-fflate branch February 12, 2024 22:05
@ghiscoding ghiscoding restored the chore/replace-node-archiver-with-fflate branch February 13, 2024 05:18
ghiscoding added a commit that referenced this pull request Feb 13, 2024
* chore(release): publish new version 4.4.0

* docs: add missing commit to changelog

* chore: introduce husky commit-msg hook and pr title linter (#1385)

* chore: setup husky commit-msg hook with commitlint

* chore(deps): upgrade to major `@typescript-eslint` v7 (#1386)

* chore(deps): upgrade to major `@typescript-eslint` v7

* chore: migrate from node-archiver to fflate to zip standalone SF bundle (#1387)

* chore: replace bundle zip creation from `node-archiver` to `fflate`

* chore(deps): update to latest pnpm action v3
- latest pnpm action is using Node 20 and drops Node 16 which is EOL
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.

2 participants