Skip to content

Commit

Permalink
build: pure ESM (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
jjangga0214 authored Oct 9, 2024
1 parent f516244 commit 221d6f4
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 19 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
node-version: 20
cache: pnpm
- name: Install dependencies
run: pnpm install
run: pnpm install --frozen-lockfile
- name: Lint
run: pnpm lint
- name: Prettier
Expand All @@ -45,6 +45,6 @@ jobs:
node-version: 20
cache: pnpm
- name: Install dependencies
run: pnpm install
run: pnpm install --frozen-lockfile
- name: Build
run: pnpm build
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
cache: pnpm
- name: Install dependencies
run: pnpm install
run: pnpm install --frozen-lockfile
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
Expand Down
2 changes: 1 addition & 1 deletion agents/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// SPDX-License-Identifier: Apache-2.0
import { Command, Option } from 'commander';
import type { EventEmitter } from 'events';
import type { EventEmitter } from 'node:events';
import { initializeLogger, log } from './log.js';
import { version } from './version.js';
import { Worker, WorkerOptions } from './worker.js';
Expand Down
2 changes: 1 addition & 1 deletion agents/src/http_server.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2024 LiveKit, Inc.
//
// SPDX-License-Identifier: Apache-2.0
import { type IncomingMessage, type Server, type ServerResponse, createServer } from 'http';
import { type IncomingMessage, type Server, type ServerResponse, createServer } from 'node:http';
import { log } from './log.js';

const healthCheck = async (res: ServerResponse) => {
Expand Down
8 changes: 4 additions & 4 deletions agents/src/ipc/job_main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
//
// SPDX-License-Identifier: Apache-2.0
import { Room, RoomEvent } from '@livekit/rtc-node';
import type { ChildProcess } from 'child_process';
import { fork } from 'child_process';
import { EventEmitter, once } from 'events';
import type { ChildProcess } from 'node:child_process';
import { fork } from 'node:child_process';
import { EventEmitter, once } from 'node:events';
import { pathToFileURL } from 'node:url';
import type { Logger } from 'pino';
import { pathToFileURL } from 'url';
import { type Agent, isAgent } from '../generator.js';
import type { RunningJobInfo } from '../job.js';
import { JobContext } from '../job.js';
Expand Down
4 changes: 2 additions & 2 deletions agents/src/ipc/proc_job_executor.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// SPDX-FileCopyrightText: 2024 LiveKit, Inc.
//
// SPDX-License-Identifier: Apache-2.0
import type { ChildProcess } from 'child_process';
import { once } from 'events';
import type { ChildProcess } from 'node:child_process';
import { once } from 'node:events';
import type { RunningJobInfo } from '../job.js';
import { log, loggerOptions } from '../log.js';
import { Future } from '../utils.js';
Expand Down
2 changes: 1 addition & 1 deletion agents/src/multimodal/agent_playout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// SPDX-License-Identifier: Apache-2.0
import type { AudioFrame } from '@livekit/rtc-node';
import { type AudioSource } from '@livekit/rtc-node';
import { EventEmitter } from 'events';
import { EventEmitter } from 'node:events';
import { AudioByteStream } from '../audio.js';
import type { TranscriptionForwarder } from '../transcription.js';
import { type AsyncIterableQueue, CancellablePromise, Future, gracefullyCancel } from '../utils.js';
Expand Down
2 changes: 1 addition & 1 deletion agents/src/multimodal/multimodal_agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
TrackPublishOptions,
TrackSource,
} from '@livekit/rtc-node';
import { EventEmitter } from 'events';
import { EventEmitter } from 'node:events';
import { AudioByteStream } from '../audio.js';
import type * as llm from '../llm/index.js';
import { log } from '../log.js';
Expand Down
2 changes: 1 addition & 1 deletion agents/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import type {
TrackPublication,
} from '@livekit/rtc-node';
import { AudioFrame, TrackSource } from '@livekit/rtc-node';
import { EventEmitter, once } from 'events';
import { EventEmitter, once } from 'node:events';

/** Union of a single and a list of {@link AudioFrame}s */
export type AudioBuffer = AudioFrame[] | AudioFrame;
Expand Down
4 changes: 2 additions & 2 deletions agents/src/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ import {
WorkerMessage,
WorkerStatus,
} from '@livekit/protocol';
import { EventEmitter } from 'events';
import { AccessToken, RoomServiceClient } from 'livekit-server-sdk';
import os from 'os';
import { EventEmitter } from 'node:events';
import os from 'node:os';
import { WebSocket } from 'ws';
import { HTTPServer } from './http_server.js';
import { ProcPool } from './ipc/proc_pool.js';
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"compilerOptions": {
"target": "ES2017",
"module": "ES2022",
"moduleResolution": "node",
"module": "Node16",
"moduleResolution": "Node16",
"declaration": true,
"declarationMap": true,
"allowJs": false,
Expand Down

0 comments on commit 221d6f4

Please sign in to comment.