Skip to content

Commit

Permalink
qe: Add "strictUndefinedChecks" preview feature (prisma#4997)
Browse files Browse the repository at this point in the history
* qe: Add "strictUndefinedChecks" preview feature

* Update snapshots
  • Loading branch information
SevInf authored Sep 12, 2024
1 parent 190a98f commit c9ff577
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion psl/psl-core/src/common/preview_features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ features!(
ReactNative,
PrismaSchemaFolder,
OmitApi,
TypedSql
TypedSql,
StrictUndefinedChecks
);

/// Generator preview features (alphabetically sorted)
Expand All @@ -100,6 +101,7 @@ pub const ALL_PREVIEW_FEATURES: FeatureMap = FeatureMap {
| RelationJoins
| OmitApi
| PrismaSchemaFolder
| StrictUndefinedChecks
}),
deprecated: enumflags2::make_bitflags!(PreviewFeature::{
AtomicNumberOperations
Expand Down
2 changes: 1 addition & 1 deletion psl/psl/tests/config/generators.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ fn nice_error_for_unknown_generator_preview_feature() {
.unwrap_err();

let expectation = expect![[r#"
[1;91merror[0m: [1mThe preview feature "foo" is not known. Expected one of: deno, driverAdapters, fullTextIndex, fullTextSearch, metrics, multiSchema, nativeDistinct, postgresqlExtensions, tracing, views, relationJoins, prismaSchemaFolder, omitApi[0m
[1;91merror[0m: [1mThe preview feature "foo" is not known. Expected one of: deno, driverAdapters, fullTextIndex, fullTextSearch, metrics, multiSchema, nativeDistinct, postgresqlExtensions, tracing, views, relationJoins, prismaSchemaFolder, omitApi, strictUndefinedChecks[0m
--> schema.prisma:3
 | 
 2 |  provider = "prisma-client-js"
Expand Down

0 comments on commit c9ff577

Please sign in to comment.