From d7fbef0a5523dc787430ce83bbffeec6640942bf Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 30 Mar 2023 13:49:56 +0900 Subject: [PATCH] specify .js --- packages/misskey-js/src/api.ts | 2 +- packages/misskey-js/src/api.types.ts | 2 +- packages/misskey-js/src/index.ts | 18 +++++++++--------- packages/misskey-js/src/streaming.ts | 2 +- packages/misskey-js/src/streaming.types.ts | 2 +- packages/misskey-js/test/api.ts | 2 +- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/packages/misskey-js/src/api.ts b/packages/misskey-js/src/api.ts index fcc9884465..17de317d19 100644 --- a/packages/misskey-js/src/api.ts +++ b/packages/misskey-js/src/api.ts @@ -1,4 +1,4 @@ -import type { Endpoints } from './api.types'; +import type { Endpoints } from './api.types.js'; const MK_API_ERROR = Symbol(); diff --git a/packages/misskey-js/src/api.types.ts b/packages/misskey-js/src/api.types.ts index 63f0b77e8d..8659261949 100644 --- a/packages/misskey-js/src/api.types.ts +++ b/packages/misskey-js/src/api.types.ts @@ -3,7 +3,7 @@ import type { LiteInstanceMetadata, MeDetailed, Note, NoteFavorite, OriginType, Page, ServerInfo, Stats, User, UserDetailed, UserGroup, UserList, UserSorting, Notification, NoteReaction, Signin, MessagingMessage, -} from './entities'; +} from './entities.js'; type TODO = Record | null; diff --git a/packages/misskey-js/src/index.ts b/packages/misskey-js/src/index.ts index f431d65cc7..bdd0d04455 100644 --- a/packages/misskey-js/src/index.ts +++ b/packages/misskey-js/src/index.ts @@ -1,8 +1,8 @@ -import { Endpoints } from './api.types'; -import Stream, { Connection } from './streaming'; -import { Channels } from './streaming.types'; -import { Acct } from './acct'; -import * as consts from './consts'; +import { Endpoints } from './api.types.js'; +import Stream, { Connection } from './streaming.js'; +import { Channels } from './streaming.types.js'; +import { Acct } from './acct.js'; +import * as consts from './consts.js'; export { Endpoints, @@ -19,8 +19,8 @@ export const mutedNoteReasons = consts.mutedNoteReasons; export const ffVisibility = consts.ffVisibility; // api extractor not supported yet -//export * as api from './api'; -//export * as entities from './entities'; -import * as api from './api'; -import * as entities from './entities'; +//export * as api from './api.js'; +//export * as entities from './entities.js'; +import * as api from './api.js'; +import * as entities from './entities.js'; export { api, entities }; diff --git a/packages/misskey-js/src/streaming.ts b/packages/misskey-js/src/streaming.ts index 6388828689..9dd764952e 100644 --- a/packages/misskey-js/src/streaming.ts +++ b/packages/misskey-js/src/streaming.ts @@ -1,7 +1,7 @@ import autobind from 'autobind-decorator'; import { EventEmitter } from 'eventemitter3'; import ReconnectingWebsocket from 'reconnecting-websocket'; -import type { BroadcastEvents, Channels } from './streaming.types'; +import type { BroadcastEvents, Channels } from './streaming.types.js'; export function urlQuery(obj: Record): string { const params = Object.entries(obj) diff --git a/packages/misskey-js/src/streaming.types.ts b/packages/misskey-js/src/streaming.types.ts index d58b90530e..a64545f8e2 100644 --- a/packages/misskey-js/src/streaming.types.ts +++ b/packages/misskey-js/src/streaming.types.ts @@ -1,4 +1,4 @@ -import type { Antenna, CustomEmoji, DriveFile, MeDetailed, MessagingMessage, Note, Notification, PageEvent, User, UserGroup } from './entities'; +import type { Antenna, CustomEmoji, DriveFile, MeDetailed, MessagingMessage, Note, Notification, PageEvent, User, UserGroup } from './entities.js'; type FIXME = any; diff --git a/packages/misskey-js/test/api.ts b/packages/misskey-js/test/api.ts index 47c8378014..84b1fc0933 100644 --- a/packages/misskey-js/test/api.ts +++ b/packages/misskey-js/test/api.ts @@ -1,5 +1,5 @@ -import { APIClient, isAPIError } from '../src/api'; import { enableFetchMocks } from 'jest-fetch-mock'; +import { APIClient, isAPIError } from '../src/api'; enableFetchMocks();