Skip to content

Commit c45d445

Browse files
authored
Do not make plugin.version mandatory (#1128)
1 parent 29e856f commit c45d445

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

.changeset/ninety-fireants-explain.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@segment/analytics-core': minor
3+
'@segment/analytics-next': minor
4+
'@segment/analytics-node': minor
5+
---
6+
7+
Do not make plugin.version required

packages/core/src/plugins/index.ts

+11-1
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,18 @@ export interface CorePlugin<
1717
Analytics extends CoreAnalytics = any
1818
> {
1919
name: string
20+
21+
/**
22+
* A concatenation of the current destination name and the specific action. This field is only relevant for destination plugins.
23+
* @example ['Braze Web Mode (Actions) updateUserProfile'] // (and the plugin name would be 'Braze Web Mode (Actions)')
24+
*/
25+
// This is only used for disabling action plugins. An action destination plugin name used to be the concatenation of the current destination name, and the specific action (like 'Braze Web Mode (Actions) updateUserProfile'. Which meant customers had to set that individual action to false to disable it before. Then with the destination filter route, we created a new wrapper around actions to make it easy to disable based on the creationName, which is when we added creationName to the objects in remotePlugin. However, to preserve backwards compatibility, we still needed to support disabling based on the concatenation since customers were doing that in the wild, so we can filter based on checking both name fields.
2026
alternativeNames?: string[]
21-
version: string
27+
/**
28+
* The version of the plugin.
29+
* @example '1.0.0'
30+
*/
31+
version?: string
2232
type: PluginType
2333
isLoaded: () => boolean
2434
load: (ctx: Ctx, instance: Analytics) => Promise<unknown>

0 commit comments

Comments
 (0)