Skip to content

Commit dbd8ffc

Browse files
chore: use type import
1 parent 04df9a8 commit dbd8ffc

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

src/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1+
import type {Config} from './types';
12
import {cosmiconfigSync} from 'cosmiconfig';
23
import {existsSync, readFileSync} from 'fs';
34
import {resolve} from 'path';
45
import {load} from 'js-yaml';
56
import {getRepository} from './misc';
6-
import {Config} from './types';
77

88
export const normalizeConfigKey = (key: string): string => key.replace(/[-\s]+/g, '_').toUpperCase();
99

src/env.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
import type {Config} from './types';
12
import dotenv from 'dotenv';
23
import {existsSync, readFileSync} from 'fs';
34
import {resolve} from 'path';
4-
import {Config} from './types';
55

66
export const loadTokenFromEnv = (dir: string): string | undefined => {
77
if (!existsSync(resolve(dir, '.env'))) {

src/misc.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1+
import type {Context} from '@actions/github/lib/context';
2+
import type {Config, ContextArgs} from './types';
13
import {readFileSync} from 'fs';
24
import {resolve} from 'path';
3-
import {Context} from '@actions/github/lib/context';
45
import {GitHelper} from '@technote-space/github-action-helper';
56
import {Logger} from '@technote-space/github-action-log-helper';
6-
import {Config, ContextArgs} from './types';
77

88
export const getRepository = (dir: string): { owner: string; repo: string } | never => {
99
const json = JSON.parse(readFileSync(resolve(dir, 'package.json'), {encoding: 'utf8'}));

src/wrapper.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1+
import type {Context} from '@actions/github/lib/context';
2+
import type {GitHelper} from '@technote-space/github-action-helper';
3+
import type {ContextArgs} from './types';
14
import {mkdirSync} from 'fs';
2-
import {Context} from '@actions/github/lib/context';
3-
import {GitHelper, Command} from '@technote-space/github-action-helper';
5+
import {Command} from '@technote-space/github-action-helper';
46
import {Logger} from '@technote-space/github-action-log-helper';
57
import * as command from '@technote-space/release-github-actions/lib/utils/command';
68
import * as misc from '@technote-space/release-github-actions/lib/utils/misc';
79
import {getContext} from './misc';
8-
import {ContextArgs} from './types';
910

1011
export const isValidContext = (args: ContextArgs): boolean => misc.isValidContext(getContext(args));
1112

0 commit comments

Comments
 (0)