Skip to content

Conversation

@legrego
Copy link
Member

@legrego legrego commented Aug 1, 2025

Attention Code Owners!

Please test these changes before approving. Your know your domains much better than I do, and I need your help to ensure I did not cause any regressions. Thank you!


This pull request removes the dependency on @paralleldrive/cuid2 and replaces it with alternatives (uuid and crypto) for generating unique IDs. The changes primarily focus on dependency management and updating the code to use the new ID generation methods.

Dependency Management:

  • Removed @paralleldrive/cuid2 from package.json and renovate.json to eliminate its usage in the project. [1] [2]

Code Updates:

  • Replaced createId from @paralleldrive/cuid2 with uuidv4 from the uuid package in sample_client_readme.tsx. This change affects the Generate API key functionality. [1] [2]
  • Updated content_stream.ts to use randomUUID from the crypto module instead of createId for generating IDs in the ContentStream class. [1] [2]
  • Updated file_client.ts to use randomUUID from the crypto module instead of createId for generating IDs in the FileClientImpl class. [1] [2]

@legrego legrego added chore Team:Security Platform Security: Auth, Users, Roles, Spaces, Audit Logging, etc t// backport:skip This PR does not require backporting backport:prev-minor release_note:skip Skip the PR/issue when compiling release notes and removed backport:skip This PR does not require backporting backport:prev-minor labels Aug 1, 2025
kibanamachine and others added 2 commits August 1, 2025 19:03
…t --include-path /api/status --include-path /api/alerting/rule/ --include-path /api/alerting/rules --include-path /api/actions --include-path /api/security/role --include-path /api/spaces --include-path /api/streams --include-path /api/fleet --include-path /api/dashboards --include-path /api/saved_objects/_import --include-path /api/saved_objects/_export --include-path /api/maintenance_window --update'
@legrego legrego added the dependency-reduction initiative to reduce the number of Kibana's third-party dependencies label Aug 4, 2025
@legrego legrego marked this pull request as ready for review August 4, 2025 14:19
@legrego legrego requested review from a team as code owners August 4, 2025 14:19
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-security (Team:Security)

Copy link
Contributor

@Dosant Dosant left a comment

Choose a reason for hiding this comment

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

The files client changes look good. The test coverage should be decent, so this shouldn't cause any issues.

@legrego legrego enabled auto-merge (squash) August 11, 2025 14:59
@legrego legrego merged commit 35f311d into elastic:main Aug 11, 2025
16 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.17, 8.18, 8.19, 9.1

https://github.com/elastic/kibana/actions/runs/16886627387

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
customIntegrations 38 31 -7

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
customIntegrations 71.2KB 60.4KB -10.8KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
customIntegrations 10.4KB 10.5KB +55.0B

History

@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.17 Backport failed because of merge conflicts
8.18 Backport failed because of merge conflicts

