mirror of
https://github.com/jimeh/update-tags-action.git
synced 2026-02-19 09:36:41 +00:00
Compare commits
35 Commits
copilot/ad
...
e33b26678f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e33b26678f | ||
| ce60e958b3 | |||
|
|
441aa939fd | ||
| af088380e8 | |||
|
|
d2bac049db | ||
| b18dece8b1 | |||
| 5f14685d44 | |||
| 605c1cfa34 | |||
| bd3bacec30 | |||
| 389bd20c41 | |||
| 38ccbb6879 | |||
| 9016fb217e | |||
|
|
ca138ceed8 | ||
|
|
eecd8caae9 | ||
| 6723e4d4ac | |||
| 92bdad7a4a | |||
| 1576a544fe | |||
| 2b1c01b3ed | |||
| 73e6309596 | |||
|
|
08138ee77f | ||
| c2d45bd3ef | |||
|
|
f44ca97378 | ||
| 1041193aa6 | |||
| 4db4cf0ae7 | |||
| 78da350f05 | |||
| c0954ab20f | |||
| f690607ffe | |||
| 20206210a0 | |||
| c1b031da4b | |||
| 40c0c24c34 | |||
| 2cb31b2a0a | |||
| 5a403d344e | |||
| 99a7d3ae1f | |||
| bdda9e7570 | |||
| ba01e004ad |
2
.github/.release-please-manifest.json
vendored
2
.github/.release-please-manifest.json
vendored
@@ -1,3 +1,3 @@
|
||||
{
|
||||
".": "2.0.0"
|
||||
".": "2.2.0"
|
||||
}
|
||||
|
||||
2
.github/dependabot.yml
vendored
2
.github/dependabot.yml
vendored
@@ -8,6 +8,7 @@ updates:
|
||||
groups:
|
||||
actions-minor:
|
||||
update-types:
|
||||
- major
|
||||
- minor
|
||||
- patch
|
||||
- package-ecosystem: npm
|
||||
@@ -23,4 +24,5 @@ updates:
|
||||
npm-production:
|
||||
dependency-type: production
|
||||
update-types:
|
||||
- minor
|
||||
- patch
|
||||
|
||||
19
.github/release-please-config.json
vendored
19
.github/release-please-config.json
vendored
@@ -1,15 +1,30 @@
|
||||
{
|
||||
"always-update": true,
|
||||
"packages": {
|
||||
".": {
|
||||
"release-type": "simple",
|
||||
"release-type": "node",
|
||||
"changelog-path": "CHANGELOG.md",
|
||||
"extra-files": ["README.md"],
|
||||
"bump-minor-pre-major": true,
|
||||
"bump-patch-for-minor-pre-major": true,
|
||||
"draft": false,
|
||||
"prerelease": false,
|
||||
"initial-version": "0.0.1"
|
||||
"include-component-in-tag": false
|
||||
}
|
||||
},
|
||||
"changelog-sections": [
|
||||
{ "type": "feat", "section": "Features" },
|
||||
{ "type": "feature", "section": "Features" },
|
||||
{ "type": "fix", "section": "Bug Fixes" },
|
||||
{ "type": "perf", "section": "Performance Improvements" },
|
||||
{ "type": "revert", "section": "Reverts" },
|
||||
{ "type": "docs", "section": "Documentation", "hidden": false },
|
||||
{ "type": "style", "section": "Styles", "hidden": true },
|
||||
{ "type": "chore", "section": "Miscellaneous Chores", "hidden": true },
|
||||
{ "type": "refactor", "section": "Code Refactoring", "hidden": true },
|
||||
{ "type": "test", "section": "Tests", "hidden": true },
|
||||
{ "type": "build", "section": "Build System", "hidden": true },
|
||||
{ "type": "ci", "section": "Continuous Integration", "hidden": true }
|
||||
],
|
||||
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
|
||||
}
|
||||
|
||||
5
.github/workflows/ci.yml
vendored
5
.github/workflows/ci.yml
vendored
@@ -77,7 +77,6 @@ jobs:
|
||||
release-please:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.ref == 'refs/heads/main' }}
|
||||
needs: [check-dist]
|
||||
outputs:
|
||||
release_created: ${{ steps.release-please.outputs.release_created }}
|
||||
major: ${{ steps.release-please.outputs.major }}
|
||||
@@ -91,12 +90,12 @@ jobs:
|
||||
|
||||
release-tags:
|
||||
runs-on: ubuntu-latest
|
||||
needs: release-please
|
||||
needs: [release-please, check-dist, lint, test]
|
||||
if: ${{ needs.release-please.outputs.release_created }}
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- uses: jimeh/update-tags-action@e58fa0f2f874a12bf0eb90ef8ab4256808c0f373 # v1.0.1
|
||||
- uses: jimeh/update-tags-action@eecd8caae9a536ed536cff9b2b7f0bd187f67c13 # v2.2.0
|
||||
with:
|
||||
tags: |
|
||||
v${{ needs.release-please.outputs.major }}
|
||||
|
||||
27
.github/workflows/copilot-setup-steps.yml
vendored
Normal file
27
.github/workflows/copilot-setup-steps.yml
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
name: "Copilot Setup Steps"
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
paths:
|
||||
- .github/workflows/copilot-setup-steps.yml
|
||||
pull_request:
|
||||
paths:
|
||||
- .github/workflows/copilot-setup-steps.yml
|
||||
|
||||
jobs:
|
||||
copilot-setup-steps:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
|
||||
with:
|
||||
node-version-file: .node-version
|
||||
cache: npm
|
||||
- run: npm ci
|
||||
- uses: ruby/setup-ruby@d5126b9b3579e429dd52e51e68624dda2e05be25 # v1.267.0
|
||||
with:
|
||||
ruby-version: ruby
|
||||
bundler-cache: true
|
||||
42
.github/workflows/dependabot-rebuild.yml
vendored
Normal file
42
.github/workflows/dependabot-rebuild.yml
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
---
|
||||
name: Dependabot Rebuild
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize]
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: read
|
||||
|
||||
jobs:
|
||||
rebuild-dist:
|
||||
runs-on: ubuntu-latest
|
||||
if: |-
|
||||
${{ github.actor == 'dependabot[bot]' && github.event.sender.login == 'dependabot[bot]' }}
|
||||
steps:
|
||||
- name: Generate app token
|
||||
id: app-token
|
||||
uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4
|
||||
with:
|
||||
app-id: ${{ secrets.BOT_APP_ID }}
|
||||
private-key: ${{ secrets.BOT_PRIVATE_KEY }}
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
token: ${{ steps.app-token.outputs.token }}
|
||||
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
|
||||
with:
|
||||
node-version-file: .node-version
|
||||
cache: npm
|
||||
- run: npm ci
|
||||
- name: Rebuild dist
|
||||
run: npm run bundle
|
||||
- name: Commit and push if changed
|
||||
uses: ryancyq/github-signed-commit@e9f3b28c80da7be66d24b8f501a5abe82a6b855f # v1.2.0
|
||||
env:
|
||||
GH_TOKEN: ${{ steps.app-token.outputs.token }}
|
||||
with:
|
||||
files: |
|
||||
dist/
|
||||
commit-message: |-
|
||||
chore: rebuild dist
|
||||
2
.github/workflows/licensed.yml
vendored
2
.github/workflows/licensed.yml
vendored
@@ -26,7 +26,7 @@ jobs:
|
||||
node-version-file: .node-version
|
||||
cache: npm
|
||||
- run: npm ci
|
||||
- uses: ruby/setup-ruby@d5126b9b3579e429dd52e51e68624dda2e05be25 # v1.267.0 # v1.266.0
|
||||
- uses: ruby/setup-ruby@d5126b9b3579e429dd52e51e68624dda2e05be25 # v1.267.0
|
||||
with:
|
||||
ruby-version: ruby
|
||||
bundler-cache: true
|
||||
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -98,7 +98,7 @@ typings/
|
||||
Thumbs.db
|
||||
|
||||
# Ignore built ts files
|
||||
__tests__/runner/*
|
||||
tests/runner/*
|
||||
|
||||
# IDE files
|
||||
.idea
|
||||
|
||||
@@ -3,3 +3,4 @@
|
||||
dist/
|
||||
node_modules/
|
||||
coverage/
|
||||
CHANGELOG.md
|
||||
|
||||
9
.vscode/settings.shared.json
vendored
9
.vscode/settings.shared.json
vendored
@@ -1,5 +1,14 @@
|
||||
{
|
||||
"[javascript]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"[typescript]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"[json]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"[jsonc]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ npm run package # Build src/index.ts -> dist/index.js via Rollup
|
||||
npm run bundle # Alias: format + package
|
||||
|
||||
# Run a single test file
|
||||
NODE_OPTIONS=--experimental-vm-modules NODE_NO_WARNINGS=1 npx jest __tests__/main.test.ts
|
||||
NODE_OPTIONS=--experimental-vm-modules NODE_NO_WARNINGS=1 npx jest tests/main.test.ts
|
||||
|
||||
# CI variants (suppress warnings)
|
||||
npm run ci-test # Run tests in CI mode
|
||||
@@ -65,7 +65,7 @@ npm run package:watch # Auto-rebuild on changes
|
||||
- `processTag()`: Creates/updates individual tags based on `when_exists` mode
|
||||
- `resolveRefToSha()`: Converts git refs to commit SHAs (private helper)
|
||||
- **[action.yml](action.yml)**: GitHub Action metadata (inputs/outputs)
|
||||
- **[\_\_fixtures\_\_/](__fixtures__)**: Mock implementations of @actions/core,
|
||||
- **[tests/fixtures/](tests/fixtures)**: Mock implementations of @actions/core,
|
||||
@actions/github, and csv-parse for testing
|
||||
|
||||
### Tag Input Parsing
|
||||
@@ -97,12 +97,12 @@ jest.unstable_mockModule('@actions/core', () => core)
|
||||
const { run } = await import('../src/main.ts')
|
||||
```
|
||||
|
||||
Mock fixtures live in `__fixtures__/` (e.g., `core.ts` mocks @actions/core).
|
||||
Mock fixtures live in `tests/fixtures/` (e.g., `core.ts` mocks @actions/core).
|
||||
|
||||
### Testing Best Practices
|
||||
|
||||
- Consider edge cases as well as the main success path
|
||||
- Tests live in `__tests__/` directory, fixtures in `__fixtures__/`
|
||||
- Tests live in `tests/` directory, fixtures in `tests/fixtures/`
|
||||
- Run tests after any refactoring to ensure coverage requirements are met
|
||||
- Use `@actions/core` package for logging (not `console`) for GitHub Actions
|
||||
compatibility
|
||||
|
||||
35
CHANGELOG.md
35
CHANGELOG.md
@@ -1,5 +1,31 @@
|
||||
# Changelog
|
||||
|
||||
## [2.2.0](https://github.com/jimeh/update-tags-action/compare/v2.1.1...v2.2.0) (2025-10-29)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **action:** add skipped tags output and tracking ([#33](https://github.com/jimeh/update-tags-action/issues/33)) ([6723e4d](https://github.com/jimeh/update-tags-action/commit/6723e4d4aceb3ba7314907830d8b1d5186f0a5d9))
|
||||
|
||||
## [2.1.1](https://github.com/jimeh/update-tags-action/compare/v2.1.0...v2.1.1) (2025-10-28)
|
||||
|
||||
|
||||
### Documentation
|
||||
|
||||
* **readme:** fix outdated action inputs/outputs ([#26](https://github.com/jimeh/update-tags-action/issues/26)) ([c2d45bd](https://github.com/jimeh/update-tags-action/commit/c2d45bd3eff96a93679cc5dbac166c5a14400751))
|
||||
|
||||
## [2.1.0](https://github.com/jimeh/update-tags-action/compare/v2.0.0...v2.1.0) (2025-10-28)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **tag:** add support for annotated tags and improved tag handling ([40c0c24](https://github.com/jimeh/update-tags-action/commit/40c0c24c3478fe96765282b3f82b7f72696f0e92)), closes [#7](https://github.com/jimeh/update-tags-action/issues/7)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **when_exists:** fail-fast if tags exist if `when_exists` is `fail` ([40c0c24](https://github.com/jimeh/update-tags-action/commit/40c0c24c3478fe96765282b3f82b7f72696f0e92))
|
||||
|
||||
## [2.0.0](https://github.com/jimeh/update-tags-action/compare/v1.0.1...v2.0.0) (2025-10-27)
|
||||
|
||||
|
||||
@@ -9,22 +35,25 @@
|
||||
|
||||
## [1.0.1](https://github.com/jimeh/update-tags-action/compare/v1.0.0...v1.0.1) (2023-05-18)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **action:** tweak metadata for GitHub Marketplace
|
||||
* **action:** tweak metadata for GitHub Marketplace
|
||||
([#4](https://github.com/jimeh/update-tags-action/issues/4))
|
||||
([b74b3c7](https://github.com/jimeh/update-tags-action/commit/b74b3c77fc20bdfd61e29dbf680a9f84612e5fda))
|
||||
|
||||
## [1.0.0](https://github.com/jimeh/update-tags-action/compare/v0.0.1...v1.0.0) (2023-05-18)
|
||||
|
||||
|
||||
### Miscellaneous Chores
|
||||
|
||||
- **release:** bump version to 1.0.0
|
||||
* **release:** bump version to 1.0.0
|
||||
([d4f686e](https://github.com/jimeh/update-tags-action/commit/d4f686ef9ff51ff4426907f89983bd286903c23e))
|
||||
|
||||
## 0.0.1 (2023-05-18)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
- initial implementation
|
||||
* initial implementation
|
||||
([0185b10](https://github.com/jimeh/update-tags-action/commit/0185b100ff1752ce06ade4b147b6befb8c37e525))
|
||||
|
||||
48
README.md
48
README.md
@@ -22,20 +22,20 @@ to move its own major and minor tags.
|
||||
|
||||
### Basic
|
||||
|
||||
<!-- x-release-please-start-major -->
|
||||
<!-- x-release-please-start-minor -->
|
||||
|
||||
```yaml
|
||||
- uses: jimeh/update-tags-action@v2
|
||||
with:
|
||||
tags: v1,v1.2
|
||||
tags: v2,v2.2
|
||||
```
|
||||
|
||||
```yaml
|
||||
- uses: jimeh/update-tags-action@v2
|
||||
with:
|
||||
tags: |
|
||||
v1
|
||||
v1.2
|
||||
v2
|
||||
v2.2
|
||||
```
|
||||
|
||||
<!-- x-release-please-end -->
|
||||
@@ -100,30 +100,38 @@ jobs:
|
||||
|
||||
<!-- x-release-please-end -->
|
||||
|
||||
<!-- action-docs-inputs -->
|
||||
<!-- action-docs-inputs source="action.yml" -->
|
||||
|
||||
## Inputs
|
||||
|
||||
| parameter | description | required | default |
|
||||
| ------------ | --------------------------------------------------------------------------------- | -------- | ------------------- |
|
||||
| tags | List/CSV of tags to create/update. | `true` | |
|
||||
| ref | The SHA or ref to tag. Defaults to SHA of current commit. | `false` | ${{ github.sha }} |
|
||||
| when_exists | What to do if the tag already exists. Must be one of 'update', 'skip', or 'fail'. | `false` | update |
|
||||
| github_token | The GitHub token to use for authentication. | `false` | ${{ github.token }} |
|
||||
| name | description | required | default |
|
||||
| -------------- | --------------------------------------------------------------------------------------------------------------------- | -------- | --------------------- |
|
||||
| `tags` | <p>List/CSV of tags to create/update.</p> | `true` | `""` |
|
||||
| `ref` | <p>The SHA or ref to tag. Defaults to SHA of current commit.</p> | `false` | `${{ github.sha }}` |
|
||||
| `when_exists` | <p>What to do if the tag already exists. Must be one of 'update', 'skip', or 'fail'.</p> | `false` | `update` |
|
||||
| `annotation` | <p>Optional annotation message for tags. If provided, creates annotated tags. If empty, creates lightweight tags.</p> | `false` | `""` |
|
||||
| `github_token` | <p>The GitHub token to use for authentication.</p> | `false` | `${{ github.token }}` |
|
||||
|
||||
<!-- action-docs-inputs -->
|
||||
|
||||
<!-- action-docs-outputs -->
|
||||
<!-- action-docs-inputs source="action.yml" -->
|
||||
<!-- action-docs-outputs source="action.yml" -->
|
||||
|
||||
## Outputs
|
||||
|
||||
| parameter | description |
|
||||
| --------- | --------------------------------------- |
|
||||
| tags | List of tags that were created/updated. |
|
||||
| created | List of tags that were created. |
|
||||
| updated | List of tags that were updated. |
|
||||
| name | description |
|
||||
| --------- | ---------------------------------------------- |
|
||||
| `tags` | <p>List of tags that were created/updated.</p> |
|
||||
| `created` | <p>List of tags that were created.</p> |
|
||||
| `updated` | <p>List of tags that were updated.</p> |
|
||||
| `skipped` | <p>List of tags that were skipped.</p> |
|
||||
|
||||
<!-- action-docs-outputs -->
|
||||
<!-- action-docs-outputs source="action.yml" -->
|
||||
<!-- action-docs-runs source="action.yml" -->
|
||||
|
||||
## Runs
|
||||
|
||||
This action is a `node24` action.
|
||||
|
||||
<!-- action-docs-runs source="action.yml" -->
|
||||
|
||||
## License
|
||||
|
||||
|
||||
@@ -1,657 +0,0 @@
|
||||
/**
|
||||
* Unit tests for the action's main functionality, src/main.ts
|
||||
*/
|
||||
import { jest } from '@jest/globals'
|
||||
import * as core from '../__fixtures__/core.js'
|
||||
import * as github from '../__fixtures__/github.js'
|
||||
import * as csvParse from '../__fixtures__/csv-parse.js'
|
||||
|
||||
// Mocks should be declared before the module being tested is imported.
|
||||
jest.unstable_mockModule('@actions/core', () => core)
|
||||
jest.unstable_mockModule('@actions/github', () => github)
|
||||
jest.unstable_mockModule('csv-parse/sync', () => csvParse)
|
||||
|
||||
// The module being tested should be imported dynamically. This ensures that
|
||||
// the mocks are used in place of any actual dependencies.
|
||||
const { run } = await import('../src/main.js')
|
||||
|
||||
// Helper functions for cleaner test setup
|
||||
const setupInputs = (inputs: Record<string, string>): void => {
|
||||
core.getInput.mockImplementation((name: string) => {
|
||||
return inputs[name] || ''
|
||||
})
|
||||
}
|
||||
|
||||
const setupCommitResolver = (
|
||||
refToSha: Record<string, string> | string
|
||||
): void => {
|
||||
if (typeof refToSha === 'string') {
|
||||
github.mockOctokit.rest.repos.getCommit.mockResolvedValue({
|
||||
data: { sha: refToSha }
|
||||
})
|
||||
} else {
|
||||
github.mockOctokit.rest.repos.getCommit.mockImplementation(
|
||||
async (args: unknown) => {
|
||||
const { ref } = args as { ref: string }
|
||||
const sha = refToSha[ref]
|
||||
if (sha) return { data: { sha } }
|
||||
throw new Error(`Unknown ref: ${ref}`)
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
const setupTagDoesNotExist = (): void => {
|
||||
github.mockOctokit.rest.git.getRef.mockRejectedValue({
|
||||
status: 404
|
||||
})
|
||||
}
|
||||
|
||||
const setupTagExists = (tagName: string, sha: string): void => {
|
||||
github.mockOctokit.rest.git.getRef.mockImplementation(
|
||||
async (args: unknown) => {
|
||||
const { ref } = args as { ref: string }
|
||||
if (ref === `tags/${tagName}`) {
|
||||
return {
|
||||
data: { ref: `refs/tags/${tagName}`, object: { sha } }
|
||||
}
|
||||
}
|
||||
throw { status: 404 }
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
const setupTagExistsForAll = (sha: string): void => {
|
||||
github.mockOctokit.rest.git.getRef.mockResolvedValue({
|
||||
data: { ref: 'refs/tags/v1', object: { sha } }
|
||||
})
|
||||
}
|
||||
|
||||
describe('run', () => {
|
||||
beforeEach(() => {
|
||||
jest.resetAllMocks()
|
||||
// Re-setup mocks after reset
|
||||
github.getOctokit.mockReturnValue(github.mockOctokit)
|
||||
csvParse.resetToRealImplementation()
|
||||
})
|
||||
|
||||
it('creates new tags when they do not exist', async () => {
|
||||
setupInputs({
|
||||
tags: 'v1,v1.0',
|
||||
ref: 'abc123',
|
||||
github_token: 'test-token',
|
||||
when_exists: 'update'
|
||||
})
|
||||
setupCommitResolver('sha-abc123')
|
||||
setupTagDoesNotExist()
|
||||
|
||||
await run()
|
||||
|
||||
expect(github.mockOctokit.rest.git.createRef).toHaveBeenCalledTimes(2)
|
||||
expect(github.mockOctokit.rest.git.createRef).toHaveBeenCalledWith({
|
||||
owner: 'test-owner',
|
||||
repo: 'test-repo',
|
||||
ref: 'refs/tags/v1',
|
||||
sha: 'sha-abc123'
|
||||
})
|
||||
expect(github.mockOctokit.rest.git.createRef).toHaveBeenCalledWith({
|
||||
owner: 'test-owner',
|
||||
repo: 'test-repo',
|
||||
ref: 'refs/tags/v1.0',
|
||||
sha: 'sha-abc123'
|
||||
})
|
||||
|
||||
expect(core.info).toHaveBeenCalledWith(
|
||||
"Tag 'v1' does not exist, creating with SHA sha-abc123."
|
||||
)
|
||||
expect(core.setOutput).toHaveBeenCalledWith('created', ['v1', 'v1.0'])
|
||||
expect(core.setOutput).toHaveBeenCalledWith('updated', [])
|
||||
expect(core.setOutput).toHaveBeenCalledWith('tags', ['v1', 'v1.0'])
|
||||
})
|
||||
|
||||
it('updates existing tags when SHA differs', async () => {
|
||||
setupInputs({
|
||||
tags: 'v1',
|
||||
ref: 'def456',
|
||||
github_token: 'test-token',
|
||||
when_exists: 'update'
|
||||
})
|
||||
setupCommitResolver('sha-def456')
|
||||
setupTagExistsForAll('sha-old123')
|
||||
|
||||
await run()
|
||||
|
||||
expect(github.mockOctokit.rest.git.updateRef).toHaveBeenCalledTimes(1)
|
||||
expect(github.mockOctokit.rest.git.updateRef).toHaveBeenCalledWith({
|
||||
owner: 'test-owner',
|
||||
repo: 'test-repo',
|
||||
ref: 'tags/v1',
|
||||
sha: 'sha-def456',
|
||||
force: true
|
||||
})
|
||||
|
||||
expect(core.info).toHaveBeenCalledWith(
|
||||
"Tag 'v1' exists, updating to SHA sha-def456 (was sha-old123)."
|
||||
)
|
||||
expect(core.setOutput).toHaveBeenCalledWith('created', [])
|
||||
expect(core.setOutput).toHaveBeenCalledWith('updated', ['v1'])
|
||||
expect(core.setOutput).toHaveBeenCalledWith('tags', ['v1'])
|
||||
})
|
||||
|
||||
it('skips updating when tag exists with same SHA', async () => {
|
||||
setupInputs({
|
||||
tags: 'v1',
|
||||
ref: 'abc123',
|
||||
github_token: 'test-token',
|
||||
when_exists: 'update'
|
||||
})
|
||||
setupCommitResolver('sha-abc123')
|
||||
setupTagExistsForAll('sha-abc123')
|
||||
|
||||
await run()
|
||||
|
||||
expect(github.mockOctokit.rest.git.updateRef).not.toHaveBeenCalled()
|
||||
expect(github.mockOctokit.rest.git.createRef).not.toHaveBeenCalled()
|
||||
expect(core.info).toHaveBeenCalledWith(
|
||||
"Tag 'v1' already exists with desired SHA sha-abc123."
|
||||
)
|
||||
expect(core.setOutput).toHaveBeenCalledWith('created', [])
|
||||
expect(core.setOutput).toHaveBeenCalledWith('updated', [])
|
||||
expect(core.setOutput).toHaveBeenCalledWith('tags', [])
|
||||
})
|
||||
|
||||
it('skips tags when when_exists is skip', async () => {
|
||||
setupInputs({
|
||||
tags: 'v1',
|
||||
ref: 'abc123',
|
||||
github_token: 'test-token',
|
||||
when_exists: 'skip'
|
||||
})
|
||||
setupCommitResolver('sha-abc123')
|
||||
setupTagExistsForAll('sha-old123')
|
||||
|
||||
await run()
|
||||
|
||||
expect(github.mockOctokit.rest.git.updateRef).not.toHaveBeenCalled()
|
||||
expect(github.mockOctokit.rest.git.createRef).not.toHaveBeenCalled()
|
||||
expect(core.info).toHaveBeenCalledWith("Tag 'v1' exists, skipping.")
|
||||
expect(core.setOutput).toHaveBeenCalledWith('created', [])
|
||||
expect(core.setOutput).toHaveBeenCalledWith('updated', [])
|
||||
expect(core.setOutput).toHaveBeenCalledWith('tags', [])
|
||||
})
|
||||
|
||||
it('handles per-tag ref overrides', async () => {
|
||||
setupInputs({
|
||||
tags: 'v1:main,v2:develop',
|
||||
ref: '',
|
||||
github_token: 'test-token',
|
||||
when_exists: 'update'
|
||||
})
|
||||
setupCommitResolver({
|
||||
main: 'sha-main',
|
||||
develop: 'sha-develop'
|
||||
})
|
||||
setupTagDoesNotExist()
|
||||
|
||||
await run()
|
||||
|
||||
expect(github.mockOctokit.rest.repos.getCommit).toHaveBeenCalledWith({
|
||||
owner: 'test-owner',
|
||||
repo: 'test-repo',
|
||||
ref: 'main'
|
||||
})
|
||||
expect(github.mockOctokit.rest.repos.getCommit).toHaveBeenCalledWith({
|
||||
owner: 'test-owner',
|
||||
repo: 'test-repo',
|
||||
ref: 'develop'
|
||||
})
|
||||
|
||||
expect(github.mockOctokit.rest.git.createRef).toHaveBeenCalledWith({
|
||||
owner: 'test-owner',
|
||||
repo: 'test-repo',
|
||||
ref: 'refs/tags/v1',
|
||||
sha: 'sha-main'
|
||||
})
|
||||
expect(github.mockOctokit.rest.git.createRef).toHaveBeenCalledWith({
|
||||
owner: 'test-owner',
|
||||
repo: 'test-repo',
|
||||
ref: 'refs/tags/v2',
|
||||
sha: 'sha-develop'
|
||||
})
|
||||
|
||||
expect(core.setOutput).toHaveBeenCalledWith('created', ['v1', 'v2'])
|
||||
})
|
||||
|
||||
it('handles various input formats (newlines and whitespace)', async () => {
|
||||
setupInputs({
|
||||
tags: ' v1 \n v1.0 \n v1.0.1 ',
|
||||
ref: 'abc123',
|
||||
github_token: 'test-token',
|
||||
when_exists: 'update'
|
||||
})
|
||||
setupCommitResolver('sha-abc123')
|
||||
setupTagDoesNotExist()
|
||||
|
||||
await run()
|
||||
|
||||
expect(github.mockOctokit.rest.git.createRef).toHaveBeenCalledTimes(3)
|
||||
expect(core.setOutput).toHaveBeenCalledWith('created', [
|
||||
'v1',
|
||||
'v1.0',
|
||||
'v1.0.1'
|
||||
])
|
||||
})
|
||||
|
||||
it('creates and updates tags in single run', async () => {
|
||||
setupInputs({
|
||||
tags: 'v1,v2',
|
||||
ref: 'abc123',
|
||||
github_token: 'test-token',
|
||||
when_exists: 'update'
|
||||
})
|
||||
setupCommitResolver('sha-abc123')
|
||||
setupTagExists('v1', 'sha-old')
|
||||
|
||||
await run()
|
||||
|
||||
expect(github.mockOctokit.rest.git.updateRef).toHaveBeenCalledTimes(1)
|
||||
expect(github.mockOctokit.rest.git.createRef).toHaveBeenCalledTimes(1)
|
||||
expect(core.setOutput).toHaveBeenCalledWith('created', ['v2'])
|
||||
expect(core.setOutput).toHaveBeenCalledWith('updated', ['v1'])
|
||||
expect(core.setOutput).toHaveBeenCalledWith('tags', ['v2', 'v1'])
|
||||
})
|
||||
|
||||
it('fails when ref is missing', async () => {
|
||||
setupInputs({
|
||||
tags: 'v1',
|
||||
ref: '',
|
||||
github_token: 'test-token',
|
||||
when_exists: 'update'
|
||||
})
|
||||
|
||||
await run()
|
||||
|
||||
expect(core.setFailed).toHaveBeenCalledWith(
|
||||
expect.stringContaining("Missing ref: provide 'ref' input")
|
||||
)
|
||||
})
|
||||
|
||||
it('fails when when_exists is fail and tag exists', async () => {
|
||||
setupInputs({
|
||||
tags: 'v1',
|
||||
ref: 'abc123',
|
||||
github_token: 'test-token',
|
||||
when_exists: 'fail'
|
||||
})
|
||||
setupCommitResolver('sha-abc123')
|
||||
setupTagExistsForAll('sha-old123')
|
||||
|
||||
await run()
|
||||
|
||||
expect(core.setFailed).toHaveBeenCalledWith("Tag 'v1' already exists.")
|
||||
expect(github.mockOctokit.rest.git.updateRef).not.toHaveBeenCalled()
|
||||
expect(github.mockOctokit.rest.git.createRef).not.toHaveBeenCalled()
|
||||
})
|
||||
|
||||
it('fails when when_exists has invalid value', async () => {
|
||||
setupInputs({
|
||||
tags: 'v1',
|
||||
ref: 'abc123',
|
||||
github_token: 'test-token',
|
||||
when_exists: 'invalid'
|
||||
})
|
||||
setupCommitResolver('sha-abc123')
|
||||
setupTagExistsForAll('sha-old123')
|
||||
|
||||
await run()
|
||||
|
||||
expect(core.setFailed).toHaveBeenCalledWith(
|
||||
expect.stringContaining("Invalid value for 'when_exists'")
|
||||
)
|
||||
})
|
||||
|
||||
it('handles non-404 errors when checking if tag exists', async () => {
|
||||
setupInputs({
|
||||
tags: 'v1',
|
||||
ref: 'abc123',
|
||||
github_token: 'test-token',
|
||||
when_exists: 'update'
|
||||
})
|
||||
setupCommitResolver('sha-abc123')
|
||||
github.mockOctokit.rest.git.getRef.mockRejectedValue({
|
||||
status: 500,
|
||||
message: 'Internal Server Error'
|
||||
})
|
||||
|
||||
await run()
|
||||
|
||||
expect(core.setFailed).toHaveBeenCalledWith(
|
||||
expect.stringContaining('Action failed with error')
|
||||
)
|
||||
})
|
||||
|
||||
it('handles errors when resolving ref to SHA', async () => {
|
||||
setupInputs({
|
||||
tags: 'v1',
|
||||
ref: 'invalid-ref',
|
||||
github_token: 'test-token',
|
||||
when_exists: 'update'
|
||||
})
|
||||
github.mockOctokit.rest.repos.getCommit.mockRejectedValue(
|
||||
new Error('Reference not found')
|
||||
)
|
||||
|
||||
await run()
|
||||
|
||||
expect(core.setFailed).toHaveBeenCalledWith(
|
||||
expect.stringContaining("Failed to resolve ref 'invalid-ref'")
|
||||
)
|
||||
})
|
||||
|
||||
it('handles non-Error thrown when parsing tags', async () => {
|
||||
setupInputs({
|
||||
tags: 'v1',
|
||||
ref: 'abc123',
|
||||
github_token: 'test-token',
|
||||
when_exists: 'update'
|
||||
})
|
||||
csvParse.parse.mockImplementation(() => {
|
||||
throw 'Parse error: not an Error instance'
|
||||
})
|
||||
|
||||
await run()
|
||||
|
||||
expect(core.setFailed).toHaveBeenCalledWith(
|
||||
'Parse error: not an Error instance'
|
||||
)
|
||||
})
|
||||
|
||||
it('defaults to update mode when when_exists is empty', async () => {
|
||||
setupInputs({
|
||||
tags: 'v1',
|
||||
ref: 'abc123',
|
||||
github_token: 'test-token',
|
||||
when_exists: ''
|
||||
})
|
||||
setupCommitResolver('sha-abc123')
|
||||
setupTagExistsForAll('sha-old123')
|
||||
|
||||
await run()
|
||||
|
||||
expect(github.mockOctokit.rest.git.updateRef).toHaveBeenCalledTimes(1)
|
||||
expect(core.setOutput).toHaveBeenCalledWith('updated', ['v1'])
|
||||
})
|
||||
|
||||
it('handles duplicate tags by using last occurrence', async () => {
|
||||
setupInputs({
|
||||
tags: 'v1,v2,v1',
|
||||
ref: 'abc123',
|
||||
github_token: 'test-token',
|
||||
when_exists: 'update'
|
||||
})
|
||||
setupCommitResolver('sha-abc123')
|
||||
setupTagDoesNotExist()
|
||||
|
||||
await run()
|
||||
|
||||
// Should only create 2 tags (v1 and v2), not 3
|
||||
expect(github.mockOctokit.rest.git.createRef).toHaveBeenCalledTimes(2)
|
||||
expect(core.setOutput).toHaveBeenCalledWith('created', ['v1', 'v2'])
|
||||
})
|
||||
|
||||
it('optimizes by resolving unique refs only once', async () => {
|
||||
setupInputs({
|
||||
tags: 'v1:main,v2:main,v3:develop',
|
||||
ref: '',
|
||||
github_token: 'test-token',
|
||||
when_exists: 'update'
|
||||
})
|
||||
setupCommitResolver({
|
||||
main: 'sha-main',
|
||||
develop: 'sha-develop'
|
||||
})
|
||||
setupTagDoesNotExist()
|
||||
|
||||
await run()
|
||||
|
||||
// Should only call getCommit 2 times (main and develop), not 3
|
||||
expect(github.mockOctokit.rest.repos.getCommit).toHaveBeenCalledTimes(2)
|
||||
expect(github.mockOctokit.rest.git.createRef).toHaveBeenCalledTimes(3)
|
||||
})
|
||||
|
||||
it('handles tag with colon but empty ref part', async () => {
|
||||
setupInputs({
|
||||
tags: 'v1:,v2',
|
||||
ref: 'abc123',
|
||||
github_token: 'test-token',
|
||||
when_exists: 'update'
|
||||
})
|
||||
setupCommitResolver('sha-abc123')
|
||||
setupTagDoesNotExist()
|
||||
|
||||
await run()
|
||||
|
||||
// Both should use default ref
|
||||
expect(github.mockOctokit.rest.git.createRef).toHaveBeenCalledTimes(2)
|
||||
expect(core.setOutput).toHaveBeenCalledWith('created', ['v1', 'v2'])
|
||||
})
|
||||
|
||||
it('fails when tag specification has multiple colons', async () => {
|
||||
setupInputs({
|
||||
tags: 'stable:refs/heads/main:latest',
|
||||
ref: '',
|
||||
github_token: 'test-token',
|
||||
when_exists: 'update'
|
||||
})
|
||||
|
||||
await run()
|
||||
|
||||
expect(core.setFailed).toHaveBeenCalledWith(
|
||||
expect.stringContaining('Invalid tag specification')
|
||||
)
|
||||
expect(core.setFailed).toHaveBeenCalledWith(
|
||||
expect.stringContaining('too many colons')
|
||||
)
|
||||
})
|
||||
|
||||
it('handles mixed scenario with multiple tags', async () => {
|
||||
setupInputs({
|
||||
tags: 'v1,v2,v3',
|
||||
ref: 'abc123',
|
||||
github_token: 'test-token',
|
||||
when_exists: 'skip'
|
||||
})
|
||||
setupCommitResolver('sha-abc123')
|
||||
|
||||
// v1 exists, v2 and v3 don't
|
||||
github.mockOctokit.rest.git.getRef.mockImplementation(
|
||||
async (args: unknown) => {
|
||||
const { ref } = args as { ref: string }
|
||||
if (ref === 'tags/v1') {
|
||||
return {
|
||||
data: { ref: 'refs/tags/v1', object: { sha: 'sha-old' } }
|
||||
}
|
||||
}
|
||||
throw { status: 404 }
|
||||
}
|
||||
)
|
||||
|
||||
await run()
|
||||
|
||||
// Should skip v1, create v2 and v3
|
||||
expect(core.info).toHaveBeenCalledWith("Tag 'v1' exists, skipping.")
|
||||
expect(github.mockOctokit.rest.git.createRef).toHaveBeenCalledTimes(2)
|
||||
expect(core.setOutput).toHaveBeenCalledWith('created', ['v2', 'v3'])
|
||||
expect(core.setOutput).toHaveBeenCalledWith('updated', [])
|
||||
})
|
||||
|
||||
it('fails when tag name is empty (e.g., ":main")', async () => {
|
||||
setupInputs({
|
||||
tags: ':main',
|
||||
ref: '',
|
||||
github_token: 'test-token',
|
||||
when_exists: 'update'
|
||||
})
|
||||
setupCommitResolver('sha-main')
|
||||
|
||||
await run()
|
||||
|
||||
expect(core.setFailed).toHaveBeenCalledWith("Invalid tag: ':main'")
|
||||
expect(github.mockOctokit.rest.git.createRef).not.toHaveBeenCalled()
|
||||
expect(github.mockOctokit.rest.git.updateRef).not.toHaveBeenCalled()
|
||||
})
|
||||
|
||||
it('fails when one of multiple tags has empty name with ref', async () => {
|
||||
setupInputs({
|
||||
tags: 'v1,:develop,v2',
|
||||
ref: 'abc123',
|
||||
github_token: 'test-token',
|
||||
when_exists: 'update'
|
||||
})
|
||||
setupCommitResolver({
|
||||
abc123: 'sha-abc123',
|
||||
develop: 'sha-develop'
|
||||
})
|
||||
setupTagDoesNotExist()
|
||||
|
||||
await run()
|
||||
|
||||
// Should fail on invalid tag during parsing, before processing any tags
|
||||
expect(core.setFailed).toHaveBeenCalledWith("Invalid tag: ':develop'")
|
||||
expect(github.mockOctokit.rest.git.createRef).not.toHaveBeenCalled()
|
||||
})
|
||||
|
||||
it('fails when duplicate tag has different refs (explicit)', async () => {
|
||||
setupInputs({
|
||||
tags: 'v1:main,v1:develop',
|
||||
ref: '',
|
||||
github_token: 'test-token'
|
||||
})
|
||||
|
||||
await run()
|
||||
|
||||
expect(core.setFailed).toHaveBeenCalledWith(
|
||||
"Duplicate tag 'v1' with different refs: 'main' and 'develop'"
|
||||
)
|
||||
expect(github.mockOctokit.rest.git.createRef).not.toHaveBeenCalled()
|
||||
})
|
||||
|
||||
it('fails when duplicate tag has different refs (default vs explicit)', async () => {
|
||||
setupInputs({
|
||||
tags: 'v1,v1:develop',
|
||||
ref: 'main',
|
||||
github_token: 'test-token'
|
||||
})
|
||||
|
||||
await run()
|
||||
|
||||
expect(core.setFailed).toHaveBeenCalledWith(
|
||||
"Duplicate tag 'v1' with different refs: 'main' and 'develop'"
|
||||
)
|
||||
expect(github.mockOctokit.rest.git.createRef).not.toHaveBeenCalled()
|
||||
})
|
||||
|
||||
it('skips empty tags from double commas (e.g., "v1,,v2")', async () => {
|
||||
setupInputs({
|
||||
tags: 'v1,,v2',
|
||||
ref: 'abc123',
|
||||
github_token: 'test-token',
|
||||
when_exists: 'update'
|
||||
})
|
||||
setupCommitResolver('sha-abc123')
|
||||
setupTagDoesNotExist()
|
||||
|
||||
await run()
|
||||
|
||||
// Should skip empty tag and process v1 and v2
|
||||
expect(github.mockOctokit.rest.git.createRef).toHaveBeenCalledWith({
|
||||
owner: 'test-owner',
|
||||
repo: 'test-repo',
|
||||
ref: 'refs/tags/v1',
|
||||
sha: 'sha-abc123'
|
||||
})
|
||||
expect(github.mockOctokit.rest.git.createRef).toHaveBeenCalledWith({
|
||||
owner: 'test-owner',
|
||||
repo: 'test-repo',
|
||||
ref: 'refs/tags/v2',
|
||||
sha: 'sha-abc123'
|
||||
})
|
||||
expect(github.mockOctokit.rest.git.createRef).toHaveBeenCalledTimes(2)
|
||||
expect(core.setOutput).toHaveBeenCalledWith('created', ['v1', 'v2'])
|
||||
})
|
||||
|
||||
it('skips empty lines in multi-line input (e.g., "v1\\n\\nv2")', async () => {
|
||||
setupInputs({
|
||||
tags: 'v1\n\nv2',
|
||||
ref: 'abc123',
|
||||
github_token: 'test-token',
|
||||
when_exists: 'update'
|
||||
})
|
||||
setupCommitResolver('sha-abc123')
|
||||
setupTagDoesNotExist()
|
||||
|
||||
await run()
|
||||
|
||||
// Should skip empty line and process v1 and v2
|
||||
expect(github.mockOctokit.rest.git.createRef).toHaveBeenCalledWith({
|
||||
owner: 'test-owner',
|
||||
repo: 'test-repo',
|
||||
ref: 'refs/tags/v1',
|
||||
sha: 'sha-abc123'
|
||||
})
|
||||
expect(github.mockOctokit.rest.git.createRef).toHaveBeenCalledWith({
|
||||
owner: 'test-owner',
|
||||
repo: 'test-repo',
|
||||
ref: 'refs/tags/v2',
|
||||
sha: 'sha-abc123'
|
||||
})
|
||||
expect(github.mockOctokit.rest.git.createRef).toHaveBeenCalledTimes(2)
|
||||
expect(core.setOutput).toHaveBeenCalledWith('created', ['v1', 'v2'])
|
||||
})
|
||||
|
||||
it('skips empty tags from mix of empty CSV fields and empty lines', async () => {
|
||||
setupInputs({
|
||||
tags: 'v1,,v2\n\nv3,v4',
|
||||
ref: 'abc123',
|
||||
github_token: 'test-token',
|
||||
when_exists: 'update'
|
||||
})
|
||||
setupCommitResolver('sha-abc123')
|
||||
setupTagDoesNotExist()
|
||||
|
||||
await run()
|
||||
|
||||
// Should skip all empty tags and process v1, v2, v3, v4
|
||||
expect(github.mockOctokit.rest.git.createRef).toHaveBeenCalledWith({
|
||||
owner: 'test-owner',
|
||||
repo: 'test-repo',
|
||||
ref: 'refs/tags/v1',
|
||||
sha: 'sha-abc123'
|
||||
})
|
||||
expect(github.mockOctokit.rest.git.createRef).toHaveBeenCalledWith({
|
||||
owner: 'test-owner',
|
||||
repo: 'test-repo',
|
||||
ref: 'refs/tags/v2',
|
||||
sha: 'sha-abc123'
|
||||
})
|
||||
expect(github.mockOctokit.rest.git.createRef).toHaveBeenCalledWith({
|
||||
owner: 'test-owner',
|
||||
repo: 'test-repo',
|
||||
ref: 'refs/tags/v3',
|
||||
sha: 'sha-abc123'
|
||||
})
|
||||
expect(github.mockOctokit.rest.git.createRef).toHaveBeenCalledWith({
|
||||
owner: 'test-owner',
|
||||
repo: 'test-repo',
|
||||
ref: 'refs/tags/v4',
|
||||
sha: 'sha-abc123'
|
||||
})
|
||||
expect(github.mockOctokit.rest.git.createRef).toHaveBeenCalledTimes(4)
|
||||
expect(core.setOutput).toHaveBeenCalledWith('created', [
|
||||
'v1',
|
||||
'v2',
|
||||
'v3',
|
||||
'v4'
|
||||
])
|
||||
})
|
||||
})
|
||||
@@ -20,6 +20,12 @@ inputs:
|
||||
'fail'.
|
||||
required: false
|
||||
default: "update"
|
||||
annotation:
|
||||
description: >-
|
||||
Optional annotation message for tags. If provided, creates annotated tags.
|
||||
If empty, creates lightweight tags.
|
||||
required: false
|
||||
default: ""
|
||||
github_token:
|
||||
description: "The GitHub token to use for authentication."
|
||||
required: false
|
||||
@@ -32,6 +38,8 @@ outputs:
|
||||
description: "List of tags that were created."
|
||||
updated:
|
||||
description: "List of tags that were updated."
|
||||
skipped:
|
||||
description: "List of tags that were skipped."
|
||||
|
||||
runs:
|
||||
using: node24
|
||||
|
||||
33425
dist/index.js
generated
vendored
33425
dist/index.js
generated
vendored
File diff suppressed because one or more lines are too long
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
514
package-lock.json
generated
514
package-lock.json
generated
@@ -1,41 +1,40 @@
|
||||
{
|
||||
"name": "update-tags-action",
|
||||
"version": "1.0.1",
|
||||
"version": "2.2.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "update-tags-action",
|
||||
"version": "1.0.1",
|
||||
"version": "2.2.0",
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.11.1",
|
||||
"@actions/github": "^6.0.1",
|
||||
"csv-parse": "^6.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/compat": "^1.4.0",
|
||||
"@eslint/compat": "^1.4.1",
|
||||
"@jest/globals": "^30.2.0",
|
||||
"@rollup/plugin-commonjs": "^28.0.9",
|
||||
"@rollup/plugin-commonjs": "^29.0.0",
|
||||
"@rollup/plugin-node-resolve": "^16.0.3",
|
||||
"@rollup/plugin-terser": "^0.4.4",
|
||||
"@rollup/plugin-typescript": "^12.3.0",
|
||||
"@types/jest": "^30.0.0",
|
||||
"@types/node": "^24.9.1",
|
||||
"@typescript-eslint/eslint-plugin": "^8.46.2",
|
||||
"@types/node": "^24.10.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.46.4",
|
||||
"@typescript-eslint/parser": "^8.46.2",
|
||||
"action-docs": "^2.5.1",
|
||||
"eslint": "^9.38.0",
|
||||
"eslint": "^9.39.1",
|
||||
"eslint-config-prettier": "^10.1.8",
|
||||
"eslint-import-resolver-typescript": "^4.4.4",
|
||||
"eslint-plugin-import": "^2.32.0",
|
||||
"eslint-plugin-jest": "^29.0.1",
|
||||
"eslint-plugin-jest": "^29.1.0",
|
||||
"eslint-plugin-prettier": "^5.5.4",
|
||||
"jest": "^30.2.0",
|
||||
"make-coverage-badge": "^1.2.0",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"prettier": "^3.6.2",
|
||||
"prettier-eslint": "^16.4.2",
|
||||
"rollup": "^4.52.5",
|
||||
"rollup": "^4.53.2",
|
||||
"ts-jest": "^29.4.5",
|
||||
"ts-jest-resolver": "^2.0.1",
|
||||
"typescript": "^5.9.3"
|
||||
@@ -125,7 +124,6 @@
|
||||
"integrity": "sha512-e7jT4DxYvIDLk1ZHmU/m/mB19rex9sv0c2ftBtjSBv+kVM/902eh0fINUzD7UwLLNR+jU585GxUJ8/EBfAM5fw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@babel/code-frame": "^7.27.1",
|
||||
"@babel/generator": "^7.28.5",
|
||||
@@ -675,13 +673,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@eslint/compat": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/compat/-/compat-1.4.0.tgz",
|
||||
"integrity": "sha512-DEzm5dKeDBPm3r08Ixli/0cmxr8LkRdwxMRUIJBlSCpAwSrvFEJpVBzV+66JhDxiaqKxnRzCXhtiMiczF7Hglg==",
|
||||
"version": "1.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/compat/-/compat-1.4.1.tgz",
|
||||
"integrity": "sha512-cfO82V9zxxGBxcQDr1lfaYB7wykTa0b00mGa36FrJl7iTFd0Z2cHfEYuxcBRP/iNijCsWsEkA+jzT8hGYmv33w==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@eslint/core": "^0.16.0"
|
||||
"@eslint/core": "^0.17.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
@@ -735,22 +733,22 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@eslint/config-helpers": {
|
||||
"version": "0.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.4.1.tgz",
|
||||
"integrity": "sha512-csZAzkNhsgwb0I/UAV6/RGFTbiakPCf0ZrGmrIxQpYvGZ00PhTkSnyKNolphgIvmnJeGw6rcGVEXfTzUnFuEvw==",
|
||||
"version": "0.4.2",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.4.2.tgz",
|
||||
"integrity": "sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@eslint/core": "^0.16.0"
|
||||
"@eslint/core": "^0.17.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@eslint/core": {
|
||||
"version": "0.16.0",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.16.0.tgz",
|
||||
"integrity": "sha512-nmC8/totwobIiFcGkDza3GIKfAw1+hLiYVrh3I1nIomQ8PEr5cxg34jnkmGawul/ep52wGRAcyeDCNtWKSOj4Q==",
|
||||
"version": "0.17.0",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.17.0.tgz",
|
||||
"integrity": "sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
@@ -819,9 +817,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@eslint/js": {
|
||||
"version": "9.38.0",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.38.0.tgz",
|
||||
"integrity": "sha512-UZ1VpFvXf9J06YG9xQBdnzU+kthors6KjhMAl6f4gH4usHyh31rUf2DLGInT8RFYIReYXNSydgPY0V2LuWgl7A==",
|
||||
"version": "9.39.1",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.39.1.tgz",
|
||||
"integrity": "sha512-S26Stp4zCy88tH94QbBv3XCuzRQiZ9yXofEILmglYTh/Ug/a9/umqvgFtYBAo3Lp0nsI/5/qH1CCrbdK3AP1Tw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
@@ -842,13 +840,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@eslint/plugin-kit": {
|
||||
"version": "0.4.0",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.4.0.tgz",
|
||||
"integrity": "sha512-sB5uyeq+dwCWyPi31B2gQlVlo+j5brPlWx4yZBrEaRo/nhdDE8Xke1gsGgtiBdaBTxuTkceLVuVt/pclrasb0A==",
|
||||
"version": "0.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.4.1.tgz",
|
||||
"integrity": "sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@eslint/core": "^0.16.0",
|
||||
"@eslint/core": "^0.17.0",
|
||||
"levn": "^0.4.1"
|
||||
},
|
||||
"engines": {
|
||||
@@ -1473,17 +1471,6 @@
|
||||
"node": ">=6.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@jridgewell/source-map": {
|
||||
"version": "0.3.11",
|
||||
"resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.11.tgz",
|
||||
"integrity": "sha512-ZMp1V8ZFcPG5dIWnQLr3NSI1MiCU7UETdS/A0G8V/XWHvJv3ZsFqutJn1Y5RPmAPX6F3BiE397OqveU/9NCuIA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@jridgewell/gen-mapping": "^0.3.5",
|
||||
"@jridgewell/trace-mapping": "^0.3.25"
|
||||
}
|
||||
},
|
||||
"node_modules/@jridgewell/sourcemap-codec": {
|
||||
"version": "1.5.5",
|
||||
"resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz",
|
||||
@@ -1567,7 +1554,6 @@
|
||||
"resolved": "https://registry.npmjs.org/@octokit/core/-/core-5.2.2.tgz",
|
||||
"integrity": "sha512-/g2d4sW9nUDJOMz3mabVQvOGhVa4e/BN/Um7yca9Bb2XTzPPnfTWHWQg+IsEYO7M3Vx+EXvaM/I2pJWIMun1bg==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@octokit/auth-token": "^4.0.0",
|
||||
"@octokit/graphql": "^7.1.0",
|
||||
@@ -1737,9 +1723,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rollup/plugin-commonjs": {
|
||||
"version": "28.0.9",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-28.0.9.tgz",
|
||||
"integrity": "sha512-PIR4/OHZ79romx0BVVll/PkwWpJ7e5lsqFa3gFfcrFPWwLXLV39JVUzQV9RKjWerE7B845Hqjj9VYlQeieZ2dA==",
|
||||
"version": "29.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-29.0.0.tgz",
|
||||
"integrity": "sha512-U2YHaxR2cU/yAiwKJtJRhnyLk7cifnQw0zUpISsocBDoHDJn+HTV74ABqnwr5bEgWUwFZC9oFL6wLe21lHu5eQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -1788,29 +1774,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@rollup/plugin-terser": {
|
||||
"version": "0.4.4",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/plugin-terser/-/plugin-terser-0.4.4.tgz",
|
||||
"integrity": "sha512-XHeJC5Bgvs8LfukDwWZp7yeqin6ns8RTl2B9avbejt6tZqsqvVoWI7ZTQrcNsfKEDWBTnTxM8nMDkO2IFFbd0A==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"serialize-javascript": "^6.0.1",
|
||||
"smob": "^1.0.0",
|
||||
"terser": "^5.17.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"rollup": "^2.0.0||^3.0.0||^4.0.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"rollup": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@rollup/plugin-typescript": {
|
||||
"version": "12.3.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-12.3.0.tgz",
|
||||
@@ -1862,9 +1825,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rollup/rollup-android-arm-eabi": {
|
||||
"version": "4.52.5",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.52.5.tgz",
|
||||
"integrity": "sha512-8c1vW4ocv3UOMp9K+gToY5zL2XiiVw3k7f1ksf4yO1FlDFQ1C2u72iACFnSOceJFsWskc2WZNqeRhFRPzv+wtQ==",
|
||||
"version": "4.53.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.53.2.tgz",
|
||||
"integrity": "sha512-yDPzwsgiFO26RJA4nZo8I+xqzh7sJTZIWQOxn+/XOdPE31lAvLIYCKqjV+lNH/vxE2L2iH3plKxDCRK6i+CwhA==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
@@ -1876,9 +1839,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-android-arm64": {
|
||||
"version": "4.52.5",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.52.5.tgz",
|
||||
"integrity": "sha512-mQGfsIEFcu21mvqkEKKu2dYmtuSZOBMmAl5CFlPGLY94Vlcm+zWApK7F/eocsNzp8tKmbeBP8yXyAbx0XHsFNA==",
|
||||
"version": "4.53.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.53.2.tgz",
|
||||
"integrity": "sha512-k8FontTxIE7b0/OGKeSN5B6j25EuppBcWM33Z19JoVT7UTXFSo3D9CdU39wGTeb29NO3XxpMNauh09B+Ibw+9g==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -1890,9 +1853,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-darwin-arm64": {
|
||||
"version": "4.52.5",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.52.5.tgz",
|
||||
"integrity": "sha512-takF3CR71mCAGA+v794QUZ0b6ZSrgJkArC+gUiG6LB6TQty9T0Mqh3m2ImRBOxS2IeYBo4lKWIieSvnEk2OQWA==",
|
||||
"version": "4.53.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.53.2.tgz",
|
||||
"integrity": "sha512-A6s4gJpomNBtJ2yioj8bflM2oogDwzUiMl2yNJ2v9E7++sHrSrsQ29fOfn5DM/iCzpWcebNYEdXpaK4tr2RhfQ==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -1904,9 +1867,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-darwin-x64": {
|
||||
"version": "4.52.5",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.52.5.tgz",
|
||||
"integrity": "sha512-W901Pla8Ya95WpxDn//VF9K9u2JbocwV/v75TE0YIHNTbhqUTv9w4VuQ9MaWlNOkkEfFwkdNhXgcLqPSmHy0fA==",
|
||||
"version": "4.53.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.53.2.tgz",
|
||||
"integrity": "sha512-e6XqVmXlHrBlG56obu9gDRPW3O3hLxpwHpLsBJvuI8qqnsrtSZ9ERoWUXtPOkY8c78WghyPHZdmPhHLWNdAGEw==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -1918,9 +1881,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-freebsd-arm64": {
|
||||
"version": "4.52.5",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.52.5.tgz",
|
||||
"integrity": "sha512-QofO7i7JycsYOWxe0GFqhLmF6l1TqBswJMvICnRUjqCx8b47MTo46W8AoeQwiokAx3zVryVnxtBMcGcnX12LvA==",
|
||||
"version": "4.53.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.53.2.tgz",
|
||||
"integrity": "sha512-v0E9lJW8VsrwPux5Qe5CwmH/CF/2mQs6xU1MF3nmUxmZUCHazCjLgYvToOk+YuuUqLQBio1qkkREhxhc656ViA==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -1932,9 +1895,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-freebsd-x64": {
|
||||
"version": "4.52.5",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.52.5.tgz",
|
||||
"integrity": "sha512-jr21b/99ew8ujZubPo9skbrItHEIE50WdV86cdSoRkKtmWa+DDr6fu2c/xyRT0F/WazZpam6kk7IHBerSL7LDQ==",
|
||||
"version": "4.53.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.53.2.tgz",
|
||||
"integrity": "sha512-ClAmAPx3ZCHtp6ysl4XEhWU69GUB1D+s7G9YjHGhIGCSrsg00nEGRRZHmINYxkdoJehde8VIsDC5t9C0gb6yqA==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -1946,9 +1909,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-linux-arm-gnueabihf": {
|
||||
"version": "4.52.5",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.52.5.tgz",
|
||||
"integrity": "sha512-PsNAbcyv9CcecAUagQefwX8fQn9LQ4nZkpDboBOttmyffnInRy8R8dSg6hxxl2Re5QhHBf6FYIDhIj5v982ATQ==",
|
||||
"version": "4.53.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.53.2.tgz",
|
||||
"integrity": "sha512-EPlb95nUsz6Dd9Qy13fI5kUPXNSljaG9FiJ4YUGU1O/Q77i5DYFW5KR8g1OzTcdZUqQQ1KdDqsTohdFVwCwjqg==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
@@ -1960,9 +1923,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-linux-arm-musleabihf": {
|
||||
"version": "4.52.5",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.52.5.tgz",
|
||||
"integrity": "sha512-Fw4tysRutyQc/wwkmcyoqFtJhh0u31K+Q6jYjeicsGJJ7bbEq8LwPWV/w0cnzOqR2m694/Af6hpFayLJZkG2VQ==",
|
||||
"version": "4.53.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.53.2.tgz",
|
||||
"integrity": "sha512-BOmnVW+khAUX+YZvNfa0tGTEMVVEerOxN0pDk2E6N6DsEIa2Ctj48FOMfNDdrwinocKaC7YXUZ1pHlKpnkja/Q==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
@@ -1974,9 +1937,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-linux-arm64-gnu": {
|
||||
"version": "4.52.5",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.52.5.tgz",
|
||||
"integrity": "sha512-a+3wVnAYdQClOTlyapKmyI6BLPAFYs0JM8HRpgYZQO02rMR09ZcV9LbQB+NL6sljzG38869YqThrRnfPMCDtZg==",
|
||||
"version": "4.53.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.53.2.tgz",
|
||||
"integrity": "sha512-Xt2byDZ+6OVNuREgBXr4+CZDJtrVso5woFtpKdGPhpTPHcNG7D8YXeQzpNbFRxzTVqJf7kvPMCub/pcGUWgBjA==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -1988,9 +1951,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-linux-arm64-musl": {
|
||||
"version": "4.52.5",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.52.5.tgz",
|
||||
"integrity": "sha512-AvttBOMwO9Pcuuf7m9PkC1PUIKsfaAJ4AYhy944qeTJgQOqJYJ9oVl2nYgY7Rk0mkbsuOpCAYSs6wLYB2Xiw0Q==",
|
||||
"version": "4.53.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.53.2.tgz",
|
||||
"integrity": "sha512-+LdZSldy/I9N8+klim/Y1HsKbJ3BbInHav5qE9Iy77dtHC/pibw1SR/fXlWyAk0ThnpRKoODwnAuSjqxFRDHUQ==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -2002,9 +1965,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-linux-loong64-gnu": {
|
||||
"version": "4.52.5",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.52.5.tgz",
|
||||
"integrity": "sha512-DkDk8pmXQV2wVrF6oq5tONK6UHLz/XcEVow4JTTerdeV1uqPeHxwcg7aFsfnSm9L+OO8WJsWotKM2JJPMWrQtA==",
|
||||
"version": "4.53.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.53.2.tgz",
|
||||
"integrity": "sha512-8ms8sjmyc1jWJS6WdNSA23rEfdjWB30LH8Wqj0Cqvv7qSHnvw6kgMMXRdop6hkmGPlyYBdRPkjJnj3KCUHV/uQ==",
|
||||
"cpu": [
|
||||
"loong64"
|
||||
],
|
||||
@@ -2016,9 +1979,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-linux-ppc64-gnu": {
|
||||
"version": "4.52.5",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.52.5.tgz",
|
||||
"integrity": "sha512-W/b9ZN/U9+hPQVvlGwjzi+Wy4xdoH2I8EjaCkMvzpI7wJUs8sWJ03Rq96jRnHkSrcHTpQe8h5Tg3ZzUPGauvAw==",
|
||||
"version": "4.53.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.53.2.tgz",
|
||||
"integrity": "sha512-3HRQLUQbpBDMmzoxPJYd3W6vrVHOo2cVW8RUo87Xz0JPJcBLBr5kZ1pGcQAhdZgX9VV7NbGNipah1omKKe23/g==",
|
||||
"cpu": [
|
||||
"ppc64"
|
||||
],
|
||||
@@ -2030,9 +1993,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-linux-riscv64-gnu": {
|
||||
"version": "4.52.5",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.52.5.tgz",
|
||||
"integrity": "sha512-sjQLr9BW7R/ZiXnQiWPkErNfLMkkWIoCz7YMn27HldKsADEKa5WYdobaa1hmN6slu9oWQbB6/jFpJ+P2IkVrmw==",
|
||||
"version": "4.53.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.53.2.tgz",
|
||||
"integrity": "sha512-fMjKi+ojnmIvhk34gZP94vjogXNNUKMEYs+EDaB/5TG/wUkoeua7p7VCHnE6T2Tx+iaghAqQX8teQzcvrYpaQA==",
|
||||
"cpu": [
|
||||
"riscv64"
|
||||
],
|
||||
@@ -2044,9 +2007,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-linux-riscv64-musl": {
|
||||
"version": "4.52.5",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.52.5.tgz",
|
||||
"integrity": "sha512-hq3jU/kGyjXWTvAh2awn8oHroCbrPm8JqM7RUpKjalIRWWXE01CQOf/tUNWNHjmbMHg/hmNCwc/Pz3k1T/j/Lg==",
|
||||
"version": "4.53.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.53.2.tgz",
|
||||
"integrity": "sha512-XuGFGU+VwUUV5kLvoAdi0Wz5Xbh2SrjIxCtZj6Wq8MDp4bflb/+ThZsVxokM7n0pcbkEr2h5/pzqzDYI7cCgLQ==",
|
||||
"cpu": [
|
||||
"riscv64"
|
||||
],
|
||||
@@ -2058,9 +2021,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-linux-s390x-gnu": {
|
||||
"version": "4.52.5",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.52.5.tgz",
|
||||
"integrity": "sha512-gn8kHOrku8D4NGHMK1Y7NA7INQTRdVOntt1OCYypZPRt6skGbddska44K8iocdpxHTMMNui5oH4elPH4QOLrFQ==",
|
||||
"version": "4.53.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.53.2.tgz",
|
||||
"integrity": "sha512-w6yjZF0P+NGzWR3AXWX9zc0DNEGdtvykB03uhonSHMRa+oWA6novflo2WaJr6JZakG2ucsyb+rvhrKac6NIy+w==",
|
||||
"cpu": [
|
||||
"s390x"
|
||||
],
|
||||
@@ -2072,9 +2035,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-linux-x64-gnu": {
|
||||
"version": "4.52.5",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.52.5.tgz",
|
||||
"integrity": "sha512-hXGLYpdhiNElzN770+H2nlx+jRog8TyynpTVzdlc6bndktjKWyZyiCsuDAlpd+j+W+WNqfcyAWz9HxxIGfZm1Q==",
|
||||
"version": "4.53.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.53.2.tgz",
|
||||
"integrity": "sha512-yo8d6tdfdeBArzC7T/PnHd7OypfI9cbuZzPnzLJIyKYFhAQ8SvlkKtKBMbXDxe1h03Rcr7u++nFS7tqXz87Gtw==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -2086,9 +2049,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-linux-x64-musl": {
|
||||
"version": "4.52.5",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.52.5.tgz",
|
||||
"integrity": "sha512-arCGIcuNKjBoKAXD+y7XomR9gY6Mw7HnFBv5Rw7wQRvwYLR7gBAgV7Mb2QTyjXfTveBNFAtPt46/36vV9STLNg==",
|
||||
"version": "4.53.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.53.2.tgz",
|
||||
"integrity": "sha512-ah59c1YkCxKExPP8O9PwOvs+XRLKwh/mV+3YdKqQ5AMQ0r4M4ZDuOrpWkUaqO7fzAHdINzV9tEVu8vNw48z0lA==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -2100,9 +2063,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-openharmony-arm64": {
|
||||
"version": "4.52.5",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.52.5.tgz",
|
||||
"integrity": "sha512-QoFqB6+/9Rly/RiPjaomPLmR/13cgkIGfA40LHly9zcH1S0bN2HVFYk3a1eAyHQyjs3ZJYlXvIGtcCs5tko9Cw==",
|
||||
"version": "4.53.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.53.2.tgz",
|
||||
"integrity": "sha512-4VEd19Wmhr+Zy7hbUsFZ6YXEiP48hE//KPLCSVNY5RMGX2/7HZ+QkN55a3atM1C/BZCGIgqN+xrVgtdak2S9+A==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -2114,9 +2077,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-win32-arm64-msvc": {
|
||||
"version": "4.52.5",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.52.5.tgz",
|
||||
"integrity": "sha512-w0cDWVR6MlTstla1cIfOGyl8+qb93FlAVutcor14Gf5Md5ap5ySfQ7R9S/NjNaMLSFdUnKGEasmVnu3lCMqB7w==",
|
||||
"version": "4.53.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.53.2.tgz",
|
||||
"integrity": "sha512-IlbHFYc/pQCgew/d5fslcy1KEaYVCJ44G8pajugd8VoOEI8ODhtb/j8XMhLpwHCMB3yk2J07ctup10gpw2nyMA==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -2128,9 +2091,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-win32-ia32-msvc": {
|
||||
"version": "4.52.5",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.52.5.tgz",
|
||||
"integrity": "sha512-Aufdpzp7DpOTULJCuvzqcItSGDH73pF3ko/f+ckJhxQyHtp67rHw3HMNxoIdDMUITJESNE6a8uh4Lo4SLouOUg==",
|
||||
"version": "4.53.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.53.2.tgz",
|
||||
"integrity": "sha512-lNlPEGgdUfSzdCWU176ku/dQRnA7W+Gp8d+cWv73jYrb8uT7HTVVxq62DUYxjbaByuf1Yk0RIIAbDzp+CnOTFg==",
|
||||
"cpu": [
|
||||
"ia32"
|
||||
],
|
||||
@@ -2142,9 +2105,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-win32-x64-gnu": {
|
||||
"version": "4.52.5",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.52.5.tgz",
|
||||
"integrity": "sha512-UGBUGPFp1vkj6p8wCRraqNhqwX/4kNQPS57BCFc8wYh0g94iVIW33wJtQAx3G7vrjjNtRaxiMUylM0ktp/TRSQ==",
|
||||
"version": "4.53.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.53.2.tgz",
|
||||
"integrity": "sha512-S6YojNVrHybQis2lYov1sd+uj7K0Q05NxHcGktuMMdIQ2VixGwAfbJ23NnlvvVV1bdpR2m5MsNBViHJKcA4ADw==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -2156,9 +2119,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-win32-x64-msvc": {
|
||||
"version": "4.52.5",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.52.5.tgz",
|
||||
"integrity": "sha512-TAcgQh2sSkykPRWLrdyy2AiceMckNf5loITqXxFI5VuQjS5tSuw3WlwdN8qv8vzjLAUTvYaH/mVjSFpbkFbpTg==",
|
||||
"version": "4.53.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.53.2.tgz",
|
||||
"integrity": "sha512-k+/Rkcyx//P6fetPoLMb8pBeqJBNGx81uuf7iljX9++yNBVRDQgD04L+SVXmXmh5ZP4/WOp4mWF0kmi06PW2tA==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -2329,9 +2292,9 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "24.9.1",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.9.1.tgz",
|
||||
"integrity": "sha512-QoiaXANRkSXK6p0Duvt56W208du4P9Uye9hWLWgGMDTEoKPhuenzNcC4vGUmrNkiOKTlIrBoyNQYNpSwfEZXSg==",
|
||||
"version": "24.10.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.10.0.tgz",
|
||||
"integrity": "sha512-qzQZRBqkFsYyaSWXuEHc2WR9c0a0CXwiE5FWUvn7ZM+vdy1uZLfCunD38UzhuB7YN/J11ndbDBcTmOdxJo9Q7A==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -2370,18 +2333,17 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@typescript-eslint/eslint-plugin": {
|
||||
"version": "8.46.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.46.2.tgz",
|
||||
"integrity": "sha512-ZGBMToy857/NIPaaCucIUQgqueOiq7HeAKkhlvqVV4lm089zUFW6ikRySx2v+cAhKeUCPuWVHeimyk6Dw1iY3w==",
|
||||
"version": "8.46.4",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.46.4.tgz",
|
||||
"integrity": "sha512-R48VhmTJqplNyDxCyqqVkFSZIx1qX6PzwqgcXn1olLrzxcSBDlOsbtcnQuQhNtnNiJ4Xe5gREI1foajYaYU2Vg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@eslint-community/regexpp": "^4.10.0",
|
||||
"@typescript-eslint/scope-manager": "8.46.2",
|
||||
"@typescript-eslint/type-utils": "8.46.2",
|
||||
"@typescript-eslint/utils": "8.46.2",
|
||||
"@typescript-eslint/visitor-keys": "8.46.2",
|
||||
"@typescript-eslint/scope-manager": "8.46.4",
|
||||
"@typescript-eslint/type-utils": "8.46.4",
|
||||
"@typescript-eslint/utils": "8.46.4",
|
||||
"@typescript-eslint/visitor-keys": "8.46.4",
|
||||
"graphemer": "^1.4.0",
|
||||
"ignore": "^7.0.0",
|
||||
"natural-compare": "^1.4.0",
|
||||
@@ -2395,23 +2357,22 @@
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@typescript-eslint/parser": "^8.46.2",
|
||||
"@typescript-eslint/parser": "^8.46.4",
|
||||
"eslint": "^8.57.0 || ^9.0.0",
|
||||
"typescript": ">=4.8.4 <6.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/parser": {
|
||||
"version": "8.46.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.46.2.tgz",
|
||||
"integrity": "sha512-BnOroVl1SgrPLywqxyqdJ4l3S2MsKVLDVxZvjI1Eoe8ev2r3kGDo+PcMihNmDE+6/KjkTubSJnmqGZZjQSBq/g==",
|
||||
"version": "8.46.4",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.46.4.tgz",
|
||||
"integrity": "sha512-tK3GPFWbirvNgsNKto+UmB/cRtn6TZfyw0D6IKrW55n6Vbs7KJoZtI//kpTKzE/DUmmnAFD8/Ca46s7Obs92/w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/scope-manager": "8.46.2",
|
||||
"@typescript-eslint/types": "8.46.2",
|
||||
"@typescript-eslint/typescript-estree": "8.46.2",
|
||||
"@typescript-eslint/visitor-keys": "8.46.2",
|
||||
"@typescript-eslint/scope-manager": "8.46.4",
|
||||
"@typescript-eslint/types": "8.46.4",
|
||||
"@typescript-eslint/typescript-estree": "8.46.4",
|
||||
"@typescript-eslint/visitor-keys": "8.46.4",
|
||||
"debug": "^4.3.4"
|
||||
},
|
||||
"engines": {
|
||||
@@ -2427,14 +2388,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/project-service": {
|
||||
"version": "8.46.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.46.2.tgz",
|
||||
"integrity": "sha512-PULOLZ9iqwI7hXcmL4fVfIsBi6AN9YxRc0frbvmg8f+4hQAjQ5GYNKK0DIArNo+rOKmR/iBYwkpBmnIwin4wBg==",
|
||||
"version": "8.46.4",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.46.4.tgz",
|
||||
"integrity": "sha512-nPiRSKuvtTN+no/2N1kt2tUh/HoFzeEgOm9fQ6XQk4/ApGqjx0zFIIaLJ6wooR1HIoozvj2j6vTi/1fgAz7UYQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/tsconfig-utils": "^8.46.2",
|
||||
"@typescript-eslint/types": "^8.46.2",
|
||||
"@typescript-eslint/tsconfig-utils": "^8.46.4",
|
||||
"@typescript-eslint/types": "^8.46.4",
|
||||
"debug": "^4.3.4"
|
||||
},
|
||||
"engines": {
|
||||
@@ -2449,14 +2410,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/scope-manager": {
|
||||
"version": "8.46.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.46.2.tgz",
|
||||
"integrity": "sha512-LF4b/NmGvdWEHD2H4MsHD8ny6JpiVNDzrSZr3CsckEgCbAGZbYM4Cqxvi9L+WqDMT+51Ozy7lt2M+d0JLEuBqA==",
|
||||
"version": "8.46.4",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.46.4.tgz",
|
||||
"integrity": "sha512-tMDbLGXb1wC+McN1M6QeDx7P7c0UWO5z9CXqp7J8E+xGcJuUuevWKxuG8j41FoweS3+L41SkyKKkia16jpX7CA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "8.46.2",
|
||||
"@typescript-eslint/visitor-keys": "8.46.2"
|
||||
"@typescript-eslint/types": "8.46.4",
|
||||
"@typescript-eslint/visitor-keys": "8.46.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
@@ -2467,9 +2428,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/tsconfig-utils": {
|
||||
"version": "8.46.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.46.2.tgz",
|
||||
"integrity": "sha512-a7QH6fw4S57+F5y2FIxxSDyi5M4UfGF+Jl1bCGd7+L4KsaUY80GsiF/t0UoRFDHAguKlBaACWJRmdrc6Xfkkag==",
|
||||
"version": "8.46.4",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.46.4.tgz",
|
||||
"integrity": "sha512-+/XqaZPIAk6Cjg7NWgSGe27X4zMGqrFqZ8atJsX3CWxH/jACqWnrWI68h7nHQld0y+k9eTTjb9r+KU4twLoo9A==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
@@ -2484,15 +2445,15 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/type-utils": {
|
||||
"version": "8.46.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.46.2.tgz",
|
||||
"integrity": "sha512-HbPM4LbaAAt/DjxXaG9yiS9brOOz6fabal4uvUmaUYe6l3K1phQDMQKBRUrr06BQkxkvIZVVHttqiybM9nJsLA==",
|
||||
"version": "8.46.4",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.46.4.tgz",
|
||||
"integrity": "sha512-V4QC8h3fdT5Wro6vANk6eojqfbv5bpwHuMsBcJUJkqs2z5XnYhJzyz9Y02eUmF9u3PgXEUiOt4w4KHR3P+z0PQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "8.46.2",
|
||||
"@typescript-eslint/typescript-estree": "8.46.2",
|
||||
"@typescript-eslint/utils": "8.46.2",
|
||||
"@typescript-eslint/types": "8.46.4",
|
||||
"@typescript-eslint/typescript-estree": "8.46.4",
|
||||
"@typescript-eslint/utils": "8.46.4",
|
||||
"debug": "^4.3.4",
|
||||
"ts-api-utils": "^2.1.0"
|
||||
},
|
||||
@@ -2509,9 +2470,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/types": {
|
||||
"version": "8.46.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.46.2.tgz",
|
||||
"integrity": "sha512-lNCWCbq7rpg7qDsQrd3D6NyWYu+gkTENkG5IKYhUIcxSb59SQC/hEQ+MrG4sTgBVghTonNWq42bA/d4yYumldQ==",
|
||||
"version": "8.46.4",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.46.4.tgz",
|
||||
"integrity": "sha512-USjyxm3gQEePdUwJBFjjGNG18xY9A2grDVGuk7/9AkjIF1L+ZrVnwR5VAU5JXtUnBL/Nwt3H31KlRDaksnM7/w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
@@ -2523,16 +2484,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/typescript-estree": {
|
||||
"version": "8.46.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.46.2.tgz",
|
||||
"integrity": "sha512-f7rW7LJ2b7Uh2EiQ+7sza6RDZnajbNbemn54Ob6fRwQbgcIn+GWfyuHDHRYgRoZu1P4AayVScrRW+YfbTvPQoQ==",
|
||||
"version": "8.46.4",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.46.4.tgz",
|
||||
"integrity": "sha512-7oV2qEOr1d4NWNmpXLR35LvCfOkTNymY9oyW+lUHkmCno7aOmIf/hMaydnJBUTBMRCOGZh8YjkFOc8dadEoNGA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/project-service": "8.46.2",
|
||||
"@typescript-eslint/tsconfig-utils": "8.46.2",
|
||||
"@typescript-eslint/types": "8.46.2",
|
||||
"@typescript-eslint/visitor-keys": "8.46.2",
|
||||
"@typescript-eslint/project-service": "8.46.4",
|
||||
"@typescript-eslint/tsconfig-utils": "8.46.4",
|
||||
"@typescript-eslint/types": "8.46.4",
|
||||
"@typescript-eslint/visitor-keys": "8.46.4",
|
||||
"debug": "^4.3.4",
|
||||
"fast-glob": "^3.3.2",
|
||||
"is-glob": "^4.0.3",
|
||||
@@ -2552,16 +2513,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/utils": {
|
||||
"version": "8.46.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.46.2.tgz",
|
||||
"integrity": "sha512-sExxzucx0Tud5tE0XqR0lT0psBQvEpnpiul9XbGUB1QwpWJJAps1O/Z7hJxLGiZLBKMCutjTzDgmd1muEhBnVg==",
|
||||
"version": "8.46.4",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.46.4.tgz",
|
||||
"integrity": "sha512-AbSv11fklGXV6T28dp2Me04Uw90R2iJ30g2bgLz529Koehrmkbs1r7paFqr1vPCZi7hHwYxYtxfyQMRC8QaVSg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@eslint-community/eslint-utils": "^4.7.0",
|
||||
"@typescript-eslint/scope-manager": "8.46.2",
|
||||
"@typescript-eslint/types": "8.46.2",
|
||||
"@typescript-eslint/typescript-estree": "8.46.2"
|
||||
"@typescript-eslint/scope-manager": "8.46.4",
|
||||
"@typescript-eslint/types": "8.46.4",
|
||||
"@typescript-eslint/typescript-estree": "8.46.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
@@ -2576,13 +2537,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/visitor-keys": {
|
||||
"version": "8.46.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.46.2.tgz",
|
||||
"integrity": "sha512-tUFMXI4gxzzMXt4xpGJEsBsTox0XbNQ1y94EwlD/CuZwFcQP79xfQqMhau9HsRc/J0cAPA/HZt1dZPtGn9V/7w==",
|
||||
"version": "8.46.4",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.46.4.tgz",
|
||||
"integrity": "sha512-/++5CYLQqsO9HFGLI7APrxBJYo+5OCMpViuhV8q5/Qa3o5mMrF//eQHks+PXcsAVaLdn817fMuS7zqoXNNZGaw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "8.46.2",
|
||||
"@typescript-eslint/types": "8.46.4",
|
||||
"eslint-visitor-keys": "^4.2.1"
|
||||
},
|
||||
"engines": {
|
||||
@@ -2888,7 +2849,6 @@
|
||||
"integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"bin": {
|
||||
"acorn": "bin/acorn"
|
||||
},
|
||||
@@ -3356,7 +3316,6 @@
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"baseline-browser-mapping": "^2.8.19",
|
||||
"caniuse-lite": "^1.0.30001751",
|
||||
@@ -4151,21 +4110,20 @@
|
||||
}
|
||||
},
|
||||
"node_modules/eslint": {
|
||||
"version": "9.38.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-9.38.0.tgz",
|
||||
"integrity": "sha512-t5aPOpmtJcZcz5UJyY2GbvpDlsK5E8JqRqoKtfiKE3cNh437KIqfJr3A3AKf5k64NPx6d0G3dno6XDY05PqPtw==",
|
||||
"version": "9.39.1",
|
||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-9.39.1.tgz",
|
||||
"integrity": "sha512-BhHmn2yNOFA9H9JmmIVKJmd288g9hrVRDkdoIgRCRuSySRUHH7r/DI6aAXW9T1WwUuY3DFgrcaqB+deURBLR5g==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@eslint-community/eslint-utils": "^4.8.0",
|
||||
"@eslint-community/regexpp": "^4.12.1",
|
||||
"@eslint/config-array": "^0.21.1",
|
||||
"@eslint/config-helpers": "^0.4.1",
|
||||
"@eslint/core": "^0.16.0",
|
||||
"@eslint/config-helpers": "^0.4.2",
|
||||
"@eslint/core": "^0.17.0",
|
||||
"@eslint/eslintrc": "^3.3.1",
|
||||
"@eslint/js": "9.38.0",
|
||||
"@eslint/plugin-kit": "^0.4.0",
|
||||
"@eslint/js": "9.39.1",
|
||||
"@eslint/plugin-kit": "^0.4.1",
|
||||
"@humanfs/node": "^0.16.6",
|
||||
"@humanwhocodes/module-importer": "^1.0.1",
|
||||
"@humanwhocodes/retry": "^0.4.2",
|
||||
@@ -4217,7 +4175,6 @@
|
||||
"integrity": "sha512-82GZUjRS0p/jganf6q1rEO25VSoHH0hKPCTrgillPjdI/3bgBhAE1QzHrHTizjpRvy6pGAvKjDJtk2pF9NDq8w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"bin": {
|
||||
"eslint-config-prettier": "bin/cli.js"
|
||||
},
|
||||
@@ -4344,7 +4301,6 @@
|
||||
"integrity": "sha512-whOE1HFo/qJDyX4SnXzP4N6zOWn79WhnCUY/iDR0mPfQZO8wcYE4JClzI2oZrhBnnMUCBCHZhO6VQyoBU95mZA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@rtsao/scc": "^1.1.0",
|
||||
"array-includes": "^3.1.9",
|
||||
@@ -4418,9 +4374,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-plugin-jest": {
|
||||
"version": "29.0.1",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-29.0.1.tgz",
|
||||
"integrity": "sha512-EE44T0OSMCeXhDrrdsbKAhprobKkPtJTbQz5yEktysNpHeDZTAL1SfDTNKmcFfJkY6yrQLtTKZALrD3j/Gpmiw==",
|
||||
"version": "29.1.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-29.1.0.tgz",
|
||||
"integrity": "sha512-LabxXbASXVjguqL+kBHTPMf3gUeSqwH4fsrEyHTY/MCs42I/p9+ctg09SJpYiD8eGaIsP6GwYr5xW6xWS9XgZg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -6065,7 +6021,6 @@
|
||||
"integrity": "sha512-F26gjC0yWN8uAA5m5Ss8ZQf5nDHWGlN/xWZIh8S5SRbsEKBovwZhxGd6LJlbZYxBgCYOtreSUyb8hpXyGC5O4A==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@jest/core": "30.2.0",
|
||||
"@jest/types": "30.2.0",
|
||||
@@ -7899,7 +7854,6 @@
|
||||
"integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"bin": {
|
||||
"prettier": "bin/prettier.cjs"
|
||||
},
|
||||
@@ -8178,7 +8132,6 @@
|
||||
"deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@eslint-community/eslint-utils": "^4.2.0",
|
||||
"@eslint-community/regexpp": "^4.6.1",
|
||||
@@ -8501,16 +8454,6 @@
|
||||
],
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/randombytes": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
|
||||
"integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"safe-buffer": "^5.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/react-is": {
|
||||
"version": "18.3.1",
|
||||
"resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz",
|
||||
@@ -8795,12 +8738,11 @@
|
||||
}
|
||||
},
|
||||
"node_modules/rollup": {
|
||||
"version": "4.52.5",
|
||||
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.52.5.tgz",
|
||||
"integrity": "sha512-3GuObel8h7Kqdjt0gxkEzaifHTqLVW56Y/bjN7PSQtkKr0w3V/QYSdt6QWYtd7A1xUtYQigtdUfgj1RvWVtorw==",
|
||||
"version": "4.53.2",
|
||||
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.53.2.tgz",
|
||||
"integrity": "sha512-MHngMYwGJVi6Fmnk6ISmnk7JAHRNF0UkuucA0CUW3N3a4KnONPEZz+vUanQP/ZC/iY1Qkf3bwPWzyY84wEks1g==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@types/estree": "1.0.8"
|
||||
},
|
||||
@@ -8812,28 +8754,28 @@
|
||||
"npm": ">=8.0.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@rollup/rollup-android-arm-eabi": "4.52.5",
|
||||
"@rollup/rollup-android-arm64": "4.52.5",
|
||||
"@rollup/rollup-darwin-arm64": "4.52.5",
|
||||
"@rollup/rollup-darwin-x64": "4.52.5",
|
||||
"@rollup/rollup-freebsd-arm64": "4.52.5",
|
||||
"@rollup/rollup-freebsd-x64": "4.52.5",
|
||||
"@rollup/rollup-linux-arm-gnueabihf": "4.52.5",
|
||||
"@rollup/rollup-linux-arm-musleabihf": "4.52.5",
|
||||
"@rollup/rollup-linux-arm64-gnu": "4.52.5",
|
||||
"@rollup/rollup-linux-arm64-musl": "4.52.5",
|
||||
"@rollup/rollup-linux-loong64-gnu": "4.52.5",
|
||||
"@rollup/rollup-linux-ppc64-gnu": "4.52.5",
|
||||
"@rollup/rollup-linux-riscv64-gnu": "4.52.5",
|
||||
"@rollup/rollup-linux-riscv64-musl": "4.52.5",
|
||||
"@rollup/rollup-linux-s390x-gnu": "4.52.5",
|
||||
"@rollup/rollup-linux-x64-gnu": "4.52.5",
|
||||
"@rollup/rollup-linux-x64-musl": "4.52.5",
|
||||
"@rollup/rollup-openharmony-arm64": "4.52.5",
|
||||
"@rollup/rollup-win32-arm64-msvc": "4.52.5",
|
||||
"@rollup/rollup-win32-ia32-msvc": "4.52.5",
|
||||
"@rollup/rollup-win32-x64-gnu": "4.52.5",
|
||||
"@rollup/rollup-win32-x64-msvc": "4.52.5",
|
||||
"@rollup/rollup-android-arm-eabi": "4.53.2",
|
||||
"@rollup/rollup-android-arm64": "4.53.2",
|
||||
"@rollup/rollup-darwin-arm64": "4.53.2",
|
||||
"@rollup/rollup-darwin-x64": "4.53.2",
|
||||
"@rollup/rollup-freebsd-arm64": "4.53.2",
|
||||
"@rollup/rollup-freebsd-x64": "4.53.2",
|
||||
"@rollup/rollup-linux-arm-gnueabihf": "4.53.2",
|
||||
"@rollup/rollup-linux-arm-musleabihf": "4.53.2",
|
||||
"@rollup/rollup-linux-arm64-gnu": "4.53.2",
|
||||
"@rollup/rollup-linux-arm64-musl": "4.53.2",
|
||||
"@rollup/rollup-linux-loong64-gnu": "4.53.2",
|
||||
"@rollup/rollup-linux-ppc64-gnu": "4.53.2",
|
||||
"@rollup/rollup-linux-riscv64-gnu": "4.53.2",
|
||||
"@rollup/rollup-linux-riscv64-musl": "4.53.2",
|
||||
"@rollup/rollup-linux-s390x-gnu": "4.53.2",
|
||||
"@rollup/rollup-linux-x64-gnu": "4.53.2",
|
||||
"@rollup/rollup-linux-x64-musl": "4.53.2",
|
||||
"@rollup/rollup-openharmony-arm64": "4.53.2",
|
||||
"@rollup/rollup-win32-arm64-msvc": "4.53.2",
|
||||
"@rollup/rollup-win32-ia32-msvc": "4.53.2",
|
||||
"@rollup/rollup-win32-x64-gnu": "4.53.2",
|
||||
"@rollup/rollup-win32-x64-msvc": "4.53.2",
|
||||
"fsevents": "~2.3.2"
|
||||
}
|
||||
},
|
||||
@@ -8881,27 +8823,6 @@
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/safe-buffer": {
|
||||
"version": "5.2.1",
|
||||
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
|
||||
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/feross"
|
||||
},
|
||||
{
|
||||
"type": "patreon",
|
||||
"url": "https://www.patreon.com/feross"
|
||||
},
|
||||
{
|
||||
"type": "consulting",
|
||||
"url": "https://feross.org/support"
|
||||
}
|
||||
],
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/safe-push-apply": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/safe-push-apply/-/safe-push-apply-1.0.0.tgz",
|
||||
@@ -8950,16 +8871,6 @@
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/serialize-javascript": {
|
||||
"version": "6.0.2",
|
||||
"resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz",
|
||||
"integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==",
|
||||
"dev": true,
|
||||
"license": "BSD-3-Clause",
|
||||
"dependencies": {
|
||||
"randombytes": "^2.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/set-function-length": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz",
|
||||
@@ -9171,13 +9082,6 @@
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/smob": {
|
||||
"version": "1.5.0",
|
||||
"resolved": "https://registry.npmjs.org/smob/-/smob-1.5.0.tgz",
|
||||
"integrity": "sha512-g6T+p7QO8npa+/hNx9ohv1E5pVCmWrVCUzUXJyLdMmftX6ER0oiWY/w9knEonLpnOp6b6FenKnMfR8gqwWdwig==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/source-map": {
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
|
||||
@@ -9583,43 +9487,6 @@
|
||||
"url": "https://opencollective.com/synckit"
|
||||
}
|
||||
},
|
||||
"node_modules/terser": {
|
||||
"version": "5.44.0",
|
||||
"resolved": "https://registry.npmjs.org/terser/-/terser-5.44.0.tgz",
|
||||
"integrity": "sha512-nIVck8DK+GM/0Frwd+nIhZ84pR/BX7rmXMfYwyg+Sri5oGVE99/E3KvXqpC2xHFxyqXyGHTKBSioxxplrO4I4w==",
|
||||
"dev": true,
|
||||
"license": "BSD-2-Clause",
|
||||
"dependencies": {
|
||||
"@jridgewell/source-map": "^0.3.3",
|
||||
"acorn": "^8.15.0",
|
||||
"commander": "^2.20.0",
|
||||
"source-map-support": "~0.5.20"
|
||||
},
|
||||
"bin": {
|
||||
"terser": "bin/terser"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/terser/node_modules/commander": {
|
||||
"version": "2.20.3",
|
||||
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
|
||||
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/terser/node_modules/source-map-support": {
|
||||
"version": "0.5.21",
|
||||
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz",
|
||||
"integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"buffer-from": "^1.0.0",
|
||||
"source-map": "^0.6.0"
|
||||
}
|
||||
},
|
||||
"node_modules/test-exclude": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz",
|
||||
@@ -10088,8 +9955,7 @@
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
|
||||
"integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
|
||||
"dev": true,
|
||||
"license": "0BSD",
|
||||
"peer": true
|
||||
"license": "0BSD"
|
||||
},
|
||||
"node_modules/tunnel": {
|
||||
"version": "0.0.6",
|
||||
@@ -10220,7 +10086,6 @@
|
||||
"integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"peer": true,
|
||||
"bin": {
|
||||
"tsc": "bin/tsc",
|
||||
"tsserver": "bin/tsserver"
|
||||
@@ -10294,7 +10159,6 @@
|
||||
"dev": true,
|
||||
"hasInstallScript": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"napi-postinstall": "^0.3.0"
|
||||
},
|
||||
|
||||
17
package.json
17
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "update-tags-action",
|
||||
"version": "1.0.1",
|
||||
"version": "2.2.0",
|
||||
"author": "jimeh",
|
||||
"type": "module",
|
||||
"private": true,
|
||||
@@ -46,29 +46,28 @@
|
||||
"csv-parse": "^6.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/compat": "^1.4.0",
|
||||
"@eslint/compat": "^1.4.1",
|
||||
"@jest/globals": "^30.2.0",
|
||||
"@rollup/plugin-commonjs": "^28.0.9",
|
||||
"@rollup/plugin-commonjs": "^29.0.0",
|
||||
"@rollup/plugin-node-resolve": "^16.0.3",
|
||||
"@rollup/plugin-terser": "^0.4.4",
|
||||
"@rollup/plugin-typescript": "^12.3.0",
|
||||
"@types/jest": "^30.0.0",
|
||||
"@types/node": "^24.9.1",
|
||||
"@typescript-eslint/eslint-plugin": "^8.46.2",
|
||||
"@types/node": "^24.10.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.46.4",
|
||||
"@typescript-eslint/parser": "^8.46.2",
|
||||
"action-docs": "^2.5.1",
|
||||
"eslint": "^9.38.0",
|
||||
"eslint": "^9.39.1",
|
||||
"eslint-config-prettier": "^10.1.8",
|
||||
"eslint-import-resolver-typescript": "^4.4.4",
|
||||
"eslint-plugin-import": "^2.32.0",
|
||||
"eslint-plugin-jest": "^29.0.1",
|
||||
"eslint-plugin-jest": "^29.1.0",
|
||||
"eslint-plugin-prettier": "^5.5.4",
|
||||
"jest": "^30.2.0",
|
||||
"make-coverage-badge": "^1.2.0",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"prettier": "^3.6.2",
|
||||
"prettier-eslint": "^16.4.2",
|
||||
"rollup": "^4.52.5",
|
||||
"rollup": "^4.53.2",
|
||||
"ts-jest": "^29.4.5",
|
||||
"ts-jest-resolver": "^2.0.1",
|
||||
"typescript": "^5.9.3"
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
import commonjs from '@rollup/plugin-commonjs'
|
||||
import nodeResolve from '@rollup/plugin-node-resolve'
|
||||
import terser from '@rollup/plugin-terser'
|
||||
import typescript from '@rollup/plugin-typescript'
|
||||
|
||||
const config = {
|
||||
@@ -13,12 +12,7 @@ const config = {
|
||||
format: 'es',
|
||||
sourcemap: true
|
||||
},
|
||||
plugins: [
|
||||
typescript(),
|
||||
nodeResolve({ preferBuiltins: true }),
|
||||
commonjs(),
|
||||
terser()
|
||||
]
|
||||
plugins: [typescript(), nodeResolve({ preferBuiltins: true }), commonjs()]
|
||||
}
|
||||
|
||||
export default config
|
||||
|
||||
@@ -1,16 +1,18 @@
|
||||
import * as core from '@actions/core'
|
||||
import * as github from '@actions/github'
|
||||
import { parseTagsInput, type Tag } from './tags.js'
|
||||
import { parse } from 'csv-parse/sync'
|
||||
|
||||
const WHEN_EXISTS_MODES = ['update', 'skip', 'fail'] as const
|
||||
export type WhenExistsMode = (typeof WHEN_EXISTS_MODES)[number]
|
||||
|
||||
export interface Inputs {
|
||||
tags: Tag[]
|
||||
tags: string[]
|
||||
defaultRef: string
|
||||
whenExists: WhenExistsMode
|
||||
annotation: string
|
||||
owner: string
|
||||
repo: string
|
||||
octokit: ReturnType<typeof github.getOctokit>
|
||||
token: string
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -35,25 +37,34 @@ function validateWhenExists(input: string): WhenExistsMode {
|
||||
*
|
||||
* @returns Parsed and validated inputs
|
||||
*/
|
||||
export async function getInputs(): Promise<Inputs> {
|
||||
export function getInputs(): Inputs {
|
||||
const tagsInput: string = core.getInput('tags', { required: true })
|
||||
const defaultRef: string = core.getInput('ref')
|
||||
const whenExistsInput = core.getInput('when_exists') || 'update'
|
||||
const whenExists = validateWhenExists(whenExistsInput)
|
||||
const annotation: string = core.getInput('annotation')
|
||||
const token: string = core.getInput('github_token', {
|
||||
required: true
|
||||
})
|
||||
|
||||
const octokit = github.getOctokit(token)
|
||||
const { owner, repo } = github.context.repo
|
||||
|
||||
const tags = await parseTagsInput(octokit, tagsInput, defaultRef, owner, repo)
|
||||
// Parse tags as CSV/newline delimited strings
|
||||
const tags = (
|
||||
parse(tagsInput, {
|
||||
delimiter: ',',
|
||||
trim: true,
|
||||
relax_column_count: true
|
||||
}) as string[][]
|
||||
).flat()
|
||||
|
||||
return {
|
||||
tags,
|
||||
defaultRef,
|
||||
whenExists,
|
||||
annotation,
|
||||
owner,
|
||||
repo,
|
||||
octokit
|
||||
token
|
||||
}
|
||||
}
|
||||
|
||||
40
src/main.ts
40
src/main.ts
@@ -1,6 +1,7 @@
|
||||
import * as core from '@actions/core'
|
||||
import * as github from '@actions/github'
|
||||
import { getInputs } from './inputs.js'
|
||||
import { processTag } from './tags.js'
|
||||
import { planTagOperations, executeTagOperation } from './tags.js'
|
||||
|
||||
/**
|
||||
* The main function for the action.
|
||||
@@ -9,38 +10,33 @@ import { processTag } from './tags.js'
|
||||
*/
|
||||
export async function run(): Promise<void> {
|
||||
try {
|
||||
let inputs
|
||||
try {
|
||||
inputs = await getInputs()
|
||||
} catch (error) {
|
||||
// For parsing/validation errors, pass message directly.
|
||||
const message = error instanceof Error ? error.message : String(error)
|
||||
core.setFailed(message)
|
||||
return
|
||||
}
|
||||
|
||||
const { tags, whenExists, owner, repo, octokit } = inputs
|
||||
const inputs = getInputs()
|
||||
const octokit = github.getOctokit(inputs.token)
|
||||
const operations = await planTagOperations(inputs, octokit)
|
||||
|
||||
const created: string[] = []
|
||||
const updated: string[] = []
|
||||
const skipped: string[] = []
|
||||
|
||||
// Create or update all tags.
|
||||
for (const tag of tags) {
|
||||
const result = await processTag(tag, whenExists, owner, repo, octokit)
|
||||
// Execute all planned operations.
|
||||
for (const operation of operations) {
|
||||
await executeTagOperation(operation, octokit)
|
||||
|
||||
if (result === 'failed') {
|
||||
return
|
||||
} else if (result === 'created') {
|
||||
created.push(tag.name)
|
||||
} else if (result === 'updated') {
|
||||
updated.push(tag.name)
|
||||
if (operation.operation === 'create') {
|
||||
created.push(operation.name)
|
||||
} else if (operation.operation === 'update') {
|
||||
updated.push(operation.name)
|
||||
} else if (operation.operation === 'skip') {
|
||||
skipped.push(operation.name)
|
||||
}
|
||||
}
|
||||
|
||||
core.setOutput('created', created)
|
||||
core.setOutput('updated', updated)
|
||||
core.setOutput('skipped', skipped)
|
||||
core.setOutput('tags', created.concat(updated))
|
||||
} catch (error) {
|
||||
core.setFailed(`Action failed with error: ${String(error)}`)
|
||||
const message = error instanceof Error ? error.message : String(error)
|
||||
core.setFailed(message)
|
||||
}
|
||||
}
|
||||
|
||||
496
src/tags.ts
496
src/tags.ts
@@ -1,44 +1,63 @@
|
||||
import * as core from '@actions/core'
|
||||
import * as github from '@actions/github'
|
||||
import { parse } from 'csv-parse/sync'
|
||||
import type { Inputs } from './inputs.js'
|
||||
|
||||
export interface Tag {
|
||||
export interface ExistingTagInfo {
|
||||
commitSHA: string
|
||||
isAnnotated: boolean
|
||||
annotation?: string
|
||||
}
|
||||
|
||||
interface BaseOperation {
|
||||
name: string
|
||||
ref: string
|
||||
sha: string
|
||||
owner: string
|
||||
repo: string
|
||||
}
|
||||
|
||||
export type TagResult = 'created' | 'updated' | 'skipped' | 'failed'
|
||||
export interface CreateOperation extends BaseOperation {
|
||||
operation: 'create'
|
||||
annotation: string
|
||||
}
|
||||
|
||||
export interface UpdateOperation extends BaseOperation {
|
||||
operation: 'update'
|
||||
annotation: string
|
||||
existingSHA: string
|
||||
existingIsAnnotated: boolean
|
||||
reasons: string[]
|
||||
}
|
||||
|
||||
export interface SkipOperation extends BaseOperation {
|
||||
operation: 'skip'
|
||||
existingIsAnnotated: boolean
|
||||
reason: 'when_exists_skip' | 'already_matches'
|
||||
}
|
||||
|
||||
export type TagOperation = CreateOperation | UpdateOperation | SkipOperation
|
||||
|
||||
interface Context {
|
||||
owner: string
|
||||
repo: string
|
||||
octokit: ReturnType<typeof github.getOctokit>
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse tags input string and resolve refs to SHAs.
|
||||
* Plan tag operations based on inputs.
|
||||
*
|
||||
* @param inputs - The validated inputs containing tags, refs, and configuration
|
||||
* @param octokit - The GitHub API client
|
||||
* @param tagsInput - The raw tags input string
|
||||
* @param defaultRef - The default ref to use if not specified per-tag
|
||||
* @param owner - The repository owner
|
||||
* @param repo - The repository name
|
||||
* @returns Array of desired tags with resolved SHAs
|
||||
* @returns Array of planned tag operations (create, update, or skip)
|
||||
*/
|
||||
export async function parseTagsInput(
|
||||
octokit: ReturnType<typeof github.getOctokit>,
|
||||
tagsInput: string,
|
||||
defaultRef: string,
|
||||
owner: string,
|
||||
repo: string
|
||||
): Promise<Tag[]> {
|
||||
const parsedTags: string[] = (
|
||||
parse(tagsInput, {
|
||||
delimiter: ',',
|
||||
trim: true,
|
||||
relax_column_count: true
|
||||
}) as string[][]
|
||||
).flat()
|
||||
|
||||
export async function planTagOperations(
|
||||
inputs: Inputs,
|
||||
octokit: ReturnType<typeof github.getOctokit>
|
||||
): Promise<TagOperation[]> {
|
||||
const uniqueRefs = new Set<string>()
|
||||
const tags: Record<string, string> = {}
|
||||
const tagRefs: Record<string, string> = {}
|
||||
|
||||
for (const tag of parsedTags) {
|
||||
for (const tag of inputs.tags) {
|
||||
const parts = tag.split(':').map((s) => s.trim())
|
||||
if (parts.length > 2) {
|
||||
throw new Error(
|
||||
@@ -55,130 +74,221 @@ export async function parseTagsInput(
|
||||
continue
|
||||
}
|
||||
|
||||
const ref = tagRef || defaultRef
|
||||
const ref = tagRef || inputs.defaultRef
|
||||
if (!ref) {
|
||||
throw new Error("Missing ref: provide 'ref' input or specify per-tag ref")
|
||||
}
|
||||
|
||||
// Check for duplicate tag with different ref.
|
||||
if (tags[tagName] && tags[tagName] !== ref) {
|
||||
// Check for duplicate tag with different ref
|
||||
if (tagRefs[tagName] && tagRefs[tagName] !== ref) {
|
||||
throw new Error(
|
||||
`Duplicate tag '${tagName}' with different refs: ` +
|
||||
`'${tags[tagName]}' and '${ref}'`
|
||||
`'${tagRefs[tagName]}' and '${ref}'`
|
||||
)
|
||||
}
|
||||
|
||||
tags[tagName] = ref
|
||||
tagRefs[tagName] = ref
|
||||
uniqueRefs.add(ref)
|
||||
}
|
||||
|
||||
// Pre-resolve all unique refs in parallel.
|
||||
const refToSha: Record<string, string> = {}
|
||||
const ctx: Context = { owner: inputs.owner, repo: inputs.repo, octokit }
|
||||
const refSHAs: Record<string, string> = {}
|
||||
await Promise.all(
|
||||
Array.from(uniqueRefs).map(async (ref) => {
|
||||
refToSha[ref] = await resolveRefToSha(octokit, owner, repo, ref)
|
||||
refSHAs[ref] = await resolveRefToSha(ctx, ref)
|
||||
})
|
||||
)
|
||||
|
||||
// Build result array with resolved SHAs.
|
||||
const result: Tag[] = []
|
||||
for (const tagName in tags) {
|
||||
const tagRef = tags[tagName]
|
||||
result.push({
|
||||
name: tagName,
|
||||
ref: tagRef,
|
||||
sha: refToSha[tagRef]
|
||||
// Build result array with planned operations
|
||||
const tagNames = Object.keys(tagRefs)
|
||||
const result: TagOperation[] = await Promise.all(
|
||||
tagNames.map(async (tagName) => {
|
||||
const tagRef = tagRefs[tagName]
|
||||
const sha = refSHAs[tagRef]
|
||||
|
||||
// Check if tag already exists
|
||||
let existing: ExistingTagInfo | undefined
|
||||
try {
|
||||
existing = await fetchTagInfo(ctx, tagName)
|
||||
|
||||
// Fail early if when_exists is 'fail'
|
||||
if (inputs.whenExists === 'fail') {
|
||||
throw new Error(`Tag '${tagName}' already exists.`)
|
||||
}
|
||||
} catch (error: unknown) {
|
||||
// Check if it's a GitHub API error with a status property
|
||||
if (typeof error === 'object' && error !== null && 'status' in error) {
|
||||
const apiError = error as { status: number; message?: string }
|
||||
if (apiError.status === 404) {
|
||||
// Tag doesn't exist, existing remains undefined
|
||||
} else {
|
||||
// Some other API error
|
||||
throw new Error(
|
||||
`Failed to check if tag '${tagName}' exists: ${apiError.message || String(error)}`
|
||||
)
|
||||
}
|
||||
} else {
|
||||
throw error
|
||||
}
|
||||
}
|
||||
|
||||
const baseOp = {
|
||||
name: tagName,
|
||||
ref: tagRef,
|
||||
sha,
|
||||
owner: inputs.owner,
|
||||
repo: inputs.repo
|
||||
}
|
||||
|
||||
// Tag doesn't exist - plan creation
|
||||
if (!existing) {
|
||||
return {
|
||||
...baseOp,
|
||||
operation: 'create',
|
||||
annotation: inputs.annotation
|
||||
} as CreateOperation
|
||||
}
|
||||
|
||||
// Tag exists - determine operation based on mode and state
|
||||
if (inputs.whenExists === 'skip') {
|
||||
return {
|
||||
...baseOp,
|
||||
operation: 'skip',
|
||||
existingIsAnnotated: existing.isAnnotated,
|
||||
reason: 'when_exists_skip'
|
||||
} as SkipOperation
|
||||
}
|
||||
|
||||
// whenExists === 'update' - check if update is needed
|
||||
const { commitMatches, annotationMatches } = compareTagState(
|
||||
sha,
|
||||
inputs.annotation,
|
||||
existing
|
||||
)
|
||||
|
||||
if (commitMatches && annotationMatches) {
|
||||
return {
|
||||
...baseOp,
|
||||
operation: 'skip',
|
||||
existingIsAnnotated: existing.isAnnotated,
|
||||
reason: 'already_matches'
|
||||
} as SkipOperation
|
||||
}
|
||||
|
||||
// Plan update with reasons
|
||||
const reasons = getUpdateReasons(sha, inputs.annotation, existing)
|
||||
return {
|
||||
...baseOp,
|
||||
operation: 'update',
|
||||
annotation: inputs.annotation,
|
||||
existingSHA: existing.commitSHA,
|
||||
existingIsAnnotated: existing.isAnnotated,
|
||||
reasons
|
||||
} as UpdateOperation
|
||||
})
|
||||
}
|
||||
)
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
/**
|
||||
* Process a single desired tag: create or update it based on configuration.
|
||||
* Execute a planned tag operation.
|
||||
*
|
||||
* @param tag - The desired tag to process
|
||||
* @param whenExists - What to do if the tag already exists
|
||||
* @param owner - Repository owner
|
||||
* @param repo - Repository name
|
||||
* @param operation - The planned tag operation to execute
|
||||
* @param octokit - GitHub API client
|
||||
* @returns The result of the tag operation
|
||||
*/
|
||||
export async function processTag(
|
||||
tag: Tag,
|
||||
whenExists: 'update' | 'skip' | 'fail',
|
||||
owner: string,
|
||||
repo: string,
|
||||
export async function executeTagOperation(
|
||||
operation: TagOperation,
|
||||
octokit: ReturnType<typeof github.getOctokit>
|
||||
): Promise<TagResult> {
|
||||
const { name: tagName, sha } = tag
|
||||
): Promise<void> {
|
||||
const ctx: Context = {
|
||||
owner: operation.owner,
|
||||
repo: operation.repo,
|
||||
octokit
|
||||
}
|
||||
|
||||
try {
|
||||
// Check if the tag exists.
|
||||
const existing = await octokit.rest.git.getRef({
|
||||
owner,
|
||||
repo,
|
||||
ref: `tags/${tagName}`
|
||||
})
|
||||
|
||||
// If the tag exists, decide action based on 'when_exists'.
|
||||
if (whenExists === 'update') {
|
||||
const existingSHA = existing.data.object.sha
|
||||
if (existingSHA === sha) {
|
||||
core.info(`Tag '${tagName}' already exists with desired SHA ${sha}.`)
|
||||
return 'skipped'
|
||||
}
|
||||
|
||||
core.info(
|
||||
`Tag '${tagName}' exists, updating to SHA ${sha} ` +
|
||||
`(was ${existingSHA}).`
|
||||
)
|
||||
await octokit.rest.git.updateRef({
|
||||
owner,
|
||||
repo,
|
||||
ref: `tags/${tagName}`,
|
||||
sha,
|
||||
force: true
|
||||
})
|
||||
return 'updated'
|
||||
} else if (whenExists === 'skip') {
|
||||
core.info(`Tag '${tagName}' exists, skipping.`)
|
||||
return 'skipped'
|
||||
if (operation.operation === 'skip') {
|
||||
if (operation.reason === 'when_exists_skip') {
|
||||
core.info(`Tag '${operation.name}' exists, skipping.`)
|
||||
} else {
|
||||
// whenExists === 'fail'
|
||||
core.setFailed(`Tag '${tagName}' already exists.`)
|
||||
return 'failed'
|
||||
}
|
||||
} catch (error: unknown) {
|
||||
const err = error as { status?: number }
|
||||
if (err?.status !== 404) {
|
||||
throw error
|
||||
core.info(
|
||||
`Tag '${operation.name}' already exists with desired commit SHA ${operation.sha}` +
|
||||
(operation.existingIsAnnotated ? ' (annotated).' : '.')
|
||||
)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// If the tag doesn't exist (404), create it.
|
||||
core.info(`Tag '${tagName}' does not exist, creating with SHA ${sha}.`)
|
||||
await octokit.rest.git.createRef({
|
||||
owner,
|
||||
repo,
|
||||
ref: `refs/tags/${tagName}`,
|
||||
sha
|
||||
})
|
||||
return 'created'
|
||||
if (operation.operation === 'create') {
|
||||
await createTag(ctx, operation)
|
||||
return
|
||||
}
|
||||
|
||||
if (operation.operation === 'update') {
|
||||
await updateExistingTag(ctx, operation)
|
||||
return
|
||||
}
|
||||
|
||||
throw new Error(
|
||||
`Unknown operation type: ${(operation as TagOperation).operation}`
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch information about an existing tag, dereferencing if annotated.
|
||||
*
|
||||
* @param ctx - Operation context
|
||||
* @param tagName - The name of the tag to fetch
|
||||
* @returns Information about the existing tag
|
||||
*/
|
||||
async function fetchTagInfo(
|
||||
ctx: Context,
|
||||
tagName: string
|
||||
): Promise<ExistingTagInfo> {
|
||||
const ref = await ctx.octokit.rest.git.getRef({
|
||||
owner: ctx.owner,
|
||||
repo: ctx.repo,
|
||||
ref: `tags/${tagName}`
|
||||
})
|
||||
const object = ref.data.object
|
||||
const isAnnotated = object.type === 'tag'
|
||||
|
||||
if (!isAnnotated) {
|
||||
return {
|
||||
commitSHA: object.sha,
|
||||
isAnnotated: false
|
||||
}
|
||||
}
|
||||
|
||||
// Dereference annotated tag to get underlying commit
|
||||
const tagRef = await ctx.octokit.rest.git.getTag({
|
||||
owner: ctx.owner,
|
||||
repo: ctx.repo,
|
||||
tag_sha: object.sha
|
||||
})
|
||||
|
||||
return {
|
||||
commitSHA: tagRef.data.object.sha,
|
||||
isAnnotated: true,
|
||||
annotation: tagRef.data.message
|
||||
}
|
||||
}
|
||||
|
||||
async function resolveRefToSha(
|
||||
octokit: ReturnType<typeof github.getOctokit>,
|
||||
owner: string,
|
||||
repo: string,
|
||||
ref: string
|
||||
): Promise<string> {
|
||||
/**
|
||||
* Resolve a ref to a SHA.
|
||||
*
|
||||
* @param ctx - Operation context
|
||||
* @param ref - The ref to resolve
|
||||
* @returns The SHA
|
||||
*/
|
||||
async function resolveRefToSha(ctx: Context, ref: string): Promise<string> {
|
||||
try {
|
||||
const {
|
||||
data: { sha }
|
||||
} = await octokit.rest.repos.getCommit({
|
||||
owner,
|
||||
repo,
|
||||
} = await ctx.octokit.rest.repos.getCommit({
|
||||
owner: ctx.owner,
|
||||
repo: ctx.repo,
|
||||
ref
|
||||
})
|
||||
|
||||
@@ -187,3 +297,165 @@ async function resolveRefToSha(
|
||||
throw new Error(`Failed to resolve ref '${ref}' to a SHA: ${String(error)}`)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update an existing tag to point to a new commit and/or annotation.
|
||||
*/
|
||||
async function updateExistingTag(
|
||||
ctx: Context,
|
||||
operation: UpdateOperation
|
||||
): Promise<void> {
|
||||
const commitMatches = operation.existingSHA === operation.sha
|
||||
|
||||
if (commitMatches) {
|
||||
core.info(
|
||||
`Tag '${operation.name}' exists with same commit but ${operation.reasons.join(', ')}.`
|
||||
)
|
||||
} else {
|
||||
core.info(
|
||||
`Tag '${operation.name}' exists` +
|
||||
`${operation.existingIsAnnotated ? ' (annotated)' : ''}` +
|
||||
`, updating to ${operation.reasons.join(', ')}.`
|
||||
)
|
||||
}
|
||||
|
||||
const targetSha = await resolveTargetSHA(
|
||||
ctx,
|
||||
operation.name,
|
||||
operation.sha,
|
||||
operation.annotation
|
||||
)
|
||||
|
||||
await ctx.octokit.rest.git.updateRef({
|
||||
owner: ctx.owner,
|
||||
repo: ctx.repo,
|
||||
ref: `tags/${operation.name}`,
|
||||
sha: targetSha,
|
||||
force: true
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a tag (doesn't exist yet).
|
||||
*/
|
||||
async function createTag(
|
||||
ctx: Context,
|
||||
operation: CreateOperation
|
||||
): Promise<void> {
|
||||
core.info(
|
||||
`Tag '${operation.name}' does not exist, creating with commit SHA ${operation.sha}.`
|
||||
)
|
||||
|
||||
const targetSha = await resolveTargetSHA(
|
||||
ctx,
|
||||
operation.name,
|
||||
operation.sha,
|
||||
operation.annotation
|
||||
)
|
||||
|
||||
await ctx.octokit.rest.git.createRef({
|
||||
owner: ctx.owner,
|
||||
repo: ctx.repo,
|
||||
ref: `refs/tags/${operation.name}`,
|
||||
sha: targetSha
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolve the target SHA for a tag (creates annotated tag object if needed).
|
||||
*
|
||||
* @param ctx - Operation context
|
||||
* @param tagName - The tag name
|
||||
* @param commitSha - The commit SHA
|
||||
* @param annotation - The annotation message (if any)
|
||||
* @returns The SHA to use (tag object SHA if annotated, commit SHA otherwise)
|
||||
*/
|
||||
async function resolveTargetSHA(
|
||||
ctx: Context,
|
||||
tagName: string,
|
||||
commitSha: string,
|
||||
annotation: string
|
||||
): Promise<string> {
|
||||
if (!annotation) {
|
||||
return commitSha
|
||||
}
|
||||
|
||||
const tagObject = await ctx.octokit.rest.git.createTag({
|
||||
owner: ctx.owner,
|
||||
repo: ctx.repo,
|
||||
tag: tagName,
|
||||
message: annotation,
|
||||
object: commitSha,
|
||||
type: 'commit'
|
||||
})
|
||||
|
||||
return tagObject.data.sha
|
||||
}
|
||||
|
||||
/**
|
||||
* Compare existing tag state with desired target state.
|
||||
*
|
||||
* @param sha - The desired commit SHA
|
||||
* @param annotation - The desired annotation
|
||||
* @param existing - Information about the existing tag
|
||||
* @returns Object indicating whether commit and annotation match
|
||||
*/
|
||||
function compareTagState(
|
||||
sha: string,
|
||||
annotation: string,
|
||||
existing: ExistingTagInfo
|
||||
): {
|
||||
commitMatches: boolean
|
||||
annotationMatches: boolean
|
||||
} {
|
||||
const isAnnotated = existing.isAnnotated === true
|
||||
|
||||
const commitMatches = existing.commitSHA === sha
|
||||
const annotationMatches =
|
||||
(isAnnotated && !!annotation && existing.annotation === annotation) ||
|
||||
(!isAnnotated && !annotation) ||
|
||||
false
|
||||
|
||||
return { commitMatches, annotationMatches }
|
||||
}
|
||||
|
||||
/**
|
||||
* Get update reason messages based on what changed.
|
||||
*
|
||||
* @param sha - The desired commit SHA
|
||||
* @param annotation - The desired annotation
|
||||
* @param existing - Information about the existing tag
|
||||
* @returns Array of reason strings
|
||||
*/
|
||||
function getUpdateReasons(
|
||||
sha: string,
|
||||
annotation: string,
|
||||
existing: ExistingTagInfo
|
||||
): string[] {
|
||||
const { commitMatches, annotationMatches } = compareTagState(
|
||||
sha,
|
||||
annotation,
|
||||
existing
|
||||
)
|
||||
const reasons: string[] = []
|
||||
|
||||
if (!commitMatches) {
|
||||
reasons.push(`commit SHA ${sha} (was ${existing.commitSHA})`)
|
||||
}
|
||||
|
||||
if (!annotationMatches && annotation) {
|
||||
if (existing.isAnnotated === true) {
|
||||
reasons.push('annotation message changed')
|
||||
} else {
|
||||
reasons.push('adding annotation')
|
||||
}
|
||||
} else if (
|
||||
!annotationMatches &&
|
||||
!annotation &&
|
||||
existing.isAnnotated === true
|
||||
) {
|
||||
reasons.push('removing annotation')
|
||||
}
|
||||
|
||||
return reasons
|
||||
}
|
||||
|
||||
@@ -5,7 +5,9 @@ export const mockOctokit = {
|
||||
git: {
|
||||
getRef: jest.fn<(args: unknown) => Promise<unknown>>(),
|
||||
createRef: jest.fn<(args: unknown) => Promise<unknown>>(),
|
||||
updateRef: jest.fn<(args: unknown) => Promise<unknown>>()
|
||||
updateRef: jest.fn<(args: unknown) => Promise<unknown>>(),
|
||||
createTag: jest.fn<(args: unknown) => Promise<unknown>>(),
|
||||
getTag: jest.fn<(args: unknown) => Promise<unknown>>()
|
||||
},
|
||||
repos: {
|
||||
getCommit: jest.fn<(args: unknown) => Promise<unknown>>()
|
||||
1222
tests/main.test.ts
Normal file
1222
tests/main.test.ts
Normal file
File diff suppressed because it is too large
Load Diff
37
tests/tags.test.ts
Normal file
37
tests/tags.test.ts
Normal file
@@ -0,0 +1,37 @@
|
||||
/**
|
||||
* Unit tests for tag operation execution, src/tags.ts
|
||||
*/
|
||||
import { jest } from '@jest/globals'
|
||||
import * as core from './fixtures/core.js'
|
||||
import * as github from './fixtures/github.js'
|
||||
|
||||
// Mocks should be declared before the module being tested is imported.
|
||||
jest.unstable_mockModule('@actions/core', () => core)
|
||||
jest.unstable_mockModule('@actions/github', () => github)
|
||||
|
||||
// The module being tested should be imported dynamically.
|
||||
const { executeTagOperation } = await import('../src/tags.js')
|
||||
import type { TagOperation } from '../src/tags.js'
|
||||
|
||||
describe('executeTagOperation', () => {
|
||||
beforeEach(() => {
|
||||
jest.resetAllMocks()
|
||||
github.getOctokit.mockReturnValue(github.mockOctokit)
|
||||
})
|
||||
|
||||
it('throws error for unknown operation type', async () => {
|
||||
const invalidOperation = {
|
||||
operation: 'invalid',
|
||||
name: 'v1',
|
||||
ref: 'main',
|
||||
sha: 'abc123',
|
||||
owner: 'test-owner',
|
||||
repo: 'test-repo'
|
||||
} as unknown as TagOperation
|
||||
|
||||
await expect(
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
executeTagOperation(invalidOperation, github.mockOctokit as any)
|
||||
).rejects.toThrow('Unknown operation type: invalid')
|
||||
})
|
||||
})
|
||||
@@ -7,8 +7,7 @@
|
||||
},
|
||||
"exclude": ["dist", "node_modules"],
|
||||
"include": [
|
||||
"__fixtures__",
|
||||
"__tests__",
|
||||
"tests",
|
||||
"src",
|
||||
"eslint.config.mjs",
|
||||
"jest.config.js",
|
||||
|
||||
@@ -6,6 +6,6 @@
|
||||
"moduleResolution": "NodeNext",
|
||||
"outDir": "./dist"
|
||||
},
|
||||
"exclude": ["__fixtures__", "__tests__", "coverage", "dist", "node_modules"],
|
||||
"exclude": ["tests", "coverage", "dist", "node_modules"],
|
||||
"include": ["src"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user