From 0fb0413d051941adc46d1b9f860d46148e8e2b4a Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 11 Oct 2022 18:18:37 +0200 Subject: [PATCH 1/2] remove deprecated channel apis --- code/lib/channels/src/index.ts | 9 --------- 1 file changed, 9 deletions(-) diff --git a/code/lib/channels/src/index.ts b/code/lib/channels/src/index.ts index 1745cff21b5..76958583eb2 100644 --- a/code/lib/channels/src/index.ts +++ b/code/lib/channels/src/index.ts @@ -62,15 +62,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 = {}; From 812fdbcea6102f797bd8e31b725475d8a01f42aa Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 11 Oct 2022 18:23:19 +0200 Subject: [PATCH 2/2] remove unused dependencies --- code/lib/channels/package.json | 4 ---- code/lib/channels/src/index.ts | 3 --- code/yarn.lock | 2 -- 3 files changed, 9 deletions(-) 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 76958583eb2..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 { 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