From c9ff5773c72b821ff6daf2c55dbe3809eae7c2c7 Mon Sep 17 00:00:00 2001 From: Serhii Tatarintsev Date: Thu, 12 Sep 2024 16:51:02 +0200 Subject: [PATCH] qe: Add "strictUndefinedChecks" preview feature (#4997) * qe: Add "strictUndefinedChecks" preview feature * Update snapshots --- psl/psl-core/src/common/preview_features.rs | 4 +++- psl/psl/tests/config/generators.rs | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/psl/psl-core/src/common/preview_features.rs b/psl/psl-core/src/common/preview_features.rs index 49e860575512..ea9b0eceea81 100644 --- a/psl/psl-core/src/common/preview_features.rs +++ b/psl/psl-core/src/common/preview_features.rs @@ -81,7 +81,8 @@ features!( ReactNative, PrismaSchemaFolder, OmitApi, - TypedSql + TypedSql, + StrictUndefinedChecks ); /// Generator preview features (alphabetically sorted) @@ -100,6 +101,7 @@ pub const ALL_PREVIEW_FEATURES: FeatureMap = FeatureMap { | RelationJoins | OmitApi | PrismaSchemaFolder + | StrictUndefinedChecks }), deprecated: enumflags2::make_bitflags!(PreviewFeature::{ AtomicNumberOperations diff --git a/psl/psl/tests/config/generators.rs b/psl/psl/tests/config/generators.rs index 273de14c7443..20e8f8864402 100644 --- a/psl/psl/tests/config/generators.rs +++ b/psl/psl/tests/config/generators.rs @@ -258,7 +258,7 @@ fn nice_error_for_unknown_generator_preview_feature() { .unwrap_err(); let expectation = expect![[r#" - error: The preview feature "foo" is not known. Expected one of: deno, driverAdapters, fullTextIndex, fullTextSearch, metrics, multiSchema, nativeDistinct, postgresqlExtensions, tracing, views, relationJoins, prismaSchemaFolder, omitApi + error: The preview feature "foo" is not known. Expected one of: deno, driverAdapters, fullTextIndex, fullTextSearch, metrics, multiSchema, nativeDistinct, postgresqlExtensions, tracing, views, relationJoins, prismaSchemaFolder, omitApi, strictUndefinedChecks --> schema.prisma:3  |   2 |  provider = "prisma-client-js"