aws-amplify / amplify-js

A declarative JavaScript library for application development using cloud services.
https://docs.amplify.aws/lib/q/platform/js
Apache License 2.0
9.36k stars 2.1k forks source link

chore: add deprecation notice to DataStore exported Schemaa type #13321

Closed svidgen closed 2 weeks ago

svidgen commented 2 weeks ago

Description of changes

Adds deprecation flag and docstring to the Schema type exported from DataStore. Customers should not be using this type directly. And, it shows up in autocompletion when customers are looking for the Schema type exported from gen2 API's, which can lead to some confusion.

Issue #, if available

Description of how you validated changes

The primary concern is whether any lint rules might prohibit an app from using a deprecated type. To alleviate that concern:

  1. Ran e2e's in a tagged release to confirm no failed builds.
  2. Manually created a nextjs app with default eslint rules and built. (No errors or warnings emitted.)

Checklist

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.