diff --git a/packages/analytics-v1.1/src/core/analytics.js b/packages/analytics-v1.1/src/core/analytics.js index 4c82cdf95..58e6cf168 100644 --- a/packages/analytics-v1.1/src/core/analytics.js +++ b/packages/analytics-v1.1/src/core/analytics.js @@ -1658,15 +1658,19 @@ const startSession = instance.startSession.bind(instance); const endSession = instance.endSession.bind(instance); const setAuthToken = instance.setAuthToken.bind(instance); -// eslint-disable-next-line no-constant-condition -if ('__MODULE_TYPE__' === 'npm') { - logger.error( - 'This RudderStack JavaScript SDK package is deprecated and no longer maintained. While your events are still being tracked and delivered, we strongly recommend you to migrate to the latest [@rudderstack/analytics-js](https://www.npmjs.com/package/@rudderstack/analytics-js) package for enhanced features, security updates, and ongoing support. For more details, visit the migration guide: https://www.rudderstack.com/docs/sources/event-streams/sdks/rudderstack-javascript-sdk/migration-guide/.', - ); -} else { - logger.error( - 'This version of the RudderStack JavaScript SDK is deprecated and no longer maintained. While your events are still being tracked and delivered, we strongly recommend you to migrate to the latest version (v3) for enhanced features, security updates, and ongoing support. For more details, visit the migration guide: https://www.rudderstack.com/docs/sources/event-streams/sdks/rudderstack-javascript-sdk/migration-guide/.', - ); +// TODO: Need to remove this in the next release +// eslint-disable-next-line sonarjs/no-gratuitous-expressions, no-constant-condition +if (false) { + // eslint-disable-next-line no-constant-condition + if ('__MODULE_TYPE__' === 'npm') { + logger.error( + 'This RudderStack JavaScript SDK package is deprecated and no longer maintained. While your events are still being tracked and delivered, we strongly recommend you to migrate to the latest [@rudderstack/analytics-js](https://www.npmjs.com/package/@rudderstack/analytics-js) package for enhanced features, security updates, and ongoing support. For more details, visit the migration guide: https://www.rudderstack.com/docs/sources/event-streams/sdks/rudderstack-javascript-sdk/migration-guide/.', + ); + } else { + logger.error( + 'This version of the RudderStack JavaScript SDK is deprecated and no longer maintained. While your events are still being tracked and delivered, we strongly recommend you to migrate to the latest version (v3) for enhanced features, security updates, and ongoing support. For more details, visit the migration guide: https://www.rudderstack.com/docs/sources/event-streams/sdks/rudderstack-javascript-sdk/migration-guide/.', + ); + } } export {