mirror of
https://github.com/actions/stale.git
synced 2026-02-14 18:18:19 +00:00
Compare commits
2 Commits
enhancemen
...
950f866ef5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
950f866ef5 | ||
|
|
fa53299cb8 |
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
name: "@actions/http-client"
|
name: "@actions/http-client"
|
||||||
version: 3.0.1
|
version: 3.0.2
|
||||||
type: npm
|
type: npm
|
||||||
summary: Actions Http Client
|
summary: Actions Http Client
|
||||||
homepage: https://github.com/actions/toolkit/tree/main/packages/http-client
|
homepage: https://github.com/actions/toolkit/tree/main/packages/http-client
|
||||||
2
.licenses/npm/fast-xml-parser.dep.yml
generated
2
.licenses/npm/fast-xml-parser.dep.yml
generated
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
name: fast-xml-parser
|
name: fast-xml-parser
|
||||||
version: 5.3.3
|
version: 5.3.4
|
||||||
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:
|
||||||
|
|||||||
34
.licenses/npm/undici-6.23.0.dep.yml
generated
Normal file
34
.licenses/npm/undici-6.23.0.dep.yml
generated
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
---
|
||||||
|
name: undici
|
||||||
|
version: 6.23.0
|
||||||
|
type: npm
|
||||||
|
summary: An HTTP/1.1 client, written from scratch for Node.js
|
||||||
|
homepage: https://undici.nodejs.org
|
||||||
|
license: mit
|
||||||
|
licenses:
|
||||||
|
- sources: LICENSE
|
||||||
|
text: |
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) Matteo Collina and Undici 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 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: []
|
||||||
@@ -4,7 +4,6 @@ import {IComment} from '../../src/interfaces/comment';
|
|||||||
import {IIssuesProcessorOptions} from '../../src/interfaces/issues-processor-options';
|
import {IIssuesProcessorOptions} from '../../src/interfaces/issues-processor-options';
|
||||||
import {IPullRequest} from '../../src/interfaces/pull-request';
|
import {IPullRequest} from '../../src/interfaces/pull-request';
|
||||||
import {IState} from '../../src/interfaces/state/state';
|
import {IState} from '../../src/interfaces/state/state';
|
||||||
import {IIssueEvent} from '../../src/interfaces/issue-event';
|
|
||||||
|
|
||||||
export class IssuesProcessorMock extends IssuesProcessor {
|
export class IssuesProcessorMock extends IssuesProcessor {
|
||||||
constructor(
|
constructor(
|
||||||
@@ -18,15 +17,7 @@ export class IssuesProcessorMock extends IssuesProcessor {
|
|||||||
getLabelCreationDate?: (
|
getLabelCreationDate?: (
|
||||||
issue: Issue,
|
issue: Issue,
|
||||||
label: string
|
label: string
|
||||||
) =>
|
) => Promise<string | undefined>,
|
||||||
| Promise<string | undefined>
|
|
||||||
| Promise<{creationDate?: string; events: IIssueEvent[]}>,
|
|
||||||
hasOnlyStaleLabelingEventsSince?: (
|
|
||||||
issue: Issue,
|
|
||||||
sinceDate: string,
|
|
||||||
staleLabel: string,
|
|
||||||
events: IIssueEvent[]
|
|
||||||
) => Promise<boolean>,
|
|
||||||
getPullRequest?: (issue: Issue) => Promise<IPullRequest | undefined | void>
|
getPullRequest?: (issue: Issue) => Promise<IPullRequest | undefined | void>
|
||||||
) {
|
) {
|
||||||
super(options, state);
|
super(options, state);
|
||||||
@@ -40,21 +31,7 @@ export class IssuesProcessorMock extends IssuesProcessor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (getLabelCreationDate) {
|
if (getLabelCreationDate) {
|
||||||
this.getLabelCreationDate = async (
|
this.getLabelCreationDate = getLabelCreationDate;
|
||||||
issue: Issue,
|
|
||||||
label: string
|
|
||||||
): Promise<{creationDate?: string; events: IIssueEvent[]}> => {
|
|
||||||
const result = await getLabelCreationDate(issue, label);
|
|
||||||
if (typeof result === 'string' || typeof result === 'undefined') {
|
|
||||||
return {creationDate: result, events: []};
|
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
if (hasOnlyStaleLabelingEventsSince) {
|
|
||||||
this.hasOnlyStaleLabelingEventsSince = hasOnlyStaleLabelingEventsSince;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getPullRequest) {
|
if (getPullRequest) {
|
||||||
|
|||||||
@@ -129,7 +129,6 @@ class IssuesProcessorBuilder {
|
|||||||
async p => (p === 1 ? this._issues : []),
|
async p => (p === 1 ? this._issues : []),
|
||||||
async () => [],
|
async () => [],
|
||||||
async () => new Date().toDateString(),
|
async () => new Date().toDateString(),
|
||||||
undefined,
|
|
||||||
async (): Promise<IPullRequest> => {
|
async (): Promise<IPullRequest> => {
|
||||||
return Promise.resolve({
|
return Promise.resolve({
|
||||||
number: 0,
|
number: 0,
|
||||||
|
|||||||
@@ -1,288 +0,0 @@
|
|||||||
import {Issue} from '../src/classes/issue';
|
|
||||||
import {IIssuesProcessorOptions} from '../src/interfaces/issues-processor-options';
|
|
||||||
import {IssuesProcessorMock} from './classes/issues-processor-mock';
|
|
||||||
import {DefaultProcessorOptions} from './constants/default-processor-options';
|
|
||||||
import {generateIssue} from './functions/generate-issue';
|
|
||||||
import {alwaysFalseStateMock} from './classes/state-mock';
|
|
||||||
import {IState} from '../src/interfaces/state/state';
|
|
||||||
import {IIssueEvent} from '../src/interfaces/issue-event';
|
|
||||||
import {IssuesProcessor} from '../src/classes/issues-processor';
|
|
||||||
|
|
||||||
describe('remove-stale-when-updated with stale label events', (): void => {
|
|
||||||
const markedStaleOn = '2025-01-01T00:00:00Z';
|
|
||||||
const updatedAt = '2025-01-01T00:01:00Z';
|
|
||||||
|
|
||||||
let options: IIssuesProcessorOptions;
|
|
||||||
|
|
||||||
beforeEach((): void => {
|
|
||||||
options = {
|
|
||||||
...DefaultProcessorOptions,
|
|
||||||
removeStaleWhenUpdated: true
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
const buildIssue = (): Issue =>
|
|
||||||
generateIssue(
|
|
||||||
options,
|
|
||||||
1,
|
|
||||||
'dummy-title',
|
|
||||||
updatedAt,
|
|
||||||
markedStaleOn,
|
|
||||||
false,
|
|
||||||
false,
|
|
||||||
['Stale']
|
|
||||||
);
|
|
||||||
|
|
||||||
const buildEvents = (): IIssueEvent[] => [
|
|
||||||
{
|
|
||||||
event: 'labeled',
|
|
||||||
created_at: markedStaleOn,
|
|
||||||
label: {name: 'Stale'}
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
test('does not remove stale label when only stale label events occurred', async (): Promise<void> => {
|
|
||||||
expect.assertions(1);
|
|
||||||
const issue = buildIssue();
|
|
||||||
|
|
||||||
const processor = new IssuesProcessorMock(
|
|
||||||
options,
|
|
||||||
alwaysFalseStateMock,
|
|
||||||
async p => (p === 1 ? [issue] : []),
|
|
||||||
async () => [],
|
|
||||||
async () => ({creationDate: markedStaleOn, events: buildEvents()}),
|
|
||||||
async () => true
|
|
||||||
);
|
|
||||||
|
|
||||||
await processor.processIssues();
|
|
||||||
|
|
||||||
expect(processor.removedLabelIssues).toHaveLength(0);
|
|
||||||
});
|
|
||||||
|
|
||||||
test('removes stale label when updates are not just stale label events', async (): Promise<void> => {
|
|
||||||
expect.assertions(1);
|
|
||||||
const issue = buildIssue();
|
|
||||||
|
|
||||||
const processor = new IssuesProcessorMock(
|
|
||||||
options,
|
|
||||||
alwaysFalseStateMock,
|
|
||||||
async p => (p === 1 ? [issue] : []),
|
|
||||||
async () => [],
|
|
||||||
async () => ({creationDate: markedStaleOn, events: buildEvents()}),
|
|
||||||
async () => false
|
|
||||||
);
|
|
||||||
|
|
||||||
await processor.processIssues();
|
|
||||||
|
|
||||||
expect(processor.removedLabelIssues).toHaveLength(1);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
class TestIssuesProcessor extends IssuesProcessor {
|
|
||||||
constructor(
|
|
||||||
options: IIssuesProcessorOptions,
|
|
||||||
state: IState,
|
|
||||||
events: IIssueEvent[]
|
|
||||||
) {
|
|
||||||
super(options, state);
|
|
||||||
const client = {
|
|
||||||
rest: {
|
|
||||||
issues: {
|
|
||||||
listEvents: {
|
|
||||||
endpoint: {
|
|
||||||
merge: () => ({})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
paginate: {
|
|
||||||
iterator: async function* () {
|
|
||||||
yield {data: events};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
(this as any).client = client;
|
|
||||||
}
|
|
||||||
|
|
||||||
async callhasOnlyStaleLabelingEventsSince(
|
|
||||||
issue: Issue,
|
|
||||||
sinceDate: string,
|
|
||||||
staleLabel: string,
|
|
||||||
events: IIssueEvent[]
|
|
||||||
): Promise<boolean> {
|
|
||||||
return this.hasOnlyStaleLabelingEventsSince(
|
|
||||||
issue,
|
|
||||||
sinceDate,
|
|
||||||
staleLabel,
|
|
||||||
events
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
describe('hasOnlyStaleLabelingEventsSince', (): void => {
|
|
||||||
const staleLabel = 'Stale';
|
|
||||||
const sinceDate = '2025-01-01T00:00:00Z';
|
|
||||||
const originalRepo = process.env.GITHUB_REPOSITORY;
|
|
||||||
|
|
||||||
let options: IIssuesProcessorOptions;
|
|
||||||
|
|
||||||
beforeEach((): void => {
|
|
||||||
process.env.GITHUB_REPOSITORY = 'owner/repo';
|
|
||||||
options = {
|
|
||||||
...DefaultProcessorOptions,
|
|
||||||
staleIssueLabel: staleLabel,
|
|
||||||
removeStaleWhenUpdated: true
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
afterEach((): void => {
|
|
||||||
if (originalRepo === undefined) {
|
|
||||||
delete process.env.GITHUB_REPOSITORY;
|
|
||||||
} else {
|
|
||||||
process.env.GITHUB_REPOSITORY = originalRepo;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
const buildIssue = (): Issue =>
|
|
||||||
generateIssue(
|
|
||||||
options,
|
|
||||||
1,
|
|
||||||
'dummy-title',
|
|
||||||
'2025-01-01T00:02:00Z',
|
|
||||||
sinceDate,
|
|
||||||
false,
|
|
||||||
false,
|
|
||||||
[staleLabel]
|
|
||||||
);
|
|
||||||
|
|
||||||
test('returns true when only stale label events exist after the since date', async (): Promise<void> => {
|
|
||||||
expect.assertions(1);
|
|
||||||
const issue = buildIssue();
|
|
||||||
const events: IIssueEvent[] = [
|
|
||||||
// Event before the sinceDate should be ignored.
|
|
||||||
{
|
|
||||||
event: 'labeled',
|
|
||||||
created_at: '2024-12-31T23:59:00Z',
|
|
||||||
label: {name: staleLabel}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
event: 'labeled',
|
|
||||||
created_at: '2025-01-01T00:00:10Z',
|
|
||||||
label: {name: staleLabel}
|
|
||||||
}
|
|
||||||
];
|
|
||||||
const processor = new TestIssuesProcessor(
|
|
||||||
options,
|
|
||||||
alwaysFalseStateMock,
|
|
||||||
events
|
|
||||||
);
|
|
||||||
const result = await processor.callhasOnlyStaleLabelingEventsSince(
|
|
||||||
issue,
|
|
||||||
sinceDate,
|
|
||||||
staleLabel,
|
|
||||||
events
|
|
||||||
);
|
|
||||||
|
|
||||||
expect(result).toBe(true);
|
|
||||||
});
|
|
||||||
|
|
||||||
test('returns false when a non-stale label event exists after the since date', async (): Promise<void> => {
|
|
||||||
expect.assertions(1);
|
|
||||||
const issue = buildIssue();
|
|
||||||
const events: IIssueEvent[] = [
|
|
||||||
{
|
|
||||||
event: 'labeled',
|
|
||||||
created_at: '2025-01-01T00:00:10Z',
|
|
||||||
label: {name: 'other-label'}
|
|
||||||
}
|
|
||||||
];
|
|
||||||
const processor = new TestIssuesProcessor(
|
|
||||||
options,
|
|
||||||
alwaysFalseStateMock,
|
|
||||||
events
|
|
||||||
);
|
|
||||||
const result = await processor.callhasOnlyStaleLabelingEventsSince(
|
|
||||||
issue,
|
|
||||||
sinceDate,
|
|
||||||
staleLabel,
|
|
||||||
events
|
|
||||||
);
|
|
||||||
|
|
||||||
expect(result).toBe(false);
|
|
||||||
});
|
|
||||||
|
|
||||||
test('returns false when stale label is removed after the since date', async (): Promise<void> => {
|
|
||||||
expect.assertions(1);
|
|
||||||
const issue = buildIssue();
|
|
||||||
const events: IIssueEvent[] = [
|
|
||||||
{
|
|
||||||
event: 'unlabeled',
|
|
||||||
created_at: '2025-01-01T00:00:10Z',
|
|
||||||
label: {name: staleLabel}
|
|
||||||
}
|
|
||||||
];
|
|
||||||
const processor = new TestIssuesProcessor(
|
|
||||||
options,
|
|
||||||
alwaysFalseStateMock,
|
|
||||||
events
|
|
||||||
);
|
|
||||||
const result = await processor.callhasOnlyStaleLabelingEventsSince(
|
|
||||||
issue,
|
|
||||||
sinceDate,
|
|
||||||
staleLabel,
|
|
||||||
events
|
|
||||||
);
|
|
||||||
|
|
||||||
expect(result).toBe(false);
|
|
||||||
});
|
|
||||||
|
|
||||||
test('returns false when a non-label event exists after the since date', async (): Promise<void> => {
|
|
||||||
expect.assertions(1);
|
|
||||||
const issue = buildIssue();
|
|
||||||
const events: IIssueEvent[] = [
|
|
||||||
{
|
|
||||||
event: 'commented',
|
|
||||||
created_at: '2025-01-01T00:00:10Z',
|
|
||||||
label: {name: staleLabel}
|
|
||||||
}
|
|
||||||
];
|
|
||||||
const processor = new TestIssuesProcessor(
|
|
||||||
options,
|
|
||||||
alwaysFalseStateMock,
|
|
||||||
events
|
|
||||||
);
|
|
||||||
const result = await processor.callhasOnlyStaleLabelingEventsSince(
|
|
||||||
issue,
|
|
||||||
sinceDate,
|
|
||||||
staleLabel,
|
|
||||||
events
|
|
||||||
);
|
|
||||||
|
|
||||||
expect(result).toBe(false);
|
|
||||||
});
|
|
||||||
|
|
||||||
test('includes events that occur exactly at the since date boundary', async (): Promise<void> => {
|
|
||||||
expect.assertions(1);
|
|
||||||
const issue = buildIssue();
|
|
||||||
const events: IIssueEvent[] = [
|
|
||||||
{
|
|
||||||
event: 'labeled',
|
|
||||||
created_at: sinceDate,
|
|
||||||
label: {name: staleLabel}
|
|
||||||
}
|
|
||||||
];
|
|
||||||
const processor = new TestIssuesProcessor(
|
|
||||||
options,
|
|
||||||
alwaysFalseStateMock,
|
|
||||||
events
|
|
||||||
);
|
|
||||||
const result = await processor.callhasOnlyStaleLabelingEventsSince(
|
|
||||||
issue,
|
|
||||||
sinceDate,
|
|
||||||
staleLabel,
|
|
||||||
events
|
|
||||||
);
|
|
||||||
|
|
||||||
expect(result).toBe(true);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
54961
dist/index.js
vendored
54961
dist/index.js
vendored
File diff suppressed because one or more lines are too long
227
package-lock.json
generated
227
package-lock.json
generated
@@ -92,13 +92,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@actions/cache/node_modules/@actions/http-client": {
|
"node_modules/@actions/cache/node_modules/@actions/http-client": {
|
||||||
"version": "3.0.1",
|
"version": "3.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-3.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-3.0.2.tgz",
|
||||||
"integrity": "sha512-SbGS8c/vySbNO3kjFgSW77n83C4MQx/Yoe+b1hAdpuvfHxnkHzDq2pWljUpAA56Si1Gae/7zjeZsV0CYjmLo/w==",
|
"integrity": "sha512-JP38FYYpyqvUsz+Igqlc/JG6YO9PaKuvqjM3iGvaLqFnJ7TFmcLyy2IDrY0bI0qCQug8E9K+elv5ZNfw62ZJzA==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"tunnel": "^0.0.6",
|
"tunnel": "^0.0.6",
|
||||||
"undici": "^5.28.5"
|
"undici": "^6.23.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@actions/cache/node_modules/@actions/io": {
|
"node_modules/@actions/cache/node_modules/@actions/io": {
|
||||||
@@ -115,6 +115,15 @@
|
|||||||
"semver": "bin/semver.js"
|
"semver": "bin/semver.js"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@actions/cache/node_modules/undici": {
|
||||||
|
"version": "6.23.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/undici/-/undici-6.23.0.tgz",
|
||||||
|
"integrity": "sha512-VfQPToRA5FZs/qJxLIinmU59u0r7LXqoJkCzinq3ckNJp3vKEh7jTWN589YQ5+aoAC/TGRLyJLCPKcLQbM8r9g==",
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18.17"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@actions/core": {
|
"node_modules/@actions/core": {
|
||||||
"version": "1.11.1",
|
"version": "1.11.1",
|
||||||
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.11.1.tgz",
|
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.11.1.tgz",
|
||||||
@@ -148,13 +157,22 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@actions/github/node_modules/@actions/http-client": {
|
"node_modules/@actions/github/node_modules/@actions/http-client": {
|
||||||
"version": "3.0.1",
|
"version": "3.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-3.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-3.0.2.tgz",
|
||||||
"integrity": "sha512-SbGS8c/vySbNO3kjFgSW77n83C4MQx/Yoe+b1hAdpuvfHxnkHzDq2pWljUpAA56Si1Gae/7zjeZsV0CYjmLo/w==",
|
"integrity": "sha512-JP38FYYpyqvUsz+Igqlc/JG6YO9PaKuvqjM3iGvaLqFnJ7TFmcLyy2IDrY0bI0qCQug8E9K+elv5ZNfw62ZJzA==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"tunnel": "^0.0.6",
|
"tunnel": "^0.0.6",
|
||||||
"undici": "^5.28.5"
|
"undici": "^6.23.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@actions/github/node_modules/@actions/http-client/node_modules/undici": {
|
||||||
|
"version": "6.23.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/undici/-/undici-6.23.0.tgz",
|
||||||
|
"integrity": "sha512-VfQPToRA5FZs/qJxLIinmU59u0r7LXqoJkCzinq3ckNJp3vKEh7jTWN589YQ5+aoAC/TGRLyJLCPKcLQbM8r9g==",
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18.17"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@actions/glob": {
|
"node_modules/@actions/glob": {
|
||||||
@@ -1040,10 +1058,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@eslint/js": {
|
"node_modules/@eslint/js": {
|
||||||
"version": "8.55.0",
|
"version": "8.57.1",
|
||||||
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.55.0.tgz",
|
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz",
|
||||||
"integrity": "sha512-qQfo2mxH5yVom1kacMtZZJFVdW+E70mqHMJvVg6WTLo+VBuQJ4TojZlfWBjK0ve5BdEeNAVxOsl/nvNMpJOaJA==",
|
"integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||||
}
|
}
|
||||||
@@ -1057,13 +1076,15 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@humanwhocodes/config-array": {
|
"node_modules/@humanwhocodes/config-array": {
|
||||||
"version": "0.11.13",
|
"version": "0.13.0",
|
||||||
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.13.tgz",
|
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz",
|
||||||
"integrity": "sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==",
|
"integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==",
|
||||||
|
"deprecated": "Use @eslint/config-array instead",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"license": "Apache-2.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@humanwhocodes/object-schema": "^2.0.1",
|
"@humanwhocodes/object-schema": "^2.0.3",
|
||||||
"debug": "^4.1.1",
|
"debug": "^4.3.1",
|
||||||
"minimatch": "^3.0.5"
|
"minimatch": "^3.0.5"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
@@ -1084,10 +1105,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@humanwhocodes/object-schema": {
|
"node_modules/@humanwhocodes/object-schema": {
|
||||||
"version": "2.0.1",
|
"version": "2.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz",
|
||||||
"integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==",
|
"integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==",
|
||||||
"dev": true
|
"deprecated": "Use @eslint/object-schema instead",
|
||||||
|
"dev": true,
|
||||||
|
"license": "BSD-3-Clause"
|
||||||
},
|
},
|
||||||
"node_modules/@hutson/parse-repository-url": {
|
"node_modules/@hutson/parse-repository-url": {
|
||||||
"version": "3.0.2",
|
"version": "3.0.2",
|
||||||
@@ -1137,10 +1160,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@istanbuljs/load-nyc-config/node_modules/js-yaml": {
|
"node_modules/@istanbuljs/load-nyc-config/node_modules/js-yaml": {
|
||||||
"version": "3.14.1",
|
"version": "3.14.2",
|
||||||
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz",
|
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.2.tgz",
|
||||||
"integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==",
|
"integrity": "sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"argparse": "^1.0.7",
|
"argparse": "^1.0.7",
|
||||||
"esprima": "^4.0.0"
|
"esprima": "^4.0.0"
|
||||||
@@ -2007,16 +2031,17 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/eslint-plugin": {
|
"node_modules/@typescript-eslint/eslint-plugin": {
|
||||||
"version": "6.13.2",
|
"version": "6.21.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.13.2.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.21.0.tgz",
|
||||||
"integrity": "sha512-3+9OGAWHhk4O1LlcwLBONbdXsAhLjyCFogJY/cWy2lxdVJ2JrcTF2pTGMaLl2AE7U1l31n8Py4a8bx5DLf/0dQ==",
|
"integrity": "sha512-oy9+hTPCUFpngkEZUSzbf9MxI65wbKFoQYsgPdILTfbUldp5ovUuphZVe4i30emU9M/kP+T64Di0mxl7dSw3MA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@eslint-community/regexpp": "^4.5.1",
|
"@eslint-community/regexpp": "^4.5.1",
|
||||||
"@typescript-eslint/scope-manager": "6.13.2",
|
"@typescript-eslint/scope-manager": "6.21.0",
|
||||||
"@typescript-eslint/type-utils": "6.13.2",
|
"@typescript-eslint/type-utils": "6.21.0",
|
||||||
"@typescript-eslint/utils": "6.13.2",
|
"@typescript-eslint/utils": "6.21.0",
|
||||||
"@typescript-eslint/visitor-keys": "6.13.2",
|
"@typescript-eslint/visitor-keys": "6.21.0",
|
||||||
"debug": "^4.3.4",
|
"debug": "^4.3.4",
|
||||||
"graphemer": "^1.4.0",
|
"graphemer": "^1.4.0",
|
||||||
"ignore": "^5.2.4",
|
"ignore": "^5.2.4",
|
||||||
@@ -2042,15 +2067,16 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/parser": {
|
"node_modules/@typescript-eslint/parser": {
|
||||||
"version": "6.13.2",
|
"version": "6.21.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.13.2.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.21.0.tgz",
|
||||||
"integrity": "sha512-MUkcC+7Wt/QOGeVlM8aGGJZy1XV5YKjTpq9jK6r6/iLsGXhBVaGP5N0UYvFsu9BFlSpwY9kMretzdBH01rkRXg==",
|
"integrity": "sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"license": "BSD-2-Clause",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/scope-manager": "6.13.2",
|
"@typescript-eslint/scope-manager": "6.21.0",
|
||||||
"@typescript-eslint/types": "6.13.2",
|
"@typescript-eslint/types": "6.21.0",
|
||||||
"@typescript-eslint/typescript-estree": "6.13.2",
|
"@typescript-eslint/typescript-estree": "6.21.0",
|
||||||
"@typescript-eslint/visitor-keys": "6.13.2",
|
"@typescript-eslint/visitor-keys": "6.21.0",
|
||||||
"debug": "^4.3.4"
|
"debug": "^4.3.4"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
@@ -2070,13 +2096,14 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/scope-manager": {
|
"node_modules/@typescript-eslint/scope-manager": {
|
||||||
"version": "6.13.2",
|
"version": "6.21.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.13.2.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.21.0.tgz",
|
||||||
"integrity": "sha512-CXQA0xo7z6x13FeDYCgBkjWzNqzBn8RXaE3QVQVIUm74fWJLkJkaHmHdKStrxQllGh6Q4eUGyNpMe0b1hMkXFA==",
|
"integrity": "sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/types": "6.13.2",
|
"@typescript-eslint/types": "6.21.0",
|
||||||
"@typescript-eslint/visitor-keys": "6.13.2"
|
"@typescript-eslint/visitor-keys": "6.21.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^16.0.0 || >=18.0.0"
|
"node": "^16.0.0 || >=18.0.0"
|
||||||
@@ -2087,13 +2114,14 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/type-utils": {
|
"node_modules/@typescript-eslint/type-utils": {
|
||||||
"version": "6.13.2",
|
"version": "6.21.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.13.2.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.21.0.tgz",
|
||||||
"integrity": "sha512-Qr6ssS1GFongzH2qfnWKkAQmMUyZSyOr0W54nZNU1MDfo+U4Mv3XveeLZzadc/yq8iYhQZHYT+eoXJqnACM1tw==",
|
"integrity": "sha512-rZQI7wHfao8qMX3Rd3xqeYSMCL3SoiSQLBATSiVKARdFGCYSRvmViieZjqc58jKgs8Y8i9YvVVhRbHSTA4VBag==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/typescript-estree": "6.13.2",
|
"@typescript-eslint/typescript-estree": "6.21.0",
|
||||||
"@typescript-eslint/utils": "6.13.2",
|
"@typescript-eslint/utils": "6.21.0",
|
||||||
"debug": "^4.3.4",
|
"debug": "^4.3.4",
|
||||||
"ts-api-utils": "^1.0.1"
|
"ts-api-utils": "^1.0.1"
|
||||||
},
|
},
|
||||||
@@ -2114,10 +2142,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/types": {
|
"node_modules/@typescript-eslint/types": {
|
||||||
"version": "6.13.2",
|
"version": "6.21.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.13.2.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.21.0.tgz",
|
||||||
"integrity": "sha512-7sxbQ+EMRubQc3wTfTsycgYpSujyVbI1xw+3UMRUcrhSy+pN09y/lWzeKDbvhoqcRbHdc+APLs/PWYi/cisLPg==",
|
"integrity": "sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^16.0.0 || >=18.0.0"
|
"node": "^16.0.0 || >=18.0.0"
|
||||||
},
|
},
|
||||||
@@ -2127,16 +2156,18 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/typescript-estree": {
|
"node_modules/@typescript-eslint/typescript-estree": {
|
||||||
"version": "6.13.2",
|
"version": "6.21.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.13.2.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.21.0.tgz",
|
||||||
"integrity": "sha512-SuD8YLQv6WHnOEtKv8D6HZUzOub855cfPnPMKvdM/Bh1plv1f7Q/0iFUDLKKlxHcEstQnaUU4QZskgQq74t+3w==",
|
"integrity": "sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"license": "BSD-2-Clause",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/types": "6.13.2",
|
"@typescript-eslint/types": "6.21.0",
|
||||||
"@typescript-eslint/visitor-keys": "6.13.2",
|
"@typescript-eslint/visitor-keys": "6.21.0",
|
||||||
"debug": "^4.3.4",
|
"debug": "^4.3.4",
|
||||||
"globby": "^11.1.0",
|
"globby": "^11.1.0",
|
||||||
"is-glob": "^4.0.3",
|
"is-glob": "^4.0.3",
|
||||||
|
"minimatch": "9.0.3",
|
||||||
"semver": "^7.5.4",
|
"semver": "^7.5.4",
|
||||||
"ts-api-utils": "^1.0.1"
|
"ts-api-utils": "^1.0.1"
|
||||||
},
|
},
|
||||||
@@ -2153,18 +2184,45 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/utils": {
|
"node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": {
|
||||||
"version": "6.13.2",
|
"version": "2.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.13.2.tgz",
|
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz",
|
||||||
"integrity": "sha512-b9Ptq4eAZUym4idijCRzl61oPCwwREcfDI8xGk751Vhzig5fFZR9CyzDz4Sp/nxSLBYxUPyh4QdIDqWykFhNmQ==",
|
"integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"balanced-match": "^1.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": {
|
||||||
|
"version": "9.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz",
|
||||||
|
"integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "ISC",
|
||||||
|
"dependencies": {
|
||||||
|
"brace-expansion": "^2.0.1"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=16 || 14 >=14.17"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/isaacs"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@typescript-eslint/utils": {
|
||||||
|
"version": "6.21.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.21.0.tgz",
|
||||||
|
"integrity": "sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@eslint-community/eslint-utils": "^4.4.0",
|
"@eslint-community/eslint-utils": "^4.4.0",
|
||||||
"@types/json-schema": "^7.0.12",
|
"@types/json-schema": "^7.0.12",
|
||||||
"@types/semver": "^7.5.0",
|
"@types/semver": "^7.5.0",
|
||||||
"@typescript-eslint/scope-manager": "6.13.2",
|
"@typescript-eslint/scope-manager": "6.21.0",
|
||||||
"@typescript-eslint/types": "6.13.2",
|
"@typescript-eslint/types": "6.21.0",
|
||||||
"@typescript-eslint/typescript-estree": "6.13.2",
|
"@typescript-eslint/typescript-estree": "6.21.0",
|
||||||
"semver": "^7.5.4"
|
"semver": "^7.5.4"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
@@ -2179,12 +2237,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/visitor-keys": {
|
"node_modules/@typescript-eslint/visitor-keys": {
|
||||||
"version": "6.13.2",
|
"version": "6.21.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.13.2.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.21.0.tgz",
|
||||||
"integrity": "sha512-OGznFs0eAQXJsp+xSd6k/O1UbFi/K/L7WjqeRoFE7vadjAF9y0uppXhYNQNEqygjou782maGClOoZwPqF0Drlw==",
|
"integrity": "sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/types": "6.13.2",
|
"@typescript-eslint/types": "6.21.0",
|
||||||
"eslint-visitor-keys": "^3.4.1"
|
"eslint-visitor-keys": "^3.4.1"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
@@ -3416,16 +3475,18 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/eslint": {
|
"node_modules/eslint": {
|
||||||
"version": "8.55.0",
|
"version": "8.57.1",
|
||||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.55.0.tgz",
|
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz",
|
||||||
"integrity": "sha512-iyUUAM0PCKj5QpwGfmCAG9XXbZCWsqP/eWAWrG/W0umvjuLRBECwSFdt+rCntju0xEH7teIABPwXpahftIaTdA==",
|
"integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==",
|
||||||
|
"deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@eslint-community/eslint-utils": "^4.2.0",
|
"@eslint-community/eslint-utils": "^4.2.0",
|
||||||
"@eslint-community/regexpp": "^4.6.1",
|
"@eslint-community/regexpp": "^4.6.1",
|
||||||
"@eslint/eslintrc": "^2.1.4",
|
"@eslint/eslintrc": "^2.1.4",
|
||||||
"@eslint/js": "8.55.0",
|
"@eslint/js": "8.57.1",
|
||||||
"@humanwhocodes/config-array": "^0.11.13",
|
"@humanwhocodes/config-array": "^0.13.0",
|
||||||
"@humanwhocodes/module-importer": "^1.0.1",
|
"@humanwhocodes/module-importer": "^1.0.1",
|
||||||
"@nodelib/fs.walk": "^1.2.8",
|
"@nodelib/fs.walk": "^1.2.8",
|
||||||
"@ungap/structured-clone": "^1.2.0",
|
"@ungap/structured-clone": "^1.2.0",
|
||||||
@@ -3506,10 +3567,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/eslint-plugin-jest": {
|
"node_modules/eslint-plugin-jest": {
|
||||||
"version": "27.6.0",
|
"version": "27.9.0",
|
||||||
"resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-27.6.0.tgz",
|
"resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-27.9.0.tgz",
|
||||||
"integrity": "sha512-MTlusnnDMChbElsszJvrwD1dN3x6nZl//s4JD23BxB6MgR66TZlL064su24xEIS3VACfAoHV1vgyMgPw8nkdng==",
|
"integrity": "sha512-QIT7FH7fNmd9n4se7FFKHbsLKGQiw885Ds6Y/sxKgCZ6natwCsXdgPOADnYVxN2QrRweF0FZWbJ6S7Rsn7llug==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/utils": "^5.10.0"
|
"@typescript-eslint/utils": "^5.10.0"
|
||||||
},
|
},
|
||||||
@@ -3517,7 +3579,7 @@
|
|||||||
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
|
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@typescript-eslint/eslint-plugin": "^5.0.0 || ^6.0.0",
|
"@typescript-eslint/eslint-plugin": "^5.0.0 || ^6.0.0 || ^7.0.0",
|
||||||
"eslint": "^7.0.0 || ^8.0.0",
|
"eslint": "^7.0.0 || ^8.0.0",
|
||||||
"jest": "*"
|
"jest": "*"
|
||||||
},
|
},
|
||||||
@@ -3909,9 +3971,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/fast-xml-parser": {
|
"node_modules/fast-xml-parser": {
|
||||||
"version": "5.3.3",
|
"version": "5.3.4",
|
||||||
"resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-5.3.3.tgz",
|
"resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-5.3.4.tgz",
|
||||||
"integrity": "sha512-2O3dkPAAC6JavuMm8+4+pgTk+5hoAs+CjZ+sWcQLkX9+/tHRuTkQh/Oaifr8qDmZ8iEHb771Ea6G8CdwkrgvYA==",
|
"integrity": "sha512-EFd6afGmXlCx8H8WTZHhAoDaWaGyuIBoZJ2mknrNxug+aZKjkp0a0dlars9Izl+jF+7Gu1/5f/2h68cQpe0IiA==",
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
"type": "github",
|
"type": "github",
|
||||||
@@ -5631,10 +5693,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/lodash": {
|
"node_modules/lodash": {
|
||||||
"version": "4.17.21",
|
"version": "4.17.23",
|
||||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
|
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.23.tgz",
|
||||||
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
|
"integrity": "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==",
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/lodash.deburr": {
|
"node_modules/lodash.deburr": {
|
||||||
"version": "4.1.0",
|
"version": "4.1.0",
|
||||||
|
|||||||
@@ -608,7 +608,7 @@ export class IssuesProcessor {
|
|||||||
async getLabelCreationDate(
|
async getLabelCreationDate(
|
||||||
issue: Issue,
|
issue: Issue,
|
||||||
label: string
|
label: string
|
||||||
): Promise<{creationDate?: string; events: IIssueEvent[]}> {
|
): Promise<string | undefined> {
|
||||||
const issueLogger: IssueLogger = new IssueLogger(issue);
|
const issueLogger: IssueLogger = new IssueLogger(issue);
|
||||||
|
|
||||||
issueLogger.info(`Checking for label on this $$type`);
|
issueLogger.info(`Checking for label on this $$type`);
|
||||||
@@ -623,7 +623,6 @@ export class IssuesProcessor {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const events: IIssueEvent[] = await this.client.paginate(options);
|
const events: IIssueEvent[] = await this.client.paginate(options);
|
||||||
|
|
||||||
const reversedEvents = events.reverse();
|
const reversedEvents = events.reverse();
|
||||||
|
|
||||||
const staleLabeledEvent = reversedEvents.find(
|
const staleLabeledEvent = reversedEvents.find(
|
||||||
@@ -634,51 +633,10 @@ export class IssuesProcessor {
|
|||||||
|
|
||||||
if (!staleLabeledEvent) {
|
if (!staleLabeledEvent) {
|
||||||
// Must be old rather than labeled
|
// Must be old rather than labeled
|
||||||
return {creationDate: undefined, events};
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
return {creationDate: staleLabeledEvent.created_at, events};
|
return staleLabeledEvent.created_at;
|
||||||
}
|
|
||||||
|
|
||||||
protected async hasOnlyStaleLabelingEventsSince(
|
|
||||||
issue: Issue,
|
|
||||||
sinceDate: string,
|
|
||||||
staleLabel: string,
|
|
||||||
events: IIssueEvent[]
|
|
||||||
): Promise<boolean> {
|
|
||||||
const issueLogger: IssueLogger = new IssueLogger(issue);
|
|
||||||
|
|
||||||
issueLogger.info(
|
|
||||||
`Checking if only stale label added events on $$type since: ${LoggerService.cyan(
|
|
||||||
sinceDate
|
|
||||||
)}`
|
|
||||||
);
|
|
||||||
|
|
||||||
if (!sinceDate) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
const sinceTimestamp = new Date(sinceDate).getTime();
|
|
||||||
if (Number.isNaN(sinceTimestamp)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
const relevantEvents = events.filter(event => {
|
|
||||||
const eventTimestamp = new Date(event.created_at).getTime();
|
|
||||||
return !Number.isNaN(eventTimestamp) && eventTimestamp >= sinceTimestamp;
|
|
||||||
});
|
|
||||||
|
|
||||||
if (relevantEvents.length === 0) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return relevantEvents.every(event => {
|
|
||||||
if (event.event !== 'labeled') {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return cleanLabel(event.label.name) === cleanLabel(staleLabel);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async getPullRequest(issue: Issue): Promise<IPullRequest | undefined | void> {
|
async getPullRequest(issue: Issue): Promise<IPullRequest | undefined | void> {
|
||||||
@@ -733,11 +691,8 @@ export class IssuesProcessor {
|
|||||||
closeLabel?: string
|
closeLabel?: string
|
||||||
) {
|
) {
|
||||||
const issueLogger: IssueLogger = new IssueLogger(issue);
|
const issueLogger: IssueLogger = new IssueLogger(issue);
|
||||||
const {creationDate, events} = await this.getLabelCreationDate(
|
const markedStaleOn: string =
|
||||||
issue,
|
(await this.getLabelCreationDate(issue, staleLabel)) || issue.updated_at;
|
||||||
staleLabel
|
|
||||||
);
|
|
||||||
const markedStaleOn: string = creationDate || issue.updated_at;
|
|
||||||
issueLogger.info(
|
issueLogger.info(
|
||||||
`$$type marked stale on: ${LoggerService.cyan(markedStaleOn)}`
|
`$$type marked stale on: ${LoggerService.cyan(markedStaleOn)}`
|
||||||
);
|
);
|
||||||
@@ -789,33 +744,12 @@ export class IssuesProcessor {
|
|||||||
|
|
||||||
// The issue.updated_at and markedStaleOn are not always exactly in sync (they can be off by a second or 2)
|
// The issue.updated_at and markedStaleOn are not always exactly in sync (they can be off by a second or 2)
|
||||||
// isDateMoreRecentThan makes sure they are not the same date within a certain tolerance (15 seconds in this case)
|
// isDateMoreRecentThan makes sure they are not the same date within a certain tolerance (15 seconds in this case)
|
||||||
let issueHasUpdateSinceStale = isDateMoreRecentThan(
|
const issueHasUpdateSinceStale = isDateMoreRecentThan(
|
||||||
new Date(issue.updated_at),
|
new Date(issue.updated_at),
|
||||||
new Date(markedStaleOn),
|
new Date(markedStaleOn),
|
||||||
15
|
15
|
||||||
);
|
);
|
||||||
|
|
||||||
// Check if the only update was the stale label being added
|
|
||||||
if (
|
|
||||||
issueHasUpdateSinceStale &&
|
|
||||||
shouldRemoveStaleWhenUpdated &&
|
|
||||||
!issue.markedStaleThisRun
|
|
||||||
) {
|
|
||||||
const onlyStaleLabelAdded = await this.hasOnlyStaleLabelingEventsSince(
|
|
||||||
issue,
|
|
||||||
markedStaleOn,
|
|
||||||
staleLabel,
|
|
||||||
events
|
|
||||||
);
|
|
||||||
|
|
||||||
if (onlyStaleLabelAdded) {
|
|
||||||
issueHasUpdateSinceStale = false;
|
|
||||||
issueLogger.info(
|
|
||||||
`Ignoring $$type update since only the stale label was added`
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
issueLogger.info(
|
issueLogger.info(
|
||||||
`$$type has been updated since it was marked stale: ${LoggerService.cyan(
|
`$$type has been updated since it was marked stale: ${LoggerService.cyan(
|
||||||
issueHasUpdateSinceStale
|
issueHasUpdateSinceStale
|
||||||
|
|||||||
Reference in New Issue
Block a user