Skip to content

Commit

Permalink
Merge branch 'master' into HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
timsuchanek committed May 25, 2020
2 parents 13c4438 + cce5f84 commit 9e7dff9
Show file tree
Hide file tree
Showing 98 changed files with 2,700 additions and 6,610 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Expand Up @@ -10,7 +10,7 @@ assignees: ''
## Problem
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->

## Solution
## Suggested solution
<!-- A clear and concise description of what you want to happen. -->

## Alternatives
Expand Down
44 changes: 44 additions & 0 deletions .github/renovate.json
@@ -0,0 +1,44 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["config:base"],
"schedule": [
"every 2 weeks on Monday before 7am"
],
"semanticCommits": true,
"ignoreDeps": ["ink", "ink-link", "react", "@types/react"],
"packageRules": [{
"groupName": "renovate-meta",
"updateTypes": ["lockFileMaintenance", "pin"],
"semanticCommitType": "chore",
"semanticCommitScope": "deps"
},
{
"groupName": "dependencies (non-major)",
"depTypeList": ["dependencies"],
"updateTypes": ["patch", "minor"],
"semanticCommitType": "deps"
},
{
"groupName": "devDependencies (major)",
"depTypeList": ["devDependencies"],
"updateTypes": ["major"],
"semanticCommitType": "chore",
"semanticCommitScope": "deps"
},
{
"groupName": "devDependencies (non-major)",
"depTypeList": ["devDependencies"],
"updateTypes": ["patch", "minor"],
"semanticCommitType": "chore",
"semanticCommitScope": "deps"
},
{
"groupName": "devDependencies (non-major)",
"automerge": "true",
"depTypeList": ["devDependencies"],
"updateTypes": ["patch", "minor"],
"semanticCommitType": "chore",
"semanticCommitScope": "deps"
}
]
}
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -27,7 +27,7 @@ Prisma is a **database toolkit** that consists of these tools:

