mirror of
https://github.com/actions/stale.git
synced 2026-08-22 16:43:25 +01:00
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.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import {IUser} from './user';
|
||||
import {IUser} from './user.js';
|
||||
|
||||
export interface IComment {
|
||||
user: IUser | null;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {ILabel} from './label';
|
||||
import {ILabel} from './label.js';
|
||||
|
||||
export interface IIssueEvent {
|
||||
created_at: string;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {IsoDateString} from '../types/iso-date-string';
|
||||
import {Assignee} from './assignee';
|
||||
import {ILabel} from './label';
|
||||
import {IMilestone} from './milestone';
|
||||
import {IsoDateString} from '../types/iso-date-string.js';
|
||||
import {Assignee} from './assignee.js';
|
||||
import {ILabel} from './label.js';
|
||||
import {IMilestone} from './milestone.js';
|
||||
import {components} from '@octokit/openapi-types';
|
||||
export interface IIssue {
|
||||
title: string;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {IsoOrRfcDateString} from '../types/iso-or-rfc-date-string';
|
||||
import {IsoOrRfcDateString} from '../types/iso-or-rfc-date-string.js';
|
||||
|
||||
export interface IIssuesProcessorOptions {
|
||||
repoToken: string;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {IIssue} from '../issue';
|
||||
import {IIssue} from '../issue.js';
|
||||
|
||||
export interface IState {
|
||||
isIssueProcessed(issue: IIssue): boolean;
|
||||
|
||||
Reference in New Issue
Block a user