Commit Graph

63 Commits

Author SHA1 Message Date
9a4fdecaac Update warning message in TSinjex class
- Converted `identifier` to string in the deprecation warning.
2024-08-23 00:17:14 +02:00
6f189942f6 Ignore test files in Istanbul coverage reporting
- Added `/* istanbul ignore file */` comment to `Decorators.spec.ts`, `Functions.spec.ts`, `ITSinjex.spec.ts`
2024-08-23 00:17:14 +02:00
27cdbeb37b Release version 0.0.13
Bumped version from 0.0.12 to 0.0.13 in package.json to reflect recent updates and improvements. No other changes to code or dependencies.
0.0.13
2024-08-16 18:48:26 +02:00
567d1c5bd2 Refactor import paths for 'Identifier' type
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.
2024-08-16 18:48:26 +02:00
942e1079f6 Merge branch 'main' of https://github.com/PxaMMaxP/TSinjex 2024-08-16 18:43:24 +02:00
37b2eb4da2 Bump package version to 0.0.12
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.
0.0.12
2024-08-16 18:43:01 +02:00
a8fd55befd Bump package version to 0.0.12
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.
2024-08-16 18:41:45 +02:00
Max P.
cc2d4c08e8 Merge pull request #12 from PxaMMaxP/fix/release-action
Fix/release action
0.0.11
2024-08-16 18:38:21 +02:00
4842140887 ... 2024-08-16 18:34:01 +02:00
7eba587119 ... 2024-08-16 18:26:13 +02:00
27fa7927e8 Bump version to 0.0.12
Updated the version in package.json from 0.0.11 to 0.0.12 to reflect the latest changes and improvements.
2024-08-16 18:22:20 +02:00
b0654b9ca9 Refactor release workflow to ensure a clean branch
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.
2024-08-16 18:17:11 +02:00
a4792833be Optimize release workflow: remove temp branch steps
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.
2024-08-16 18:12:34 +02:00
a2638420e8 Create temp branch to handle release changes
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.
2024-08-16 18:10:05 +02:00
aeff933b47 Reorder Git commands for cleanup
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.
2024-08-16 18:07:54 +02:00
f77e2be99a Move checkout and cleanup steps in release workflow
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.
2024-08-16 18:06:52 +02:00
ec4dfb020b Remove package-lock.json in release workflow
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.
2024-08-16 18:02:49 +02:00
ccf24b511f Remove .gitignore before creating temp branch
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.
2024-08-16 18:01:15 +02:00
372244d5c4 Add GitHub token for secure push in release workflow
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.
2024-08-16 17:59:52 +02:00
49490f2647 Simplify release branch checkout process
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.
2024-08-16 17:57:58 +02:00
9caf12c61d Enhance release branch update 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.
2024-08-16 17:54:31 +02:00
6581ef6058 Enhance release branch handling
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.
2024-08-16 17:51:54 +02:00
c240083cf0 Switch to modern GITHUB_OUTPUT syntax in CI release workflow
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.
2024-08-16 17:41:20 +02:00
a25953ffc2 Prevent redundant releases in GitHub Actions
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.
2024-08-16 17:38:38 +02:00
3cdeecc0fc Exit with error if conditions fail in release workflow
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.
2024-08-16 17:34:54 +02:00
4f4145faa0 Prevent duplicate releases in workflow
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.
2024-08-16 17:32:49 +02:00
f7c4e609c2 ### Raise Coverage and Enhance Testing
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.
2024-08-16 17:31:55 +02:00
d322459e44 Bump version to 0.0.11
Updated package version to 0.0.11 to reflect recent bug fixes and minor improvements. Ensures users get the latest enhancements.
2024-08-16 17:28:24 +02:00
64bd0883c8 Fix lazy initialization of instances in RegisterInstance
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.
2024-08-16 17:28:24 +02:00
92a3482537 Update package version and add description
Bumped version from 0.0.9 to 0.0.10. Added a meaningful description for the package to clarify its purpose as a dependency injection system for TypeScript, improving documentation.
2024-08-16 16:14:11 +02:00
41be08e02e Refactor DI container for better structure and clarity
- Moved `TSinjex` class to `classes` directory for better organization.
- Updated imports across the codebase to reflect the new location of `TSinjex`.
- Introduced `Identifier` type to standardize dependency identifiers.
- Enhanced JSDoc comments for improved clarity and consistency.
- Adjusted error messages for `DependencyResolutionError` to provide clearer information.
- Updated and expanded decorator and function types to use `Identifier` type.
2024-08-16 16:14:11 +02:00
5277f93df1 Disable console errors and enhance docs generation
Updated ESLint rules to turn off 'no-console' to allow console statements. Streamlined the GitHub Actions workflow to combine test coverage and TypeDoc generation into a single script for more efficient documentation deployment. Enhanced README with simplified test coverage badges. Added new npm scripts to automate documentation fixes, including a script to correct escaping issues in HTML files. Improved documentation generation, ensuring comprehensive and accurate project documentation.
2024-08-16 16:10:14 +02:00
fc40d7fa83 Update coverage URL to relative path
Changed the coverage URL from an absolute web link to a relative file path to ensure compatibility with local file system references. This facilitates easier navigation and access to the coverage reports in different environments.
2024-08-16 12:11:26 +02:00
7258f3813f Update test script in DeployTypeDoc workflow
Modified the GitHub Actions DeployTypeDoc workflow to run `npm run test:coverage` instead of `npm run test:verbose`. This change switches from verbose test output to generating test coverage, aiming to improve code quality insights during deployment.
2024-08-16 12:04:47 +02:00
4a1229b344 Add test coverage config and badges
Configured Jest for improved test coverage reporting and threshold enforcement. Updated README with project time and test coverage badges. Added scripts to fix coverage report paths and generate badges. Updated dependencies to include necessary tools for coverage reporting. Bumped package version to 0.0.9.
2024-08-16 12:02:39 +02:00
187b39e7c5 Add GitHub Actions workflow for TypeDoc deployment
Introduced a new GitHub Actions workflow to automate the deployment of documentation using TypeDoc and test coverage to GitHub Pages. The workflow triggers on pushes to the main branch or manually. Steps include checking out the repository, setting up Node.js, installing dependencies, running tests, generating TypeDoc documentation, and deploying the output to the gh-pages branch.
2024-08-16 11:40:24 +02:00
b9a75a36f5 Add Typedoc support and improve documentation
Upgraded the package version to 0.0.9. Introduced Typedoc for generating documentation with added script in package.json. Enhanced exception handling by introducing `DependencyResolutionError`. Refined TSinjex comments and README structure for better readability. Updated index file exports for better module organization.
2024-08-15 17:57:07 +02:00
f0d1db6fa1 Upgrade package versions and update ESLint config
Upgraded the project version to 0.0.8. Updated various dev dependencies, specifically @typescript-eslint packages and eslint-plugin-jsdoc, to their latest versions. Replaced @typescript-eslint/eslint-plugin with @stylistic/eslint-plugin to ensure compatibility and improved linting. These changes enhance code quality and tool efficiency.
2024-08-15 00:08:52 +02:00
de2cca1742 Bump version to 0.0.7, export additional types
Updated package version to 0.0.7 to reflect new changes. Added export statements for `InitDelegate` and `GenericConstructor` types, enhancing type availability for package users.
2024-08-14 23:20:44 +02:00
771b810419 Rename TSInjex to TSinjex and Add Jest Setup in README
Renamed all instances of 'TSInjex' to 'TSinjex' for consistency across the codebase, including interfaces, classes, and test files. Updated the version in `package.json` from 0.0.5 to 0.0.6. Added Jest setup example to the `README.md` to guide developers on initial configuration for testing.
2024-08-14 23:10:44 +02:00
ad4a8fd8c6 Include additional files in release and mark as prerelease
Added `src` folder and `tsconfig.json` to the release preparation to ensure all necessary files are included. Uncommented the deletion of the temporary branch to streamline the workflow. Set releases to be marked as prereleases automatically. Updated version in `package.json` to 0.0.5 and included a `files` field to specify which files to include in the package.
2024-08-14 22:34:15 +02:00
de45d8e791 Update import path and version number
Changed the relative import path in `register.ts` for better module resolution and incremented the package version to 0.0.4 to reflect the updated changes.
2024-08-14 22:29:37 +02:00
f56df7eb29 Comment out temporary branch deletion in workflow
### Details
Disabled the step for deleting the temporary branch in the release workflow by commenting out the relevant lines. This adjustment prevents potential issues caused by branch deletion during the release process and ensures the stability of the workflow until a more robust solution is implemented.
2024-08-14 21:50:12 +02:00
8937d5f307 Configure Git user in release workflow
Added steps to set the Git user name and email in the release workflow. This ensures that commits made by the workflow are correctly attributed to GitHub Actions, preventing potential issues with commit authorship.
2024-08-14 21:48:13 +02:00
27ed151589 Improve CreateRelease workflow cleanup
Updated the GitHub Actions CreateRelease workflow to use `git reset` instead of `git rm -rf`, ensuring the `.gitignore` file is removed. Simplifies the preparation of files for release and prevents the removal of unexpected files.
2024-08-14 21:46:58 +02:00
1606c9b6dd Refine create_temp_branch logic in release workflow
Switched `git reset --hard` to `git rm -rf .` followed by a target-specific `git reset` in the release workflow. This change ensures only the necessary files (README.md, package.json, LICENSE, dist/**) are retained for the temp release branch, improving the accuracy of release preparation.
2024-08-14 21:43:38 +02:00
3c308635dd Standardize file naming and improve typings export
Renamed functions files to follow consistent camelCase convention. Added a missing type export for ITSInjex interface in the main index file, enabling better TypeScript type support and ensuring interfaces are available for external modules.
2024-08-14 21:39:59 +02:00
c1a4dc7bd0 Rename Jest config to .cjs and update .eslintignore
Renamed `jest.config.js` to `jest.config.cjs` for compatibility with CommonJS modules. Updated `.eslintignore` to exclude `.cjs` files to prevent linting issues.
2024-08-14 21:26:39 +02:00
bc9376bce7 Remove redundant postinstall npm script
Simplified the npm scripts by removing the unnecessary "postinstall" script which was triggering the TypeScript build. This step was redundant since the build process is already handled separately.
2024-08-14 21:23:20 +02:00
f7dc771e0a Automate release workflow, bump version to 0.0.3
Added the creation of a temporary branch to stage release files before tagging, ensuring a clean release environment. Adjusted the tag creation process and included steps to delete the temporary branch post-tagging. Updated `package.json` to version 0.0.3 and set module type for better compatibility.
2024-08-14 21:22:06 +02:00