Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- '*'

permissions:
id-token: write # Required for OIDC
id-token: write # Required for OIDC
contents: read

jobs:
Expand All @@ -20,7 +20,7 @@ jobs:

- uses: actions/setup-node@v5
with:
node-version: '18.x'
node-version-file: .nvmrc
registry-url: 'https://registry.npmjs.org'

- run: npm ci
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
build-and-test:
strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
node-version: [20.x, 22.x, 24.x]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
24
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@
*/

/**
* An environment's unique identifier.
* Unique environment key. May be used for selecting a value for a multivariate feature, or for % split segmentation.
*/
export type Key = string;
/**
* An environment's human-readable name.
*/
export type Name = string;
/**
* A unique identifier for an identity, used for segment and multivariate feature flag targeting, and displayed in the Flagsmith UI.
* A unique identifier for an identity as displayed in the Flagsmith UI.
*/
export type Identifier = string;
/**
* Key used when selecting a value for a multivariate feature, or for % split segmentation. Set to an internal identifier or a composite value based on the environment key and identifier, depending on Flagsmith implementation.
*/
export type Key1 = string;
/**
* Key used for % split segmentation.
* Unique segment key used for % split segmentation.
*/
export type Key2 = string;
/**
Expand Down Expand Up @@ -85,13 +85,9 @@ export type SubRules = SegmentRule[];
*/
export type Rules = SegmentRule[];
/**
* Key used when selecting a value for a multivariate feature. Set to an internal identifier or a UUID, depending on Flagsmith implementation.
* Unique feature key used when selecting a variant if the feature is multivariate. Set to an internal identifier or a UUID, depending on Flagsmith implementation.
*/
export type Key3 = string;
/**
* Unique feature identifier.
*/
export type FeatureKey = string;
/**
* Feature name.
*/
Expand Down Expand Up @@ -155,7 +151,7 @@ export interface EnvironmentContext {
*/
export interface IdentityContext {
identifier: Identifier;
key: Key1;
key?: Key1;
traits?: Traits;
[k: string]: unknown;
}
Expand Down Expand Up @@ -214,7 +210,6 @@ export interface InSegmentCondition {
*/
export interface FeatureContext {
key: Key3;
feature_key: FeatureKey;
name: Name2;
enabled: Enabled;
value: Value2;
Expand Down
Copy link

@emyller emyller Nov 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes look related with the engine, and IIRC are required by recent tests.
Should we include them in this pull request though?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, good catch. Looks like those have been included by some kind of pre-commit hook... I'll look into it.

Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@
* and run json-schema-to-typescript to regenerate this file.
*/

/**
* Unique feature identifier.
*/
export type FeatureKey = string;
/**
* Feature name.
*/
Expand All @@ -25,10 +21,6 @@ export type Value = string | number | boolean | null;
* Reason for the feature flag evaluation.
*/
export type Reason = string;
/**
* Unique segment identifier.
*/
export type Key = string;
/**
* Segment name.
*/
Expand All @@ -53,7 +45,6 @@ export interface Flags {
[k: string]: FlagResult;
}
export interface FlagResult {
feature_key: FeatureKey;
name: Name;
enabled: Enabled;
value: Value;
Expand All @@ -68,7 +59,6 @@ export interface FeatureMetadata {
[k: string]: unknown;
}
export interface SegmentResult {
key: Key;
name: Name1;
metadata?: SegmentMetadata;
[k: string]: unknown;
Expand Down
Loading