- Import additional exception classes from `src/interfaces/Exceptions`
- Modify `Inject` function to:
- Accept `init` parameter as a function or `true` for instantiation
- Throw specific errors: `DependencyResolutionError`, `InjectorError`, `NoInstantiationMethodError`
- Ensure necessary dependencies are handled properly
- Define property with `Object.defineProperty` for performance
- Add `hasConstructor` helper function to check if an object has a constructor
- Added `InjectorError` class for handling injector errors
- Added `NoInstantiationMethodError` class for missing instantiation methods
- Both classes extend `TSinjexError` and provide detailed error messages
- Import `Identifier` from `src/types/Identifier`
- Change `identifier` parameter type in `DependencyResolutionError` constructor from `string` to `Identifier`
- Update error message to call `identifier.toString()`
Unified the import paths of the 'Identifier' type across multiple files to ensure consistency. The 'Identifier' type is now imported from '../types/Identifier' instead of 'src/types/Identifier'. This change reduces ambiguity and aligns the import pattern throughout the codebase.
Updated the package version from 0.0.11 to 0.0.12 to reflect recent changes and improvements in the codebase. This helps ensure version clarity and proper dependency management.
Updated the package version from 0.0.11 to 0.0.12 to reflect recent changes and improvements in the codebase. This helps ensure version clarity and proper dependency management.
Updated the release workflow to prepare a clean release branch by copying necessary files to a temporary directory and then resetting the branch to avoid residue from previous commits. This ensures only the relevant files are included in the release, enhancing the integrity and clarity of the release branch.
Simplified the workflow by eliminating the creation and usage of a temporary branch for releasing. Changes are now directly committed and pushed to the release branch, streamlining the process and reducing complexity.
Introduced a temporary branch for release preparation steps before merging into the release branch. This isolates changes such as file removals and modifications until all updates are ready, improving workflow clarity and reducing risk of conflicts. After merging, the temp branch is deleted to keep the repository clean.
Reordered the Git checkout command to occur after removing the unwanted files. This ensures that the cleanup operations are performed on the correct branch and reflect in the release process accurately.
Reordered steps in the release workflow to checkout the release branch and remove unwanted files before staging changes. This change ensures that the files removed reflect the current state of the release branch, avoiding potential inconsistencies during the release process.
Updated the release workflow to also remove package-lock.json when creating a temporary branch. This ensures that any changes to dependencies are not carried over inadvertently during the release process.
Added step to delete .gitignore before staging new and modified files in the CreateRelease workflow. Ensures .gitignore does not interfere with the release processes and file staging operations.
Configured the GitHub Actions workflow to include the GITHUB_TOKEN environment variable during the release process. This ensures secure authentication when pushing changes to the release branch. Additionally, reordered the checkout and commit commands for better sequencing.
Removed unnecessary git stash operations during release branch checkout. This streamlines the workflow by only focusing on switching to the release branch and adding the required files, which reduces potential complications and speeds up the release preparation process.
Refined workflow to ensure smoother updates to the release branch. Added steps to stash and apply local changes to prevent conflicts. Provided specific commands to checkout and update the release branch correctly. This approach maintains the branch's integrity and ensures all modifications are properly committed and pushed.
Streamlined the branch checkout process by switching to `release --no-checkout` and added the push operation to the release branch. This improves the workflow efficiency and ensures the release branch is updated consistently.
Updated the CreateRelease workflow to replace deprecated "::set-output" commands with the newer "$GITHUB_OUTPUT" syntax. This ensures compatibility with the latest GitHub Actions practices and enhances readability of the workflow script.
Added conditional logic to skip unnecessary release steps if the version tag already exists or if the version hasn't changed. This optimization avoids redundant operations by ensuring release-related jobs are executed only when needed, thus enhancing workflow efficiency.
Updated the release workflow to exit with status 1 instead of 0 when a version tag already exists or the version hasn't changed. This adjustment ensures the workflow stops for these error conditions, preventing unintended behavior or false success indications. Added `continue-on-error: true` to allow subsequent steps despite these non-critical errors.
Added a check to ensure the version already exists as a tag before creating a new release. This prevents creating duplicate releases and refines the version comparison logic by changing the exit status to 0 when the version hasn't changed.
Increased coverage thresholds to 90% across all metrics. Added exclusions for `.spec.ts` and `.test.ts` files to the coverage configuration. Introduced new test files for `Decorators` and `Functions`, incorporating detailed unit tests for decorators and DI functionalities. Removed outdated and redundant test files, consolidating their functionality into the updated tests. Also added new npm script for jest watch mode. Marked helper and main index files to be ignored by the coverage.
Updated the lazy initialization logic to ensure the instance is created only once by moving the instance variable outside of the proxy handlers. This addresses potential redundant instance creation and improves efficiency and consistency in DI container operations.