Repository navigation
v4.0.0
4.0.0 (2026-10-15)
BREAKING CHANGES
- the fs helpers are no longer exported from the package root.
Import them from '@sasjs/utils/fs'.
Measured
A webpack browser build (target web, with the Node polyfill plugin - the shape
the issue describes) importing one runtime value from the barrel:
before 1971 kB | 473 modules | 103 packages | 21 crypto-suite packages
after 822 kB | 292 modules | 65 packages | 0 crypto-suite packages
The remaining weight is the other node-only modules the barrel carries by
design - prompts, fs-extra, @fast-csv/format, chalk, consola - so the barrel is
still a Node entry point and not a browser one. That contract is stated in the
README now, along with the browser-safe subpaths. Making the barrel itself
browser-safe would mean splitting the package's exports, which this change does
not attempt.
Verified
- npm test: 41 suites / 450 tests pass, including a new src/index.spec.ts that
asserts the barrel does not carry the fs helpers and that they stay reachable
at the subpath. Re-adding the export fails it, naming getHash. - npm run build and npm run lint pass.
- The probe above was run against the built package, and the compiled barrel
carries no require of './fs'.
Co-authored-by: sasjs-dev[bot] <sasjs-dev[bot]@users.noreply.github.com>