DEV Community

Adrien Poly
Adrien Poly

Posted on

5 2

StimulusJS 2.0 silencing depreciation message

Stimulus 2.0

🚀 The long expected Stimulus 2.0 is Out. The upgrade from 1.1.1 to 2.0 should be very smooth as they are very minimal breaking changes.

Mute the data-target depreciation message in production

The data-target API has changed. While the 1.1 version is still supported. There is a warning message in the console every time an old syntax is seen for the first time.

The best way to fix this of course is to update all data targets but in a large code base this can take some time.

Another solution to gradually update your code is to silence the warning in production.

Here is a snippet to help

import { Application } from 'stimulus'
import { definitionsFromContext } from 'stimulus/webpack-helpers'

const application = Application.start()

// remove Stimulus depreciation warnings in production
if (process.env.NODE_ENV === 'production') {
  application.logger = { ...application.logger, warn: () => {} }
}
Enter fullscreen mode Exit fullscreen mode

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read full post →

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more