diff --git a/.changeset/chilled-avocados-speak.md b/.changeset/chilled-avocados-speak.md new file mode 100644 index 00000000..58783377 --- /dev/null +++ b/.changeset/chilled-avocados-speak.md @@ -0,0 +1,5 @@ +--- +'jellycommands': patch +--- + +add errors to props.get, props.set, props.has to aid in migration diff --git a/packages/jellycommands/src/JellyCommands.ts b/packages/jellycommands/src/JellyCommands.ts index 03202d15..54e2b1bd 100644 --- a/packages/jellycommands/src/JellyCommands.ts +++ b/packages/jellycommands/src/JellyCommands.ts @@ -20,6 +20,27 @@ export class JellyCommands extends Client { else this.joptions = value; this.props = options.props || {}; + + // TODO remove for 1.0 + // Makes need for a migration more obvious for those using props api + this.props = { + get() { + throw new Error( + 'props.get has been removed, SEE: https://jellycommands.dev/guide/migrate/props.html', + ); + }, + set() { + throw new Error( + 'props.set has been removed, SEE: https://jellycommands.dev/guide/migrate/props.html', + ); + }, + has() { + throw new Error( + 'props.has has been removed, SEE: https://jellycommands.dev/guide/migrate/props.html', + ); + }, + ...this.props, + }; } async login(potentialToken?: string): Promise {