Skip to content

Conversation

@spirit-wiegmann
Copy link
Collaborator

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:

  • Replaced the Rollup-based build system (rollup.config.js removed) 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]
  • Added bundle size analysis and reporting to the build process for better visibility into output artifacts.

Release workflow modernization:

  • Migrated release automation from semantic-release to release-it, including a new .release-it.json configuration and updated npm scripts for dry-run, changelog generation, and publishing. [1] [2]
  • Updated changelog and release hooks to use conventional commits and workspace-aware publishing for the proxy package.

Dependency and metadata updates:

  • Updated and cleaned up dependencies in package.json and proxy/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]
  • Updated repository URLs and descriptions to reflect the new fork and maintainership. [1] [2]

Browser/server compatibility improvements:

  • Refactored event stream handling to use a lazy-loading wrapper (src/modules/CaaSEventStreamLazy.ts), ensuring that server-only dependencies (like better-sse) are not bundled in browser builds. Express integration now dynamically imports the event stream handler only when needed. [1] [2] [3]
  • Exported the new CaaSEventStream API for use in both main and proxy packages.

Test and code maintenance:

  • Updated test imports to use @faker-js/faker instead of the deprecated faker package, and replaced usage accordingly. [1] [2] [3] [4]
  • Minor cleanup of unused imports and improved test variable initialization for clarity. [1] [2]

Let me know if you want to go deeper into any of these changes or discuss how this affects your workflow!

- Replaced `faker` with `@faker-js/faker` for better compatibility.
- Updated TypeScript configuration to exclude `node_modules`.
- Refactored `CaaSEventStream` to use lazy loading, preventing unnecessary bundling in browser builds.
- Improved code readability and maintainability across multiple files.

This commit enhances the overall project structure and prepares for future updates.
BREAKING CHANGES
* Reduced the default maximum reference depth from 10 to 2.
* This change aims to optimize performance and reduce complexity in handling referenced items.
…ies-update

# Conflicts:
#	package-lock.json
#	package.json
#	rollup.config.js
#	src/integrations/express.spec.ts
#	src/integrations/express.ts
#	tsconfig.json
* Changed package names to include the scope `@spirit-wiegmann`.
* Updated repository URLs to reflect the new organization.
* Modified descriptions to indicate the packages are test forks.
* Changed package names from `@spirit-wiegmann` to `@mrj-cp`.
* Updated repository URLs to reflect the new organization.
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.

1 participant