deprecation
Marking a feature as outdated and scheduled for removal, while it still works, so users have time to move to its replacement.
In more detail
A good deprecation names the replacement, says when the old feature will be removed, and warns people who still use it. Deprecated features usually keep working for at least one more release. Tutorials written before the deprecation often still recommend the old way, so check the current documentation.
Examples
In the browser: Deprecated web features keep working for a while but may disappear; legacy mutation events are an example that browsers have now removed.In Terraform, deprecated settings keep working for a while and print a warning. DynamoDB-based state locking is deprecated in favour of use_lockfile.Related terms
- sunset — The date after which a deprecated API or version stops working, which can be sent in a Sunset response header.
- API versioning — Giving an API contract a version so that incompatible changes can be released without breaking clients that use the old one.
- breaking change — A change that makes existing users of a program or interface stop working until they change something too.
- deprecation warning — A message logged to the developer console when code uses a deprecated prop or component, pointing to the replacement.
- JSDoc — A convention for writing documentation comments above JavaScript and TypeScript code, using tags such as @param and @deprecated.
- codemod — A script that rewrites source code automatically, for example renaming a deprecated prop across a whole codebase.
- mutation events — An old, removed way of watching DOM changes that fired a synchronous event for every single change.
- Amazon DynamoDB — Amazon's fully managed key-value and document database, which stores items in tables without any servers for you to run.
- use_lockfile — The s3 backend setting, added in Terraform 1.10, that locks state by writing a small lock file next to it in the bucket, with no extra database.
Taught in
- Versioning APIs — Modern API Architecture: REST, GraphQL & gRPC
- System Governance: Changesets, Semantic Versioning & Deprecation — Design Systems & Component Engineering
- MutationObserver: Reactive DOM Watching Without Polling — Frontend Architecture & Web Platform
- The Problem With Local State — Infrastructure as Code with Terraform
- Configuring A Remote Backend — Infrastructure as Code with Terraform
- State Locking With Use Lockfile — Infrastructure as Code with Terraform
- Workspaces For Multiple Environments — Infrastructure as Code with Terraform
- Security: Secrets In State And Ephemeral Values — Infrastructure as Code with Terraform
- Validate, Format, Destroy, And The Flags That Bend A Plan — HashiCorp Terraform Associate (004) Exam Prep
- State Locking: One Writer At A Time — HashiCorp Terraform Associate (004) Exam Prep
- Drift: When Reality Stops Matching State — HashiCorp Terraform Associate (004) Exam Prep
- Collaboration And Governance: Teams, Policies, Registry And Health — HashiCorp Terraform Associate (004) Exam Prep
- Trap Sprint: Twelve Answers That Are Almost True — HashiCorp Terraform Associate (004) Exam Prep
References
- RFC 9745: The Deprecation HTTP Response Header Field
- RFC 8594: The Sunset HTTP Header Field
- JSDoc: @deprecated
- Semantic Versioning 2.0.0, FAQ on deprecation
- MDN: Feature status (deprecated and obsolete)
- s3 backend: state locking