Skip to content

v4.0.0

Choose a tag to compare

@sasjs-gha sasjs-gha released this 15 Oct 22:47
· 2 commits to main since this release

4.0.0 (2026-10-15)

  • feat(barrel)!: stop re-exporting ./fs, the one module that imports crypto (#283) (a18eb2b)

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>