diff --git a/code/lib/channels/package.json b/code/lib/channels/package.json index d040c1149dc..489f3a585ec 100644 --- a/code/lib/channels/package.json +++ b/code/lib/channels/package.json @@ -41,10 +41,6 @@ "check": "../../../scripts/node_modules/.bin/tsc --noEmit", "prep": "../../../scripts/prepare/bundle.ts" }, - "dependencies": { - "ts-dedent": "^2.0.0", - "util-deprecate": "^1.0.2" - }, "devDependencies": { "typescript": "~4.6.3" }, diff --git a/code/lib/channels/src/index.ts b/code/lib/channels/src/index.ts index 1745cff21b5..99a90a5a9e7 100644 --- a/code/lib/channels/src/index.ts +++ b/code/lib/channels/src/index.ts @@ -1,8 +1,5 @@ /// -import deprecate from 'util-deprecate'; -import { dedent } from 'ts-dedent'; - export type ChannelHandler = (event: ChannelEvent) => void; export interface ChannelTransport { @@ -62,15 +59,6 @@ export class Channel { this.events[eventName].push(listener); } - addPeerListener = deprecate( - (eventName: string, listener: Listener) => { - this.addListener(eventName, listener); - }, - dedent` - channel.addPeerListener is deprecated - ` - ); - emit(eventName: string, ...args: any) { const event: ChannelEvent = { type: eventName, args, from: this.sender }; let options = {}; diff --git a/code/yarn.lock b/code/yarn.lock index 4ef0c2b737d..bc7fb301653 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -7295,9 +7295,7 @@ __metadata: version: 0.0.0-use.local resolution: "@storybook/channels@workspace:lib/channels" dependencies: - ts-dedent: ^2.0.0 typescript: ~4.6.3 - util-deprecate: ^1.0.2 languageName: unknown linkType: soft