From 75d2217ac674d200d8ac6582f93fa047cf1a0af1 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 27 Jun 2025 07:58:41 +0000 Subject: [PATCH 1/7] chore(deps): update dependency @types/node to v22.15.33 (#10223) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@types/node](https://redirect.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node) ([source](https://redirect.github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node)) | [`22.15.32` -> `22.15.33`](https://renovatebot.com/diffs/npm/@types%2fnode/22.15.32/22.15.33) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@types%2fnode/22.15.33?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@types%2fnode/22.15.33?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@types%2fnode/22.15.32/22.15.33?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@types%2fnode/22.15.32/22.15.33?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - "after 7pm every weekday,before 5am every weekday" in timezone Europe/Madrid, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/Unleash/unleash). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- frontend/yarn.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/frontend/yarn.lock b/frontend/yarn.lock index 496fc31597..ed16b80d16 100644 --- a/frontend/yarn.lock +++ b/frontend/yarn.lock @@ -3209,20 +3209,20 @@ __metadata: linkType: hard "@types/node@npm:*": - version: 24.0.3 - resolution: "@types/node@npm:24.0.3" + version: 24.0.4 + resolution: "@types/node@npm:24.0.4" dependencies: undici-types: "npm:~7.8.0" - checksum: 10c0/9c3c4e87600d1cf11e291c2fd4bfd806a615455463c30a0ef6dc9c801b3423344d9b82b8084e3ccabce485a7421ebb61a66e9676181bd7d9aea4759998a120d5 + checksum: 10c0/590e8cb0ec59fb9cd566402120e690d87ecbdf57f1ee2b8493266121ed33aa4b25949a0c6156b84a6ffb9250baaf1f80e9af142da542ed603e6ee73fc4d1115f languageName: node linkType: hard "@types/node@npm:^22.0.0": - version: 22.15.32 - resolution: "@types/node@npm:22.15.32" + version: 22.15.33 + resolution: "@types/node@npm:22.15.33" dependencies: undici-types: "npm:~6.21.0" - checksum: 10c0/63a2fa52adf1134d1b3bee8b1862d4b8e4550fffc190551068d3d41a41d9e5c0c8f1cb81faa18767b260637360f662115c26c5e4e7718868ead40c4a57cbc0e3 + checksum: 10c0/ee040c29c891aa37fffc27d04a8529318c391356346933646b7692eaf62236831ad532f6ebaf43ebd6a2ef1f0f091860d8a0a83a4e3c5a4f66d37aa1b2c99f31 languageName: node linkType: hard From 16c0f3167a909207c0e1c12f60a2e282f28cdfb5 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 27 Jun 2025 07:58:52 +0000 Subject: [PATCH 2/7] chore(deps): update dependency path-to-regexp to v0.2.5 (#10224) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [path-to-regexp](https://redirect.github.com/pillarjs/path-to-regexp) | [`0.1.12` -> `0.2.5`](https://renovatebot.com/diffs/npm/path-to-regexp/0.1.12/0.2.5) | [![age](https://developer.mend.io/api/mc/badges/age/npm/path-to-regexp/0.2.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/path-to-regexp/0.2.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/path-to-regexp/0.1.12/0.2.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/path-to-regexp/0.1.12/0.2.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
pillarjs/path-to-regexp (path-to-regexp) ### [`v0.2.5`](https://redirect.github.com/pillarjs/path-to-regexp/blob/HEAD/History.md#025--2014-08-07) [Compare Source](https://redirect.github.com/pillarjs/path-to-regexp/compare/v0.2.4...v0.2.5) - Allow keys parameter to be omitted ### [`v0.2.4`](https://redirect.github.com/pillarjs/path-to-regexp/blob/HEAD/History.md#024--2014-08-02) [Compare Source](https://redirect.github.com/pillarjs/path-to-regexp/compare/v0.2.3...v0.2.4) - Code coverage badge - Updated readme - Attach keys to the generated regexp ### [`v0.2.3`](https://redirect.github.com/pillarjs/path-to-regexp/blob/HEAD/History.md#023--2014-07-09) [Compare Source](https://redirect.github.com/pillarjs/path-to-regexp/compare/v0.2.2...v0.2.3) - Add MIT license ### [`v0.2.2`](https://redirect.github.com/pillarjs/path-to-regexp/blob/HEAD/History.md#022--2014-07-06) [Compare Source](https://redirect.github.com/pillarjs/path-to-regexp/compare/v0.2.1...v0.2.2) - A passed in trailing slash in non-strict mode will become optional - In non-end mode, the optional trailing slash will only match at the end ### [`v0.2.1`](https://redirect.github.com/pillarjs/path-to-regexp/blob/HEAD/History.md#021--2014-06-11) [Compare Source](https://redirect.github.com/pillarjs/path-to-regexp/compare/v0.2.0...v0.2.1) - Fixed a major capturing group regexp regression ### [`v0.2.0`](https://redirect.github.com/pillarjs/path-to-regexp/blob/HEAD/History.md#020--2014-06-09) [Compare Source](https://redirect.github.com/pillarjs/path-to-regexp/compare/v0.1.12...v0.2.0) - Improved support for arrays - Improved support for regexps - Better support for non-ending strict mode matches with a trailing slash - Travis CI support - Block using regexp special characters in the path - Removed support for the asterisk to match all - New support for parameter suffixes - `*`, `+` and `?` - Updated readme - Provide delimiter information with keys array
--- ### Configuration 📅 **Schedule**: Branch creation - "after 7pm every weekday,before 5am every weekday" in timezone Europe/Madrid, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/Unleash/unleash). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- website/package.json | 2 +- website/yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/website/package.json b/website/package.json index 1ee40e1eec..6c6b9803ee 100644 --- a/website/package.json +++ b/website/package.json @@ -64,7 +64,7 @@ }, "resolutions": { "http-proxy-middleware": "3.0.5", - "express/path-to-regexp": "0.1.12" + "express/path-to-regexp": "0.2.5" }, "packageManager": "yarn@4.9.2" } diff --git a/website/yarn.lock b/website/yarn.lock index 4c5df5c34a..262e53f180 100644 --- a/website/yarn.lock +++ b/website/yarn.lock @@ -12839,10 +12839,10 @@ __metadata: languageName: node linkType: hard -"path-to-regexp@npm:0.1.12": - version: 0.1.12 - resolution: "path-to-regexp@npm:0.1.12" - checksum: 10c0/1c6ff10ca169b773f3bba943bbc6a07182e332464704572962d277b900aeee81ac6aa5d060ff9e01149636c30b1f63af6e69dd7786ba6e0ddb39d4dee1f0645b +"path-to-regexp@npm:0.2.5": + version: 0.2.5 + resolution: "path-to-regexp@npm:0.2.5" + checksum: 10c0/947ffdd583390408a4814dcb921226fba363110a8245d22bd11c2bb1db323ad76b2e879f6dadc02bcf8c9c925b1556d5405c01a466dd28a93d84af5f62c51b79 languageName: node linkType: hard From 8c1c9076b39cfb19e3c06d93f90440ccc1080bf4 Mon Sep 17 00:00:00 2001 From: Jaanus Sellin Date: Fri, 27 Jun 2025 11:04:52 +0300 Subject: [PATCH 3/7] feat: add transaction context store (#10211) Create transaction context, that generates a random ID for each transaction, but also allows you to define your own id, for example change-request. --- src/lib/db/transaction.test.ts | 268 +++++++++++++++++++++++++++++++++ src/lib/db/transaction.ts | 29 +++- 2 files changed, 293 insertions(+), 4 deletions(-) create mode 100644 src/lib/db/transaction.test.ts diff --git a/src/lib/db/transaction.test.ts b/src/lib/db/transaction.test.ts new file mode 100644 index 0000000000..37891d1b55 --- /dev/null +++ b/src/lib/db/transaction.test.ts @@ -0,0 +1,268 @@ +import { + withTransactional, + withRollbackTransaction, + withFakeTransactional, + inTransaction, + type TransactionUserParams, +} from './transaction.js'; +import { type Mock, vi } from 'vitest'; + +interface MockService { + getData: () => string; + saveData: (data: string) => Promise; +} + +describe('transaction utilities', () => { + let mockDb: any; + let mockTransaction: any; + let mockServiceFactory: Mock; + let mockService: MockService; + + beforeEach(() => { + mockTransaction = { + commit: vi.fn(), + rollback: vi.fn(), + isTransaction: true, + select: vi.fn(), + insert: vi.fn(), + update: vi.fn(), + userParams: undefined, + }; + + mockDb = { + transaction: vi + .fn() + .mockImplementation((callback) => callback(mockTransaction)), + isTransaction: false, + }; + + mockService = { + getData: vi.fn().mockReturnValue('test-data'), + saveData: vi.fn().mockResolvedValue(undefined), + }; + + mockServiceFactory = vi.fn().mockReturnValue(mockService); + }); + + describe('withTransactional', () => { + it('should add transactional method to service', () => { + const serviceWithTransactional = withTransactional( + mockServiceFactory, + mockDb, + ); + + expect(typeof serviceWithTransactional.transactional).toBe( + 'function', + ); + expect(serviceWithTransactional.getData).toBe(mockService.getData); + expect(serviceWithTransactional.saveData).toBe( + mockService.saveData, + ); + }); + + it('should execute callback within database transaction', async () => { + const serviceWithTransactional = withTransactional( + mockServiceFactory, + mockDb, + ); + + const result = await serviceWithTransactional.transactional( + (service) => { + return service.getData(); + }, + ); + + expect(mockDb.transaction).toHaveBeenCalledTimes(1); + expect(result).toBe('test-data'); + }); + + it('should set default userParams when no transactionContext provided', async () => { + const serviceWithTransactional = withTransactional( + mockServiceFactory, + mockDb, + ); + + await serviceWithTransactional.transactional((service) => { + return service.getData(); + }); + + expect(mockTransaction.userParams).toBeDefined(); + expect(mockTransaction.userParams.type).toBe('transaction'); + expect(mockTransaction.userParams.value).toBeDefined(); + expect(typeof mockTransaction.userParams.value).toBe('number'); + }); + + it('should use provided transactionContext when given', async () => { + const serviceWithTransactional = withTransactional( + mockServiceFactory, + mockDb, + ); + const customContext: TransactionUserParams = { + type: 'change-request', + value: 42, + }; + + await serviceWithTransactional.transactional((service) => { + return service.getData(); + }, customContext); + + expect(mockTransaction.userParams).toEqual(customContext); + expect(mockTransaction.userParams.type).toBe('change-request'); + expect(mockTransaction.userParams.value).toBe(42); + }); + + it('should generate unique numeric IDs for default context', async () => { + const serviceWithTransactional = withTransactional( + mockServiceFactory, + mockDb, + ); + const userParamsValues: number[] = []; + + for (let i = 0; i < 3; i++) { + await serviceWithTransactional.transactional((service) => { + userParamsValues.push(mockTransaction.userParams.value); + return service.getData(); + }); + } + + expect(userParamsValues).toHaveLength(3); + expect(userParamsValues.every((id) => typeof id === 'number')).toBe( + true, + ); + expect(new Set(userParamsValues).size).toBe(3); + }); + + it('should create transactional service with transaction instance', async () => { + const serviceWithTransactional = withTransactional( + mockServiceFactory, + mockDb, + ); + + await serviceWithTransactional.transactional((service) => { + return service.getData(); + }); + + expect(mockServiceFactory).toHaveBeenCalledWith(mockTransaction); + }); + + it('should handle promise-based callbacks', async () => { + const serviceWithTransactional = withTransactional( + mockServiceFactory, + mockDb, + ); + + const result = await serviceWithTransactional.transactional( + async (service) => { + await service.saveData('new-data'); + return 'success'; + }, + ); + + expect(result).toBe('success'); + expect(mockService.saveData).toHaveBeenCalledWith('new-data'); + }); + + it('should propagate errors from callback', async () => { + const serviceWithTransactional = withTransactional( + mockServiceFactory, + mockDb, + ); + const error = new Error('Test error'); + + await expect( + serviceWithTransactional.transactional(() => { + throw error; + }), + ).rejects.toThrow('Test error'); + }); + }); + + describe('withRollbackTransaction', () => { + beforeEach(() => { + mockDb.transaction = vi.fn().mockResolvedValue(mockTransaction); + }); + + it('should add rollbackTransaction method to service', () => { + const serviceWithRollback = withRollbackTransaction( + mockServiceFactory, + mockDb, + ); + + expect(typeof serviceWithRollback.rollbackTransaction).toBe( + 'function', + ); + expect(serviceWithRollback.getData).toBe(mockService.getData); + expect(serviceWithRollback.saveData).toBe(mockService.saveData); + }); + + it('should execute callback and rollback transaction', async () => { + const serviceWithRollback = withRollbackTransaction( + mockServiceFactory, + mockDb, + ); + + const result = await serviceWithRollback.rollbackTransaction( + (service) => { + return service.getData(); + }, + ); + + expect(mockDb.transaction).toHaveBeenCalledTimes(1); + expect(mockTransaction.rollback).toHaveBeenCalledTimes(1); + expect(result).toBe('test-data'); + }); + }); + + describe('withFakeTransactional', () => { + it('should add transactional method to service', () => { + const serviceWithFakeTransactional = + withFakeTransactional(mockService); + + expect(typeof serviceWithFakeTransactional.transactional).toBe( + 'function', + ); + expect(serviceWithFakeTransactional.getData).toBe( + mockService.getData, + ); + expect(serviceWithFakeTransactional.saveData).toBe( + mockService.saveData, + ); + }); + + it('should execute callback directly without transaction', async () => { + const serviceWithFakeTransactional = + withFakeTransactional(mockService); + + const result = await serviceWithFakeTransactional.transactional( + (service) => { + return service.getData(); + }, + ); + + expect(result).toBe('test-data'); + }); + }); + + describe('inTransaction', () => { + it('should execute callback directly when db is already a transaction', async () => { + const transactionDb = { ...mockDb, isTransaction: true }; + const callback = vi.fn().mockReturnValue('result'); + + const result = await inTransaction(transactionDb, callback); + + expect(result).toBe('result'); + expect(callback).toHaveBeenCalledWith(transactionDb); + expect(transactionDb.transaction).not.toHaveBeenCalled(); + }); + + it('should create new transaction when db is not a transaction', async () => { + const callback = vi.fn().mockReturnValue('result'); + + const result = await inTransaction(mockDb, callback); + + expect(result).toBe('result'); + expect(mockDb.transaction).toHaveBeenCalledTimes(1); + expect(callback).toHaveBeenCalledWith(mockTransaction); + }); + }); +}); diff --git a/src/lib/db/transaction.ts b/src/lib/db/transaction.ts index ac59b18b49..769d1cac9a 100644 --- a/src/lib/db/transaction.ts +++ b/src/lib/db/transaction.ts @@ -1,6 +1,17 @@ import type { Knex } from 'knex'; import type { IUnleashConfig } from '../types/index.ts'; +export interface TransactionUserParams { + type: 'change-request' | 'transaction'; + value: number; +} + +function generateNumericTransactionId(): number { + const timestamp = Date.now(); + const random = Math.floor(Math.random() * 1000); + return timestamp * 1000 + random; +} + export type KnexTransaction = Knex.Transaction; export type MockTransaction = null; @@ -38,7 +49,10 @@ export type ServiceFactory = ( ) => DeferredServiceFactory; export type WithTransactional = S & { - transactional: (fn: (service: S) => R) => Promise; + transactional: ( + fn: (service: S) => R, + transactionContext?: TransactionUserParams, + ) => Promise; }; export type WithRollbackTransaction = S & { @@ -75,10 +89,17 @@ export function withTransactional( ): WithTransactional { const service = serviceFactory(db) as WithTransactional; - service.transactional = async (fn: (service: S) => R) => - // Maybe: inTransaction(db, async (trx: Knex.Transaction) => fn(serviceFactory(trx))); - // this assumes that the caller didn't start a transaction already and opens a new one. + service.transactional = async ( + fn: (service: S) => R, + transactionContext?: TransactionUserParams, + ) => db.transaction(async (trx: Knex.Transaction) => { + const defaultContext: TransactionUserParams = { + type: 'transaction', + value: generateNumericTransactionId(), + }; + + trx.userParams = transactionContext || defaultContext; const transactionalService = serviceFactory(trx); return fn(transactionalService); }); From c5b6ee75f365b4689ef8e5a6bc0a891569cc4ffc Mon Sep 17 00:00:00 2001 From: Jaanus Sellin Date: Fri, 27 Jun 2025 11:45:17 +0300 Subject: [PATCH 4/7] feat: transaction grouping, use ulids and strings (#10230) Replace generating random number id based on timestamp and now use ulids. --- src/lib/db/transaction.test.ts | 25 +++++++++++++++---------- src/lib/db/transaction.ts | 11 +++++------ 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/src/lib/db/transaction.test.ts b/src/lib/db/transaction.test.ts index 37891d1b55..88172b449e 100644 --- a/src/lib/db/transaction.test.ts +++ b/src/lib/db/transaction.test.ts @@ -88,8 +88,8 @@ describe('transaction utilities', () => { expect(mockTransaction.userParams).toBeDefined(); expect(mockTransaction.userParams.type).toBe('transaction'); - expect(mockTransaction.userParams.value).toBeDefined(); - expect(typeof mockTransaction.userParams.value).toBe('number'); + expect(mockTransaction.userParams.id).toBeDefined(); + expect(typeof mockTransaction.userParams.id).toBe('string'); }); it('should use provided transactionContext when given', async () => { @@ -99,7 +99,7 @@ describe('transaction utilities', () => { ); const customContext: TransactionUserParams = { type: 'change-request', - value: 42, + id: '01HQVX5K8P9EXAMPLE123456', }; await serviceWithTransactional.transactional((service) => { @@ -108,28 +108,33 @@ describe('transaction utilities', () => { expect(mockTransaction.userParams).toEqual(customContext); expect(mockTransaction.userParams.type).toBe('change-request'); - expect(mockTransaction.userParams.value).toBe(42); + expect(mockTransaction.userParams.id).toBe( + '01HQVX5K8P9EXAMPLE123456', + ); }); - it('should generate unique numeric IDs for default context', async () => { + it('should generate unique ULID strings for default context', async () => { const serviceWithTransactional = withTransactional( mockServiceFactory, mockDb, ); - const userParamsValues: number[] = []; + const userParamsIds: string[] = []; for (let i = 0; i < 3; i++) { await serviceWithTransactional.transactional((service) => { - userParamsValues.push(mockTransaction.userParams.value); + userParamsIds.push(mockTransaction.userParams.id); return service.getData(); }); } - expect(userParamsValues).toHaveLength(3); - expect(userParamsValues.every((id) => typeof id === 'number')).toBe( + expect(userParamsIds).toHaveLength(3); + expect(userParamsIds.every((id) => typeof id === 'string')).toBe( true, ); - expect(new Set(userParamsValues).size).toBe(3); + expect(new Set(userParamsIds).size).toBe(3); + userParamsIds.forEach((id) => { + expect(id).toMatch(/^[0-9A-HJKMNP-TV-Z]{26}$/); + }); }); it('should create transactional service with transaction instance', async () => { diff --git a/src/lib/db/transaction.ts b/src/lib/db/transaction.ts index 769d1cac9a..f98cd182fa 100644 --- a/src/lib/db/transaction.ts +++ b/src/lib/db/transaction.ts @@ -1,15 +1,14 @@ import type { Knex } from 'knex'; import type { IUnleashConfig } from '../types/index.ts'; +import { ulid } from 'ulidx'; export interface TransactionUserParams { type: 'change-request' | 'transaction'; - value: number; + id: string; } -function generateNumericTransactionId(): number { - const timestamp = Date.now(); - const random = Math.floor(Math.random() * 1000); - return timestamp * 1000 + random; +function generateTransactionId(): string { + return ulid(); } export type KnexTransaction = Knex.Transaction; @@ -96,7 +95,7 @@ export function withTransactional( db.transaction(async (trx: Knex.Transaction) => { const defaultContext: TransactionUserParams = { type: 'transaction', - value: generateNumericTransactionId(), + id: generateTransactionId(), }; trx.userParams = transactionContext || defaultContext; From 4eedf8862754226550084b7ab6b7054799c40b66 Mon Sep 17 00:00:00 2001 From: Thomas Heartman Date: Fri, 27 Jun 2025 11:24:44 +0200 Subject: [PATCH 5/7] add `crDiffView` to Unleash (#10228) This change adds the `crDiffView` flag to Unleash, potentially enabling the new JSON diff tab in change request changes instead of the "view json diff" hover functionality. --- frontend/src/interfaces/uiConfig.ts | 1 + src/lib/types/experimental.ts | 5 +++++ src/server-dev.ts | 1 + 3 files changed, 7 insertions(+) diff --git a/frontend/src/interfaces/uiConfig.ts b/frontend/src/interfaces/uiConfig.ts index c743b5a24e..501a7ab46b 100644 --- a/frontend/src/interfaces/uiConfig.ts +++ b/frontend/src/interfaces/uiConfig.ts @@ -90,6 +90,7 @@ export type UiFlags = { createFlagDialogCache?: boolean; healthToTechDebt?: boolean; improvedJsonDiff?: boolean; + crDiffView?: boolean; changeRequestApproverEmails?: boolean; }; diff --git a/src/lib/types/experimental.ts b/src/lib/types/experimental.ts index aefdcb3d72..e155c81844 100644 --- a/src/lib/types/experimental.ts +++ b/src/lib/types/experimental.ts @@ -61,6 +61,7 @@ export type IFlagKey = | 'impactMetrics' | 'createFlagDialogCache' | 'improvedJsonDiff' + | 'crDiffView' | 'changeRequestApproverEmails'; export type IFlags = Partial<{ [key in IFlagKey]: boolean | Variant }>; @@ -282,6 +283,10 @@ const flags: IFlags = { process.env.UNLEASH_EXPERIMENTAL_IMPROVED_JSON_DIFF, false, ), + crDiffView: parseEnvVarBoolean( + process.env.UNLEASH_EXPERIMENTAL_CR_DIFF_VIEW, + false, + ), impactMetrics: parseEnvVarBoolean( process.env.UNLEASH_EXPERIMENTAL_IMPACT_METRICS, false, diff --git a/src/server-dev.ts b/src/server-dev.ts index b49244861d..ad51d0a923 100644 --- a/src/server-dev.ts +++ b/src/server-dev.ts @@ -57,6 +57,7 @@ process.nextTick(async () => { lifecycleMetrics: true, improvedJsonDiff: true, impactMetrics: true, + crDiffView: true, }, }, authentication: { From 75488a01b085f6aac297fc4a03634dcf6c28887a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 27 Jun 2025 11:45:58 +0200 Subject: [PATCH 6/7] chore(deps): update dependency path-to-regexp to v1 [security] (#10227) --- website/package.json | 2 +- website/yarn.lock | 19 ++++++------------- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/website/package.json b/website/package.json index 6c6b9803ee..e69ccbfb16 100644 --- a/website/package.json +++ b/website/package.json @@ -64,7 +64,7 @@ }, "resolutions": { "http-proxy-middleware": "3.0.5", - "express/path-to-regexp": "0.2.5" + "express/path-to-regexp": "1.9.0" }, "packageManager": "yarn@4.9.2" } diff --git a/website/yarn.lock b/website/yarn.lock index 262e53f180..ffafa4d226 100644 --- a/website/yarn.lock +++ b/website/yarn.lock @@ -12839,10 +12839,12 @@ __metadata: languageName: node linkType: hard -"path-to-regexp@npm:0.2.5": - version: 0.2.5 - resolution: "path-to-regexp@npm:0.2.5" - checksum: 10c0/947ffdd583390408a4814dcb921226fba363110a8245d22bd11c2bb1db323ad76b2e879f6dadc02bcf8c9c925b1556d5405c01a466dd28a93d84af5f62c51b79 +"path-to-regexp@npm:1.9.0, path-to-regexp@npm:^1.7.0": + version: 1.9.0 + resolution: "path-to-regexp@npm:1.9.0" + dependencies: + isarray: "npm:0.0.1" + checksum: 10c0/de9ddb01b84d9c2c8e2bed18630d8d039e2d6f60a6538595750fa08c7a6482512257464c8da50616f266ab2cdd2428387e85f3b089e4c3f25d0c537e898a0751 languageName: node linkType: hard @@ -12853,15 +12855,6 @@ __metadata: languageName: node linkType: hard -"path-to-regexp@npm:^1.7.0": - version: 1.9.0 - resolution: "path-to-regexp@npm:1.9.0" - dependencies: - isarray: "npm:0.0.1" - checksum: 10c0/de9ddb01b84d9c2c8e2bed18630d8d039e2d6f60a6538595750fa08c7a6482512257464c8da50616f266ab2cdd2428387e85f3b089e4c3f25d0c537e898a0751 - languageName: node - linkType: hard - "path-type@npm:^4.0.0": version: 4.0.0 resolution: "path-type@npm:4.0.0" From 55b89413062609da5ed0721535ce023a2034f091 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 27 Jun 2025 11:49:41 +0200 Subject: [PATCH 7/7] fix(deps): update dependency uuid to v11 (#10226) --- package.json | 2 +- yarn.lock | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 198d041e49..bf8242be07 100644 --- a/package.json +++ b/package.json @@ -130,7 +130,7 @@ "type-is": "^2.0.0", "ulidx": "^2.4.1", "unleash-client": "^6.7.0-beta.0", - "uuid": "^9.0.0" + "uuid": "^11.0.0" }, "devDependencies": { "@apidevtools/swagger-parser": "10.1.1", diff --git a/yarn.lock b/yarn.lock index 805a565976..0ec137937a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7875,7 +7875,7 @@ __metadata: typescript: "npm:5.8.3" ulidx: "npm:^2.4.1" unleash-client: "npm:^6.7.0-beta.0" - uuid: "npm:^9.0.0" + uuid: "npm:^11.0.0" vite-node: "npm:^3.1.3" vitest: "npm:^3.1.3" wait-on: "npm:^8.0.0" @@ -7950,6 +7950,15 @@ __metadata: languageName: node linkType: hard +"uuid@npm:^11.0.0": + version: 11.1.0 + resolution: "uuid@npm:11.1.0" + bin: + uuid: dist/esm/bin/uuid + checksum: 10c0/34aa51b9874ae398c2b799c88a127701408cd581ee89ec3baa53509dd8728cbb25826f2a038f9465f8b7be446f0fbf11558862965b18d21c993684297628d4d3 + languageName: node + linkType: hard + "uuid@npm:^3.3.2": version: 3.4.0 resolution: "uuid@npm:3.4.0" @@ -7959,15 +7968,6 @@ __metadata: languageName: node linkType: hard -"uuid@npm:^9.0.0": - version: 9.0.1 - resolution: "uuid@npm:9.0.1" - bin: - uuid: dist/bin/uuid - checksum: 10c0/1607dd32ac7fc22f2d8f77051e6a64845c9bce5cd3dd8aa0070c074ec73e666a1f63c7b4e0f4bf2bc8b9d59dc85a15e17807446d9d2b17c8485fbc2147b27f9b - languageName: node - linkType: hard - "v8-compile-cache-lib@npm:^3.0.1": version: 3.0.1 resolution: "v8-compile-cache-lib@npm:3.0.1"