Issue/px 334 node and dependencies update #230
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces a major overhaul to the build system, dependency management, and release workflow for both the main and proxy packages. The changes replace Rollup with esbuild for bundling, switch the release automation from semantic-release to release-it, update package metadata and dependencies, and improve browser/server compatibility for event streaming. These improvements streamline the build and release process, reduce bundle size, and resolve issues with browser-side imports of server-only modules.
Build system migration and optimization:
rollup.config.jsremoved) with a new, scriptable esbuild configuration (esbuild.config.mjs), supporting both CJS and ESM outputs for main and proxy packages, bundle analysis, and external dependency handling. [1] [2]Release workflow modernization:
.release-it.jsonconfiguration and updated npm scripts for dry-run, changelog generation, and publishing. [1] [2]Dependency and metadata updates:
package.jsonandproxy/package.json, replacing deprecated or unused packages, aligning versions, and switching to scoped package names (@mrj-cp/fsxa-api,@mrj-cp/fsxa-proxy-api). [1] [2] [3]Browser/server compatibility improvements:
src/modules/CaaSEventStreamLazy.ts), ensuring that server-only dependencies (likebetter-sse) are not bundled in browser builds. Express integration now dynamically imports the event stream handler only when needed. [1] [2] [3]CaaSEventStreamAPI for use in both main and proxy packages.Test and code maintenance:
@faker-js/fakerinstead of the deprecatedfakerpackage, and replaced usage accordingly. [1] [2] [3] [4]Let me know if you want to go deeper into any of these changes or discuss how this affects your workflow!