Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(migrate diff): add -o --output option (#23715)
- Loading branch information
Showing
62 changed files
with
1,424 additions
and
1,194 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 4 additions & 1 deletion
5
packages/cli/src/__tests__/__snapshots__/dotenv-2-prisma-folder.test.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`should read .env file in prisma folder 1`] = `Environment variables loaded from prisma/.env`; | ||
exports[`should read .env file in prisma folder 1`] = ` | ||
Environment variables loaded from prisma/.env | ||
`; |
5 changes: 4 additions & 1 deletion
5
packages/cli/src/__tests__/__snapshots__/dotenv-4-prisma-when-no-schema.test.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`should read .env file in prisma folder when there is no schema 1`] = `Environment variables loaded from prisma/.env`; | ||
exports[`should read .env file in prisma folder when there is no schema 1`] = ` | ||
Environment variables loaded from prisma/.env | ||
`; |
5 changes: 4 additions & 1 deletion
5
packages/cli/src/__tests__/__snapshots__/dotenv-5-only-root.test.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`should not load root .env file 1`] = `Environment variables loaded from .env`; | ||
exports[`should not load root .env file 1`] = ` | ||
Environment variables loaded from .env | ||
`; |
5 changes: 4 additions & 1 deletion
5
packages/cli/src/__tests__/__snapshots__/dotenv-6-expand.test.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`should read expanded env vars 1`] = `Environment variables loaded from expand/.env`; | ||
exports[`should read expanded env vars 1`] = ` | ||
Environment variables loaded from expand/.env | ||
`; |
7 changes: 4 additions & 3 deletions
7
packages/cli/src/__tests__/dotenv-1-custom-schema-path.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 4 additions & 3 deletions
7
packages/cli/src/__tests__/dotenv-4-prisma-when-no-schema.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
import { jestConsoleContext, jestContext } from '@prisma/get-platform' | ||
import { jestContext, jestProcessContext } from '@prisma/get-platform' | ||
import { loadEnvFile } from '@prisma/internals' | ||
|
||
const ctx = jestContext.new().add(jestConsoleContext()).assemble() | ||
const ctx = jestContext.new().add(jestProcessContext()).assemble() | ||
|
||
it('should not load root .env file', () => { | ||
ctx.fixture('dotenv-5-only-root') | ||
|
||
loadEnvFile({ printMessage: true }) | ||
|
||
expect(ctx.mocked['console.info'].mock.calls.join('\n')).toMatchSnapshot() | ||
expect(ctx.mocked['process.stdout.write'].mock.calls.join('\n')).toMatchSnapshot() | ||
|
||
expect(process.env.DOTENV_ROOT_SHOULD_BE_UNDEFINED).toEqual(undefined) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,4 +31,5 @@ model users { | |
numberOrString1 Json | ||
} | ||
`; |
Oops, something went wrong.