Compare commits
9 Commits
feature/es
...
dependabot
Author | SHA1 | Date | |
---|---|---|---|
![]() |
be88170be4 | ||
2942e15fcf | |||
1d94b33542 | |||
08d58b2d41 | |||
19f7be1e3d | |||
![]() |
a490ea980a | ||
![]() |
d69eacf9be | ||
099c8dbfa3 | |||
6e6a521c1f |
36
.github/workflows/CreateRelease.yml
vendored
36
.github/workflows/CreateRelease.yml
vendored
@@ -4,6 +4,7 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
- 'dev/*'
|
||||||
paths:
|
paths:
|
||||||
- 'package.json'
|
- 'package.json'
|
||||||
workflow_dispatch: # Allows manual execution of the workflow.
|
workflow_dispatch: # Allows manual execution of the workflow.
|
||||||
@@ -22,14 +23,8 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version: '20.8.0'
|
node-version: '20.8.0'
|
||||||
|
|
||||||
- name: Install Dependencies
|
- name: Install dependencies, run tests and build
|
||||||
run: npm install
|
run: npm run prepare:deploy
|
||||||
|
|
||||||
- name: Run Tests
|
|
||||||
run: npm run test:verbose
|
|
||||||
|
|
||||||
- name: Build the Project
|
|
||||||
run: npm run build:tsc
|
|
||||||
|
|
||||||
- name: Get the version
|
- name: Get the version
|
||||||
id: get_version
|
id: get_version
|
||||||
@@ -77,8 +72,9 @@ jobs:
|
|||||||
echo "Generating release notes from ${{ env.PREVIOUS_TAG }} to HEAD..."
|
echo "Generating release notes from ${{ env.PREVIOUS_TAG }} to HEAD..."
|
||||||
repo_url=$(git config --get remote.origin.url)
|
repo_url=$(git config --get remote.origin.url)
|
||||||
notes=$(git log ${{ env.PREVIOUS_TAG }}..HEAD --pretty=format:"- [\`%h\`]($repo_url/commit/%H): %s%n")
|
notes=$(git log ${{ env.PREVIOUS_TAG }}..HEAD --pretty=format:"- [\`%h\`]($repo_url/commit/%H): %s%n")
|
||||||
echo "Release notes:"
|
echo "See [CHANGELOG.md](./CHANGELOG.md) for more details."
|
||||||
echo "$notes"
|
echo "$notes"
|
||||||
|
echo ""
|
||||||
echo "### Changes in this release" > release_notes.md
|
echo "### Changes in this release" > release_notes.md
|
||||||
echo "$notes" >> release_notes.md
|
echo "$notes" >> release_notes.md
|
||||||
shell: bash
|
shell: bash
|
||||||
@@ -90,17 +86,6 @@ jobs:
|
|||||||
git config --local user.email "actions@github.com"
|
git config --local user.email "actions@github.com"
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
# - name: Create temporary branch
|
|
||||||
# id: create_temp_branch
|
|
||||||
# if: steps.check_version.outputs.skip_release == 'false'
|
|
||||||
# run: |
|
|
||||||
# git checkout --orphan release/v${{ env.VERSION }}
|
|
||||||
# git reset
|
|
||||||
# rm -f .gitignore
|
|
||||||
# git add README.md package.json LICENSE dist/ src/ tsconfig.json
|
|
||||||
# git commit -m "Prepare files for release ${{ env.VERSION }}"
|
|
||||||
# shell: bash
|
|
||||||
|
|
||||||
- name: Create and push tag
|
- name: Create and push tag
|
||||||
id: create_tag
|
id: create_tag
|
||||||
if: steps.check_version.outputs.skip_release == 'false'
|
if: steps.check_version.outputs.skip_release == 'false'
|
||||||
@@ -111,6 +96,15 @@ jobs:
|
|||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
|
- name: Set Release Prerelease Flag
|
||||||
|
id: set_prerelease_flag
|
||||||
|
run: |
|
||||||
|
if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
|
||||||
|
echo "PRE_RELEASE=false" >> $GITHUB_ENV
|
||||||
|
elif [[ "${{ github.ref }}" == refs/heads/dev/* ]]; then
|
||||||
|
echo "PRE_RELEASE=true" >> $GITHUB_ENV
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Release
|
- name: Release
|
||||||
if: steps.check_version.outputs.skip_release == 'false'
|
if: steps.check_version.outputs.skip_release == 'false'
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
@@ -118,6 +112,6 @@ jobs:
|
|||||||
tag_name: ${{ env.VERSION }}
|
tag_name: ${{ env.VERSION }}
|
||||||
name: Release ${{ env.VERSION }}
|
name: Release ${{ env.VERSION }}
|
||||||
body_path: release_notes.md
|
body_path: release_notes.md
|
||||||
prerelease: true
|
prerelease: ${{ env.PRE_RELEASE }}
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
2
.github/workflows/ValidateBranchName.yml
vendored
2
.github/workflows/ValidateBranchName.yml
vendored
@@ -3,7 +3,7 @@ name: Validate Branch Name on Pull Request
|
|||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- UNDEFINED
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
validate-branch-name-on-pull-request:
|
validate-branch-name-on-pull-request:
|
||||||
|
@@ -9,8 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- feat: Add a full description of `Identifiers` as JSDoc comment.
|
- Add pre release building to release workflow on dev/* branches an version changes.
|
||||||
This establishes the definition of what an `Identifiers` is.
|
|
||||||
|
|
||||||
|
|
||||||
### Deprecated
|
### Deprecated
|
||||||
|
20
package-lock.json
generated
20
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "ts-injex",
|
"name": "ts-injex",
|
||||||
"version": "0.0.9",
|
"version": "0.1.0",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "ts-injex",
|
"name": "ts-injex",
|
||||||
"version": "0.0.9",
|
"version": "0.1.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"eslint-plugin-prettier": "^5.2.1",
|
"eslint-plugin-prettier": "^5.2.1",
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
"axios": "^1.7.2",
|
"axios": "^1.7.2",
|
||||||
"eslint-plugin-deprecation": "^3.0.0",
|
"eslint-plugin-deprecation": "^3.0.0",
|
||||||
"eslint-plugin-import": "^2.29.1",
|
"eslint-plugin-import": "^2.29.1",
|
||||||
"eslint-plugin-jsdoc": "^50.2.2",
|
"eslint-plugin-jsdoc": "^50.4.3",
|
||||||
"eslint-plugin-override": "https://github.com/PxaMMaxP/eslint-plugin-override",
|
"eslint-plugin-override": "https://github.com/PxaMMaxP/eslint-plugin-override",
|
||||||
"istanbul-badges-readme": "^1.9.0",
|
"istanbul-badges-readme": "^1.9.0",
|
||||||
"jest": "^29.7.0",
|
"jest": "^29.7.0",
|
||||||
@@ -612,9 +612,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@es-joy/jsdoccomment": {
|
"node_modules/@es-joy/jsdoccomment": {
|
||||||
"version": "0.48.0",
|
"version": "0.49.0",
|
||||||
"resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.48.0.tgz",
|
"resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.49.0.tgz",
|
||||||
"integrity": "sha512-G6QUWIcC+KvSwXNsJyDTHvqUdNoAVJPPgkc3+Uk4WBKqZvoXhlvazOgm9aL0HwihJLQf0l+tOE2UFzXBqCqgDw==",
|
"integrity": "sha512-xjZTSFgECpb9Ohuk5yMX5RhUEbfeQcuOp8IF60e+wyzWEF0M5xeSgqsfLtvPEX8BIyOX9saZqzuGPmZ8oWc+5Q==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"comment-parser": "1.4.1",
|
"comment-parser": "1.4.1",
|
||||||
@@ -3218,12 +3218,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/eslint-plugin-jsdoc": {
|
"node_modules/eslint-plugin-jsdoc": {
|
||||||
"version": "50.2.2",
|
"version": "50.4.3",
|
||||||
"resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-50.2.2.tgz",
|
"resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-50.4.3.tgz",
|
||||||
"integrity": "sha512-i0ZMWA199DG7sjxlzXn5AeYZxpRfMJjDPUl7lL9eJJX8TPRoIaxJU4ys/joP5faM5AXE1eqW/dslCj3uj4Nqpg==",
|
"integrity": "sha512-uWtwFxGRv6B8sU63HZM5dAGDhgsatb+LONwmILZJhdRALLOkCX2HFZhdL/Kw2ls8SQMAVEfK+LmnEfxInRN8HA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@es-joy/jsdoccomment": "~0.48.0",
|
"@es-joy/jsdoccomment": "~0.49.0",
|
||||||
"are-docs-informative": "^0.0.2",
|
"are-docs-informative": "^0.0.2",
|
||||||
"comment-parser": "1.4.1",
|
"comment-parser": "1.4.1",
|
||||||
"debug": "^4.3.6",
|
"debug": "^4.3.6",
|
||||||
|
@@ -22,7 +22,8 @@
|
|||||||
"docs:fix:coverage": "node scripts/fix-coverage-paths.cjs",
|
"docs:fix:coverage": "node scripts/fix-coverage-paths.cjs",
|
||||||
"docs:generate:badge": "node scripts/generate-badge.cjs",
|
"docs:generate:badge": "node scripts/generate-badge.cjs",
|
||||||
"docs:fix:escape": "node scripts/replace-doc-escaping.cjs",
|
"docs:fix:escape": "node scripts/replace-doc-escaping.cjs",
|
||||||
"version:show": "node -e \"console.log(require('./package.json').version)\""
|
"version:show": "node -e \"console.log(require('./package.json').version)\"",
|
||||||
|
"prepare:deploy": "npm install && npm run test:verbose && npm run build:tsc"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@@ -40,7 +41,7 @@
|
|||||||
"@typescript-eslint/parser": "^8.1.0",
|
"@typescript-eslint/parser": "^8.1.0",
|
||||||
"eslint-plugin-deprecation": "^3.0.0",
|
"eslint-plugin-deprecation": "^3.0.0",
|
||||||
"eslint-plugin-import": "^2.29.1",
|
"eslint-plugin-import": "^2.29.1",
|
||||||
"eslint-plugin-jsdoc": "^50.2.2",
|
"eslint-plugin-jsdoc": "^50.4.3",
|
||||||
"eslint-plugin-override": "https://github.com/PxaMMaxP/eslint-plugin-override",
|
"eslint-plugin-override": "https://github.com/PxaMMaxP/eslint-plugin-override",
|
||||||
"jest": "^29.7.0",
|
"jest": "^29.7.0",
|
||||||
"ts-jest": "^29.2.3",
|
"ts-jest": "^29.2.3",
|
||||||
|
@@ -1,35 +1,11 @@
|
|||||||
/**
|
/**
|
||||||
* ## The dependency identifier
|
* The dependency identifier.
|
||||||
*
|
* You can use any string as identifier.
|
||||||
* You can use any string or Symbol as identifier. The identifier is used to
|
* To create order, it is also possible to
|
||||||
* register a class in the TSinjex DI (Dependency Injection) container.
|
* provide these with a separator: `GroupA.ClassZ`.
|
||||||
* See **Hierarchical identifiers** for more information on `.` in identifiers.
|
* The convection for naming is as follows:
|
||||||
*
|
* The name should generally correspond to the interface that is relevant.
|
||||||
* ### Hierarchical identifiers
|
* I.e. a class `ClassA` that implements the interface `IClassA` and is
|
||||||
* To create hierarchical identifiers, you can use a dot `.` as a separator.
|
* registered as a dependent class is registered under the interface name `IClassA`.
|
||||||
* E.g. `Parent.Child` or `Parent.Child.Grandchild`.
|
|
||||||
*
|
|
||||||
* ### Merge functionality
|
|
||||||
* You can merge multiple dependencies into one by resolving them with
|
|
||||||
* a identifier that is a prefix of the actual identifiers.
|
|
||||||
* E.g. `Parent` resolves `Parent.*` and returns a mixin of all children.
|
|
||||||
* Merging will only work, if the main identifier is not registered.
|
|
||||||
* Grandchildren are not included in the mixin but you can use something like
|
|
||||||
* `Parent.Child.Grandchild` to merge all direct children of Grandchild,
|
|
||||||
* e.g. `Parent.Child.Grandchild.*`.
|
|
||||||
* If you don't want to allow merging, you must register the dependencies
|
|
||||||
* with the full identifier. E.g. `Parent` or `Parent.Child.Grandchild`.
|
|
||||||
*
|
|
||||||
* ### Naming convention
|
|
||||||
* The name of a dependency should generally correspond to the interface that is implemented.
|
|
||||||
* E.g. a class `ClassA` that implements the interface `IClassA` and is registered
|
|
||||||
* as a dependent class is registered under the interface name `IClassA`.
|
|
||||||
*
|
|
||||||
* The mixin parts of the class are registered under the interface name `IClassA.*`.
|
|
||||||
* E.g. `IClassA.IClassZ`, `IClassA.IClassY`, etc.
|
|
||||||
*
|
|
||||||
* #### Static/Constructor Identifier naming
|
|
||||||
* The identifier for a static or constructor dependency should be the same as the class name
|
|
||||||
* postfixed with `_`. E.g. `IClassA_` for the the static or constructor interface of class `IClassA`.
|
|
||||||
*/
|
*/
|
||||||
export type Identifier = string | symbol;
|
export type Identifier = string | symbol;
|
||||||
|
Reference in New Issue
Block a user