-
Notifications
You must be signed in to change notification settings - Fork 249
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(psl): add support for multi-line comments (#5083)
- Loading branch information
Showing
14 changed files
with
127 additions
and
8 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
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
4 changes: 2 additions & 2 deletions
4
psl/psl/tests/reformatter/trailing_comments_allowed_in_configuration_blocks.prisma
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,11 +1,11 @@ | ||
datasource db { | ||
provider = "postgres" // "mysql" | "sqlite" ... | ||
url = env("TEST_POSTGRES_URI") | ||
relationMode = "prisma" // = on or set to "foreignKeys" to turn off emulation | ||
relationMode = "prisma" /* = on or set to "foreignKeys" to turn off emulation */ | ||
} | ||
|
||
generator js { | ||
provider = "prisma-client-js" // optional | ||
previewFeatures = ["referentialIntegrity"] // [] | ||
previewFeatures = ["referentialIntegrity"] /* [] */ | ||
} | ||
|
4 changes: 2 additions & 2 deletions
4
...sl/tests/reformatter/trailing_comments_allowed_in_configuration_blocks.reformatted.prisma
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,10 +1,10 @@ | ||
datasource db { | ||
provider = "postgres" // "mysql" | "sqlite" ... | ||
url = env("TEST_POSTGRES_URI") | ||
relationMode = "prisma" // = on or set to "foreignKeys" to turn off emulation | ||
relationMode = "prisma" /* = on or set to "foreignKeys" to turn off emulation */ | ||
} | ||
|
||
generator js { | ||
provider = "prisma-client-js" // optional | ||
previewFeatures = ["referentialIntegrity"] // [] | ||
previewFeatures = ["referentialIntegrity"] /* [] */ | ||
} |
18 changes: 18 additions & 0 deletions
18
psl/psl/tests/validation/comments/mixed_line_docs_field_block.prisma
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/// Example Doc Comment | ||
model MyModel { | ||
pk Int @id | ||
/* | ||
* Multi-line comment | ||
* There are several lines here. | ||
*/ | ||
field1 Int // Comment Field 1 | ||
field2 Int // Comment Field 2 | ||
/** | ||
* Multi-line comment for | ||
* field3. This can contain **asterisks**. | ||
*/ | ||
field3 Int // Comment Field 3 | ||
} |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/** | ||
* Comment MyModel | ||
*/ | ||
model MyModel { | ||
pk Int @id | ||
field1 Int | ||
field2 Int | ||
} |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
model MyModel { | ||
pk Int @id | ||
/** | ||
* Multi-line comment for | ||
* field1. This can contain **asterisks**. | ||
*/ | ||
field1 Int | ||
} |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// Comment MyModel | ||
model MyModel { | ||
pk Int @id | ||
field1 Int | ||
field2 Int | ||
} |
9 changes: 9 additions & 0 deletions
9
psl/psl/tests/validation/comments/single_line_docs_field_block.prisma
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/// Example Doc Comment | ||
model MyModel { | ||
// Example Comment | ||
pk Int @id | ||
field1 Int // Comment Field 1 | ||
field2 Int // Comment Field 2 | ||
field3 Int // Comment Field 3 | ||
} |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
model MyModel { | ||
pk Int @id | ||
field1 Int // Comment Field 1 | ||
field2 Int // Comment Field 2 | ||
} |
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