Prisma consists of a mono-repo for all TypeScript code. To setup and build the packages, follow these steps:
git clone https://github.com/prisma/prisma.git
cd prisma/src
npm i -g [email protected]
pnpm i --ignore-scripts
pnpm run setup
Note for Windows: Use the latest version of Git Bash
cd src/packages/client
ts-node fixtures/generate.ts ./fixtures/blog/ --skip-transpile
cd fixtures/blog
prisma migrate save --name init --experimental && prisma migrate up --experimental
ts-node main.ts
If you have your local blog fixture running, you can now do changes to TSClient.ts
and re-execute npx ts-node fixtures/generate.ts ./fixtures/blog/
.
When doing changes and working on a fixture use yarn build && rm -rf fixtures/blog/node_modules/ && ts-node fixtures/generate.ts fixtures/blog
If you want to use the local runtime in the blog fixture, run
ts-node fixtures/generate.ts ./fixtures/blog/ --local-runtime
Changes to query.ts
will then be reflected when running fixtures/blog/main.ts
cd src/packages/migrate/fixtures/blog
ts-node ../../src/bin.ts up
cd src/packages/introspection
mkdir test && cd test
ts-node ../src/bin.ts
cd src/packages/prisma2
mkdir test && cd test
ts-node ../src/bin.ts generate
# In the root directory
pnpm run download
cd src/.buildkite/test
docker-compose up -d
docker-compose logs -f app
We structure our messages like this:
<type>(<package>): <subject>
<BLANK LINE>
<body>
Example
feature(client): new awesome feature
Closes #111
List of types:
- feat: A new feature
- fix: A bug fix
- docs: Documentation only changes
- style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
- refactor: A code change that neither fixes a bug nor adds a feature
- perf: A code change that improves performance
- test: Adding missing or correcting existing tests
- chore: Changes to the build process or auxiliary tools and libraries such as documentation generation
List of packages:
- cli
- client
- engine-core
- fetch-engine
- generator-helper
- get-platform
- ink-components
- migrate
- sdk
- introspection