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(cli): add deprecation message for introspect command #8763

Merged
merged 16 commits into from Aug 18, 2021

Conversation

Jolg42
Copy link
Member

@Jolg42 Jolg42 commented Aug 16, 2021

Screen Shot 2021-08-16 at 14 50 28

Renamed to prisma db pull

Closes #8078

  • added test for the warning
  • removed the really not nice test.sh and converted tests to Jest
  • moved some tests to a commands folder like packages/cli/src/__tests__/commands/Studio.test.ts

@Jolg42 Jolg42 added this to the 2.30.0 milestone Aug 16, 2021
packages/cli/src/Studio.ts Outdated Show resolved Hide resolved
packages/cli/src/Studio.ts Outdated Show resolved Hide resolved
Jolg42 and others added 4 commits August 16, 2021 17:57
…ed' of github.com:prisma/prisma into pr/introspect-deprecated

* 'pr/introspect-deprecated' of github.com:prisma/prisma:
  Update packages/cli/src/Studio.ts
  Update packages/cli/src/Studio.ts

* 'pr/introspect-deprecated' of github.com:prisma/prisma:
  Update packages/cli/src/Studio.ts
  Update packages/cli/src/Studio.ts
@Jolg42 Jolg42 marked this pull request as ready for review August 17, 2021 07:27
const prisma = new PrismaClient()
\`\`\`
`)
✔ Generated Prisma Client (0.0.0) to ./subdirectory/@prisma/client in XXms
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure why the the indentation changed

Copy link
Member Author

Choose a reason for hiding this comment

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

One mysterious thing for me with Jest ...

@@ -0,0 +1,34 @@
generator min {
// https://github.com/timsuchanek/minimal-generator
provider = "npx @timsuchanek/minimal-generator"
Copy link
Member

Choose a reason for hiding this comment

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

How does this work?

Copy link
Member Author

Choose a reason for hiding this comment

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

It runs the command, it's what powers the go client like https://github.com/prisma/prisma-client-go/blob/master/docs/quickstart.md

generator db {
    provider = "go run github.com/prisma/prisma-client-go"
}

Copy link
Member Author

Choose a reason for hiding this comment

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

Source code should be here

if (this.isNode) {
this.child = fork(this.executablePath, [], {
stdio: ['pipe', 'inherit', 'pipe', 'ipc'],
env: {
...process.env,
PRISMA_GENERATOR_INVOCATION: 'true',
},
execArgv: ['--max-old-space-size=8096'],
})
} else {
this.child = spawn(this.executablePath, {
stdio: ['pipe', 'inherit', 'pipe'],
env: {
...process.env,
PRISMA_GENERATOR_INVOCATION: 'true',
},
shell: true,
})
}

packages/cli/src/CLI.ts Outdated Show resolved Hide resolved
Jolg42 and others added 3 commits August 18, 2021 18:30
* main:
  chore(deps): update engines to 2.30.0-15.4da3a4b94c0bc4080d9bca0c9af0ed6835b11a68 (#8800)
  chore(deps): update engines to 2.30.0-14.bc8ecb93b05fdd02e398f68b1ec6f66df813b1c6 (#8798)
  ci: switch engine type for both cli and client for relavant tests (#8782)
  fix(deps): update dependencies (non-major) (#8793)
  chore(deps): update react-prisma
  chore(deps): update engines to 2.30.0-13.9bcc8544c6e8000eadc8afce064b55d00b56ce28 (#8794)
  chore(deps): update jest (#8791)
  chore(deps): update devdependencies (non-major) (#8790)
  chore(deps): update engines to 2.30.0-12.bea9c1f215004e5407a7c5f77287b8bd5a24ea3c (#8785)
  chore(deps): update engines to 2.30.0-11.efdfe2be6801d76e59e7488f5bc60cece4e366d9 (#8780)
  chore(deps): update dependency @prisma/studio-server to v0.421.0 (#8767)
  chore(deps): update engines to 2.30.0-10.0210b3de5042a714f8838a59f9edcb28b11ab97d (#8778)
  chore(deps): update engines to 2.30.0-9.a8608ff20d8774e88657834d2d58ad4c9134e5b7 (#8769)
  chore: remove encrypt=DANGER_PLAINTEXT (#8737)
@Jolg42 Jolg42 merged commit 2bce15b into main Aug 18, 2021
@Jolg42 Jolg42 deleted the pr/introspect-deprecated branch August 18, 2021 17:23
@@ -1,134 +0,0 @@
#!/bin/bash
Copy link
Member

Choose a reason for hiding this comment

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

Sure this file should go away? Did these tests move somewhere else?

Copy link
Member

Choose a reason for hiding this comment

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

They've been ported to src/__tests__/commands/Generate.test.ts

@millsp
Copy link
Member

millsp commented Aug 18, 2021

Approved ✔️ Nice to see some cleanup along your PR. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CLI: Add deprecation notice to prisma introspect (renamed db pull)
3 participants