Skip to content

feat(client): remove DataProxyEngine, remove /edge import - #28345

Merged
jkomyno merged 40 commits into
nextfrom
feat/remove-dataproxyengine
Oct 24, 2025
Merged

feat(client): remove DataProxyEngine, remove /edge import#28345
jkomyno merged 40 commits into
nextfrom
feat/remove-dataproxyengine

Conversation

@jkomyno

@jkomyno jkomyno commented Oct 21, 2025

Copy link
Copy Markdown
Contributor

This PR:

  • is built on top of test: refactor before Prisma 7 #28342
  • removes DataProxyEngine
  • removes AccelerateEngine
  • removes @prisma/accelerate-contract
  • removes /edge from @prisma/client
  • removes in-memory tests (which were using library query engine)
  • removes support for wasm-engine-edge and edge from TARGET_BUILD_TYPE
  • adjusts some functional tests so that we no longer have to care about the line numbers in snapshot tests
  • closes TML-1535

@jkomyno jkomyno added this to the 7.0.0 milestone Oct 21, 2025
@jkomyno jkomyno changed the title feat(client): remove DataProxyEngine, remove "edge" import feat(client): remove DataProxyEngine, remove /edge import Oct 21, 2025
@jkomyno jkomyno changed the title feat(client): remove DataProxyEngine, remove /edge import feat(client): remove DataProxyEngine, remove /edge import Oct 21, 2025
@github-actions

github-actions Bot commented Oct 21, 2025

Copy link
Copy Markdown
Contributor

Client memory tests, node 24, library:

✅ Success

@github-actions

github-actions Bot commented Oct 21, 2025

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
packages/client/runtime/library.js 148.64 KB (0%)
packages/client/runtime/library.d.ts 115.89 KB (0%)
packages/client/runtime/binary.js 608.34 KB (0%)
packages/client/runtime/binary.d.ts 26 B (0%)
packages/client/runtime/index-browser.js 2.23 KB (0%)
packages/client/runtime/index-browser.d.ts 3.28 KB (0%)
packages/cli/build/index.js 2.19 MB (0%)
packages/client/prisma-client-0.0.0.tgz 13.06 MB (0%)
packages/cli/prisma-0.0.0.tgz 11.18 MB (0%)
packages/bundle-size/da-workers-libsql/output.tgz 848.48 KB (0%)
packages/bundle-size/da-workers-neon/output.tgz 904.25 KB (0%)
packages/bundle-size/da-workers-pg/output.tgz 903.67 KB (0%)
packages/bundle-size/da-workers-planetscale/output.tgz 848.62 KB (0%)
packages/bundle-size/da-workers-d1/output.tgz 830.65 KB (0%)

Base automatically changed from feat/refactor-tests to next October 22, 2025 13:28
@medz

medz commented Oct 23, 2025

Copy link
Copy Markdown
Contributor

I'm curious about what will happen to the accelerate extension after the removal of /edge. I'm currently using accelerate with /edge extensively. When I import from /, it complains and tells me to import from /edge. Furthermore, / imports don't work in Cloudflare.

I've noticed that Prisma has been actively collaborating with Cloudflare, but currently, compatibility with the workerd environment is the worst.

  1. For the MySQL adapter, Prisma chose mariadb-connector-nodejs, but mariadb-connector-nodejs doesn't work in a workerd environment at all.

  2. Because of 1, I was forced to subscribe to Prisma Postgres Enterprise Edition, which uses accelerate extensively. Therefore, I'm concerned about the migration difficulty of using /edge in the hundreds of places in my existing applications.

I upgrade to Prisma as soon as a new version is released, to reduce the workload of upgrading to Prisma 7 in the future.

I watch two hours of Prisma Issues and PR content every day, and the recent Prisma work has me very worried.

@ankur-arch

Copy link
Copy Markdown
Contributor

Hey @medz ! 👋 Really appreciate the thoughtful feedback.

