Compare commits

..

2 Commits

Author SHA1 Message Date
dependabot[bot] 4391f3da66 Fix 24 high severity vulnerabilities by overriding brace-expansion to 5.0.8 (#1351)
* Bump fast-xml-parser from 5.9.3 to 5.10.1

Bumps [fast-xml-parser](https://github.com/NaturalIntelligence/fast-xml-parser) from 5.9.3 to 5.10.1.
- [Release notes](https://github.com/NaturalIntelligence/fast-xml-parser/releases)
- [Changelog](https://github.com/NaturalIntelligence/fast-xml-parser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/NaturalIntelligence/fast-xml-parser/compare/v5.9.3...v5.10.1)

---
updated-dependencies:
- dependency-name: fast-xml-parser
  dependency-version: 5.10.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore: update dependencies and remove unused packages

- Updated `balanced-match` to version 4.0.4 in `package-lock.json`.
- Updated `brace-expansion` to version 5.0.8 in `package-lock.json` and `package.json`.
- Removed unused nested dependencies of `balanced-match` and `brace-expansion` from `package-lock.json`.
- Adjusted `overrides` in `package.json` to reflect the new version of `brace-expansion`.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: chiranjib-swain <chiranjib-swain@github.com>
2026-07-27 12:11:06 -05:00
Chiranjib Swain eaf9131fae refactor: update imports to use ES module syntax and improve test structure (#1350)
- Changed import statements across multiple files to use the .js extension for ES module compatibility.
- Refactored test files to utilize jest's unstable_mockModule for mocking core actions.
- Removed unnecessary spy instances in tests, replacing them with direct mocked function calls.
- Updated TypeScript configuration to target ES2022 and use NodeNext module resolution.
- Removed the tsconfig.spec.json file and adjusted the main tsconfig.json to exclude test files.
2026-07-23 15:39:34 -05:00
127 changed files with 68621 additions and 55629 deletions
-6
View File
@@ -1,6 +0,0 @@
# Ignore list
/*
# Do not ignore these folders:
!__tests__/
!src/
-51
View File
@@ -1,51 +0,0 @@
// This is a reusable configuration file copied from https://github.com/actions/reusable-workflows/tree/main/reusable-configurations. Please don't make changes to this file as it's the subject of an automatic update.
module.exports = {
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:eslint-plugin-jest/recommended',
'eslint-config-prettier'
],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'eslint-plugin-node', 'eslint-plugin-jest'],
rules: {
'@typescript-eslint/no-require-imports': 'error',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/ban-ts-comment': [
'error',
{
'ts-ignore': 'allow-with-description'
}
],
'no-console': 'error',
'yoda': 'error',
'prefer-const': [
'error',
{
destructuring: 'all'
}
],
'no-control-regex': 'off',
'no-constant-condition': ['error', {checkLoops: false}],
'node/no-extraneous-import': 'error'
},
overrides: [
{
files: ['**/*{test,spec}.ts'],
rules: {
'@typescript-eslint/no-unused-vars': 'off',
'jest/no-standalone-expect': 'off',
'jest/no-conditional-expect': 'off',
'no-console': 'off',
}
}
],
env: {
node: true,
es6: true,
'jest/globals': true
}
};
+2
View File
@@ -14,3 +14,5 @@ allowed:
reviewed: reviewed:
npm: npm:
- "@actions/http-client" - "@actions/http-client"
- brace-expansion
- balanced-match
+1 -1
View File
@@ -1,6 +1,6 @@
--- ---
name: "@actions/cache" name: "@actions/cache"
version: 5.0.5 version: 6.1.0
type: npm type: npm
summary: Actions cache lib summary: Actions cache lib
homepage: https://github.com/actions/toolkit/tree/main/packages/cache homepage: https://github.com/actions/toolkit/tree/main/packages/cache
+1 -1
View File
@@ -1,6 +1,6 @@
--- ---
name: "@actions/core" name: "@actions/core"
version: 2.0.3 version: 3.0.1
type: npm type: npm
summary: Actions core lib summary: Actions core lib
homepage: https://github.com/actions/toolkit/tree/main/packages/core homepage: https://github.com/actions/toolkit/tree/main/packages/core
+1 -1
View File
@@ -1,6 +1,6 @@
--- ---
name: "@actions/exec" name: "@actions/exec"
version: 2.0.0 version: 3.0.0
type: npm type: npm
summary: Actions exec lib summary: Actions exec lib
homepage: https://github.com/actions/toolkit/tree/main/packages/exec homepage: https://github.com/actions/toolkit/tree/main/packages/exec
+1 -1
View File
@@ -1,6 +1,6 @@
--- ---
name: "@actions/github" name: "@actions/github"
version: 7.0.0 version: 9.1.1
type: npm type: npm
summary: Actions github lib summary: Actions github lib
homepage: https://github.com/actions/toolkit/tree/main/packages/github homepage: https://github.com/actions/toolkit/tree/main/packages/github
+1 -1
View File
@@ -1,6 +1,6 @@
--- ---
name: "@actions/glob" name: "@actions/glob"
version: 0.5.1 version: 0.6.1
type: npm type: npm
summary: Actions glob lib summary: Actions glob lib
homepage: https://github.com/actions/toolkit/tree/main/packages/glob homepage: https://github.com/actions/toolkit/tree/main/packages/glob
+32
View File
@@ -0,0 +1,32 @@
---
name: "@actions/http-client"
version: 4.0.1
type: npm
summary: Actions Http Client
homepage: https://github.com/actions/toolkit/tree/main/packages/http-client
license: other
licenses:
- sources: LICENSE
text: |
Actions Http Client for Node.js
Copyright (c) GitHub, Inc.
All rights reserved.
MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
notices: []
+1 -1
View File
@@ -1,6 +1,6 @@
--- ---
name: "@actions/io" name: "@actions/io"
version: 2.0.0 version: 3.0.2
type: npm type: npm
summary: Actions io lib summary: Actions io lib
homepage: https://github.com/actions/toolkit/tree/main/packages/io homepage: https://github.com/actions/toolkit/tree/main/packages/io
+1 -1
View File
@@ -1,6 +1,6 @@
--- ---
name: "@azure/core-client" name: "@azure/core-client"
version: 1.10.1 version: 1.10.2
type: npm type: npm
summary: Core library for interfacing with AutoRest generated code summary: Core library for interfacing with AutoRest generated code
homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-client/ homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-client/
+1 -1
View File
@@ -1,6 +1,6 @@
--- ---
name: "@azure/core-http-compat" name: "@azure/core-http-compat"
version: 2.3.1 version: 2.4.0
type: npm type: npm
summary: Core HTTP Compatibility Library to bridge the gap between Core V1 & V2 packages. summary: Core HTTP Compatibility Library to bridge the gap between Core V1 & V2 packages.
homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-compat/ homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-compat/
+2 -2
View File
@@ -1,9 +1,9 @@
--- ---
name: "@azure/core-rest-pipeline" name: "@azure/core-rest-pipeline"
version: 1.22.2 version: 1.24.0
type: npm type: npm
summary: Isomorphic client library for making HTTP requests in node.js and browser. summary: Isomorphic client library for making HTTP requests in node.js and browser.
homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-rest-pipeline/ homepage: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/core-rest-pipeline/README.md
license: mit license: mit
licenses: licenses:
- sources: LICENSE - sources: LICENSE
+1 -1
View File
@@ -1,6 +1,6 @@
--- ---
name: "@azure/core-xml" name: "@azure/core-xml"
version: 1.5.0 version: 1.5.1
type: npm type: npm
summary: Core library for interacting with XML payloads summary: Core library for interacting with XML payloads
homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-xml/ homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-xml/
+2 -2
View File
@@ -1,9 +1,9 @@
--- ---
name: "@azure/storage-blob" name: "@azure/storage-blob"
version: 12.30.0 version: 12.33.0
type: npm type: npm
summary: Microsoft Azure Storage SDK for JavaScript - Blob summary: Microsoft Azure Storage SDK for JavaScript - Blob
homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/storage/storage-blob/ homepage: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/storage/storage-blob/README.md
license: mit license: mit
licenses: licenses:
- sources: LICENSE - sources: LICENSE
+2 -2
View File
@@ -1,9 +1,9 @@
--- ---
name: "@azure/storage-common" name: "@azure/storage-common"
version: 12.2.0 version: 12.4.1
type: npm type: npm
summary: Azure Storage Common Client Library for JavaScript summary: Azure Storage Common Client Library for JavaScript
homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/storage/storage-internal-avro/ homepage: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/storage/storage-common/README.md
license: mit license: mit
licenses: licenses:
- sources: LICENSE - sources: LICENSE
+1 -1
View File
@@ -1,6 +1,6 @@
--- ---
name: "@nodable/entities" name: "@nodable/entities"
version: 2.1.0 version: 3.0.0
type: npm type: npm
summary: Entity parser for XML, HTML, External entites with security and NCR control summary: Entity parser for XML, HTML, External entites with security and NCR control
homepage: homepage:
+1 -1
View File
@@ -1,6 +1,6 @@
--- ---
name: "@octokit/auth-token" name: "@octokit/auth-token"
version: 4.0.0 version: 6.0.0
type: npm type: npm
summary: GitHub API token authentication for browsers and Node.js summary: GitHub API token authentication for browsers and Node.js
homepage: homepage:
+1 -1
View File
@@ -1,6 +1,6 @@
--- ---
name: "@octokit/core" name: "@octokit/core"
version: 5.2.2 version: 7.0.6
type: npm type: npm
summary: Extendable client for GitHub's REST & GraphQL APIs summary: Extendable client for GitHub's REST & GraphQL APIs
homepage: homepage:
+1 -1
View File
@@ -1,6 +1,6 @@
--- ---
name: "@octokit/endpoint" name: "@octokit/endpoint"
version: 9.0.6 version: 11.0.3
type: npm type: npm
summary: Turns REST API endpoints into generic request options summary: Turns REST API endpoints into generic request options
homepage: homepage:
+1 -1
View File
@@ -1,6 +1,6 @@
--- ---
name: "@octokit/graphql" name: "@octokit/graphql"
version: 7.1.1 version: 9.0.3
type: npm type: npm
summary: GitHub GraphQL API client for browsers and Node summary: GitHub GraphQL API client for browsers and Node
homepage: homepage:
-20
View File
@@ -1,20 +0,0 @@
---
name: "@octokit/openapi-types"
version: 24.2.0
type: npm
summary: Generated TypeScript definitions based on GitHub's OpenAPI spec for api.github.com
homepage:
license: mit
licenses:
- sources: LICENSE
text: |-
Copyright 2020 Gregor Martynus
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- sources: README.md
text: "[MIT](LICENSE)"
notices: []
@@ -1,14 +1,14 @@
--- ---
name: "@octokit/openapi-types" name: "@octokit/openapi-types"
version: 20.0.0 version: 27.0.0
type: npm type: npm
summary: Generated TypeScript definitions based on GitHub's OpenAPI spec for api.github.com summary: Generated TypeScript definitions based on GitHub's OpenAPI spec for api.github.com
homepage: homepage:
license: mit license: mit
licenses: licenses:
- sources: LICENSE - sources: LICENSE
text: |- text: |
Copyright 2020 Gregor Martynus Copyright (c) GitHub 2025 - Licensed as MIT.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+1 -1
View File
@@ -1,6 +1,6 @@
--- ---
name: "@octokit/plugin-paginate-rest" name: "@octokit/plugin-paginate-rest"
version: 9.2.2 version: 14.0.0
type: npm type: npm
summary: Octokit plugin to paginate REST API endpoint responses summary: Octokit plugin to paginate REST API endpoint responses
homepage: homepage:
+1 -1
View File
@@ -1,6 +1,6 @@
--- ---
name: "@octokit/plugin-rest-endpoint-methods" name: "@octokit/plugin-rest-endpoint-methods"
version: 10.4.1 version: 17.0.0
type: npm type: npm
summary: Octokit plugin adding one method for all of api.github.com REST API endpoints summary: Octokit plugin adding one method for all of api.github.com REST API endpoints
homepage: homepage:
+1 -1
View File
@@ -1,6 +1,6 @@
--- ---
name: "@octokit/plugin-retry" name: "@octokit/plugin-retry"
version: 6.1.0 version: 8.1.0
type: npm type: npm
summary: Automatic retry plugin for octokit summary: Automatic retry plugin for octokit
homepage: homepage:
+1 -1
View File
@@ -1,6 +1,6 @@
--- ---
name: "@octokit/request-error" name: "@octokit/request-error"
version: 5.1.1 version: 7.1.0
type: npm type: npm
summary: Error class for Octokit request errors summary: Error class for Octokit request errors
homepage: homepage:
+1 -1
View File
@@ -1,6 +1,6 @@
--- ---
name: "@octokit/request" name: "@octokit/request"
version: 8.4.1 version: 10.0.11
type: npm type: npm
summary: Send parameterized requests to GitHub's APIs with sensible defaults in browsers summary: Send parameterized requests to GitHub's APIs with sensible defaults in browsers
and Node and Node
-20
View File
@@ -1,20 +0,0 @@
---
name: "@octokit/types"
version: 13.10.0
type: npm
summary: Shared TypeScript definitions for Octokit projects
homepage:
license: mit
licenses:
- sources: LICENSE
text: |
MIT License Copyright (c) 2019 Octokit contributors
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- sources: README.md
text: "[MIT](LICENSE)"
notices: []
@@ -1,6 +1,6 @@
--- ---
name: "@octokit/types" name: "@octokit/types"
version: 12.6.0 version: 16.0.0
type: npm type: npm
summary: Shared TypeScript definitions for Octokit projects summary: Shared TypeScript definitions for Octokit projects
homepage: homepage:
+2 -2
View File
@@ -1,9 +1,9 @@
--- ---
name: "@typespec/ts-http-runtime" name: "@typespec/ts-http-runtime"
version: 0.3.2 version: 0.3.6
type: npm type: npm
summary: Isomorphic client library for making HTTP requests in node.js and browser. summary: Isomorphic client library for making HTTP requests in node.js and browser.
homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/ts-http-runtime/ homepage: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/ts-http-runtime/README.md
license: mit license: mit
licenses: licenses:
- sources: LICENSE - sources: LICENSE
+35
View File
@@ -0,0 +1,35 @@
---
name: anynum
version: 1.0.1
type: npm
summary: Normalize all Unicode decimal digits (Devanagari, Arabic, Thai, etc.) to
ASCII numerals. Zero dependencies, performance-first.
homepage:
license: mit
licenses:
- sources: LICENSE
text: |
MIT License
Copyright (c) 2026 Natural Intelligence
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
- sources: README.md
text: MIT
notices: []
+5 -26
View File
@@ -1,39 +1,18 @@
--- ---
name: balanced-match name: balanced-match
version: 1.0.2 version: 4.0.4
type: npm type: npm
summary: Match balanced character pairs, like "{" and "}" summary: Match balanced character pairs, like "{" and "}"
homepage: https://github.com/juliangruber/balanced-match homepage:
license: mit license: other
licenses: licenses:
- sources: LICENSE.md - sources: LICENSE.md
text: | text: |
(MIT) (MIT)
Copyright (c) 2013 Julian Gruber &lt;julian@juliangruber.com&gt; Original code Copyright Julian Gruber <julian@juliangruber.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of Port to TypeScript Copyright Isaac Z. Schlueter <i@izs.me>
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
- sources: README.md
text: |-
(MIT)
Copyright (c) 2013 Julian Gruber &lt;julian@juliangruber.com&gt;
Permission is hereby granted, free of charge, to any person obtaining a copy of Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in this software and associated documentation files (the "Software"), to deal in
+1 -1
View File
@@ -1,6 +1,6 @@
--- ---
name: before-after-hook name: before-after-hook
version: 2.2.3 version: 4.0.0
type: npm type: npm
summary: asynchronous before/error/after hooks for internal functionality summary: asynchronous before/error/after hooks for internal functionality
homepage: homepage:
+6 -27
View File
@@ -1,16 +1,18 @@
--- ---
name: brace-expansion name: brace-expansion
version: 1.1.14 version: 5.0.8
type: npm type: npm
summary: Brace expansion as known from sh/bash summary: Brace expansion as known from sh/bash
homepage: https://github.com/juliangruber/brace-expansion homepage:
license: mit license: other
licenses: licenses:
- sources: LICENSE - sources: LICENSE
text: | text: |
MIT License MIT License
Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> Copyright Julian Gruber <julian@juliangruber.com>
TypeScript port Copyright Isaac Z. Schlueter <i@izs.me>
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal
@@ -22,29 +24,6 @@ licenses:
The above copyright notice and this permission notice shall be included in all The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software. copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
- sources: README.md
text: |-
(MIT)
Copyright (c) 2013 Julian Gruber &lt;julian@juliangruber.com&gt;
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-31
View File
@@ -1,31 +0,0 @@
---
name: concat-map
version: 0.0.1
type: npm
summary: concatenative mapdashery
homepage:
license: other
licenses:
- sources: LICENSE
text: |
This software is released under the MIT license:
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- sources: README.markdown
text: MIT
notices: []
+47
View File
@@ -0,0 +1,47 @@
---
name: content-type
version: 2.0.0
type: npm
summary: Create and parse HTTP Content-Type header
homepage:
license: mit
licenses:
- sources: LICENSE
text: |
(The MIT License)
Copyright (c) 2015 Douglas Christopher Wilson
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- sources: README.md
text: |-
[MIT](LICENSE)
[npm-image]: https://img.shields.io/npm/v/content-type
[npm-url]: https://npmjs.org/package/content-type
[downloads-image]: https://img.shields.io/npm/dm/content-type
[downloads-url]: https://npmjs.org/package/content-type
[build-image]: https://img.shields.io/github/actions/workflow/status/jshttp/content-type/ci.yml?branch=master
[build-url]: https://github.com/jshttp/content-type/actions/workflows/ci.yml?query=branch%3Amaster
[coverage-image]: https://img.shields.io/codecov/c/gh/jshttp/content-type
[coverage-url]: https://codecov.io/gh/jshttp/content-type
[license-image]: http://img.shields.io/npm/l/content-type.svg?style=flat
[license-url]: LICENSE
notices: []
+1 -1
View File
@@ -1,6 +1,6 @@
--- ---
name: debug name: debug
version: 4.3.4 version: 4.4.3
type: npm type: npm
summary: Lightweight debugging utility for Node.js and the browser summary: Lightweight debugging utility for Node.js and the browser
homepage: homepage:
-28
View File
@@ -1,28 +0,0 @@
---
name: deprecation
version: 2.3.1
type: npm
summary: Log a deprecation message with stack
homepage: https://github.com/gr2m/deprecation#readme
license: isc
licenses:
- sources: LICENSE
text: |
The ISC License
Copyright (c) Gregor Martynus and contributors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- sources: README.md
text: "[ISC](LICENSE)"
notices: []
+1 -1
View File
@@ -1,6 +1,6 @@
--- ---
name: fast-xml-builder name: fast-xml-builder
version: 1.1.8 version: 1.2.1
type: npm type: npm
summary: Build XML from JSON without C/C++ based libraries summary: Build XML from JSON without C/C++ based libraries
homepage: homepage:
+1 -1
View File
@@ -1,6 +1,6 @@
--- ---
name: fast-xml-parser name: fast-xml-parser
version: 5.7.3 version: 5.10.1
type: npm type: npm
summary: Validate XML, Parse XML, Build XML without C/C++ based libraries summary: Validate XML, Parse XML, Build XML without C/C++ based libraries
homepage: homepage:
+35
View File
@@ -0,0 +1,35 @@
---
name: is-unsafe
version: 2.0.0
type: npm
summary: Zero-dependency, DOM-free, pure predicate for detecting unsafe strings across
HTML, XML, SVG, SQL, SHELL, and REGEX contexts
homepage:
license: mit
licenses:
- sources: LICENSE
text: |
MIT License
Copyright (c) 2026 Natural Intelligence
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
- sources: README.md
text: MIT
notices: []
@@ -1,16 +1,17 @@
--- ---
name: "@azure/abort-controller" name: json-with-bigint
version: 1.1.0 version: 3.5.8
type: npm type: npm
summary: Microsoft Azure SDK for JavaScript - Aborter summary: JS library that allows you to easily serialize and deserialize data with
homepage: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/abort-controller/README.md BigInt values
homepage:
license: mit license: mit
licenses: licenses:
- sources: LICENSE - sources: LICENSE
text: | text: |
The MIT License (MIT) MIT License
Copyright (c) 2020 Microsoft Copyright (c) 2023 Ivan Korolenko
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal
+2 -2
View File
@@ -1,6 +1,6 @@
--- ---
name: ms name: ms
version: 2.1.2 version: 2.1.3
type: npm type: npm
summary: Tiny millisecond conversion utility summary: Tiny millisecond conversion utility
homepage: homepage:
@@ -10,7 +10,7 @@ licenses:
text: | text: |
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2016 Zeit, Inc. Copyright (c) 2020 Vercel, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal
-26
View File
@@ -1,26 +0,0 @@
---
name: once
version: 1.4.0
type: npm
summary: Run a function exactly one time
homepage: https://github.com/isaacs/once#readme
license: isc
licenses:
- sources: LICENSE
text: |
The ISC License
Copyright (c) Isaac Z. Schlueter and Contributors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
notices: []
+1 -1
View File
@@ -1,6 +1,6 @@
--- ---
name: path-expression-matcher name: path-expression-matcher
version: 1.5.0 version: 1.6.2
type: npm type: npm
summary: Efficient path tracking and pattern matching for XML/JSON parsers summary: Efficient path tracking and pattern matching for XML/JSON parsers
homepage: https://github.com/NaturalIntelligence/path-expression-matcher#readme homepage: https://github.com/NaturalIntelligence/path-expression-matcher#readme
-26
View File
@@ -1,26 +0,0 @@
---
name: semver
version: 6.3.1
type: npm
summary: The semantic version parser used by npm.
homepage:
license: isc
licenses:
- sources: LICENSE
text: |
The ISC License
Copyright (c) Isaac Z. Schlueter and Contributors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
notices: []
@@ -1,6 +1,6 @@
--- ---
name: semver name: semver
version: 7.7.4 version: 7.8.5
type: npm type: npm
summary: The semantic version parser used by npm. summary: The semantic version parser used by npm.
homepage: homepage:
+1 -1
View File
@@ -1,6 +1,6 @@
--- ---
name: strnum name: strnum
version: 2.2.3 version: 2.4.1
type: npm type: npm
summary: Parse String to Number based on configuration summary: Parse String to Number based on configuration
homepage: homepage:
+3 -3
View File
@@ -1,8 +1,8 @@
--- ---
name: universal-user-agent name: universal-user-agent
version: 6.0.1 version: 7.0.3
type: npm type: npm
summary: Get a user agent string in both browser and node summary: Get a user agent string across all JavaScript Runtime Environments
homepage: homepage:
license: other license: other
licenses: licenses:
@@ -10,7 +10,7 @@ licenses:
text: | text: |
# [ISC License](https://spdx.org/licenses/ISC) # [ISC License](https://spdx.org/licenses/ISC)
Copyright (c) 2018, Gregor Martynus (https://github.com/gr2m) Copyright (c) 2018-2021, Gregor Martynus (https://github.com/gr2m)
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
-26
View File
@@ -1,26 +0,0 @@
---
name: wrappy
version: 1.0.2
type: npm
summary: Callback wrapping utility
homepage: https://github.com/npm/wrappy
license: isc
licenses:
- sources: LICENSE
text: |
The ISC License
Copyright (c) Isaac Z. Schlueter and Contributors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
notices: []
+12
View File
@@ -0,0 +1,12 @@
---
name: xml-naming
version: 0.1.0
type: npm
summary: Validates XML name productions — Name, NCName, QName, NMToken, NMTokens —
for XML 1.0 and 1.1
homepage:
license: mit
licenses:
- sources: README.md
text: MIT
notices: []
+35
View File
@@ -0,0 +1,35 @@
---
name: xml-naming
version: 0.3.0
type: npm
summary: Validates XML name productions — Name, NCName, QName, NMToken, NMTokens —
for XML 1.0 and 1.1
homepage:
license: mit
licenses:
- sources: LICENSE
text: |
MIT License
Copyright (c) 2026 Natural Intelligence
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
- sources: README.md
text: MIT
notices: []
-11
View File
@@ -1,11 +0,0 @@
// This is a reusable configuration file copied from https://github.com/actions/reusable-workflows/tree/main/reusable-configurations. Please don't make changes to this file as it's the subject of an automatic update.
module.exports = {
printWidth: 80,
tabWidth: 2,
useTabs: false,
semi: true,
singleQuote: true,
trailingComma: 'none',
bracketSpacing: false,
arrowParens: 'avoid'
};
+10
View File
@@ -0,0 +1,10 @@
{
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": true,
"trailingComma": "none",
"bracketSpacing": false,
"arrowParens": "avoid"
}
+4
View File
@@ -3,6 +3,10 @@
[![Basic validation](https://github.com/actions/stale/actions/workflows/basic-validation.yml/badge.svg?branch=main)](https://github.com/actions/stale/actions/workflows/basic-validation.yml) [![Basic validation](https://github.com/actions/stale/actions/workflows/basic-validation.yml/badge.svg?branch=main)](https://github.com/actions/stale/actions/workflows/basic-validation.yml)
[![e2e tests](https://github.com/actions/stale/actions/workflows/e2e-tests.yml/badge.svg?branch=main)](https://github.com/actions/stale/actions/workflows/e2e-tests.yml) [![e2e tests](https://github.com/actions/stale/actions/workflows/e2e-tests.yml/badge.svg?branch=main)](https://github.com/actions/stale/actions/workflows/e2e-tests.yml)
## What's changed in V11
- **Migrated to ESM** internally to support the latest `@actions/*` package versions. No changes to action inputs, outputs, or behavior.
## Breaking changes in V10 ## Breaking changes in V10
- Upgraded action from node20 to node 24 - Upgraded action from node20 to node 24
+8 -7
View File
@@ -1,10 +1,11 @@
import {Issue} from '../src/classes/issue'; import {beforeEach, describe, expect, test} from '@jest/globals';
import {IIssue} from '../src/interfaces/issue'; import {Issue} from '../src/classes/issue.js';
import {IIssuesProcessorOptions} from '../src/interfaces/issues-processor-options'; import {IIssue} from '../src/interfaces/issue.js';
import {IssuesProcessorMock} from './classes/issues-processor-mock'; import {IIssuesProcessorOptions} from '../src/interfaces/issues-processor-options.js';
import {DefaultProcessorOptions} from './constants/default-processor-options'; import {IssuesProcessorMock} from './classes/issues-processor-mock.js';
import {generateIssue} from './functions/generate-issue'; import {DefaultProcessorOptions} from './constants/default-processor-options.js';
import {StateMock} from './classes/state-mock'; import {generateIssue} from './functions/generate-issue.js';
import {StateMock} from './classes/state-mock.js';
let issuesProcessorBuilder: IssuesProcessorBuilder; let issuesProcessorBuilder: IssuesProcessorBuilder;
let issuesProcessor: IssuesProcessorMock; let issuesProcessor: IssuesProcessorMock;
+7 -6
View File
@@ -1,9 +1,10 @@
import {Issue} from '../src/classes/issue'; import {beforeEach, describe, expect, test} from '@jest/globals';
import {IIssuesProcessorOptions} from '../src/interfaces/issues-processor-options'; import {Issue} from '../src/classes/issue.js';
import {IssuesProcessorMock} from './classes/issues-processor-mock'; import {IIssuesProcessorOptions} from '../src/interfaces/issues-processor-options.js';
import {DefaultProcessorOptions} from './constants/default-processor-options'; import {IssuesProcessorMock} from './classes/issues-processor-mock.js';
import {generateIssue} from './functions/generate-issue'; import {DefaultProcessorOptions} from './constants/default-processor-options.js';
import {alwaysFalseStateMock} from './classes/state-mock'; import {generateIssue} from './functions/generate-issue.js';
import {alwaysFalseStateMock} from './classes/state-mock.js';
interface ITestData { interface ITestData {
id: number; id: number;
+7 -7
View File
@@ -1,10 +1,10 @@
import {Issue} from '../../src/classes/issue'; import {Issue} from '../../src/classes/issue.js';
import {IssuesProcessor} from '../../src/classes/issues-processor'; import {IssuesProcessor} from '../../src/classes/issues-processor.js';
import {IComment} from '../../src/interfaces/comment'; import {IComment} from '../../src/interfaces/comment.js';
import {IIssuesProcessorOptions} from '../../src/interfaces/issues-processor-options'; import {IIssuesProcessorOptions} from '../../src/interfaces/issues-processor-options.js';
import {IPullRequest} from '../../src/interfaces/pull-request'; import {IPullRequest} from '../../src/interfaces/pull-request.js';
import {IState} from '../../src/interfaces/state/state'; import {IState} from '../../src/interfaces/state/state.js';
import {IIssueEvent} from '../../src/interfaces/issue-event'; import {IIssueEvent} from '../../src/interfaces/issue-event.js';
export class IssuesProcessorMock extends IssuesProcessor { export class IssuesProcessorMock extends IssuesProcessor {
constructor( constructor(
+2 -2
View File
@@ -1,5 +1,5 @@
import {IState} from '../../src/interfaces/state/state'; import {IState} from '../../src/interfaces/state/state.js';
import {IIssue} from '../../src/interfaces/issue'; import {IIssue} from '../../src/interfaces/issue.js';
export class StateMock implements IState { export class StateMock implements IState {
// eslint-disable-next-line @typescript-eslint/no-unused-vars // eslint-disable-next-line @typescript-eslint/no-unused-vars
@@ -1,4 +1,4 @@
import {IIssuesProcessorOptions} from '../../src/interfaces/issues-processor-options'; import {IIssuesProcessorOptions} from '../../src/interfaces/issues-processor-options.js';
// Default options for use in tests. // Default options for use in tests.
// Mirrors the defaults defined in action.yml // Mirrors the defaults defined in action.yml
+9 -8
View File
@@ -1,11 +1,12 @@
import {Issue} from '../src/classes/issue'; import {beforeEach, describe, expect, test} from '@jest/globals';
import {IIssue} from '../src/interfaces/issue'; import {Issue} from '../src/classes/issue.js';
import {IIssuesProcessorOptions} from '../src/interfaces/issues-processor-options'; import {IIssue} from '../src/interfaces/issue.js';
import {IPullRequest} from '../src/interfaces/pull-request'; import {IIssuesProcessorOptions} from '../src/interfaces/issues-processor-options.js';
import {IssuesProcessorMock} from './classes/issues-processor-mock'; import {IPullRequest} from '../src/interfaces/pull-request.js';
import {DefaultProcessorOptions} from './constants/default-processor-options'; import {IssuesProcessorMock} from './classes/issues-processor-mock.js';
import {generateIssue} from './functions/generate-issue'; import {DefaultProcessorOptions} from './constants/default-processor-options.js';
import {alwaysFalseStateMock} from './classes/state-mock'; import {generateIssue} from './functions/generate-issue.js';
import {alwaysFalseStateMock} from './classes/state-mock.js';
let issuesProcessorBuilder: IssuesProcessorBuilder; let issuesProcessorBuilder: IssuesProcessorBuilder;
let issuesProcessor: IssuesProcessorMock; let issuesProcessor: IssuesProcessorMock;
+1 -1
View File
@@ -1,4 +1,4 @@
import {IIssue} from '../../src/interfaces/issue'; import {IIssue} from '../../src/interfaces/issue.js';
export function generateIIssue( export function generateIIssue(
partialIssue?: Readonly<Partial<IIssue>> partialIssue?: Readonly<Partial<IIssue>>
+4 -4
View File
@@ -1,7 +1,7 @@
import {Issue} from '../../src/classes/issue'; import {Issue} from '../../src/classes/issue.js';
import {IUserAssignee} from '../../src/interfaces/assignee'; import {IUserAssignee} from '../../src/interfaces/assignee.js';
import {IIssuesProcessorOptions} from '../../src/interfaces/issues-processor-options'; import {IIssuesProcessorOptions} from '../../src/interfaces/issues-processor-options.js';
import {IsoDateString} from '../../src/types/iso-date-string'; import {IsoDateString} from '../../src/types/iso-date-string.js';
export function generateIssue( export function generateIssue(
options: IIssuesProcessorOptions, options: IIssuesProcessorOptions,
+8 -7
View File
@@ -1,11 +1,12 @@
import {jest, expect, it, test} from '@jest/globals';
import * as github from '@actions/github'; import * as github from '@actions/github';
import {Issue} from '../src/classes/issue'; import {Issue} from '../src/classes/issue.js';
import {IComment} from '../src/interfaces/comment'; import {IComment} from '../src/interfaces/comment.js';
import {IIssuesProcessorOptions} from '../src/interfaces/issues-processor-options'; import {IIssuesProcessorOptions} from '../src/interfaces/issues-processor-options.js';
import {IssuesProcessorMock} from './classes/issues-processor-mock'; import {IssuesProcessorMock} from './classes/issues-processor-mock.js';
import {DefaultProcessorOptions} from './constants/default-processor-options'; import {DefaultProcessorOptions} from './constants/default-processor-options.js';
import {generateIssue} from './functions/generate-issue'; import {generateIssue} from './functions/generate-issue.js';
import {alwaysFalseStateMock} from './classes/state-mock'; import {alwaysFalseStateMock} from './classes/state-mock.js';
test('processing an issue with no label will make it stale and close it, if it is old enough only if days-before-close is set to 0', async () => { test('processing an issue with no label will make it stale and close it, if it is old enough only if days-before-close is set to 0', async () => {
const opts: IIssuesProcessorOptions = { const opts: IIssuesProcessorOptions = {
+7 -6
View File
@@ -1,9 +1,10 @@
import {Issue} from '../src/classes/issue'; import {beforeEach, describe, expect, test} from '@jest/globals';
import {IIssuesProcessorOptions} from '../src/interfaces/issues-processor-options'; import {Issue} from '../src/classes/issue.js';
import {IssuesProcessorMock} from './classes/issues-processor-mock'; import {IIssuesProcessorOptions} from '../src/interfaces/issues-processor-options.js';
import {DefaultProcessorOptions} from './constants/default-processor-options'; import {IssuesProcessorMock} from './classes/issues-processor-mock.js';
import {generateIssue} from './functions/generate-issue'; import {DefaultProcessorOptions} from './constants/default-processor-options.js';
import {alwaysFalseStateMock} from './classes/state-mock'; import {generateIssue} from './functions/generate-issue.js';
import {alwaysFalseStateMock} from './classes/state-mock.js';
interface ITestData { interface ITestData {
isPullRequest: boolean; isPullRequest: boolean;
+7 -6
View File
@@ -1,9 +1,10 @@
import {Issue} from '../src/classes/issue'; import {describe, expect, test} from '@jest/globals';
import {IIssuesProcessorOptions} from '../src/interfaces/issues-processor-options'; import {Issue} from '../src/classes/issue.js';
import {IssuesProcessorMock} from './classes/issues-processor-mock'; import {IIssuesProcessorOptions} from '../src/interfaces/issues-processor-options.js';
import {DefaultProcessorOptions} from './constants/default-processor-options'; import {IssuesProcessorMock} from './classes/issues-processor-mock.js';
import {generateIssue} from './functions/generate-issue'; import {DefaultProcessorOptions} from './constants/default-processor-options.js';
import {alwaysFalseStateMock} from './classes/state-mock'; import {generateIssue} from './functions/generate-issue.js';
import {alwaysFalseStateMock} from './classes/state-mock.js';
describe('only-issue-types option', () => { describe('only-issue-types option', () => {
test('should only process issues with allowed type', async () => { test('should only process issues with allowed type', async () => {
+8 -7
View File
@@ -1,10 +1,11 @@
import {Issue} from '../src/classes/issue'; import {beforeEach, describe, expect, test} from '@jest/globals';
import {IIssue} from '../src/interfaces/issue'; import {Issue} from '../src/classes/issue.js';
import {IIssuesProcessorOptions} from '../src/interfaces/issues-processor-options'; import {IIssue} from '../src/interfaces/issue.js';
import {IssuesProcessorMock} from './classes/issues-processor-mock'; import {IIssuesProcessorOptions} from '../src/interfaces/issues-processor-options.js';
import {DefaultProcessorOptions} from './constants/default-processor-options'; import {IssuesProcessorMock} from './classes/issues-processor-mock.js';
import {generateIssue} from './functions/generate-issue'; import {DefaultProcessorOptions} from './constants/default-processor-options.js';
import {alwaysFalseStateMock} from './classes/state-mock'; import {generateIssue} from './functions/generate-issue.js';
import {alwaysFalseStateMock} from './classes/state-mock.js';
let issuesProcessorBuilder: IssuesProcessorBuilder; let issuesProcessorBuilder: IssuesProcessorBuilder;
let issuesProcessor: IssuesProcessorMock; let issuesProcessor: IssuesProcessorMock;
+8 -7
View File
@@ -1,10 +1,11 @@
import {Issue} from '../src/classes/issue'; import {beforeEach, describe, expect, it, test} from '@jest/globals';
import {IIssuesProcessorOptions} from '../src/interfaces/issues-processor-options'; import {Issue} from '../src/classes/issue.js';
import {IsoDateString} from '../src/types/iso-date-string'; import {IIssuesProcessorOptions} from '../src/interfaces/issues-processor-options.js';
import {IssuesProcessorMock} from './classes/issues-processor-mock'; import {IsoDateString} from '../src/types/iso-date-string.js';
import {DefaultProcessorOptions} from './constants/default-processor-options'; import {IssuesProcessorMock} from './classes/issues-processor-mock.js';
import {generateIssue} from './functions/generate-issue'; import {DefaultProcessorOptions} from './constants/default-processor-options.js';
import {alwaysFalseStateMock, StateMock} from './classes/state-mock'; import {generateIssue} from './functions/generate-issue.js';
import {alwaysFalseStateMock, StateMock} from './classes/state-mock.js';
describe('operations-per-run option', (): void => { describe('operations-per-run option', (): void => {
let sut: SUT; let sut: SUT;
@@ -1,12 +1,13 @@
import {Issue} from '../src/classes/issue'; import {afterEach, beforeEach, describe, expect, test} from '@jest/globals';
import {IIssuesProcessorOptions} from '../src/interfaces/issues-processor-options'; import {Issue} from '../src/classes/issue.js';
import {IssuesProcessorMock} from './classes/issues-processor-mock'; import {IIssuesProcessorOptions} from '../src/interfaces/issues-processor-options.js';
import {DefaultProcessorOptions} from './constants/default-processor-options'; import {IssuesProcessorMock} from './classes/issues-processor-mock.js';
import {generateIssue} from './functions/generate-issue'; import {DefaultProcessorOptions} from './constants/default-processor-options.js';
import {alwaysFalseStateMock} from './classes/state-mock'; import {generateIssue} from './functions/generate-issue.js';
import {IState} from '../src/interfaces/state/state'; import {alwaysFalseStateMock} from './classes/state-mock.js';
import {IIssueEvent} from '../src/interfaces/issue-event'; import {IState} from '../src/interfaces/state/state.js';
import {IssuesProcessor} from '../src/classes/issues-processor'; import {IIssueEvent} from '../src/interfaces/issue-event.js';
import {IssuesProcessor} from '../src/classes/issues-processor.js';
describe('remove-stale-when-updated with stale label events', (): void => { describe('remove-stale-when-updated with stale label events', (): void => {
const markedStaleOn = '2025-01-01T00:00:00Z'; const markedStaleOn = '2025-01-01T00:00:00Z';
+9 -8
View File
@@ -1,11 +1,12 @@
import {Issue} from '../src/classes/issue'; import {beforeEach, describe, expect, test} from '@jest/globals';
import {IIssue} from '../src/interfaces/issue'; import {Issue} from '../src/classes/issue.js';
import {IIssuesProcessorOptions} from '../src/interfaces/issues-processor-options'; import {IIssue} from '../src/interfaces/issue.js';
import {ILabel} from '../src/interfaces/label'; import {IIssuesProcessorOptions} from '../src/interfaces/issues-processor-options.js';
import {IssuesProcessorMock} from './classes/issues-processor-mock'; import {ILabel} from '../src/interfaces/label.js';
import {DefaultProcessorOptions} from './constants/default-processor-options'; import {IssuesProcessorMock} from './classes/issues-processor-mock.js';
import {generateIssue} from './functions/generate-issue'; import {DefaultProcessorOptions} from './constants/default-processor-options.js';
import {alwaysFalseStateMock} from './classes/state-mock'; import {generateIssue} from './functions/generate-issue.js';
import {alwaysFalseStateMock} from './classes/state-mock.js';
let issuesProcessorBuilder: IssuesProcessorBuilder; let issuesProcessorBuilder: IssuesProcessorBuilder;
let issuesProcessor: IssuesProcessorMock; let issuesProcessor: IssuesProcessorMock;
+48 -29
View File
@@ -1,12 +1,31 @@
import {IStateStorage} from '../src/interfaces/state/state-storage'; import {jest, afterEach, describe, expect, it} from '@jest/globals';
import {IIssuesProcessorOptions} from '../src/interfaces/issues-processor-options'; import type {IStateStorage} from '../src/interfaces/state/state-storage.js';
import {DefaultProcessorOptions} from './constants/default-processor-options'; import type {IIssuesProcessorOptions} from '../src/interfaces/issues-processor-options.js';
import {Issue} from '../src/classes/issue'; import {DefaultProcessorOptions} from './constants/default-processor-options.js';
import {generateIssue} from './functions/generate-issue'; import {Issue} from '../src/classes/issue.js';
import {IssuesProcessorMock} from './classes/issues-processor-mock'; import {generateIssue} from './functions/generate-issue.js';
import {IssueID, State} from '../src/classes/state/state'; import type {IState} from '../src/interfaces/state/state.js';
import {IState} from '../src/interfaces/state/state';
import * as core from '@actions/core'; jest.unstable_mockModule('@actions/core', () => ({
debug: jest.fn(),
info: jest.fn(),
warning: jest.fn(),
error: jest.fn(),
setFailed: jest.fn(),
getInput: jest.fn(),
group: jest
.fn()
.mockImplementation((...args: unknown[]) =>
(args[1] as () => Promise<unknown>)()
)
}));
const {State} = await import('../src/classes/state/state.js');
const {IssuesProcessorMock} =
await import('./classes/issues-processor-mock.js');
const core = await import('@actions/core');
type IssueID = number;
const stateStorage: IStateStorage = { const stateStorage: IStateStorage = {
restore(): Promise<string> { restore(): Promise<string> {
@@ -21,17 +40,7 @@ const getProcessedIssuesIDs = (state: IState): Set<IssueID> =>
(state as unknown as {processedIssuesIDs: Set<IssueID>}).processedIssuesIDs; (state as unknown as {processedIssuesIDs: Set<IssueID>}).processedIssuesIDs;
describe('state', (): void => { describe('state', (): void => {
let debugSpy: jest.SpyInstance;
let infoSpy: jest.SpyInstance;
let warningSpy: jest.SpyInstance;
beforeEach(() => {
debugSpy = jest.spyOn(core, 'debug');
infoSpy = jest.spyOn(core, 'info');
warningSpy = jest.spyOn(core, 'warning');
});
afterEach(() => { afterEach(() => {
jest.resetAllMocks();
jest.clearAllMocks(); jest.clearAllMocks();
}); });
@@ -85,8 +94,10 @@ describe('state', (): void => {
expect(addIssueToProcessedSpy).toHaveBeenCalledTimes(1); expect(addIssueToProcessedSpy).toHaveBeenCalledTimes(1);
expect(addIssueToProcessedSpy).toHaveBeenCalledWith(testIssue1); expect(addIssueToProcessedSpy).toHaveBeenCalledWith(testIssue1);
expect(debugSpy).toHaveBeenCalledWith('state: reset'); expect(jest.mocked(core.debug)).toHaveBeenCalledWith('state: reset');
expect(debugSpy).toHaveBeenCalledWith('state: mark 1 as processed'); expect(jest.mocked(core.debug)).toHaveBeenCalledWith(
'state: mark 1 as processed'
);
}); });
it('issueProcessor should skip the issue marked as proceeded', async () => { it('issueProcessor should skip the issue marked as proceeded', async () => {
@@ -109,7 +120,7 @@ describe('state', (): void => {
const TestIssueList: Issue[] = [testIssue1, testIssue2]; const TestIssueList: Issue[] = [testIssue1, testIssue2];
const state = new State(stateStorage, opts); const state = new State(stateStorage, opts);
state.addIssueToProcessed(testIssue1); state.addIssueToProcessed(testIssue1);
debugSpy.mockClear(); jest.mocked(core.debug).mockClear();
const addIssueToProcessedSpy = jest.spyOn(state, 'addIssueToProcessed'); const addIssueToProcessedSpy = jest.spyOn(state, 'addIssueToProcessed');
const isIssueProcessedSpy = jest.spyOn(state, 'isIssueProcessed'); const isIssueProcessedSpy = jest.spyOn(state, 'isIssueProcessed');
const processor = new IssuesProcessorMock( const processor = new IssuesProcessorMock(
@@ -129,8 +140,10 @@ describe('state', (): void => {
expect(processor.staleIssues.length).toStrictEqual(1); expect(processor.staleIssues.length).toStrictEqual(1);
expect(processor.closedIssues.length).toStrictEqual(1); expect(processor.closedIssues.length).toStrictEqual(1);
expect(debugSpy).toHaveBeenCalledWith('state: reset'); expect(jest.mocked(core.debug)).toHaveBeenCalledWith('state: reset');
expect(debugSpy).toHaveBeenCalledWith('state: mark 2 as processed'); expect(jest.mocked(core.debug)).toHaveBeenCalledWith(
'state: mark 2 as processed'
);
}); });
it('state should not be reset if not all issues are proceeded', async () => { it('state should not be reset if not all issues are proceeded', async () => {
@@ -164,12 +177,14 @@ describe('state', (): void => {
await processor.processIssues(1); await processor.processIssues(1);
// make sure not all issues are proceeded // make sure not all issues are proceeded
expect(warningSpy.mock.calls[2][0]).toContain( expect(jest.mocked(core.warning).mock.calls[2][0]).toContain(
'No more operations left! Exiting...' 'No more operations left! Exiting...'
); );
expect(resetSpy).toHaveBeenCalledTimes(0); expect(resetSpy).toHaveBeenCalledTimes(0);
expect(debugSpy).toHaveBeenCalledWith('state: mark 1 as processed'); expect(jest.mocked(core.debug)).toHaveBeenCalledWith(
'state: mark 1 as processed'
);
}); });
it('state should be reset if all issues are proceeded', async () => { it('state should be reset if all issues are proceeded', async () => {
@@ -202,12 +217,16 @@ describe('state', (): void => {
await processor.processIssues(1); await processor.processIssues(1);
// make sure all issues are proceeded // make sure all issues are proceeded
expect(infoSpy.mock.calls[71][0]).toContain( expect(jest.mocked(core.info).mock.calls[71][0]).toContain(
'No more issues found to process. Exiting...' 'No more issues found to process. Exiting...'
); );
expect(resetSpy).toHaveBeenCalledTimes(1); expect(resetSpy).toHaveBeenCalledTimes(1);
expect(debugSpy).toHaveBeenCalledWith('state: mark 1 as processed'); expect(jest.mocked(core.debug)).toHaveBeenCalledWith(
expect(debugSpy).toHaveBeenCalledWith('state: mark 2 as processed'); 'state: mark 1 as processed'
);
expect(jest.mocked(core.debug)).toHaveBeenCalledWith(
'state: mark 2 as processed'
);
}); });
}); });
+8 -7
View File
@@ -1,10 +1,11 @@
import {Issue} from '../src/classes/issue'; import {beforeEach, describe, expect, it, test} from '@jest/globals';
import {IIssuesProcessorOptions} from '../src/interfaces/issues-processor-options'; import {Issue} from '../src/classes/issue.js';
import {IsoDateString} from '../src/types/iso-date-string'; import {IIssuesProcessorOptions} from '../src/interfaces/issues-processor-options.js';
import {IssuesProcessorMock} from './classes/issues-processor-mock'; import {IsoDateString} from '../src/types/iso-date-string.js';
import {DefaultProcessorOptions} from './constants/default-processor-options'; import {IssuesProcessorMock} from './classes/issues-processor-mock.js';
import {generateIssue} from './functions/generate-issue'; import {DefaultProcessorOptions} from './constants/default-processor-options.js';
import {alwaysFalseStateMock} from './classes/state-mock'; import {generateIssue} from './functions/generate-issue.js';
import {alwaysFalseStateMock} from './classes/state-mock.js';
describe('ignore-updates options', (): void => { describe('ignore-updates options', (): void => {
let sut: SUT; let sut: SUT;
+63176 -52729
View File
File diff suppressed because one or more lines are too long
+3
View File
@@ -0,0 +1,3 @@
{
"type": "module"
}
+74
View File
@@ -0,0 +1,74 @@
// This is a reusable configuration file copied from https://github.com/actions/reusable-workflows/tree/main/reusable-configurations. Please don't make changes to this file as it's the subject of an automatic update.
import js from '@eslint/js';
import tsParser from '@typescript-eslint/parser';
import tsPlugin from '@typescript-eslint/eslint-plugin';
import jest from 'eslint-plugin-jest';
import n from 'eslint-plugin-n';
import prettier from 'eslint-config-prettier';
import globals from 'globals';
export default [
{
ignores: ['**/*', '!src/**', '!__tests__/**']
},
js.configs.recommended,
{
files: ['**/*.ts'],
languageOptions: {
parser: tsParser,
ecmaVersion: 2022,
sourceType: 'module',
globals: {
...globals.node,
...globals.es2015
}
},
plugins: {
'@typescript-eslint': tsPlugin,
n
},
rules: {
...tsPlugin.configs.recommended.rules,
'@typescript-eslint/no-require-imports': 'error',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/ban-ts-comment': [
'error',
{
'ts-ignore': 'allow-with-description'
}
],
'no-console': 'error',
yoda: 'error',
'prefer-const': [
'error',
{
destructuring: 'all'
}
],
'no-control-regex': 'off',
'no-constant-condition': ['error', {checkLoops: false}],
'no-undef': 'off',
'no-useless-assignment': 'off',
'n/no-extraneous-import': 'error'
}
},
{
files: ['**/*{test,spec}.ts'],
plugins: {jest},
languageOptions: {
globals: {
...globals.jest
}
},
rules: {
...jest.configs['flat/recommended'].rules,
'@typescript-eslint/no-unused-vars': 'off',
'jest/no-standalone-expect': 'off',
'jest/no-conditional-expect': 'off',
'no-console': 'off'
}
},
prettier
];
-11
View File
@@ -1,11 +0,0 @@
module.exports = {
clearMocks: true,
moduleFileExtensions: ['js', 'ts'],
testEnvironment: 'node',
testMatch: ['**/*.test.ts', '**/*.spec.ts'],
testRunner: 'jest-circus/runner',
transform: {
'^.+\\.ts$': 'ts-jest'
},
verbose: true
};
+22
View File
@@ -0,0 +1,22 @@
export default {
clearMocks: true,
moduleFileExtensions: ['js', 'ts'],
testMatch: ['**/*.test.ts', '**/*.spec.ts'],
transform: {
'^.+\\.ts$': [
'ts-jest',
{
useESM: true,
diagnostics: {
ignoreCodes: [151002]
}
}
]
},
extensionsToTreatAsEsm: ['.ts'],
transformIgnorePatterns: ['node_modules/(?!(@actions|@octokit)/)'],
moduleNameMapper: {
'^(\\.{1,2}/.*)\\.js$': '$1'
},
verbose: true
};
+4606 -2115
View File
File diff suppressed because it is too large Load Diff
+35 -36
View File
@@ -1,20 +1,21 @@
{ {
"name": "stale-action", "name": "stale-action",
"version": "10.4.0", "version": "11.0.0",
"private": true, "private": true,
"type": "module",
"description": "Marks old issues and PRs as stale", "description": "Marks old issues and PRs as stale",
"main": "lib/main.js", "main": "lib/main.js",
"scripts": { "scripts": {
"build": "tsc --project tsconfig.app.json && ncc build", "build": "tsc --project tsconfig.app.json && ncc build lib/main.js",
"format": "prettier --no-error-on-unmatched-pattern --config ./.prettierrc.js --write \"**/*.{ts,yml,yaml}\"", "format": "prettier --no-error-on-unmatched-pattern --write \"**/*.{ts,yml,yaml}\"",
"format-check": "prettier --no-error-on-unmatched-pattern --config ./.prettierrc.js --check \"**/*.{ts,yml,yaml}\"", "format-check": "prettier --no-error-on-unmatched-pattern --check \"**/*.{ts,yml,yaml}\"",
"lint": "eslint --config ./.eslintrc.js \"**/*.ts\"", "lint": "eslint \"**/*.ts\"",
"lint:fix": "eslint --config ./.eslintrc.js \"**/*.ts\" --fix", "lint:fix": "eslint \"**/*.ts\" --fix",
"lint:all": "npm run format-check && npm run lint", "lint:all": "npm run format-check && npm run lint",
"lint:all:fix": "npm run format && npm run lint:fix", "lint:all:fix": "npm run format && npm run lint:fix",
"test": "jest --config ./jest.config.js", "test": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js --runInBand",
"test:only-errors": "jest --reporters jest-silent-reporter --silent", "test:only-errors": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js --reporters jest-silent-reporter --silent",
"test:watch": "jest --watch --notify --expand", "test:watch": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js --watch --notify --expand",
"all": "npm run format && npm run lint && npm run build && npm test", "all": "npm run format && npm run lint && npm run build && npm test",
"all:ci": "npm run format && npm run lint && npm run build && npm run test:only-errors", "all:ci": "npm run format && npm run lint && npm run build && npm run test:only-errors",
"prerelease": "npm run build", "prerelease": "npm run build",
@@ -37,38 +38,36 @@
"author": "GitHub", "author": "GitHub",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@actions/cache": "^5.0.5", "@actions/cache": "^6.1.0",
"@actions/core": "^2.0.3", "@actions/core": "^3.0.1",
"@actions/github": "^7.0.0", "@actions/github": "^9.1.1",
"@octokit/core": "^5.2.2", "@octokit/core": "^7.0.6",
"@octokit/plugin-retry": "^6.1.0", "@octokit/plugin-retry": "^8.1.0",
"lodash.deburr": "^4.1.0", "lodash.deburr": "^4.1.0"
"semver": "^7.7.4"
}, },
"overrides": { "overrides": {
"undici": "6.27.0" "brace-expansion": "5.0.8"
}, },
"devDependencies": { "devDependencies": {
"@types/jest": "^29.5.14", "@eslint/js": "^10.0.1",
"@jest/globals": "^30.4.1",
"@types/lodash.deburr": "^4.1.6", "@types/lodash.deburr": "^4.1.6",
"@types/node": "^24.3.1", "@types/node": "^24.13.3",
"@types/semver": "^7.5.0", "@typescript-eslint/eslint-plugin": "^8.62.1",
"@typescript-eslint/eslint-plugin": "^7.18.0", "@typescript-eslint/parser": "^8.62.1",
"@typescript-eslint/parser": "^7.18.0", "@vercel/ncc": "^0.44.1",
"@vercel/ncc": "^0.36.1", "ansi-styles": "^6.2.3",
"ansi-styles": "5.2.0", "eslint": "^10.7.0",
"eslint": "^8.56.0",
"eslint-config-prettier": "^10.1.8", "eslint-config-prettier": "^10.1.8",
"eslint-plugin-jest": "^27.7.0", "eslint-plugin-jest": "^29.15.4",
"eslint-plugin-node": "^11.1.0", "eslint-plugin-n": "^18.2.1",
"jest": "^29.6.2", "globals": "^17.7.0",
"jest-circus": "^29.5.0", "jest": "^30.4.2",
"jest-silent-reporter": "^0.5.0", "jest-silent-reporter": "^0.6.0",
"js-yaml": "^4.1.1", "prettier": "^3.9.4",
"prettier": "^2.8.7", "standard-version": "^9.5.0",
"standard-version": "^9.3.1", "terminal-link": "^5.0.0",
"terminal-link": "^2.1.1", "ts-jest": "^29.4.11",
"ts-jest": "^29.2.5", "typescript": "^6.0.3"
"typescript": "^5.2.2"
} }
} }
+7 -6
View File
@@ -1,9 +1,10 @@
import {DefaultProcessorOptions} from '../../__tests__/constants/default-processor-options'; import {beforeEach, describe, expect, it} from '@jest/globals';
import {generateIIssue} from '../../__tests__/functions/generate-iissue'; import {DefaultProcessorOptions} from '../../__tests__/constants/default-processor-options.js';
import {IIssue} from '../interfaces/issue'; import {generateIIssue} from '../../__tests__/functions/generate-iissue.js';
import {IIssuesProcessorOptions} from '../interfaces/issues-processor-options'; import {IIssue} from '../interfaces/issue.js';
import {Assignees} from './assignees'; import {IIssuesProcessorOptions} from '../interfaces/issues-processor-options.js';
import {Issue} from './issue'; import {Assignees} from './assignees.js';
import {Issue} from './issue.js';
describe('Assignees', (): void => { describe('Assignees', (): void => {
let assignees: Assignees; let assignees: Assignees;
+7 -7
View File
@@ -1,11 +1,11 @@
import deburr from 'lodash.deburr'; import deburr from 'lodash.deburr';
import {Option} from '../enums/option'; import {Option} from '../enums/option.js';
import {wordsToList} from '../functions/words-to-list'; import {wordsToList} from '../functions/words-to-list.js';
import {Assignee} from '../interfaces/assignee'; import {Assignee} from '../interfaces/assignee.js';
import {IIssuesProcessorOptions} from '../interfaces/issues-processor-options'; import {IIssuesProcessorOptions} from '../interfaces/issues-processor-options.js';
import {Issue} from './issue'; import {Issue} from './issue.js';
import {IssueLogger} from './loggers/issue-logger'; import {IssueLogger} from './loggers/issue-logger.js';
import {LoggerService} from '../services/logger.service'; import {LoggerService} from '../services/logger.service.js';
type CleanAssignee = string; type CleanAssignee = string;
+6 -6
View File
@@ -1,9 +1,9 @@
import {Option} from '../enums/option'; import {Option} from '../enums/option.js';
import {IIssuesProcessorOptions} from '../interfaces/issues-processor-options'; import {IIssuesProcessorOptions} from '../interfaces/issues-processor-options.js';
import {IPullRequest} from '../interfaces/pull-request'; import {IPullRequest} from '../interfaces/pull-request.js';
import {LoggerService} from '../services/logger.service'; import {LoggerService} from '../services/logger.service.js';
import {Issue} from './issue'; import {Issue} from './issue.js';
import {IssueLogger} from './loggers/issue-logger'; import {IssueLogger} from './loggers/issue-logger.js';
export class ExemptDraftPullRequest { export class ExemptDraftPullRequest {
private readonly _options: IIssuesProcessorOptions; private readonly _options: IIssuesProcessorOptions;
+7 -6
View File
@@ -1,10 +1,11 @@
/* eslint jest/no-identical-title: "off" */ /* eslint jest/no-identical-title: "off" */
import {DefaultProcessorOptions} from '../../__tests__/constants/default-processor-options'; import {beforeEach, describe, expect, it} from '@jest/globals';
import {generateIIssue} from '../../__tests__/functions/generate-iissue'; import {DefaultProcessorOptions} from '../../__tests__/constants/default-processor-options.js';
import {IIssue} from '../interfaces/issue'; import {generateIIssue} from '../../__tests__/functions/generate-iissue.js';
import {IIssuesProcessorOptions} from '../interfaces/issues-processor-options'; import {IIssue} from '../interfaces/issue.js';
import {IgnoreUpdates} from './ignore-updates'; import {IIssuesProcessorOptions} from '../interfaces/issues-processor-options.js';
import {Issue} from './issue'; import {IgnoreUpdates} from './ignore-updates.js';
import {Issue} from './issue.js';
describe('IgnoreUpdates', (): void => { describe('IgnoreUpdates', (): void => {
let ignoreUpdates: IgnoreUpdates; let ignoreUpdates: IgnoreUpdates;
+4 -4
View File
@@ -1,7 +1,7 @@
import {Option} from '../enums/option'; import {Option} from '../enums/option.js';
import {IIssuesProcessorOptions} from '../interfaces/issues-processor-options'; import {IIssuesProcessorOptions} from '../interfaces/issues-processor-options.js';
import {Issue} from './issue'; import {Issue} from './issue.js';
import {IssueLogger} from './loggers/issue-logger'; import {IssueLogger} from './loggers/issue-logger.js';
export class IgnoreUpdates { export class IgnoreUpdates {
private readonly _options: IIssuesProcessorOptions; private readonly _options: IIssuesProcessorOptions;
+7 -6
View File
@@ -1,9 +1,10 @@
import {IUserAssignee} from '../interfaces/assignee'; import {beforeEach, describe, expect, it} from '@jest/globals';
import {IIssue} from '../interfaces/issue'; import {IUserAssignee} from '../interfaces/assignee.js';
import {IIssuesProcessorOptions} from '../interfaces/issues-processor-options'; import {IIssue} from '../interfaces/issue.js';
import {ILabel} from '../interfaces/label'; import {IIssuesProcessorOptions} from '../interfaces/issues-processor-options.js';
import {IMilestone} from '../interfaces/milestone'; import {ILabel} from '../interfaces/label.js';
import {Issue} from './issue'; import {IMilestone} from '../interfaces/milestone.js';
import {Issue} from './issue.js';
describe('Issue', (): void => { describe('Issue', (): void => {
let issue: Issue; let issue: Issue;
+9 -9
View File
@@ -1,12 +1,12 @@
import {isLabeled} from '../functions/is-labeled'; import {isLabeled} from '../functions/is-labeled.js';
import {isPullRequest} from '../functions/is-pull-request'; import {isPullRequest} from '../functions/is-pull-request.js';
import {Assignee} from '../interfaces/assignee'; import {Assignee} from '../interfaces/assignee.js';
import {IIssue, OctokitIssue} from '../interfaces/issue'; import {IIssue, OctokitIssue} from '../interfaces/issue.js';
import {IIssuesProcessorOptions} from '../interfaces/issues-processor-options'; import {IIssuesProcessorOptions} from '../interfaces/issues-processor-options.js';
import {ILabel} from '../interfaces/label'; import {ILabel} from '../interfaces/label.js';
import {IMilestone} from '../interfaces/milestone'; import {IMilestone} from '../interfaces/milestone.js';
import {IsoDateString} from '../types/iso-date-string'; import {IsoDateString} from '../types/iso-date-string.js';
import {Operations} from './operations'; import {Operations} from './operations.js';
export class Issue implements IIssue { export class Issue implements IIssue {
readonly title: string; readonly title: string;
+35 -40
View File
@@ -1,35 +1,34 @@
import * as core from '@actions/core'; import * as core from '@actions/core';
import {context, getOctokit} from '@actions/github'; import {context, getOctokit} from '@actions/github';
import {GitHub} from '@actions/github/lib/utils'; import {Option} from '../enums/option.js';
import {Option} from '../enums/option'; import {getHumanizedDate} from '../functions/dates/get-humanized-date.js';
import {getHumanizedDate} from '../functions/dates/get-humanized-date'; import {isDateMoreRecentThan} from '../functions/dates/is-date-more-recent-than.js';
import {isDateMoreRecentThan} from '../functions/dates/is-date-more-recent-than'; import {isValidDate} from '../functions/dates/is-valid-date.js';
import {isValidDate} from '../functions/dates/is-valid-date'; import {isBoolean} from '../functions/is-boolean.js';
import {isBoolean} from '../functions/is-boolean'; import {isLabeled} from '../functions/is-labeled.js';
import {isLabeled} from '../functions/is-labeled'; import {cleanLabel} from '../functions/clean-label.js';
import {cleanLabel} from '../functions/clean-label'; import {shouldMarkWhenStale} from '../functions/should-mark-when-stale.js';
import {shouldMarkWhenStale} from '../functions/should-mark-when-stale'; import {wordsToList} from '../functions/words-to-list.js';
import {wordsToList} from '../functions/words-to-list'; import {IComment} from '../interfaces/comment.js';
import {IComment} from '../interfaces/comment'; import {IIssueEvent} from '../interfaces/issue-event.js';
import {IIssueEvent} from '../interfaces/issue-event'; import {IIssuesProcessorOptions} from '../interfaces/issues-processor-options.js';
import {IIssuesProcessorOptions} from '../interfaces/issues-processor-options'; import {IPullRequest} from '../interfaces/pull-request.js';
import {IPullRequest} from '../interfaces/pull-request'; import {Assignees} from './assignees.js';
import {Assignees} from './assignees'; import {IgnoreUpdates} from './ignore-updates.js';
import {IgnoreUpdates} from './ignore-updates'; import {ExemptDraftPullRequest} from './exempt-draft-pull-request.js';
import {ExemptDraftPullRequest} from './exempt-draft-pull-request'; import {Issue} from './issue.js';
import {Issue} from './issue'; import {IssueLogger} from './loggers/issue-logger.js';
import {IssueLogger} from './loggers/issue-logger'; import {Logger} from './loggers/logger.js';
import {Logger} from './loggers/logger'; import {Milestones} from './milestones.js';
import {Milestones} from './milestones'; import {StaleOperations} from './stale-operations.js';
import {StaleOperations} from './stale-operations'; import {Statistics} from './statistics.js';
import {Statistics} from './statistics'; import {LoggerService} from '../services/logger.service.js';
import {LoggerService} from '../services/logger.service'; import {OctokitIssue} from '../interfaces/issue.js';
import {OctokitIssue} from '../interfaces/issue';
import {retry} from '@octokit/plugin-retry'; import {retry} from '@octokit/plugin-retry';
import {IState} from '../interfaces/state/state'; import {IState} from '../interfaces/state/state.js';
import {IRateLimit} from '../interfaces/rate-limit'; import {IRateLimit} from '../interfaces/rate-limit.js';
import {RateLimit} from './rate-limit'; import {RateLimit} from './rate-limit.js';
import {getSortField} from '../functions/get-sort-field'; import {getSortField} from '../functions/get-sort-field.js';
/*** /***
* Handle processing of issues for staleness/closure. * Handle processing of issues for staleness/closure.
@@ -67,7 +66,7 @@ export class IssuesProcessor {
} }
readonly operations: StaleOperations; readonly operations: StaleOperations;
readonly client: InstanceType<typeof GitHub>; readonly client: ReturnType<typeof getOctokit>;
readonly options: IIssuesProcessorOptions; readonly options: IIssuesProcessorOptions;
readonly staleIssues: Issue[] = []; readonly staleIssues: Issue[] = [];
readonly closedIssues: Issue[] = []; readonly closedIssues: Issue[] = [];
@@ -599,7 +598,9 @@ export class IssuesProcessor {
new Issue(this.options, issue as Readonly<OctokitIssue>) new Issue(this.options, issue as Readonly<OctokitIssue>)
); );
} catch (error) { } catch (error) {
throw Error(`Getting issues was blocked by the error: ${error.message}`); throw Error(`Getting issues was blocked by the error: ${error.message}`, {
cause: error
});
} }
} }
@@ -1032,11 +1033,7 @@ export class IssuesProcessor {
issue_number: issue.number, issue_number: issue.number,
state: 'closed', state: 'closed',
state_reason: (this.options.closeIssueReason || undefined) as state_reason: (this.options.closeIssueReason || undefined) as
| 'completed' 'completed' | 'reopened' | 'not_planned' | null | undefined
| 'reopened'
| 'not_planned'
| null
| undefined
}); });
} }
} catch (error) { } catch (error) {
@@ -1352,16 +1349,14 @@ export class IssuesProcessor {
} }
private _getDaysBeforeIssueStaleUsedOptionName(): private _getDaysBeforeIssueStaleUsedOptionName():
| Option.DaysBeforeStale Option.DaysBeforeStale | Option.DaysBeforeIssueStale {
| Option.DaysBeforeIssueStale {
return isNaN(this.options.daysBeforeIssueStale) return isNaN(this.options.daysBeforeIssueStale)
? Option.DaysBeforeStale ? Option.DaysBeforeStale
: Option.DaysBeforeIssueStale; : Option.DaysBeforeIssueStale;
} }
private _getDaysBeforePrStaleUsedOptionName(): private _getDaysBeforePrStaleUsedOptionName():
| Option.DaysBeforeStale Option.DaysBeforeStale | Option.DaysBeforePrStale {
| Option.DaysBeforePrStale {
return isNaN(this.options.daysBeforePrStale) return isNaN(this.options.daysBeforePrStale)
? Option.DaysBeforeStale ? Option.DaysBeforeStale
: Option.DaysBeforePrStale; : Option.DaysBeforePrStale;
+39 -40
View File
@@ -1,16 +1,26 @@
import {DefaultProcessorOptions} from '../../../__tests__/constants/default-processor-options'; import {jest, beforeEach, describe, expect, it} from '@jest/globals';
import {generateIIssue} from '../../../__tests__/functions/generate-iissue'; import type {Issue as IssueType} from '../issue.js';
import {Issue} from '../issue'; import type {IssueLogger as IssueLoggerType} from './issue-logger.js';
import {IssueLogger} from './issue-logger';
import * as core from '@actions/core'; jest.unstable_mockModule('@actions/core', () => ({
warning: jest.fn(),
info: jest.fn(),
error: jest.fn()
}));
const {DefaultProcessorOptions} =
await import('../../../__tests__/constants/default-processor-options.js');
const {generateIIssue} =
await import('../../../__tests__/functions/generate-iissue.js');
const {Issue} = await import('../issue.js');
const {IssueLogger} = await import('./issue-logger.js');
const core = await import('@actions/core');
describe('IssueLogger', (): void => { describe('IssueLogger', (): void => {
let issue: Issue; let issue: IssueType;
let issueLogger: IssueLogger; let issueLogger: IssueLoggerType;
let message: string; let message: string;
let coreWarningSpy: jest.SpyInstance;
describe('warning()', (): void => { describe('warning()', (): void => {
beforeEach((): void => { beforeEach((): void => {
message = 'dummy-message'; message = 'dummy-message';
@@ -21,8 +31,6 @@ describe('IssueLogger', (): void => {
}) })
); );
issueLogger = new IssueLogger(issue); issueLogger = new IssueLogger(issue);
coreWarningSpy = jest.spyOn(core, 'warning').mockImplementation();
}); });
it('should log a warning with the given message and with the issue number as prefix', (): void => { it('should log a warning with the given message and with the issue number as prefix', (): void => {
@@ -30,19 +38,17 @@ describe('IssueLogger', (): void => {
issueLogger.warning(message); issueLogger.warning(message);
expect(coreWarningSpy).toHaveBeenCalledTimes(1); expect(jest.mocked(core.warning)).toHaveBeenCalledTimes(1);
expect(coreWarningSpy).toHaveBeenCalledWith( expect(jest.mocked(core.warning)).toHaveBeenCalledWith(
expect.stringContaining('[#8]') expect.stringContaining('[#8]')
); );
expect(coreWarningSpy).toHaveBeenCalledWith( expect(jest.mocked(core.warning)).toHaveBeenCalledWith(
expect.stringContaining('dummy-message') expect.stringContaining('dummy-message')
); );
}); });
}); });
describe('info()', (): void => { describe('info()', (): void => {
let coreInfoSpy: jest.SpyInstance;
beforeEach((): void => { beforeEach((): void => {
message = 'dummy-message'; message = 'dummy-message';
issue = new Issue( issue = new Issue(
@@ -52,8 +58,6 @@ describe('IssueLogger', (): void => {
}) })
); );
issueLogger = new IssueLogger(issue); issueLogger = new IssueLogger(issue);
coreInfoSpy = jest.spyOn(core, 'info').mockImplementation();
}); });
it('should log an information with the given message and with the issue number as prefix', (): void => { it('should log an information with the given message and with the issue number as prefix', (): void => {
@@ -61,17 +65,17 @@ describe('IssueLogger', (): void => {
issueLogger.info(message); issueLogger.info(message);
expect(coreInfoSpy).toHaveBeenCalledTimes(1); expect(jest.mocked(core.info)).toHaveBeenCalledTimes(1);
expect(coreInfoSpy).toHaveBeenCalledWith(expect.stringContaining('[#8]')); expect(jest.mocked(core.info)).toHaveBeenCalledWith(
expect(coreInfoSpy).toHaveBeenCalledWith( expect.stringContaining('[#8]')
);
expect(jest.mocked(core.info)).toHaveBeenCalledWith(
expect.stringContaining('dummy-message') expect.stringContaining('dummy-message')
); );
}); });
}); });
describe('error()', (): void => { describe('error()', (): void => {
let coreErrorSpy: jest.SpyInstance;
beforeEach((): void => { beforeEach((): void => {
message = 'dummy-message'; message = 'dummy-message';
issue = new Issue( issue = new Issue(
@@ -81,8 +85,6 @@ describe('IssueLogger', (): void => {
}) })
); );
issueLogger = new IssueLogger(issue); issueLogger = new IssueLogger(issue);
coreErrorSpy = jest.spyOn(core, 'error').mockImplementation();
}); });
it('should log an error with the given message and with the issue number as prefix', (): void => { it('should log an error with the given message and with the issue number as prefix', (): void => {
@@ -90,11 +92,11 @@ describe('IssueLogger', (): void => {
issueLogger.error(message); issueLogger.error(message);
expect(coreErrorSpy).toHaveBeenCalledTimes(1); expect(jest.mocked(core.error)).toHaveBeenCalledTimes(1);
expect(coreErrorSpy).toHaveBeenCalledWith( expect(jest.mocked(core.error)).toHaveBeenCalledWith(
expect.stringContaining('[#8]') expect.stringContaining('[#8]')
); );
expect(coreErrorSpy).toHaveBeenCalledWith( expect(jest.mocked(core.error)).toHaveBeenCalledWith(
expect.stringContaining('dummy-message') expect.stringContaining('dummy-message')
); );
}); });
@@ -110,15 +112,14 @@ describe('IssueLogger', (): void => {
}) })
); );
issueLogger = new IssueLogger(issue); issueLogger = new IssueLogger(issue);
coreWarningSpy = jest.spyOn(core, 'warning').mockImplementation();
issueLogger.warning(message); issueLogger.warning(message);
expect(coreWarningSpy).toHaveBeenCalledTimes(1); expect(jest.mocked(core.warning)).toHaveBeenCalledTimes(1);
expect(coreWarningSpy).toHaveBeenCalledWith( expect(jest.mocked(core.warning)).toHaveBeenCalledWith(
expect.stringContaining('[#123]') expect.stringContaining('[#123]')
); );
expect(coreWarningSpy).toHaveBeenCalledWith( expect(jest.mocked(core.warning)).toHaveBeenCalledWith(
expect.stringContaining('dummy-message') expect.stringContaining('dummy-message')
); );
}); });
@@ -142,15 +143,14 @@ describe('IssueLogger', (): void => {
}) })
); );
issueLogger = new IssueLogger(issue); issueLogger = new IssueLogger(issue);
coreWarningSpy = jest.spyOn(core, 'warning').mockImplementation();
issueLogger.warning(message); issueLogger.warning(message);
expect(coreWarningSpy).toHaveBeenCalledTimes(1); expect(jest.mocked(core.warning)).toHaveBeenCalledTimes(1);
expect(coreWarningSpy).toHaveBeenCalledWith( expect(jest.mocked(core.warning)).toHaveBeenCalledWith(
expect.stringContaining(`[#8]`) expect.stringContaining(`[#8]`)
); );
expect(coreWarningSpy).toHaveBeenCalledWith( expect(jest.mocked(core.warning)).toHaveBeenCalledWith(
expect.stringContaining( expect.stringContaining(
`The ${replacement} will stale! ${replacement} will soon be closed!` `The ${replacement} will stale! ${replacement} will soon be closed!`
) )
@@ -177,15 +177,14 @@ describe('IssueLogger', (): void => {
}) })
); );
issueLogger = new IssueLogger(issue); issueLogger = new IssueLogger(issue);
coreWarningSpy = jest.spyOn(core, 'warning').mockImplementation();
issueLogger.warning(message); issueLogger.warning(message);
expect(coreWarningSpy).toHaveBeenCalledTimes(1); expect(jest.mocked(core.warning)).toHaveBeenCalledTimes(1);
expect(coreWarningSpy).toHaveBeenCalledWith( expect(jest.mocked(core.warning)).toHaveBeenCalledWith(
expect.stringContaining(`[#8]`) expect.stringContaining(`[#8]`)
); );
expect(coreWarningSpy).toHaveBeenCalledWith( expect(jest.mocked(core.warning)).toHaveBeenCalledWith(
expect.stringContaining(`${replacement} will stale`) expect.stringContaining(`${replacement} will stale`)
); );
} }
+3 -3
View File
@@ -1,6 +1,6 @@
import {Issue} from '../issue'; import {Issue} from '../issue.js';
import {Logger} from './logger'; import {Logger} from './logger.js';
import {LoggerService} from '../../services/logger.service'; import {LoggerService} from '../../services/logger.service.js';
/** /**
* @description * @description
+18 -21
View File
@@ -1,8 +1,17 @@
import {Logger} from './logger'; import {jest, beforeEach, describe, expect, it} from '@jest/globals';
import * as core from '@actions/core'; import type {Logger as LoggerType} from './logger.js';
jest.unstable_mockModule('@actions/core', () => ({
warning: jest.fn(),
info: jest.fn(),
error: jest.fn()
}));
const {Logger} = await import('./logger.js');
const core = await import('@actions/core');
describe('Logger', (): void => { describe('Logger', (): void => {
let logger: Logger; let logger: LoggerType;
beforeEach((): void => { beforeEach((): void => {
logger = new Logger(); logger = new Logger();
@@ -11,12 +20,8 @@ describe('Logger', (): void => {
describe('warning()', (): void => { describe('warning()', (): void => {
let message: string; let message: string;
let coreWarningSpy: jest.SpyInstance;
beforeEach((): void => { beforeEach((): void => {
message = 'dummy-message'; message = 'dummy-message';
coreWarningSpy = jest.spyOn(core, 'warning').mockImplementation();
}); });
it('should log a warning with the given message', (): void => { it('should log a warning with the given message', (): void => {
@@ -24,8 +29,8 @@ describe('Logger', (): void => {
logger.warning(message); logger.warning(message);
expect(coreWarningSpy).toHaveBeenCalledTimes(1); expect(jest.mocked(core.warning)).toHaveBeenCalledTimes(1);
expect(coreWarningSpy).toHaveBeenCalledWith( expect(jest.mocked(core.warning)).toHaveBeenCalledWith(
expect.stringContaining('dummy-message') expect.stringContaining('dummy-message')
); );
}); });
@@ -34,12 +39,8 @@ describe('Logger', (): void => {
describe('info()', (): void => { describe('info()', (): void => {
let message: string; let message: string;
let coreInfoSpy: jest.SpyInstance;
beforeEach((): void => { beforeEach((): void => {
message = 'dummy-message'; message = 'dummy-message';
coreInfoSpy = jest.spyOn(core, 'info').mockImplementation();
}); });
it('should log an information with the given message', (): void => { it('should log an information with the given message', (): void => {
@@ -47,8 +48,8 @@ describe('Logger', (): void => {
logger.info(message); logger.info(message);
expect(coreInfoSpy).toHaveBeenCalledTimes(1); expect(jest.mocked(core.info)).toHaveBeenCalledTimes(1);
expect(coreInfoSpy).toHaveBeenCalledWith( expect(jest.mocked(core.info)).toHaveBeenCalledWith(
expect.stringContaining('dummy-message') expect.stringContaining('dummy-message')
); );
}); });
@@ -57,12 +58,8 @@ describe('Logger', (): void => {
describe('error()', (): void => { describe('error()', (): void => {
let message: string; let message: string;
let coreErrorSpy: jest.SpyInstance;
beforeEach((): void => { beforeEach((): void => {
message = 'dummy-message'; message = 'dummy-message';
coreErrorSpy = jest.spyOn(core, 'error').mockImplementation();
}); });
it('should log an error with the given message', (): void => { it('should log an error with the given message', (): void => {
@@ -70,8 +67,8 @@ describe('Logger', (): void => {
logger.error(message); logger.error(message);
expect(coreErrorSpy).toHaveBeenCalledTimes(1); expect(jest.mocked(core.error)).toHaveBeenCalledTimes(1);
expect(coreErrorSpy).toHaveBeenCalledWith( expect(jest.mocked(core.error)).toHaveBeenCalledWith(
expect.stringContaining('dummy-message') expect.stringContaining('dummy-message')
); );
}); });
+2 -2
View File
@@ -1,7 +1,7 @@
import * as core from '@actions/core'; import * as core from '@actions/core';
import terminalLink from 'terminal-link'; import terminalLink from 'terminal-link';
import {Option} from '../../enums/option'; import {Option} from '../../enums/option.js';
import {LoggerService} from '../../services/logger.service'; import {LoggerService} from '../../services/logger.service.js';
export class Logger { export class Logger {
warning(...message: string[]): void { warning(...message: string[]): void {
+7 -6
View File
@@ -1,9 +1,10 @@
import {DefaultProcessorOptions} from '../../__tests__/constants/default-processor-options'; import {beforeEach, describe, expect, it} from '@jest/globals';
import {generateIIssue} from '../../__tests__/functions/generate-iissue'; import {DefaultProcessorOptions} from '../../__tests__/constants/default-processor-options.js';
import {IIssue} from '../interfaces/issue'; import {generateIIssue} from '../../__tests__/functions/generate-iissue.js';
import {IIssuesProcessorOptions} from '../interfaces/issues-processor-options'; import {IIssue} from '../interfaces/issue.js';
import {Issue} from './issue'; import {IIssuesProcessorOptions} from '../interfaces/issues-processor-options.js';
import {Milestones} from './milestones'; import {Issue} from './issue.js';
import {Milestones} from './milestones.js';
describe('Milestones', (): void => { describe('Milestones', (): void => {
let milestones: Milestones; let milestones: Milestones;
+6 -6
View File
@@ -1,10 +1,10 @@
import deburr from 'lodash.deburr'; import deburr from 'lodash.deburr';
import {Option} from '../enums/option'; import {Option} from '../enums/option.js';
import {wordsToList} from '../functions/words-to-list'; import {wordsToList} from '../functions/words-to-list.js';
import {IIssuesProcessorOptions} from '../interfaces/issues-processor-options'; import {IIssuesProcessorOptions} from '../interfaces/issues-processor-options.js';
import {Issue} from './issue'; import {Issue} from './issue.js';
import {IssueLogger} from './loggers/issue-logger'; import {IssueLogger} from './loggers/issue-logger.js';
import {LoggerService} from '../services/logger.service'; import {LoggerService} from '../services/logger.service.js';
type CleanMilestone = string; type CleanMilestone = string;
+2 -1
View File
@@ -1,4 +1,5 @@
import {Operations} from './operations'; import {beforeEach, describe, expect, it} from '@jest/globals';
import {Operations} from './operations.js';
describe('Operations', (): void => { describe('Operations', (): void => {
let operations: Operations; let operations: Operations;
+1 -1
View File
@@ -1,4 +1,4 @@
import {IRateLimit, OctokitRateLimit} from '../interfaces/rate-limit'; import {IRateLimit, OctokitRateLimit} from '../interfaces/rate-limit.js';
export class RateLimit implements IRateLimit { export class RateLimit implements IRateLimit {
readonly limit: number; readonly limit: number;
+4 -3
View File
@@ -1,6 +1,7 @@
import {DefaultProcessorOptions} from '../../__tests__/constants/default-processor-options'; import {beforeEach, describe, expect, it} from '@jest/globals';
import {IIssuesProcessorOptions} from '../interfaces/issues-processor-options'; import {DefaultProcessorOptions} from '../../__tests__/constants/default-processor-options.js';
import {StaleOperations} from './stale-operations'; import {IIssuesProcessorOptions} from '../interfaces/issues-processor-options.js';
import {StaleOperations} from './stale-operations.js';
interface IHasRemainingOperationsMatrix { interface IHasRemainingOperationsMatrix {
operationsPerRun: number; operationsPerRun: number;
+2 -2
View File
@@ -1,5 +1,5 @@
import {IIssuesProcessorOptions} from '../interfaces/issues-processor-options'; import {IIssuesProcessorOptions} from '../interfaces/issues-processor-options.js';
import {Operations} from './operations'; import {Operations} from './operations.js';
export class StaleOperations extends Operations { export class StaleOperations extends Operations {
private readonly _options: IIssuesProcessorOptions; private readonly _options: IIssuesProcessorOptions;

Some files were not shown because too many files have changed in this diff Show More