Upgrading @growthbook/growthbook from 1.x to 2.x
Comparison of the public API of @growthbook/growthbook 1.8.0 and 2.0.0, computed automatically from their TypeScript types. A changed signature is a candidate for a breaking change, not a certainty.
Summary
| Removed import paths | 0 |
|---|---|
| Removed exports | 0 |
| Changed signatures | 8 |
| Removed class or interface members | 0 |
| Changed class or interface members | 1 |
| Newly deprecated | 0 |
| Requirement changes (engines, peer dependencies) | 0 |
| New exports | 26 |
Removed exports
None detected.
Changed signatures
| export | Before | After |
|---|---|---|
@growthbook/growthbook · Context | { enabled?: boolean | undefined; attributes?: Attributes | undefined; url?: string | undefined; features?: Record<string, FeatureDefinition<any>> | undefined; experiments?: AutoExperiment<AutoExperimentVariation>[] | undefined; forcedVariations?: Record<string, number> | undefined; forcedFeatureValues?: Map<string, any> | undefined; attributeOverrides?: Attributes | undefined; blockedChangeIds?: string[] | undefined; disableVisualExperiments?: boolean | undefined; disableJsInjection?: boolean | undefined; jsInjectionNonce?: string | undefined; disableUrlRedirectExperiments?: boolean | undefine… | { enabled?: boolean | undefined; attributes?: Attributes | undefined; remoteGroupIds?: string[] | undefined; url?: string | undefined; features?: Record<string, FeatureDefinition<any>> | undefined; experiments?: AutoExperiment<AutoExperimentVariation>[] | undefined; forcedVariations?: Record<string, number> | undefined; forcedFeatureValues?: Map<string, any> | undefined; attributeOverrides?: Attributes | undefined; blockedChangeIds?: string[] | undefined; disableVisualExperiments?: boolean | undefined; disableJsInjection?: boolean | undefined; jsInjectionNonce?: string | undefined; disableUrlR… |
@growthbook/growthbook · Options | { enabled?: boolean | undefined; attributes?: Attributes | undefined; url?: string | undefined; features?: Record<string, FeatureDefinition<any>> | undefined; experiments?: AutoExperiment<AutoExperimentVariation>[] | undefined; forcedVariations?: Record<string, number> | undefined; forcedFeatureValues?: Map<string, any> | undefined; attributeOverrides?: Attributes | undefined; blockedChangeIds?: string[] | undefined; disableVisualExperiments?: boolean | undefined; disableJsInjection?: boolean | undefined; jsInjectionNonce?: string | undefined; disableUrlRedirectExperiments?: boolean | undefine… | { enabled?: boolean | undefined; attributes?: Attributes | undefined; remoteGroupIds?: string[] | undefined; url?: string | undefined; features?: Record<string, FeatureDefinition<any>> | undefined; experiments?: AutoExperiment<AutoExperimentVariation>[] | undefined; forcedVariations?: Record<string, number> | undefined; forcedFeatureValues?: Map<string, any> | undefined; attributeOverrides?: Attributes | undefined; blockedChangeIds?: string[] | undefined; disableVisualExperiments?: boolean | undefined; disableJsInjection?: boolean | undefined; jsInjectionNonce?: string | undefined; disableUrlR… |
@growthbook/growthbook · UserContext | { enabled?: boolean | undefined; qaMode?: boolean | undefined; enableDevMode?: boolean | undefined; attributes?: Attributes | undefined; url?: string | undefined; blockedChangeIds?: string[] | undefined; stickyBucketAssignmentDocs?: Record<string, StickyAssignmentsDocument> | undefined; saveStickyBucketAssignmentDoc?: ((doc: StickyAssignmentsDocument) => Promise<unknown>) | undefined; forcedVariations?: Record<string, number> | undefined; forcedFeatureValues?: Map<string, any> | undefined; attributeOverrides?: Attributes | undefined; trackingCallback?: TrackingCallback | undefined; onFeatureUs… | { enabled?: boolean | undefined; qaMode?: boolean | undefined; enableDevMode?: boolean | undefined; attributes?: Attributes | undefined; remoteGroupIds?: string[] | undefined; url?: string | undefined; blockedChangeIds?: string[] | undefined; stickyBucketAssignmentDocs?: Record<string, StickyAssignmentsDocument> | undefined; saveStickyBucketAssignmentDoc?: ((doc: StickyAssignmentsDocument) => Promise<unknown>) | undefined; forcedVariations?: Record<string, number> | undefined; forcedFeatureValues?: Map<string, any> | undefined; attributeOverrides?: Attributes | undefined; trackingCallback?: Tr… |
@growthbook/growthbook · evalCondition | (obj: TestedObj, condition: ConditionInterface, savedGroups?: SavedGroupsPayload | undefined, visited?: Set<string> | undefined): boolean | (obj: TestedObj, condition: ConditionInterface, options?: EvalConditionOptions | undefined): boolean |
@growthbook/growthbook · AutoExperiment | Experiment<T> & { changeId?: string | undefined; manual?: boolean | undefined; } | Experiment<T> & { changeId?: string | undefined; manual?: boolean | undefined; metadata?: PayloadMetadata | undefined; contextualBanditRef?: string | undefined; } |
@growthbook/growthbook · GrowthBookPayload | { features?: FeatureDefinitions | undefined; dateUpdated?: string | undefined; encryptedFeatures?: string | undefined; experiments?: AutoExperiment<AutoExperimentVariation>[] | undefined; encryptedExperiments?: string | undefined; savedGroups?: SavedGroupsPayload | undefined; encryptedSavedGroups?: string | undefined; contextualBandits?: ContextualBanditDefinitions | undefined; encryptedContextualBandits?: string | undefined; } | { features?: FeatureDefinitions | undefined; dateUpdated?: string | undefined; encryptedFeatures?: string | undefined; experiments?: AutoExperiment<AutoExperimentVariation>[] | undefined; encryptedExperiments?: string | undefined; savedGroups?: SavedGroupsPayload | undefined; encryptedSavedGroups?: string | undefined; contextualBandits?: ContextualBanditDefinitions | undefined; encryptedContextualBandits?: string | undefined; interleavings?: InterleavingDefinitions | undefined; encryptedInterleavings?: string | undefined; } |
@growthbook/growthbook · FeatureApiResponse | { features?: FeatureDefinitions | undefined; dateUpdated?: string | undefined; encryptedFeatures?: string | undefined; experiments?: AutoExperiment<AutoExperimentVariation>[] | undefined; encryptedExperiments?: string | undefined; savedGroups?: SavedGroupsPayload | undefined; encryptedSavedGroups?: string | undefined; contextualBandits?: ContextualBanditDefinitions | undefined; encryptedContextualBandits?: string | undefined; } | { features?: FeatureDefinitions | undefined; dateUpdated?: string | undefined; encryptedFeatures?: string | undefined; experiments?: AutoExperiment<AutoExperimentVariation>[] | undefined; encryptedExperiments?: string | undefined; savedGroups?: SavedGroupsPayload | undefined; encryptedSavedGroups?: string | undefined; contextualBandits?: ContextualBanditDefinitions | undefined; encryptedContextualBandits?: string | undefined; interleavings?: InterleavingDefinitions | undefined; encryptedInterleavings?: string | undefined; } |
@growthbook/growthbook · SavedGroupPayloadEntry | { type: "list"; attributeKey: string; values: (string | number)[]; } | { type: "condition"; condition: ConditionInterface; } | { type: "list"; attributeKey: string; values: (string | number)[]; } | { type: "condition"; condition: ConditionInterface; } | { type: "remote"; attributeKey: string; valuesFrom?: string | undefined; } |
Removed class or interface members
None detected.
Changed class or interface members
| member | Before | After |
|---|---|---|
GrowthBook.getAttributes | (): { [x: string]: any; } | (): Attributes |
Newly deprecated
None detected.
Requirement changes (engines, peer dependencies)
None detected.
New exports (26)
| import | export | kind |
|---|---|---|
@growthbook/growthbook | redisResolver | function |
@growthbook/growthbook | PayloadFilters | type |
@growthbook/growthbook | RedisSetClient | type |
@growthbook/growthbook | pruneCondition | function |
@growthbook/growthbook | PayloadMetadata | type |
@growthbook/growthbook | RemoteSavedGroup | type |
@growthbook/growthbook | SavedGroupResolver | type |
@growthbook/growthbook | EvalConditionOptions | type |
@growthbook/growthbook | ReducePayloadOptions | type |
@growthbook/growthbook | TypeMismatchCallback | type |
@growthbook/growthbook | getRemoteSavedGroups | function |
@growthbook/growthbook | ConditionTypeMismatch | type |
@growthbook/growthbook | resolveRemoteGroupIds | function |
@growthbook/growthbook | InterleavingDefinition | type |
@growthbook/growthbook | InterleavingDefinitions | type |
@growthbook/growthbook | REMOTE_GROUP_IDS_ATTRIBUTE | variable |
@growthbook/growthbook/plugins | interleave | function |
@growthbook/growthbook/plugins | InterleavedItem | type |
@growthbook/growthbook/plugins | InterleaveConfig | type |
@growthbook/growthbook/plugins | InterleaveResult | type |
@growthbook/growthbook/plugins | interleavePlugin | function |
@growthbook/growthbook/plugins | InterleaveOptions | type |
@growthbook/growthbook/plugins | InterleaveExposure | type |
@growthbook/growthbook/plugins | InterleavePluginOptions | type |
@growthbook/growthbook/plugins | InterleaveTrackingProps | type |
@growthbook/growthbook/plugins | EVENT_INTERLEAVE_EXPOSURE | variable |
Give your AI agent these facts
Vigia is a free MCP server: your coding agent checks versions, breaking changes and vulnerabilities before it writes code. No signup, no API key.
claude mcp add --transport http vigia https://vigia.coredls.cloud/mcp
Add to CursorAdd to VS Code★ Star on GitHub
Any other MCP client
{ "mcpServers": { "vigia": { "url": "https://vigia.coredls.cloud/mcp" } } }Agent skill (SKILL.md): tells the agent when to use Vigia · GitHub Action for pull requests
Frequently asked questions
What are the breaking changes when upgrading @growthbook/growthbook from 1 to 2?
Between @growthbook/growthbook 1.8.0 and 2.0.0, Vigia found 0 removed exports, 8 changed signatures and 1 removed or changed class or interface members.
What became deprecated in @growthbook/growthbook 2?
0 exports or members are newly marked as deprecated in @growthbook/growthbook 2.0.0.
For agents
GET https://vigia.coredls.cloud/v1/packages/npm/@growthbook/growthbook/upgrade?from=1.8.0&to=2.0.0