refactor: 2024 updates and Node20 support #538
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR updates this Action to include all of the recent changes in the actions/typescript-action template repository, such as Linting, Packages, Workflows, moving to Node20, etc. The goal is to get things updated to 2024 standards in hopes of enabling other open-source developers to more easily contribute. 😇
In addition to this, some of the code was refactored to better support more of the API and address Issues #536, #537. I also added real test cases for the parsing function of this Action - I'm not familiar enough with
jest
and mocking HTTP calls, so I didn't expand on the tests cases too much.The
README
has also been cleaned up a bit with proper inputs and explanations.I understand there are a lot of changes in this PR, but this repo has been behind for a few years now so there was a lot of updates since then. I have confirmed these changes work in my organization and confirmed that there are no changes needed by the users consuming the Action. The only change is that the Action will FAIL if an invalid Metric/Event comes up or if we do not get a
202
back from Dynatrace - this is so things are clear to the user and they can take action to correct it.check-dist.yaml
This will ensure the
dist/
directory is updated as part of any PR or commit intomain
. This was from the template.linter.yaml
Will run super-linter against the entire repo to ensure consistency. This was from the template.
ci.yaml
Will ensure that tests and linting passes on the TypeScript code. This was part of the template.
codeql.yaml
Will run CodeQL against the TypeScript codebase to check for any vulnerabilities. This was part of the template.
release.yaml
This is a small utility workflow that will let you create versioned released like
v1.2.3
and have the tagsv1.2
andv1
updated with them. Create avX.Y.Z
tag and this workflow will kick off - you can easily do this via the Releases page. I wanted to keep things simple so you can more easily manage this going forward.