Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update engines to 2.29.0-14.7a25b4cea9ebc8ffbbe419dbe66a06590f514fe4 #8556

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@
"devDependencies": {
"@prisma/client": "workspace:*",
"@prisma/debug": "workspace:*",
"@prisma/fetch-engine": "2.29.0-13.10a1beca097abd55b7d4a40e6a1035985ba4e219",
"@prisma/fetch-engine": "2.29.0-14.7a25b4cea9ebc8ffbbe419dbe66a06590f514fe4",
"@prisma/generator-helper": "workspace:*",
"@prisma/get-platform": "2.29.0-13.10a1beca097abd55b7d4a40e6a1035985ba4e219",
"@prisma/get-platform": "2.29.0-14.7a25b4cea9ebc8ffbbe419dbe66a06590f514fe4",
"@prisma/migrate": "workspace:*",
"@prisma/sdk": "workspace:*",
"@prisma/studio-server": "0.418.0",
Expand Down Expand Up @@ -127,7 +127,7 @@
"precommit": "lint-staged"
},
"dependencies": {
"@prisma/engines": "2.29.0-13.10a1beca097abd55b7d4a40e6a1035985ba4e219"
"@prisma/engines": "2.29.0-14.7a25b4cea9ebc8ffbbe419dbe66a06590f514fe4"
},
"lint-staged": {
"*.ts": [
Expand Down
8 changes: 4 additions & 4 deletions packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@
"devDependencies": {
"@prisma/debug": "workspace:*",
"@prisma/engine-core": "workspace:*",
"@prisma/engines": "2.29.0-13.10a1beca097abd55b7d4a40e6a1035985ba4e219",
"@prisma/fetch-engine": "2.29.0-13.10a1beca097abd55b7d4a40e6a1035985ba4e219",
"@prisma/engines": "2.29.0-14.7a25b4cea9ebc8ffbbe419dbe66a06590f514fe4",
"@prisma/fetch-engine": "2.29.0-14.7a25b4cea9ebc8ffbbe419dbe66a06590f514fe4",
"@prisma/generator-helper": "workspace:*",
"@prisma/get-platform": "2.29.0-13.10a1beca097abd55b7d4a40e6a1035985ba4e219",
"@prisma/get-platform": "2.29.0-14.7a25b4cea9ebc8ffbbe419dbe66a06590f514fe4",
"@prisma/migrate": "workspace:*",
"@prisma/sdk": "workspace:*",
"@timsuchanek/copy": "1.4.5",
Expand Down Expand Up @@ -128,7 +128,7 @@
}
},
"dependencies": {
"@prisma/engines-version": "2.29.0-13.10a1beca097abd55b7d4a40e6a1035985ba4e219"
"@prisma/engines-version": "2.29.0-14.7a25b4cea9ebc8ffbbe419dbe66a06590f514fe4"
},
"lint-staged": {
"*.ts": [
Expand Down
62 changes: 3 additions & 59 deletions packages/client/src/__tests__/resolveDatasources.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ import {
datasourceToDatasourceOverwrite,
serializeDatasources,
} from '../generation/serializeDatasources'
import {
absolutizeRelativePath,
resolveDatasources,
} from '../utils/resolveDatasources'
import { absolutizeRelativePath } from '../utils/resolveDatasources'

const cwd = '/Users/tim/project/prisma'
const outputDir = '/Users/tim/project/node_modules/@prisma/client/runtime'
Expand Down Expand Up @@ -89,62 +86,9 @@ const datasources: DataSource[] = [
},
]

test('resolveDatasources', () => {
expect(resolveDatasources(datasources, cwd, outputDir))
.toMatchInlineSnapshot(`
Array [
Object {
activeProvider: sqlite,
config: Object {},
name: db,
provider: sqlite,
url: Object {
fromEnvVar: null,
value: file:db.db,
},
},
Object {
activeProvider: sqlite,
config: Object {},
name: db2,
provider: sqlite,
url: Object {
fromEnvVar: null,
value: file:./some-dir/db.db,
},
},
Object {
activeProvider: mysql,
config: Object {},
name: db3,
provider: mysql,
url: Object {
fromEnvVar: null,
value: mysql:localhost,
},
},
Object {
activeProvider: postgresql,
config: Object {},
name: db4,
provider: postgresql,
url: Object {
fromEnvVar: null,
value: postgresql://,
},
},
]
`)
})

test('serializeDatasources', () => {
expect(
serializeDatasources(
resolveDatasources(datasources, cwd, outputDir).map(
datasourceToDatasourceOverwrite,
),
),
).toMatchInlineSnapshot(`
expect(serializeDatasources(datasources.map(datasourceToDatasourceOverwrite)))
.toMatchInlineSnapshot(`
[
{
"name": "db",
Expand Down
3 changes: 1 addition & 2 deletions packages/client/src/generation/generateClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import pkgUp from 'pkg-up'
import { promisify } from 'util'
import { DMMF as PrismaClientDMMF } from '../runtime/dmmf-types'
import { Dictionary } from '../runtime/utils/common'
import { resolveDatasources } from '../utils/resolveDatasources'
import { getPrismaClientDMMF } from './getDMMF'
import { JS, TS, TSClient } from './TSClient'
import { BrowserJS } from './TSClient/Generatable'
Expand Down Expand Up @@ -83,7 +82,7 @@ export async function buildClient({
document,
runtimePath,
browser,
datasources: resolveDatasources(datasources, schemaDir, outputDir),
datasources: datasources,
generator,
platforms: useNodeAPI
? Object.keys(binaryPaths.libqueryEngine!)
Expand Down
12 changes: 0 additions & 12 deletions packages/client/src/utils/resolveDatasources.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
import { DataSource } from '@prisma/generator-helper'
import path from 'path'

export function resolveDatasources(
datasources: DataSource[],
cwd: string,
outputDir: string,
absolutePaths?: boolean,
): DataSource[] {
return datasources.map((datasource) => {
return datasource
})
}

export function absolutizeRelativePath(
url: string,
cwd: string,
Expand Down
4 changes: 2 additions & 2 deletions packages/engine-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@
},
"dependencies": {
"@prisma/debug": "workspace:*",
"@prisma/engines": "2.29.0-13.10a1beca097abd55b7d4a40e6a1035985ba4e219",
"@prisma/engines": "2.29.0-14.7a25b4cea9ebc8ffbbe419dbe66a06590f514fe4",
"@prisma/generator-helper": "workspace:*",
"@prisma/get-platform": "2.29.0-13.10a1beca097abd55b7d4a40e6a1035985ba4e219",
"@prisma/get-platform": "2.29.0-14.7a25b4cea9ebc8ffbbe419dbe66a06590f514fe4",
"chalk": "4.1.2",
"execa": "5.1.1",
"get-stream": "6.0.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/integration-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"repository": "git@github.com:prisma/prisma.git",
"devDependencies": {
"@prisma/client": "workspace:*",
"@prisma/get-platform": "2.29.0-13.10a1beca097abd55b7d4a40e6a1035985ba4e219",
"@prisma/get-platform": "2.29.0-14.7a25b4cea9ebc8ffbbe419dbe66a06590f514fe4",
"@prisma/migrate": "workspace:*",
"@prisma/sdk": "workspace:*",
"@sindresorhus/slugify": "1.1.2",
Expand Down
4 changes: 2 additions & 2 deletions packages/migrate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"version": "latest"
},
"devDependencies": {
"@prisma/engines-version": "2.29.0-13.10a1beca097abd55b7d4a40e6a1035985ba4e219",
"@prisma/engines-version": "2.29.0-14.7a25b4cea9ebc8ffbbe419dbe66a06590f514fe4",
"@prisma/generator-helper": "workspace:*",
"@prisma/sdk": "workspace:*",
"@types/jest": "26.0.24",
Expand Down Expand Up @@ -55,7 +55,7 @@
},
"dependencies": {
"@prisma/debug": "workspace:*",
"@prisma/get-platform": "2.29.0-13.10a1beca097abd55b7d4a40e6a1035985ba4e219",
"@prisma/get-platform": "2.29.0-14.7a25b4cea9ebc8ffbbe419dbe66a06590f514fe4",
"@sindresorhus/slugify": "1.1.0",
"execa": "5.1.1",
"global-dirs": "3.0.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/migrate/src/utils/ensureDatabaseExists.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export async function ensureCanConnectToDatabase(
throw new Error(`Couldn't find a datasource in the schema.prisma file`)
}

if (activeDatasource.provider[0] === 'mongodb') {
if (activeDatasource.provider === 'mongodb') {
throw new Error(
`"mongodb" provider is not supported with this command. For more info see https://www.prisma.io/docs/concepts/database-connectors/mongodb`,
)
Expand Down Expand Up @@ -107,7 +107,7 @@ export async function ensureDatabaseExists(
throw new Error(`Couldn't find a datasource in the schema.prisma file`)
}

if (activeDatasource.provider[0] === 'mongodb') {
if (activeDatasource.provider === 'mongodb') {
throw new Error(
`"mongodb" provider is not supported with this command. For more info see https://www.prisma.io/docs/concepts/database-connectors/mongodb`,
)
Expand Down
6 changes: 3 additions & 3 deletions packages/sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@
"dependencies": {
"@prisma/debug": "workspace:*",
"@prisma/engine-core": "workspace:*",
"@prisma/engines": "2.29.0-13.10a1beca097abd55b7d4a40e6a1035985ba4e219",
"@prisma/fetch-engine": "2.29.0-13.10a1beca097abd55b7d4a40e6a1035985ba4e219",
"@prisma/engines": "2.29.0-14.7a25b4cea9ebc8ffbbe419dbe66a06590f514fe4",
"@prisma/fetch-engine": "2.29.0-14.7a25b4cea9ebc8ffbbe419dbe66a06590f514fe4",
"@prisma/generator-helper": "workspace:*",
"@prisma/get-platform": "2.29.0-13.10a1beca097abd55b7d4a40e6a1035985ba4e219",
"@prisma/get-platform": "2.29.0-14.7a25b4cea9ebc8ffbbe419dbe66a06590f514fe4",
"@timsuchanek/copy": "1.4.5",
"archiver": "4.0.2",
"arg": "5.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ Object {
Object {
"activeProvider": "postgresql",
"name": "db",
"provider": Array [
"postgresql",
],
"provider": "postgresql",
"url": Object {
"fromEnvVar": "SOMETHING-SOMETHING-1234",
"value": null,
Expand All @@ -26,9 +24,7 @@ Object {
Object {
"activeProvider": "postgresql",
"name": "db",
"provider": Array [
"postgresql",
],
"provider": "postgresql",
"url": Object {
"fromEnvVar": "TEST_POSTGRES_URI_FOR_DATASOURCE",
"value": "postgres://user:password@something:5432/db",
Expand All @@ -46,9 +42,7 @@ Object {
Object {
"activeProvider": "sqlite",
"name": "db",
"provider": Array [
"sqlite",
],
"provider": "sqlite",
"url": Object {
"fromEnvVar": null,
"value": "file:../hello.db",
Expand All @@ -66,9 +60,7 @@ Object {
Object {
"activeProvider": "sqlite",
"name": "db",
"provider": Array [
"sqlite",
],
"provider": "sqlite",
"url": Object {
"fromEnvVar": null,
"value": "file:dev.db",
Expand Down
7 changes: 7 additions & 0 deletions packages/sdk/src/__tests__/engine-commands/getConfig.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ describe('getConfig', () => {
}`,
})

expect(config.datasources).toHaveLength(1)
expect(config.datasources[0].provider).toEqual('sqlite')
expect(config.generators).toHaveLength(0)
expect(config.warnings).toHaveLength(0)
expect(config).toMatchSnapshot()
})

Expand Down Expand Up @@ -66,6 +70,9 @@ describe('getConfig', () => {
}`,
})

expect(config.datasources).toHaveLength(1)
expect(config.generators).toHaveLength(1)
expect(config.warnings).toHaveLength(0)
expect(config).toMatchSnapshot()
})

Expand Down