- [**Prisma Client**](https://github.com/prisma/prisma-client-js): Auto-generated and type-safe query builder for Node.js & TypeScript
- [**Prisma Migrate**](https://github.com/prisma/migrate) (_experimental_): Declarative data modeling & migration system
- [**Prisma Studio**](https://github.com/prisma/studio): GUI to view and edit data in your database
- [**Prisma Studio**](https://github.com/prisma/studio) (_experimental_): GUI to view and edit data in your database

Prisma Client can be used in _any_ Node.js or TypeScript backend application (including serverless applications and microservices). This can be a [REST API](https://www.prisma.io/docs/understand-prisma/prisma-in-your-stack/rest), a [GraphQL API](https://www.prisma.io/docs/understand-prisma/prisma-in-your-stack/graphql) a gRPC API or anything else that needs a database.

Expand Down
4 changes: 2 additions & 2 deletions src/.buildkite/databases-only/docker-compose.yml
Expand Up @@ -10,7 +10,7 @@ services:
# - TEST_MARIADB_URI=mysql://prisma:prisma@localhost:4306/tests

postgres:
image: postgres:10.3
image: postgres:10.12
restart: always
environment:
- POSTGRES_USER=prisma
Expand All @@ -35,7 +35,7 @@ services:
- '3306:3306'

mariadb:
image: mariadb:10.4
image: mariadb:10.5
restart: always
environment:
- MYSQL_ROOT_PASSWORD=root
Expand Down
2 changes: 1 addition & 1 deletion src/.buildkite/publish/docker-compose.yml
Expand Up @@ -29,7 +29,7 @@ services:
# - mariadb

postgres:
image: postgres:10.3
image: postgres:10.12
restart: always
environment:
- POSTGRES_USER=prisma
Expand Down
2 changes: 1 addition & 1 deletion src/.buildkite/publish/publish.yml
@@ -1,7 +1,7 @@
steps:
- label: ":llama: Publish"
plugins:
- docker-compose#v3.0.3:
- docker-compose#v3.3.0:
config: src/.buildkite/publish/docker-compose.yml
run: app
- wait
32 changes: 16 additions & 16 deletions src/package.json
Expand Up @@ -5,22 +5,22 @@
"private": true,
"license": "MIT",
"devDependencies": {
"@types/debug": "^4.1.5",
"@types/node": "^13.11.1",
"@types/redis": "^2.8.17",
"arg": "^4.1.3",
"batching-toposort": "^1.2.0",
"chalk": "^3.0.0",
"debug": "^4.1.1",
"execa": "^4.0.0",
"globby": "^11.0.0",
"p-map": "^4.0.0",
"p-reduce": "^2.1.0",
"redis": "^3.0.2",
"redis-lock": "^0.1.4",
"semver": "^7.2.1",
"ts-node": "^8.8.2",
"typescript": "^3.8.3"
"@types/debug": "4.1.5",
"@types/node": "13.13.6",
"@types/redis": "2.8.20",
"arg": "4.1.3",
"batching-toposort": "1.2.0",
"chalk": "3.0.0",
"debug": "4.1.1",
"execa": "4.0.1",
"globby": "11.0.0",
"p-map": "4.0.0",
"p-reduce": "2.1.0",
"redis": "3.0.2",
"redis-lock": "0.1.4",
"semver": "7.3.2",
"ts-node": "8.10.1",
"typescript": "3.9.2"
},
"scripts": {
"preinstall": "node -e \"!process.env.npm_config_user_agent.startsWith('pnpm/') && !console.log('Use pnpm install to install dependencies in this repository\\n') && process.exit(1)\"",
Expand Down
1 change: 1 addition & 0 deletions src/packages/.eslintrc.js
Expand Up @@ -35,6 +35,7 @@ module.exports = {
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'no-useless-escape': 'off',
'@typescript-eslint/no-explicit-any': 'off'
},
},
],
Expand Down
90 changes: 45 additions & 45 deletions src/packages/cli/package.json
@@ -1,5 +1,5 @@
{
"version": "2.0.0-alpha.1179",
"version": "2.0.0-alpha.1205",
"name": "@prisma/cli",
"description": "The Prisma command line interface (CLI) is the primary way to interact with your Prisma project from the command line. It can initialize new project assets, generate Prisma Client, and analyze existing database structures through introspection to automatically create your application models.",
"keywords": [
Expand Down Expand Up @@ -49,65 +49,65 @@
"prisma2": "build/index.js"
},
"prisma": {
"version": "f401775ef1c681c705db8fd8d6cecaa5a4eb44fd"
"version": "947599a1413bc514e275905d562b50200bac990b"
},
"devDependencies": {
"@apexearth/copy": "^1.4.5",
"@prisma/ci-info": "^2.1.1",
"@apexearth/copy": "1.4.5",
"@prisma/ci-info": "2.1.1",
"@prisma/client": "workspace:*",
"@prisma/debug": "workspace:*",
"@prisma/fetch-engine": "workspace:*",
"@prisma/generator-helper": "workspace:*",
"@prisma/get-platform": "workspace:*",
"@prisma/introspection": "workspace:*",
"@prisma/migrate": "workspace:*",
"@prisma/sdk": "workspace:*",
"@prisma/studio": "0.226.0",
"@prisma/studio-server": "0.226.0",
"@prisma/studio-transports": "0.226.0",
"@prisma/studio-types": "0.226.0",
"@sentry/node": "5.12.4",
"@types/debug": "^4.1.5",
"@types/mocha": "^5.2.7",
"@types/pg": "^7.14.3",
"@types/sqlite3": "^3.1.6",
"@typescript-eslint/eslint-plugin": "^2.28.0",
"@typescript-eslint/parser": "^2.28.0",
"@prisma/studio": "0.228.0",
"@prisma/studio-server": "0.228.0",
"@prisma/studio-transports": "0.228.0",
"@prisma/studio-types": "0.228.0",
"@types/debug": "4.1.5",
"@types/mocha": "5.2.7",
"@types/pg": "7.14.3",
"@types/sqlite3": "3.1.6",
"@typescript-eslint/eslint-plugin": "2.33.0",
"@typescript-eslint/parser": "2.33.0",
"@zeit/ncc": "0.22.1",
"checkpoint-client": "^1.0.7",
"dotenv": "^8.2.0",
"eslint": "^6.8.0",
"eslint-config-prettier": "^6.10.1",
"eslint-plugin-eslint-comments": "^3.1.2",
"eslint-plugin-jest": "^23.8.2",
"eslint-plugin-prettier": "^3.1.3",
"execa": "^4.0.0",
"global-dirs": "^2.0.1",
"husky": "^4.2.5",
"is-installed-globally": "^0.3.2",
"jest": "^25.3.0",
"lint-staged": "^10.1.3",
"checkpoint-client": "1.1.0",
"dotenv": "8.2.0",
"eslint": "6.8.0",
"eslint-config-prettier": "6.11.0",
"eslint-plugin-eslint-comments": "3.1.2",
"eslint-plugin-jest": "23.11.0",
"eslint-plugin-prettier": "3.1.3",
"execa": "4.0.1",
"global-dirs": "2.0.1",
"husky": "4.2.5",
"is-installed-globally": "0.3.2",
"jest": "25.5.4",
"lint-staged": "10.2.2",
"log-update": "4.0.0",
"make-dir": "^3.0.2",
"mariadb": "^2.3.1",
"mocha": "~6.2.3",
"make-dir": "3.1.0",
"mariadb": "2.3.1",
"mocha": "6.2.3",
"mz": "2.7.0",
"open": "^7.0.3",
"packwatch": "^2.0.0",
"open": "7.0.3",
"packwatch": "2.0.0",
"pg": "8.0.0",
"pkg": "^4.4.7",
"pkg": "4.4.8",
"pkg-up": "3.1.0",
"resolve-pkg": "^2.0.0",
"rimraf": "^3.0.2",
"snap-shot-it": "~7.9.3",
"sqlite-async": "~1.0.12",
"sqlite3": "4.1",
"strip-ansi": "^6.0.0",
"resolve-pkg": "2.0.0",
"rimraf": "3.0.2",
"snap-shot-it": "7.9.3",
"sqlite-async": "1.0.12",
"sqlite3": "4.2.0",
"strip-ansi": "6.0.0",
"strip-indent": "3.0.0",
"tempy": "^0.5.0",
"terminal-link": "^2.1.1",
"ts-jest": "^25.3.1",
"tempy": "0.5.0",
"terminal-link": "2.1.1",
"ts-jest": "25.5.1",
"ts-mocha": "6.0.0",
"typescript": "^3.8.3"
"typescript": "3.9.2"
},
"scripts": {
"test:generate": "./node_modules/.bin/mocha src/__tests__/integrate.generate.test.ts --require ts-mocha src/__tests__/integrate.generate.test.ts --timeout 10s",
Expand Down Expand Up @@ -146,4 +146,4 @@
"eslint"
]
}
}
}
2 changes: 0 additions & 2 deletions src/packages/cli/src/Version.ts
Expand Up @@ -2,8 +2,6 @@ import { Command, getVersion, resolveBinary, arg } from '@prisma/sdk'
import { getPlatform } from '@prisma/get-platform'
import fs from 'fs'
const packageJson = require('../package.json') // eslint-disable-line @typescript-eslint/no-var-requires
import Debug from 'debug'
const debug = Debug('version')

interface BinaryInfo {
path: string
Expand Down
12 changes: 10 additions & 2 deletions src/packages/cli/src/bin.ts
@@ -1,10 +1,10 @@
#!/usr/bin/env ts-node

import fs from 'fs'
import { promisify } from 'util'
import path from 'path'
import dotenv from 'dotenv'
import chalk from 'chalk'
import { arg, drawBox } from '@prisma/sdk'
import { arg, drawBox, getCLIPathHash, getProjectHash } from '@prisma/sdk'
const packageJson = require('../package.json') // eslint-disable-line @typescript-eslint/no-var-requires

export { byline } from '@prisma/migrate'
Expand Down Expand Up @@ -175,9 +175,17 @@ async function main(): Promise<number> {
return 1
}
console.log(result)

// SHA256 identifier for the project based on the prisma schema path
const projectPathHash = await getProjectHash()
// SHA256 of the cli path
const cliPathHash = getCLIPathHash()

// check prisma for updates
const checkResult = await checkpoint.check({
product: 'prisma',
cli_path_hash: cliPathHash,
project_hash: projectPathHash,
version: packageJson.version,
disable: ci.isCI,
})
Expand Down
2 changes: 1 addition & 1 deletion src/packages/client/.packwatch.json
@@ -1 +1 @@
{ "limit": "450.0 kB", "packageSize": "450.0 kB", "unpackedSize": "1.6 MB" }
{ "limit": "460.0 kB", "packageSize": "460.0 kB", "unpackedSize": "1.6 MB" }
18 changes: 14 additions & 4 deletions src/packages/client/fixtures/blog/main.ts
@@ -1,6 +1,8 @@
import { PrismaClient } from '@prisma/client'
import { PrismaClient } from './@prisma/client'

const prisma = new PrismaClient()
const prisma = new PrismaClient({
errorFormat: 'pretty',
})

async function main() {
const users = await prisma.user.findMany({
Expand All @@ -10,14 +12,22 @@ async function main() {
author: true,
},
orderBy: {
title: 'aasc',
title: 'asc',
},
},
},
} as any)
})

console.log(users)

// const result = await prisma.user.updateMany({
// data: {
// id: null,
// },
// })

// console.log(result)

// // prisma.disconnect()

// const user = await prisma.post.findOne({
Expand Down

0 comments on commit 9e7dff9

Please sign in to comment.