Could you please check your DMs on X? We reached out there about today’s AMA on our X account
(starting at 4 p.m. CEST).

It would be great if you could bring up some of these insights and questions in the thread. I think they’d add a lot of value to the discussion.

@jkomyno
jkomyno marked this pull request as ready for review October 23, 2025 13:27
Comment thread packages/client/src/runtime/core/engines/common/Engine.ts Outdated
Comment thread packages/client/src/runtime/core/engines/common/Engine.ts
Comment thread packages/client/src/runtime/core/engines/library/LibraryEngine.ts
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Oct 24, 2025
@jkomyno
jkomyno merged commit 823a1a2 into next Oct 24, 2025
8 checks passed
@jkomyno
jkomyno deleted the feat/remove-dataproxyengine branch October 24, 2025 11:33
aqrln added a commit that referenced this pull request Nov 3, 2025
This PR introduces a new way to configure the Accelerate URL in
preparation to removing `url` from PSL:

```ts
new PrismaClient({
  accelerateUrl: "prisma://...",
})
```

This property is mutually exclusive with `adapter`, and exactly one of
them needs to be provided when using `engineType = "client"`.

It also makes a few related changes along the way or as a side effect:

- Contributes towards
[TML-1459](https://linear.app/prisma-company/issue/TML-1459/remove-processenv-loading-from-prisma-cli-and-prismaclient):
the logic related to environment variables was completely removed from
the `RemoteExecutor` code path, along with the `resolveDatasourceUrl`
function.

- Fixes the `@prisma/extension-accelerate` extension which was
inadvertently broken in #28345:
while most of `accelerateUtils` (which were meant to be used by the
removed `AccelerateEngine`) were indeed never used, one specific method
is actually currently used:
`_accelerateEngineConfig.accelerateUtils.resolveDatasourceUrl`. This PR
now restores this function and re-implements it in a different way.
- As a result of this, we now have a new validation and a DX improvement
we didn't use to: now if you apply the Accelerate extension to a client
that's not actually configured to use Accelerate, you will get a very
clear error with a code suggestion.

- Removes `null` support for the `adapter` constructor option, which was
introduced in #21315. It was the
only option that required `null` instead of `undefined` to disable it
explicitly and it was inconsistent with the others. The [motivation for
introducing `null` and making it different from
`undefined`](#21163 (comment))
made total sense for the `LibraryEngine` (where accidentally setting the
`adapter` to `undefined` meant silently using completely different
drivers before that change) but is now obsolete for the `ClientEngine`.
Since we are removing `LibraryEngine` in
#28375, we don't need this
distinction anymore since there are no longer any pitfalls from using
`adapter: undefined`, and removing it here in this PR made the
validation around the combinations of `adapter` and `accelerateUrl`
easier.

- Fixed the incorrect error message when Accelerate URL cannot be
parsed.

Closes:
https://linear.app/prisma-company/issue/TML-1507/env-less-accelerate-url-configuration
aqrln pushed a commit that referenced this pull request Nov 17, 2025
This PR:
- is built on top of #28342
- removes `DataProxyEngine`
- removes `AccelerateEngine`
- removes `@prisma/accelerate-contract`
- removes `/edge` from `@prisma/client`
- removes `in-memory` tests (which were using `library` query engine)
- removes support for `wasm-engine-edge` and `edge` from
`TARGET_BUILD_TYPE`
- adjusts some functional tests so that we no longer have to care about
the line numbers in snapshot tests
- closes
[TML-1535](https://linear.app/prisma-company/issue/TML-1535/get-rid-of-dataproxyengine-studio)

---------

Co-authored-by: jkomyno <12381818+jkomyno@users.noreply.github.com>
Co-authored-by: Amp <amp@ampcode.com>
aqrln added a commit that referenced this pull request Nov 17, 2025
This PR introduces a new way to configure the Accelerate URL in
preparation to removing `url` from PSL:

```ts
new PrismaClient({
  accelerateUrl: "prisma://...",
})
```

This property is mutually exclusive with `adapter`, and exactly one of
them needs to be provided when using `engineType = "client"`.

It also makes a few related changes along the way or as a side effect:

- Contributes towards
[TML-1459](https://linear.app/prisma-company/issue/TML-1459/remove-processenv-loading-from-prisma-cli-and-prismaclient):
the logic related to environment variables was completely removed from
the `RemoteExecutor` code path, along with the `resolveDatasourceUrl`
function.

- Fixes the `@prisma/extension-accelerate` extension which was
inadvertently broken in #28345:
while most of `accelerateUtils` (which were meant to be used by the
removed `AccelerateEngine`) were indeed never used, one specific method
is actually currently used:
`_accelerateEngineConfig.accelerateUtils.resolveDatasourceUrl`. This PR
now restores this function and re-implements it in a different way.
- As a result of this, we now have a new validation and a DX improvement
we didn't use to: now if you apply the Accelerate extension to a client
that's not actually configured to use Accelerate, you will get a very
clear error with a code suggestion.

- Removes `null` support for the `adapter` constructor option, which was
introduced in #21315. It was the
only option that required `null` instead of `undefined` to disable it
explicitly and it was inconsistent with the others. The [motivation for
introducing `null` and making it different from
`undefined`](#21163 (comment))
made total sense for the `LibraryEngine` (where accidentally setting the
`adapter` to `undefined` meant silently using completely different
drivers before that change) but is now obsolete for the `ClientEngine`.
Since we are removing `LibraryEngine` in
#28375, we don't need this
distinction anymore since there are no longer any pitfalls from using
`adapter: undefined`, and removing it here in this PR made the
validation around the combinations of `adapter` and `accelerateUrl`
easier.

- Fixed the incorrect error message when Accelerate URL cannot be
parsed.

Closes:
https://linear.app/prisma-company/issue/TML-1507/env-less-accelerate-url-configuration
aqrln pushed a commit that referenced this pull request Nov 17, 2025
This PR:
- is built on top of #28342
- removes `DataProxyEngine`
- removes `AccelerateEngine`
- removes `@prisma/accelerate-contract`
- removes `/edge` from `@prisma/client`
- removes `in-memory` tests (which were using `library` query engine)
- removes support for `wasm-engine-edge` and `edge` from
`TARGET_BUILD_TYPE`
- adjusts some functional tests so that we no longer have to care about
the line numbers in snapshot tests
- closes
[TML-1535](https://linear.app/prisma-company/issue/TML-1535/get-rid-of-dataproxyengine-studio)

---------

Co-authored-by: jkomyno <12381818+jkomyno@users.noreply.github.com>
Co-authored-by: Amp <amp@ampcode.com>
aqrln added a commit that referenced this pull request Nov 17, 2025
This PR introduces a new way to configure the Accelerate URL in
preparation to removing `url` from PSL:

```ts
new PrismaClient({
  accelerateUrl: "prisma://...",
})
```

This property is mutually exclusive with `adapter`, and exactly one of
them needs to be provided when using `engineType = "client"`.

It also makes a few related changes along the way or as a side effect:

- Contributes towards
[TML-1459](https://linear.app/prisma-company/issue/TML-1459/remove-processenv-loading-from-prisma-cli-and-prismaclient):
the logic related to environment variables was completely removed from
the `RemoteExecutor` code path, along with the `resolveDatasourceUrl`
function.

- Fixes the `@prisma/extension-accelerate` extension which was
inadvertently broken in #28345:
while most of `accelerateUtils` (which were meant to be used by the
removed `AccelerateEngine`) were indeed never used, one specific method
is actually currently used:
`_accelerateEngineConfig.accelerateUtils.resolveDatasourceUrl`. This PR
now restores this function and re-implements it in a different way.
- As a result of this, we now have a new validation and a DX improvement
we didn't use to: now if you apply the Accelerate extension to a client
that's not actually configured to use Accelerate, you will get a very
clear error with a code suggestion.

- Removes `null` support for the `adapter` constructor option, which was
introduced in #21315. It was the
only option that required `null` instead of `undefined` to disable it
explicitly and it was inconsistent with the others. The [motivation for
introducing `null` and making it different from
`undefined`](#21163 (comment))
made total sense for the `LibraryEngine` (where accidentally setting the
`adapter` to `undefined` meant silently using completely different
drivers before that change) but is now obsolete for the `ClientEngine`.
Since we are removing `LibraryEngine` in
#28375, we don't need this
distinction anymore since there are no longer any pitfalls from using
`adapter: undefined`, and removing it here in this PR made the
validation around the combinations of `adapter` and `accelerateUrl`
easier.

- Fixed the incorrect error message when Accelerate URL cannot be
parsed.

Closes:
https://linear.app/prisma-company/issue/TML-1507/env-less-accelerate-url-configuration
aqrln pushed a commit that referenced this pull request Nov 17, 2025
This PR:
- is built on top of #28342
- removes `DataProxyEngine`
- removes `AccelerateEngine`
- removes `@prisma/accelerate-contract`
- removes `/edge` from `@prisma/client`
- removes `in-memory` tests (which were using `library` query engine)
- removes support for `wasm-engine-edge` and `edge` from
`TARGET_BUILD_TYPE`
- adjusts some functional tests so that we no longer have to care about
the line numbers in snapshot tests
- closes
[TML-1535](https://linear.app/prisma-company/issue/TML-1535/get-rid-of-dataproxyengine-studio)

---------

Co-authored-by: jkomyno <12381818+jkomyno@users.noreply.github.com>
Co-authored-by: Amp <amp@ampcode.com>
aqrln added a commit that referenced this pull request Nov 17, 2025
This PR introduces a new way to configure the Accelerate URL in
preparation to removing `url` from PSL:

```ts
new PrismaClient({
  accelerateUrl: "prisma://...",
})
```

This property is mutually exclusive with `adapter`, and exactly one of
them needs to be provided when using `engineType = "client"`.

It also makes a few related changes along the way or as a side effect:

- Contributes towards
[TML-1459](https://linear.app/prisma-company/issue/TML-1459/remove-processenv-loading-from-prisma-cli-and-prismaclient):
the logic related to environment variables was completely removed from
the `RemoteExecutor` code path, along with the `resolveDatasourceUrl`
function.

- Fixes the `@prisma/extension-accelerate` extension which was
inadvertently broken in #28345:
while most of `accelerateUtils` (which were meant to be used by the
removed `AccelerateEngine`) were indeed never used, one specific method
is actually currently used:
`_accelerateEngineConfig.accelerateUtils.resolveDatasourceUrl`. This PR
now restores this function and re-implements it in a different way.
- As a result of this, we now have a new validation and a DX improvement
we didn't use to: now if you apply the Accelerate extension to a client
that's not actually configured to use Accelerate, you will get a very
clear error with a code suggestion.

- Removes `null` support for the `adapter` constructor option, which was
introduced in #21315. It was the
only option that required `null` instead of `undefined` to disable it
explicitly and it was inconsistent with the others. The [motivation for
introducing `null` and making it different from
`undefined`](#21163 (comment))
made total sense for the `LibraryEngine` (where accidentally setting the
`adapter` to `undefined` meant silently using completely different
drivers before that change) but is now obsolete for the `ClientEngine`.
Since we are removing `LibraryEngine` in
#28375, we don't need this
distinction anymore since there are no longer any pitfalls from using
`adapter: undefined`, and removing it here in this PR made the
validation around the combinations of `adapter` and `accelerateUrl`
easier.

- Fixed the incorrect error message when Accelerate URL cannot be
parsed.

Closes:
https://linear.app/prisma-company/issue/TML-1507/env-less-accelerate-url-configuration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants