Skip to content

Conversation

@spirit-wiegmann
Copy link
Collaborator

This pull request introduces several important updates to the build, release, and test infrastructure, as well as improvements to integration tests. The main themes are migration from Semantic Release to Release It, modernization of Node.js versions, enhanced authentication and release workflows, and improvements to integration test reliability and maintainability.

Release and Build System Modernization

  • Migrated the release process from Semantic Release (removed .releaserc) to Release It by adding a new .release-it.json configuration file, enabling more flexible release hooks, changelog generation, workspace publishing, and conventional commit support. [1] [2]
  • Updated all GitHub Actions workflows (integration-tests.yml, release.yml, validation.yml) to use Node.js version 24.x instead of 20.x for improved compatibility and support. [1] [2] [3]

Release Workflow Improvements

  • Enhanced the release workflow in release.yml to use full git history (fetch-depth: 0), set the npm registry URL, configure npm authentication using the NPM_TOKEN secret, and switched the release command from semantic-release to release. Also added redundant environment variables for npm authentication.
  • Updated the validation workflow to include npm authentication before dry-run publishing and switched the dry-run command to release:dry-run.

Build Configuration

  • Added a new esbuild.config.mjs file to manage builds for both Node.js and browser bundles, including bundle analysis reports and external dependency handling. This improves transparency and maintainability of the build process.

Integration Test Improvements

  • Updated integration tests to use the modern @faker-js/faker library instead of the deprecated faker package, and replaced all usages accordingly. Also made tenant ID configurable via environment variables for better test flexibility. [1] [2] [3] [4] [5]
  • Improved server lifecycle management in integration tests by using an asynchronous closeServer utility, ensuring servers are properly closed after tests, and refactored tests that require custom server configurations (e.g., higher maxReferenceDepth) to use temporary servers with proper cleanup. [1] [2] [3] [4] [5] [6] [7] [8]

Test Data Generation

  • Standardized all test data generation to use faker.string.uuid() for UUIDs, improving consistency and reliability across all integration tests. [1] [2] [3] [4] [5] [6]

- 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.
* Replaced `Faker` with `@faker-js/faker` in test files.
* Updated UUID generation to use `faker.string.uuid()` for consistency.
…ANT_ID`

* Refactored tests to utilize `INTEGRATION_TEST_TENANT_ID` from environment variables.
* Added `closeServer` utility to ensure proper server shutdown in tests.
* Updated server start function to accept a port parameter for flexibility.
* Updated Node.js version from 20.x to 24.x in `integration-tests.yml`, `release.yml`, and `validation.yml`.
* Added NPM authentication setup for publishing in `validation.yml`.
* Configured `.release-it.json` to skip checks during publishing.
* Updated `release.yml` and `validation.yml` to set `fetch-depth: 0` and `ref: ${{ github.ref }}` for the checkout action.
* This change ensures that the full history is fetched and the correct reference is checked out during CI workflows.
* Changed the `ref` parameter in the checkout action to use `github.head_ref` for better compatibility with pull requests.
* This ensures that the correct branch is checked out during CI workflows.
* Added npm registry URL to the setup-node action.
* Configured npm authentication using the NPM_TOKEN secret for secure access during the release process.
* Added `GITHUB_TOKEN` to the environment variables in `release.yml` for improved authentication during releases.
* Removed redundant `version` script from `package.json` to streamline the publishing process.
* Changed the release command from `npm run semantic-release` to `npm run release`.
* Updated dry run command to `npm run release:dry-run`.
* Added `release-it` configuration in `package.json` for streamlined release management.
* Ensured compatibility with Node.js version 14.0.0 and above.
* No functional changes were made to the application.
* Introduced `.release-it.json` for release management.
* Updated `package.json` to include `release:ci` script for CI environments.
* Enhanced hooks in `.release-it.json` for better build and release processes.
* Refactored `.release-it.json` to enhance hook formatting and readability.
* Simplified `release` and `release:ci` scripts in `package.json` for clarity.
* Ensured consistency in workspace and version update configurations.
* Cleaned up the `scripts` section in `package.json` by removing the `postpublish` script, which was not necessary for the current workflow.
* Removed the `@release-it/bumper` plugin from `.release-it.json` and `package.json` as it is no longer needed.
* Updated the `package-lock.json` to reflect these changes.
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