You might need to backport the following PRs to 8.18:
- Update @testing-library (main) (#230346)
8.19 Backport failed because of merge conflicts
9.1 Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 230293

Questions ?

Please refer to the Backport tool documentation

legrego added a commit to legrego/kibana that referenced this pull request Aug 11, 2025
## Attention Code Owners!

Please test these changes before approving. Your know your domains much
better than I do, and I need your help to ensure I did not cause any
regressions. Thank you!

-------

This pull request removes the dependency on `@paralleldrive/cuid2` and
replaces it with alternatives (`uuid` and `crypto`) for generating
unique IDs. The changes primarily focus on dependency management and
updating the code to use the new ID generation methods.

### Dependency Management:
* Removed `@paralleldrive/cuid2` from `package.json` and `renovate.json`
to eliminate its usage in the project.
[[1]](diffhunk://#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519L1147)
[[2]](diffhunk://#diff-7b5c8955fc544a11b4b74eddb4115f9cc51c9cf162dbffa60d37eeed82a55a57L761)

### Code Updates:
* Replaced `createId` from `@paralleldrive/cuid2` with `uuidv4` from the
`uuid` package in `sample_client_readme.tsx`. This change affects the
`Generate API key` functionality.
[[1]](diffhunk://#diff-19ec5ab675709969feeeaaa0b0549d8926f49e3115166426a17370bc6a98d673L13-R13)
[[2]](diffhunk://#diff-19ec5ab675709969feeeaaa0b0549d8926f49e3115166426a17370bc6a98d673L148-R148)
* Updated `content_stream.ts` to use `randomUUID` from the `crypto`
module instead of `createId` for generating IDs in the `ContentStream`
class.
[[1]](diffhunk://#diff-a7545f2aab64e1136452bd37f3388ae269f64761b19c80cc007be7e7c97f511dL10-R10)
[[2]](diffhunk://#diff-a7545f2aab64e1136452bd37f3388ae269f64761b19c80cc007be7e7c97f511dL227-R227)
* Updated `file_client.ts` to use `randomUUID` from the `crypto` module
instead of `createId` for generating IDs in the `FileClientImpl` class.
[[1]](diffhunk://#diff-ffbfbe730b81183661bb18b6b78bbb3903496b5716598f4284531fe31390358aL13-R13)
[[2]](diffhunk://#diff-ffbfbe730b81183661bb18b6b78bbb3903496b5716598f4284531fe31390358aL133-R133)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 35f311d)

# Conflicts:
#	package.json
legrego added a commit to legrego/kibana that referenced this pull request Aug 11, 2025
## Attention Code Owners!

Please test these changes before approving. Your know your domains much
better than I do, and I need your help to ensure I did not cause any
regressions. Thank you!

-------

This pull request removes the dependency on `@paralleldrive/cuid2` and
replaces it with alternatives (`uuid` and `crypto`) for generating
unique IDs. The changes primarily focus on dependency management and
updating the code to use the new ID generation methods.

### Dependency Management:
* Removed `@paralleldrive/cuid2` from `package.json` and `renovate.json`
to eliminate its usage in the project.
[[1]](diffhunk://#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519L1147)
[[2]](diffhunk://#diff-7b5c8955fc544a11b4b74eddb4115f9cc51c9cf162dbffa60d37eeed82a55a57L761)

### Code Updates:
* Replaced `createId` from `@paralleldrive/cuid2` with `uuidv4` from the
`uuid` package in `sample_client_readme.tsx`. This change affects the
`Generate API key` functionality.
[[1]](diffhunk://#diff-19ec5ab675709969feeeaaa0b0549d8926f49e3115166426a17370bc6a98d673L13-R13)
[[2]](diffhunk://#diff-19ec5ab675709969feeeaaa0b0549d8926f49e3115166426a17370bc6a98d673L148-R148)
* Updated `content_stream.ts` to use `randomUUID` from the `crypto`
module instead of `createId` for generating IDs in the `ContentStream`
class.
[[1]](diffhunk://#diff-a7545f2aab64e1136452bd37f3388ae269f64761b19c80cc007be7e7c97f511dL10-R10)
[[2]](diffhunk://#diff-a7545f2aab64e1136452bd37f3388ae269f64761b19c80cc007be7e7c97f511dL227-R227)
* Updated `file_client.ts` to use `randomUUID` from the `crypto` module
instead of `createId` for generating IDs in the `FileClientImpl` class.
[[1]](diffhunk://#diff-ffbfbe730b81183661bb18b6b78bbb3903496b5716598f4284531fe31390358aL13-R13)
[[2]](diffhunk://#diff-ffbfbe730b81183661bb18b6b78bbb3903496b5716598f4284531fe31390358aL133-R133)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 35f311d)

# Conflicts:
#	package.json
legrego added a commit to legrego/kibana that referenced this pull request Aug 11, 2025
## Attention Code Owners!

Please test these changes before approving. Your know your domains much
better than I do, and I need your help to ensure I did not cause any
regressions. Thank you!

-------

This pull request removes the dependency on `@paralleldrive/cuid2` and
replaces it with alternatives (`uuid` and `crypto`) for generating
unique IDs. The changes primarily focus on dependency management and
updating the code to use the new ID generation methods.

### Dependency Management:
* Removed `@paralleldrive/cuid2` from `package.json` and `renovate.json`
to eliminate its usage in the project.
[[1]](diffhunk://#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519L1147)
[[2]](diffhunk://#diff-7b5c8955fc544a11b4b74eddb4115f9cc51c9cf162dbffa60d37eeed82a55a57L761)

### Code Updates:
* Replaced `createId` from `@paralleldrive/cuid2` with `uuidv4` from the
`uuid` package in `sample_client_readme.tsx`. This change affects the
`Generate API key` functionality.
[[1]](diffhunk://#diff-19ec5ab675709969feeeaaa0b0549d8926f49e3115166426a17370bc6a98d673L13-R13)
[[2]](diffhunk://#diff-19ec5ab675709969feeeaaa0b0549d8926f49e3115166426a17370bc6a98d673L148-R148)
* Updated `content_stream.ts` to use `randomUUID` from the `crypto`
module instead of `createId` for generating IDs in the `ContentStream`
class.
[[1]](diffhunk://#diff-a7545f2aab64e1136452bd37f3388ae269f64761b19c80cc007be7e7c97f511dL10-R10)
[[2]](diffhunk://#diff-a7545f2aab64e1136452bd37f3388ae269f64761b19c80cc007be7e7c97f511dL227-R227)
* Updated `file_client.ts` to use `randomUUID` from the `crypto` module
instead of `createId` for generating IDs in the `FileClientImpl` class.
[[1]](diffhunk://#diff-ffbfbe730b81183661bb18b6b78bbb3903496b5716598f4284531fe31390358aL13-R13)
[[2]](diffhunk://#diff-ffbfbe730b81183661bb18b6b78bbb3903496b5716598f4284531fe31390358aL133-R133)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 35f311d)

# Conflicts:
#	package.json
legrego added a commit to legrego/kibana that referenced this pull request Aug 11, 2025
## Attention Code Owners!

Please test these changes before approving. Your know your domains much
better than I do, and I need your help to ensure I did not cause any
regressions. Thank you!

-------

This pull request removes the dependency on `@paralleldrive/cuid2` and
replaces it with alternatives (`uuid` and `crypto`) for generating
unique IDs. The changes primarily focus on dependency management and
updating the code to use the new ID generation methods.

### Dependency Management:
* Removed `@paralleldrive/cuid2` from `package.json` and `renovate.json`
to eliminate its usage in the project.
[[1]](diffhunk://#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519L1147)
[[2]](diffhunk://#diff-7b5c8955fc544a11b4b74eddb4115f9cc51c9cf162dbffa60d37eeed82a55a57L761)

### Code Updates:
* Replaced `createId` from `@paralleldrive/cuid2` with `uuidv4` from the
`uuid` package in `sample_client_readme.tsx`. This change affects the
`Generate API key` functionality.
[[1]](diffhunk://#diff-19ec5ab675709969feeeaaa0b0549d8926f49e3115166426a17370bc6a98d673L13-R13)
[[2]](diffhunk://#diff-19ec5ab675709969feeeaaa0b0549d8926f49e3115166426a17370bc6a98d673L148-R148)
* Updated `content_stream.ts` to use `randomUUID` from the `crypto`
module instead of `createId` for generating IDs in the `ContentStream`
class.
[[1]](diffhunk://#diff-a7545f2aab64e1136452bd37f3388ae269f64761b19c80cc007be7e7c97f511dL10-R10)
[[2]](diffhunk://#diff-a7545f2aab64e1136452bd37f3388ae269f64761b19c80cc007be7e7c97f511dL227-R227)
* Updated `file_client.ts` to use `randomUUID` from the `crypto` module
instead of `createId` for generating IDs in the `FileClientImpl` class.
[[1]](diffhunk://#diff-ffbfbe730b81183661bb18b6b78bbb3903496b5716598f4284531fe31390358aL13-R13)
[[2]](diffhunk://#diff-ffbfbe730b81183661bb18b6b78bbb3903496b5716598f4284531fe31390358aL133-R133)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 35f311d)

# Conflicts:
#	package.json
@legrego
Copy link
Member Author

legrego commented Aug 11, 2025

💚 All backports created successfully

Status Branch Result
9.1
9.0
8.19
8.18

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

legrego added a commit that referenced this pull request Aug 11, 2025
# Backport

This will backport the following commits from `main` to `9.1`:
- [Remove @paralleldrive/cuid2
(#230293)](#230293)

<!--- Backport version: 10.0.1 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Larry
Gregory","email":"larry.gregory@elastic.co"},"sourceCommit":{"committedDate":"2025-08-11T16:54:51Z","message":"Remove
@paralleldrive/cuid2 (#230293)\n\n## Attention Code Owners!\n\nPlease
test these changes before approving. Your know your domains much\nbetter
than I do, and I need your help to ensure I did not cause
any\nregressions. Thank you!\n\n-------\n\nThis pull request removes the
dependency on `@paralleldrive/cuid2` and\nreplaces it with alternatives
(`uuid` and `crypto`) for generating\nunique IDs. The changes primarily
focus on dependency management and\nupdating the code to use the new ID
generation methods.\n\n### Dependency Management:\n* Removed
`@paralleldrive/cuid2` from `package.json` and `renovate.json`\nto
eliminate its usage in the
project.\n[[1]](diffhunk://#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519L1147)\n[[2]](diffhunk://#diff-7b5c8955fc544a11b4b74eddb4115f9cc51c9cf162dbffa60d37eeed82a55a57L761)\n\n###
Code Updates:\n* Replaced `createId` from `@paralleldrive/cuid2` with
`uuidv4` from the\n`uuid` package in `sample_client_readme.tsx`. This
change affects the\n`Generate API key`
functionality.\n[[1]](diffhunk://#diff-19ec5ab675709969feeeaaa0b0549d8926f49e3115166426a17370bc6a98d673L13-R13)\n[[2]](diffhunk://#diff-19ec5ab675709969feeeaaa0b0549d8926f49e3115166426a17370bc6a98d673L148-R148)\n*
Updated `content_stream.ts` to use `randomUUID` from the
`crypto`\nmodule instead of `createId` for generating IDs in the
`ContentStream`\nclass.\n[[1]](diffhunk://#diff-a7545f2aab64e1136452bd37f3388ae269f64761b19c80cc007be7e7c97f511dL10-R10)\n[[2]](diffhunk://#diff-a7545f2aab64e1136452bd37f3388ae269f64761b19c80cc007be7e7c97f511dL227-R227)\n*
Updated `file_client.ts` to use `randomUUID` from the `crypto`
module\ninstead of `createId` for generating IDs in the `FileClientImpl`
class.\n[[1]](diffhunk://#diff-ffbfbe730b81183661bb18b6b78bbb3903496b5716598f4284531fe31390358aL13-R13)\n[[2]](diffhunk://#diff-ffbfbe730b81183661bb18b6b78bbb3903496b5716598f4284531fe31390358aL133-R133)\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"35f311d6c61aa8998baba8f7499bbf744d212a2f","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["chore","Team:Security","release_note:skip","backport:prev-minor","backport:prev-major","v9.2.0","dependency-reduction"],"title":"Remove
@paralleldrive/cuid2","number":230293,"url":"https://github.com/elastic/kibana/pull/230293","mergeCommit":{"message":"Remove
@paralleldrive/cuid2 (#230293)\n\n## Attention Code Owners!\n\nPlease
test these changes before approving. Your know your domains much\nbetter
than I do, and I need your help to ensure I did not cause
any\nregressions. Thank you!\n\n-------\n\nThis pull request removes the
dependency on `@paralleldrive/cuid2` and\nreplaces it with alternatives
(`uuid` and `crypto`) for generating\nunique IDs. The changes primarily
focus on dependency management and\nupdating the code to use the new ID
generation methods.\n\n### Dependency Management:\n* Removed
`@paralleldrive/cuid2` from `package.json` and `renovate.json`\nto
eliminate its usage in the
project.\n[[1]](diffhunk://#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519L1147)\n[[2]](diffhunk://#diff-7b5c8955fc544a11b4b74eddb4115f9cc51c9cf162dbffa60d37eeed82a55a57L761)\n\n###
Code Updates:\n* Replaced `createId` from `@paralleldrive/cuid2` with
`uuidv4` from the\n`uuid` package in `sample_client_readme.tsx`. This
change affects the\n`Generate API key`
functionality.\n[[1]](diffhunk://#diff-19ec5ab675709969feeeaaa0b0549d8926f49e3115166426a17370bc6a98d673L13-R13)\n[[2]](diffhunk://#diff-19ec5ab675709969feeeaaa0b0549d8926f49e3115166426a17370bc6a98d673L148-R148)\n*
Updated `content_stream.ts` to use `randomUUID` from the
`crypto`\nmodule instead of `createId` for generating IDs in the
`ContentStream`\nclass.\n[[1]](diffhunk://#diff-a7545f2aab64e1136452bd37f3388ae269f64761b19c80cc007be7e7c97f511dL10-R10)\n[[2]](diffhunk://#diff-a7545f2aab64e1136452bd37f3388ae269f64761b19c80cc007be7e7c97f511dL227-R227)\n*
Updated `file_client.ts` to use `randomUUID` from the `crypto`
module\ninstead of `createId` for generating IDs in the `FileClientImpl`
class.\n[[1]](diffhunk://#diff-ffbfbe730b81183661bb18b6b78bbb3903496b5716598f4284531fe31390358aL13-R13)\n[[2]](diffhunk://#diff-ffbfbe730b81183661bb18b6b78bbb3903496b5716598f4284531fe31390358aL133-R133)\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"35f311d6c61aa8998baba8f7499bbf744d212a2f"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/230293","number":230293,"mergeCommit":{"message":"Remove
@paralleldrive/cuid2 (#230293)\n\n## Attention Code Owners!\n\nPlease
test these changes before approving. Your know your domains much\nbetter
than I do, and I need your help to ensure I did not cause
any\nregressions. Thank you!\n\n-------\n\nThis pull request removes the
dependency on `@paralleldrive/cuid2` and\nreplaces it with alternatives
(`uuid` and `crypto`) for generating\nunique IDs. The changes primarily
focus on dependency management and\nupdating the code to use the new ID
generation methods.\n\n### Dependency Management:\n* Removed
`@paralleldrive/cuid2` from `package.json` and `renovate.json`\nto
eliminate its usage in the
project.\n[[1]](diffhunk://#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519L1147)\n[[2]](diffhunk://#diff-7b5c8955fc544a11b4b74eddb4115f9cc51c9cf162dbffa60d37eeed82a55a57L761)\n\n###
Code Updates:\n* Replaced `createId` from `@paralleldrive/cuid2` with
`uuidv4` from the\n`uuid` package in `sample_client_readme.tsx`. This
change affects the\n`Generate API key`
functionality.\n[[1]](diffhunk://#diff-19ec5ab675709969feeeaaa0b0549d8926f49e3115166426a17370bc6a98d673L13-R13)\n[[2]](diffhunk://#diff-19ec5ab675709969feeeaaa0b0549d8926f49e3115166426a17370bc6a98d673L148-R148)\n*
Updated `content_stream.ts` to use `randomUUID` from the
`crypto`\nmodule instead of `createId` for generating IDs in the
`ContentStream`\nclass.\n[[1]](diffhunk://#diff-a7545f2aab64e1136452bd37f3388ae269f64761b19c80cc007be7e7c97f511dL10-R10)\n[[2]](diffhunk://#diff-a7545f2aab64e1136452bd37f3388ae269f64761b19c80cc007be7e7c97f511dL227-R227)\n*
Updated `file_client.ts` to use `randomUUID` from the `crypto`
module\ninstead of `createId` for generating IDs in the `FileClientImpl`
class.\n[[1]](diffhunk://#diff-ffbfbe730b81183661bb18b6b78bbb3903496b5716598f4284531fe31390358aL13-R13)\n[[2]](diffhunk://#diff-ffbfbe730b81183661bb18b6b78bbb3903496b5716598f4284531fe31390358aL133-R133)\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"35f311d6c61aa8998baba8f7499bbf744d212a2f"}}]}]
BACKPORT-->
legrego added a commit that referenced this pull request Aug 11, 2025
# Backport

This will backport the following commits from `main` to `9.0`:
- [Remove @paralleldrive/cuid2
(#230293)](#230293)

<!--- Backport version: 10.0.1 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Larry
Gregory","email":"larry.gregory@elastic.co"},"sourceCommit":{"committedDate":"2025-08-11T16:54:51Z","message":"Remove
@paralleldrive/cuid2 (#230293)\n\n## Attention Code Owners!\n\nPlease
test these changes before approving. Your know your domains much\nbetter
than I do, and I need your help to ensure I did not cause
any\nregressions. Thank you!\n\n-------\n\nThis pull request removes the
dependency on `@paralleldrive/cuid2` and\nreplaces it with alternatives
(`uuid` and `crypto`) for generating\nunique IDs. The changes primarily
focus on dependency management and\nupdating the code to use the new ID
generation methods.\n\n### Dependency Management:\n* Removed
`@paralleldrive/cuid2` from `package.json` and `renovate.json`\nto
eliminate its usage in the
project.\n[[1]](diffhunk://#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519L1147)\n[[2]](diffhunk://#diff-7b5c8955fc544a11b4b74eddb4115f9cc51c9cf162dbffa60d37eeed82a55a57L761)\n\n###
Code Updates:\n* Replaced `createId` from `@paralleldrive/cuid2` with
`uuidv4` from the\n`uuid` package in `sample_client_readme.tsx`. This
change affects the\n`Generate API key`
functionality.\n[[1]](diffhunk://#diff-19ec5ab675709969feeeaaa0b0549d8926f49e3115166426a17370bc6a98d673L13-R13)\n[[2]](diffhunk://#diff-19ec5ab675709969feeeaaa0b0549d8926f49e3115166426a17370bc6a98d673L148-R148)\n*
Updated `content_stream.ts` to use `randomUUID` from the
`crypto`\nmodule instead of `createId` for generating IDs in the
`ContentStream`\nclass.\n[[1]](diffhunk://#diff-a7545f2aab64e1136452bd37f3388ae269f64761b19c80cc007be7e7c97f511dL10-R10)\n[[2]](diffhunk://#diff-a7545f2aab64e1136452bd37f3388ae269f64761b19c80cc007be7e7c97f511dL227-R227)\n*
Updated `file_client.ts` to use `randomUUID` from the `crypto`
module\ninstead of `createId` for generating IDs in the `FileClientImpl`
class.\n[[1]](diffhunk://#diff-ffbfbe730b81183661bb18b6b78bbb3903496b5716598f4284531fe31390358aL13-R13)\n[[2]](diffhunk://#diff-ffbfbe730b81183661bb18b6b78bbb3903496b5716598f4284531fe31390358aL133-R133)\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"35f311d6c61aa8998baba8f7499bbf744d212a2f","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["chore","Team:Security","release_note:skip","backport:prev-minor","backport:prev-major","v9.2.0","dependency-reduction"],"title":"Remove
@paralleldrive/cuid2","number":230293,"url":"https://github.com/elastic/kibana/pull/230293","mergeCommit":{"message":"Remove
@paralleldrive/cuid2 (#230293)\n\n## Attention Code Owners!\n\nPlease
test these changes before approving. Your know your domains much\nbetter
than I do, and I need your help to ensure I did not cause
any\nregressions. Thank you!\n\n-------\n\nThis pull request removes the
dependency on `@paralleldrive/cuid2` and\nreplaces it with alternatives
(`uuid` and `crypto`) for generating\nunique IDs. The changes primarily
focus on dependency management and\nupdating the code to use the new ID
generation methods.\n\n### Dependency Management:\n* Removed
`@paralleldrive/cuid2` from `package.json` and `renovate.json`\nto
eliminate its usage in the
project.\n[[1]](diffhunk://#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519L1147)\n[[2]](diffhunk://#diff-7b5c8955fc544a11b4b74eddb4115f9cc51c9cf162dbffa60d37eeed82a55a57L761)\n\n###
Code Updates:\n* Replaced `createId` from `@paralleldrive/cuid2` with
`uuidv4` from the\n`uuid` package in `sample_client_readme.tsx`. This
change affects the\n`Generate API key`
functionality.\n[[1]](diffhunk://#diff-19ec5ab675709969feeeaaa0b0549d8926f49e3115166426a17370bc6a98d673L13-R13)\n[[2]](diffhunk://#diff-19ec5ab675709969feeeaaa0b0549d8926f49e3115166426a17370bc6a98d673L148-R148)\n*
Updated `content_stream.ts` to use `randomUUID` from the
`crypto`\nmodule instead of `createId` for generating IDs in the
`ContentStream`\nclass.\n[[1]](diffhunk://#diff-a7545f2aab64e1136452bd37f3388ae269f64761b19c80cc007be7e7c97f511dL10-R10)\n[[2]](diffhunk://#diff-a7545f2aab64e1136452bd37f3388ae269f64761b19c80cc007be7e7c97f511dL227-R227)\n*
Updated `file_client.ts` to use `randomUUID` from the `crypto`
module\ninstead of `createId` for generating IDs in the `FileClientImpl`
class.\n[[1]](diffhunk://#diff-ffbfbe730b81183661bb18b6b78bbb3903496b5716598f4284531fe31390358aL13-R13)\n[[2]](diffhunk://#diff-ffbfbe730b81183661bb18b6b78bbb3903496b5716598f4284531fe31390358aL133-R133)\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"35f311d6c61aa8998baba8f7499bbf744d212a2f"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/230293","number":230293,"mergeCommit":{"message":"Remove
@paralleldrive/cuid2 (#230293)\n\n## Attention Code Owners!\n\nPlease
test these changes before approving. Your know your domains much\nbetter
than I do, and I need your help to ensure I did not cause
any\nregressions. Thank you!\n\n-------\n\nThis pull request removes the
dependency on `@paralleldrive/cuid2` and\nreplaces it with alternatives
(`uuid` and `crypto`) for generating\nunique IDs. The changes primarily
focus on dependency management and\nupdating the code to use the new ID
generation methods.\n\n### Dependency Management:\n* Removed
`@paralleldrive/cuid2` from `package.json` and `renovate.json`\nto
eliminate its usage in the
project.\n[[1]](diffhunk://#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519L1147)\n[[2]](diffhunk://#diff-7b5c8955fc544a11b4b74eddb4115f9cc51c9cf162dbffa60d37eeed82a55a57L761)\n\n###
Code Updates:\n* Replaced `createId` from `@paralleldrive/cuid2` with
`uuidv4` from the\n`uuid` package in `sample_client_readme.tsx`. This
change affects the\n`Generate API key`
functionality.\n[[1]](diffhunk://#diff-19ec5ab675709969feeeaaa0b0549d8926f49e3115166426a17370bc6a98d673L13-R13)\n[[2]](diffhunk://#diff-19ec5ab675709969feeeaaa0b0549d8926f49e3115166426a17370bc6a98d673L148-R148)\n*
Updated `content_stream.ts` to use `randomUUID` from the
`crypto`\nmodule instead of `createId` for generating IDs in the
`ContentStream`\nclass.\n[[1]](diffhunk://#diff-a7545f2aab64e1136452bd37f3388ae269f64761b19c80cc007be7e7c97f511dL10-R10)\n[[2]](diffhunk://#diff-a7545f2aab64e1136452bd37f3388ae269f64761b19c80cc007be7e7c97f511dL227-R227)\n*
Updated `file_client.ts` to use `randomUUID` from the `crypto`
module\ninstead of `createId` for generating IDs in the `FileClientImpl`
class.\n[[1]](diffhunk://#diff-ffbfbe730b81183661bb18b6b78bbb3903496b5716598f4284531fe31390358aL13-R13)\n[[2]](diffhunk://#diff-ffbfbe730b81183661bb18b6b78bbb3903496b5716598f4284531fe31390358aL133-R133)\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"35f311d6c61aa8998baba8f7499bbf744d212a2f"}}]}]
BACKPORT-->
legrego added a commit that referenced this pull request Aug 11, 2025
# Backport

This will backport the following commits from `main` to `8.19`:
- [Remove @paralleldrive/cuid2
(#230293)](#230293)

<!--- Backport version: 10.0.1 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Larry
Gregory","email":"larry.gregory@elastic.co"},"sourceCommit":{"committedDate":"2025-08-11T16:54:51Z","message":"Remove
@paralleldrive/cuid2 (#230293)\n\n## Attention Code Owners!\n\nPlease
test these changes before approving. Your know your domains much\nbetter
than I do, and I need your help to ensure I did not cause
any\nregressions. Thank you!\n\n-------\n\nThis pull request removes the
dependency on `@paralleldrive/cuid2` and\nreplaces it with alternatives
(`uuid` and `crypto`) for generating\nunique IDs. The changes primarily
focus on dependency management and\nupdating the code to use the new ID
generation methods.\n\n### Dependency Management:\n* Removed
`@paralleldrive/cuid2` from `package.json` and `renovate.json`\nto
eliminate its usage in the
project.\n[[1]](diffhunk://#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519L1147)\n[[2]](diffhunk://#diff-7b5c8955fc544a11b4b74eddb4115f9cc51c9cf162dbffa60d37eeed82a55a57L761)\n\n###
Code Updates:\n* Replaced `createId` from `@paralleldrive/cuid2` with
`uuidv4` from the\n`uuid` package in `sample_client_readme.tsx`. This
change affects the\n`Generate API key`
functionality.\n[[1]](diffhunk://#diff-19ec5ab675709969feeeaaa0b0549d8926f49e3115166426a17370bc6a98d673L13-R13)\n[[2]](diffhunk://#diff-19ec5ab675709969feeeaaa0b0549d8926f49e3115166426a17370bc6a98d673L148-R148)\n*
Updated `content_stream.ts` to use `randomUUID` from the
`crypto`\nmodule instead of `createId` for generating IDs in the
`ContentStream`\nclass.\n[[1]](diffhunk://#diff-a7545f2aab64e1136452bd37f3388ae269f64761b19c80cc007be7e7c97f511dL10-R10)\n[[2]](diffhunk://#diff-a7545f2aab64e1136452bd37f3388ae269f64761b19c80cc007be7e7c97f511dL227-R227)\n*
Updated `file_client.ts` to use `randomUUID` from the `crypto`
module\ninstead of `createId` for generating IDs in the `FileClientImpl`
class.\n[[1]](diffhunk://#diff-ffbfbe730b81183661bb18b6b78bbb3903496b5716598f4284531fe31390358aL13-R13)\n[[2]](diffhunk://#diff-ffbfbe730b81183661bb18b6b78bbb3903496b5716598f4284531fe31390358aL133-R133)\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"35f311d6c61aa8998baba8f7499bbf744d212a2f","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["chore","Team:Security","release_note:skip","backport:prev-minor","backport:prev-major","v9.2.0","dependency-reduction"],"title":"Remove
@paralleldrive/cuid2","number":230293,"url":"https://github.com/elastic/kibana/pull/230293","mergeCommit":{"message":"Remove
@paralleldrive/cuid2 (#230293)\n\n## Attention Code Owners!\n\nPlease
test these changes before approving. Your know your domains much\nbetter
than I do, and I need your help to ensure I did not cause
any\nregressions. Thank you!\n\n-------\n\nThis pull request removes the
dependency on `@paralleldrive/cuid2` and\nreplaces it with alternatives
(`uuid` and `crypto`) for generating\nunique IDs. The changes primarily
focus on dependency management and\nupdating the code to use the new ID
generation methods.\n\n### Dependency Management:\n* Removed
`@paralleldrive/cuid2` from `package.json` and `renovate.json`\nto
eliminate its usage in the
project.\n[[1]](diffhunk://#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519L1147)\n[[2]](diffhunk://#diff-7b5c8955fc544a11b4b74eddb4115f9cc51c9cf162dbffa60d37eeed82a55a57L761)\n\n###
Code Updates:\n* Replaced `createId` from `@paralleldrive/cuid2` with
`uuidv4` from the\n`uuid` package in `sample_client_readme.tsx`. This
change affects the\n`Generate API key`
functionality.\n[[1]](diffhunk://#diff-19ec5ab675709969feeeaaa0b0549d8926f49e3115166426a17370bc6a98d673L13-R13)\n[[2]](diffhunk://#diff-19ec5ab675709969feeeaaa0b0549d8926f49e3115166426a17370bc6a98d673L148-R148)\n*
Updated `content_stream.ts` to use `randomUUID` from the
`crypto`\nmodule instead of `createId` for generating IDs in the
`ContentStream`\nclass.\n[[1]](diffhunk://#diff-a7545f2aab64e1136452bd37f3388ae269f64761b19c80cc007be7e7c97f511dL10-R10)\n[[2]](diffhunk://#diff-a7545f2aab64e1136452bd37f3388ae269f64761b19c80cc007be7e7c97f511dL227-R227)\n*
Updated `file_client.ts` to use `randomUUID` from the `crypto`
module\ninstead of `createId` for generating IDs in the `FileClientImpl`
class.\n[[1]](diffhunk://#diff-ffbfbe730b81183661bb18b6b78bbb3903496b5716598f4284531fe31390358aL13-R13)\n[[2]](diffhunk://#diff-ffbfbe730b81183661bb18b6b78bbb3903496b5716598f4284531fe31390358aL133-R133)\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"35f311d6c61aa8998baba8f7499bbf744d212a2f"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/230293","number":230293,"mergeCommit":{"message":"Remove
@paralleldrive/cuid2 (#230293)\n\n## Attention Code Owners!\n\nPlease
test these changes before approving. Your know your domains much\nbetter
than I do, and I need your help to ensure I did not cause
any\nregressions. Thank you!\n\n-------\n\nThis pull request removes the
dependency on `@paralleldrive/cuid2` and\nreplaces it with alternatives
(`uuid` and `crypto`) for generating\nunique IDs. The changes primarily
focus on dependency management and\nupdating the code to use the new ID
generation methods.\n\n### Dependency Management:\n* Removed
`@paralleldrive/cuid2` from `package.json` and `renovate.json`\nto
eliminate its usage in the
project.\n[[1]](diffhunk://#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519L1147)\n[[2]](diffhunk://#diff-7b5c8955fc544a11b4b74eddb4115f9cc51c9cf162dbffa60d37eeed82a55a57L761)\n\n###
Code Updates:\n* Replaced `createId` from `@paralleldrive/cuid2` with
`uuidv4` from the\n`uuid` package in `sample_client_readme.tsx`. This
change affects the\n`Generate API key`
functionality.\n[[1]](diffhunk://#diff-19ec5ab675709969feeeaaa0b0549d8926f49e3115166426a17370bc6a98d673L13-R13)\n[[2]](diffhunk://#diff-19ec5ab675709969feeeaaa0b0549d8926f49e3115166426a17370bc6a98d673L148-R148)\n*
Updated `content_stream.ts` to use `randomUUID` from the
`crypto`\nmodule instead of `createId` for generating IDs in the
`ContentStream`\nclass.\n[[1]](diffhunk://#diff-a7545f2aab64e1136452bd37f3388ae269f64761b19c80cc007be7e7c97f511dL10-R10)\n[[2]](diffhunk://#diff-a7545f2aab64e1136452bd37f3388ae269f64761b19c80cc007be7e7c97f511dL227-R227)\n*
Updated `file_client.ts` to use `randomUUID` from the `crypto`
module\ninstead of `createId` for generating IDs in the `FileClientImpl`
class.\n[[1]](diffhunk://#diff-ffbfbe730b81183661bb18b6b78bbb3903496b5716598f4284531fe31390358aL13-R13)\n[[2]](diffhunk://#diff-ffbfbe730b81183661bb18b6b78bbb3903496b5716598f4284531fe31390358aL133-R133)\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"35f311d6c61aa8998baba8f7499bbf744d212a2f"}}]}]
BACKPORT-->
legrego added a commit that referenced this pull request Aug 12, 2025
# Backport

This will backport the following commits from `main` to `8.18`:
- [Remove @paralleldrive/cuid2
(#230293)](#230293)

<!--- Backport version: 10.0.1 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Larry
Gregory","email":"larry.gregory@elastic.co"},"sourceCommit":{"committedDate":"2025-08-11T16:54:51Z","message":"Remove
@paralleldrive/cuid2 (#230293)\n\n## Attention Code Owners!\n\nPlease
test these changes before approving. Your know your domains much\nbetter
than I do, and I need your help to ensure I did not cause
any\nregressions. Thank you!\n\n-------\n\nThis pull request removes the
dependency on `@paralleldrive/cuid2` and\nreplaces it with alternatives
(`uuid` and `crypto`) for generating\nunique IDs. The changes primarily
focus on dependency management and\nupdating the code to use the new ID
generation methods.\n\n### Dependency Management:\n* Removed
`@paralleldrive/cuid2` from `package.json` and `renovate.json`\nto
eliminate its usage in the
project.\n[[1]](diffhunk://#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519L1147)\n[[2]](diffhunk://#diff-7b5c8955fc544a11b4b74eddb4115f9cc51c9cf162dbffa60d37eeed82a55a57L761)\n\n###
Code Updates:\n* Replaced `createId` from `@paralleldrive/cuid2` with
`uuidv4` from the\n`uuid` package in `sample_client_readme.tsx`. This
change affects the\n`Generate API key`
functionality.\n[[1]](diffhunk://#diff-19ec5ab675709969feeeaaa0b0549d8926f49e3115166426a17370bc6a98d673L13-R13)\n[[2]](diffhunk://#diff-19ec5ab675709969feeeaaa0b0549d8926f49e3115166426a17370bc6a98d673L148-R148)\n*
Updated `content_stream.ts` to use `randomUUID` from the
`crypto`\nmodule instead of `createId` for generating IDs in the
`ContentStream`\nclass.\n[[1]](diffhunk://#diff-a7545f2aab64e1136452bd37f3388ae269f64761b19c80cc007be7e7c97f511dL10-R10)\n[[2]](diffhunk://#diff-a7545f2aab64e1136452bd37f3388ae269f64761b19c80cc007be7e7c97f511dL227-R227)\n*
Updated `file_client.ts` to use `randomUUID` from the `crypto`
module\ninstead of `createId` for generating IDs in the `FileClientImpl`
class.\n[[1]](diffhunk://#diff-ffbfbe730b81183661bb18b6b78bbb3903496b5716598f4284531fe31390358aL13-R13)\n[[2]](diffhunk://#diff-ffbfbe730b81183661bb18b6b78bbb3903496b5716598f4284531fe31390358aL133-R133)\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"35f311d6c61aa8998baba8f7499bbf744d212a2f","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["chore","Team:Security","release_note:skip","backport:prev-minor","backport:prev-major","v9.2.0","dependency-reduction"],"title":"Remove
@paralleldrive/cuid2","number":230293,"url":"https://github.com/elastic/kibana/pull/230293","mergeCommit":{"message":"Remove
@paralleldrive/cuid2 (#230293)\n\n## Attention Code Owners!\n\nPlease
test these changes before approving. Your know your domains much\nbetter
than I do, and I need your help to ensure I did not cause
any\nregressions. Thank you!\n\n-------\n\nThis pull request removes the
dependency on `@paralleldrive/cuid2` and\nreplaces it with alternatives
(`uuid` and `crypto`) for generating\nunique IDs. The changes primarily
focus on dependency management and\nupdating the code to use the new ID
generation methods.\n\n### Dependency Management:\n* Removed
`@paralleldrive/cuid2` from `package.json` and `renovate.json`\nto
eliminate its usage in the
project.\n[[1]](diffhunk://#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519L1147)\n[[2]](diffhunk://#diff-7b5c8955fc544a11b4b74eddb4115f9cc51c9cf162dbffa60d37eeed82a55a57L761)\n\n###
Code Updates:\n* Replaced `createId` from `@paralleldrive/cuid2` with
`uuidv4` from the\n`uuid` package in `sample_client_readme.tsx`. This
change affects the\n`Generate API key`
functionality.\n[[1]](diffhunk://#diff-19ec5ab675709969feeeaaa0b0549d8926f49e3115166426a17370bc6a98d673L13-R13)\n[[2]](diffhunk://#diff-19ec5ab675709969feeeaaa0b0549d8926f49e3115166426a17370bc6a98d673L148-R148)\n*
Updated `content_stream.ts` to use `randomUUID` from the
`crypto`\nmodule instead of `createId` for generating IDs in the
`ContentStream`\nclass.\n[[1]](diffhunk://#diff-a7545f2aab64e1136452bd37f3388ae269f64761b19c80cc007be7e7c97f511dL10-R10)\n[[2]](diffhunk://#diff-a7545f2aab64e1136452bd37f3388ae269f64761b19c80cc007be7e7c97f511dL227-R227)\n*
Updated `file_client.ts` to use `randomUUID` from the `crypto`
module\ninstead of `createId` for generating IDs in the `FileClientImpl`
class.\n[[1]](diffhunk://#diff-ffbfbe730b81183661bb18b6b78bbb3903496b5716598f4284531fe31390358aL13-R13)\n[[2]](diffhunk://#diff-ffbfbe730b81183661bb18b6b78bbb3903496b5716598f4284531fe31390358aL133-R133)\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"35f311d6c61aa8998baba8f7499bbf744d212a2f"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/230293","number":230293,"mergeCommit":{"message":"Remove
@paralleldrive/cuid2 (#230293)\n\n## Attention Code Owners!\n\nPlease
test these changes before approving. Your know your domains much\nbetter
than I do, and I need your help to ensure I did not cause
any\nregressions. Thank you!\n\n-------\n\nThis pull request removes the
dependency on `@paralleldrive/cuid2` and\nreplaces it with alternatives
(`uuid` and `crypto`) for generating\nunique IDs. The changes primarily
focus on dependency management and\nupdating the code to use the new ID
generation methods.\n\n### Dependency Management:\n* Removed
`@paralleldrive/cuid2` from `package.json` and `renovate.json`\nto
eliminate its usage in the
project.\n[[1]](diffhunk://#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519L1147)\n[[2]](diffhunk://#diff-7b5c8955fc544a11b4b74eddb4115f9cc51c9cf162dbffa60d37eeed82a55a57L761)\n\n###
Code Updates:\n* Replaced `createId` from `@paralleldrive/cuid2` with
`uuidv4` from the\n`uuid` package in `sample_client_readme.tsx`. This
change affects the\n`Generate API key`
functionality.\n[[1]](diffhunk://#diff-19ec5ab675709969feeeaaa0b0549d8926f49e3115166426a17370bc6a98d673L13-R13)\n[[2]](diffhunk://#diff-19ec5ab675709969feeeaaa0b0549d8926f49e3115166426a17370bc6a98d673L148-R148)\n*
Updated `content_stream.ts` to use `randomUUID` from the
`crypto`\nmodule instead of `createId` for generating IDs in the
`ContentStream`\nclass.\n[[1]](diffhunk://#diff-a7545f2aab64e1136452bd37f3388ae269f64761b19c80cc007be7e7c97f511dL10-R10)\n[[2]](diffhunk://#diff-a7545f2aab64e1136452bd37f3388ae269f64761b19c80cc007be7e7c97f511dL227-R227)\n*
Updated `file_client.ts` to use `randomUUID` from the `crypto`
module\ninstead of `createId` for generating IDs in the `FileClientImpl`
class.\n[[1]](diffhunk://#diff-ffbfbe730b81183661bb18b6b78bbb3903496b5716598f4284531fe31390358aL13-R13)\n[[2]](diffhunk://#diff-ffbfbe730b81183661bb18b6b78bbb3903496b5716598f4284531fe31390358aL133-R133)\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"35f311d6c61aa8998baba8f7499bbf744d212a2f"}}]}]
BACKPORT-->
NicholasPeretti pushed a commit to NicholasPeretti/kibana that referenced this pull request Aug 18, 2025
## Attention Code Owners!

Please test these changes before approving. Your know your domains much
better than I do, and I need your help to ensure I did not cause any
regressions. Thank you!

-------

This pull request removes the dependency on `@paralleldrive/cuid2` and
replaces it with alternatives (`uuid` and `crypto`) for generating
unique IDs. The changes primarily focus on dependency management and
updating the code to use the new ID generation methods.

### Dependency Management:
* Removed `@paralleldrive/cuid2` from `package.json` and `renovate.json`
to eliminate its usage in the project.
[[1]](diffhunk://#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519L1147)
[[2]](diffhunk://#diff-7b5c8955fc544a11b4b74eddb4115f9cc51c9cf162dbffa60d37eeed82a55a57L761)

### Code Updates:
* Replaced `createId` from `@paralleldrive/cuid2` with `uuidv4` from the
`uuid` package in `sample_client_readme.tsx`. This change affects the
`Generate API key` functionality.
[[1]](diffhunk://#diff-19ec5ab675709969feeeaaa0b0549d8926f49e3115166426a17370bc6a98d673L13-R13)
[[2]](diffhunk://#diff-19ec5ab675709969feeeaaa0b0549d8926f49e3115166426a17370bc6a98d673L148-R148)
* Updated `content_stream.ts` to use `randomUUID` from the `crypto`
module instead of `createId` for generating IDs in the `ContentStream`
class.
[[1]](diffhunk://#diff-a7545f2aab64e1136452bd37f3388ae269f64761b19c80cc007be7e7c97f511dL10-R10)
[[2]](diffhunk://#diff-a7545f2aab64e1136452bd37f3388ae269f64761b19c80cc007be7e7c97f511dL227-R227)
* Updated `file_client.ts` to use `randomUUID` from the `crypto` module
instead of `createId` for generating IDs in the `FileClientImpl` class.
[[1]](diffhunk://#diff-ffbfbe730b81183661bb18b6b78bbb3903496b5716598f4284531fe31390358aL13-R13)
[[2]](diffhunk://#diff-ffbfbe730b81183661bb18b6b78bbb3903496b5716598f4284531fe31390358aL133-R133)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
qn895 pushed a commit to qn895/kibana that referenced this pull request Aug 26, 2025
## Attention Code Owners!

Please test these changes before approving. Your know your domains much
better than I do, and I need your help to ensure I did not cause any
regressions. Thank you!

-------

This pull request removes the dependency on `@paralleldrive/cuid2` and
replaces it with alternatives (`uuid` and `crypto`) for generating
unique IDs. The changes primarily focus on dependency management and
updating the code to use the new ID generation methods.

### Dependency Management:
* Removed `@paralleldrive/cuid2` from `package.json` and `renovate.json`
to eliminate its usage in the project.
[[1]](diffhunk://#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519L1147)
[[2]](diffhunk://#diff-7b5c8955fc544a11b4b74eddb4115f9cc51c9cf162dbffa60d37eeed82a55a57L761)

### Code Updates:
* Replaced `createId` from `@paralleldrive/cuid2` with `uuidv4` from the
`uuid` package in `sample_client_readme.tsx`. This change affects the
`Generate API key` functionality.
[[1]](diffhunk://#diff-19ec5ab675709969feeeaaa0b0549d8926f49e3115166426a17370bc6a98d673L13-R13)
[[2]](diffhunk://#diff-19ec5ab675709969feeeaaa0b0549d8926f49e3115166426a17370bc6a98d673L148-R148)
* Updated `content_stream.ts` to use `randomUUID` from the `crypto`
module instead of `createId` for generating IDs in the `ContentStream`
class.
[[1]](diffhunk://#diff-a7545f2aab64e1136452bd37f3388ae269f64761b19c80cc007be7e7c97f511dL10-R10)
[[2]](diffhunk://#diff-a7545f2aab64e1136452bd37f3388ae269f64761b19c80cc007be7e7c97f511dL227-R227)
* Updated `file_client.ts` to use `randomUUID` from the `crypto` module
instead of `createId` for generating IDs in the `FileClientImpl` class.
[[1]](diffhunk://#diff-ffbfbe730b81183661bb18b6b78bbb3903496b5716598f4284531fe31390358aL13-R13)
[[2]](diffhunk://#diff-ffbfbe730b81183661bb18b6b78bbb3903496b5716598f4284531fe31390358aL133-R133)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore dependency-reduction initiative to reduce the number of Kibana's third-party dependencies release_note:skip Skip the PR/issue when compiling release notes Team:Security Platform Security: Auth, Users, Roles, Spaces, Audit Logging, etc t// v8.18.6 v8.19.3 v9.0.6 v9.1.3 v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants