From 9877879c8951c9ea2437d06e343c848699413f23 Mon Sep 17 00:00:00 2001 From: zgoldie Date: Thu, 12 Nov 2026 12:28:29 +0000 Subject: [PATCH 1/2] Warn that this package is deprecated in favor of Codemagic Patch. Add README and npm description freeze copy, a postinstall notice, and a dev-only runtime warning so installs and local development point at the migration guide. Co-authored-by: Cursor --- CodePush.js | 8 ++++++++ README.md | 6 +++++- package.json | 3 ++- scripts/postinstall.js | 16 ++++++++++++++++ 4 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 scripts/postinstall.js diff --git a/CodePush.js b/CodePush.js index 2d1d9deda..e50107e7b 100644 --- a/CodePush.js +++ b/CodePush.js @@ -5,6 +5,14 @@ import { AppState, Platform } from "react-native"; import log from "./logging"; import hoistStatics from 'hoist-non-react-statics'; +if (typeof __DEV__ !== "undefined" && __DEV__) { + console.warn( + "[CodePush] @code-push-next/react-native-code-push is deprecated in favor of Codemagic Patch " + + "(@codemagic/react-native-patch). This package is frozen (no new features, no new React Native " + + "version support). https://patch.codemagic.io/docs/migration/migrating-from-codepush" + ); +} + let NativeCodePush = require("react-native").NativeModules.CodePush; const PackageMixins = require("./package-mixins")(NativeCodePush); diff --git a/README.md b/README.md index 28ce784de..2f15e33a6 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,8 @@ -> **From the maintainers:** We build [Codemagic Patch](https://github.com/codemagic-ci-cd/codemagic-patch), a self-hosted OTA update service for React Native — server, client SDK, CLI, and dashboard — where our new development happens, and we recommend it for new projects. If you want to migrate from self-hosted CodePush, see the [migration guide](https://github.com/codemagic-ci-cd/codemagic-patch/blob/main/docs/migrate-from-codepush.md). +> **DEPRECATED:** This package is frozen. No new features and no React Native version support will ship here. Last targeted support is in the React Native 0.82 era (`v10.4+`). +> +> Migrate to [Codemagic Patch](https://patch.codemagic.io/docs/migration/migrating-from-codepush) (`@codemagic/react-native-patch`) instead, our improved over-the-air update tool. +> +> Migration guide: https://patch.codemagic.io/docs/migration/migrating-from-codepush # React Native Module for CodePush diff --git a/package.json b/package.json index 232987355..7557b40d0 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@code-push-next/react-native-code-push", "version": "10.4.3", - "description": "React Native plugin for the CodePush service", + "description": "Deprecated in favor of Codemagic Patch. Frozen CodePush client (no new features, no new React Native version support). Migrate: https://patch.codemagic.io/docs/migration/migrating-from-codepush", "main": "CodePush.js", "typings": "typings/react-native-code-push.d.ts", "homepage": "https://github.com/codemagic-ci-cd/react-native-code-push", @@ -13,6 +13,7 @@ "author": "Code Push Next", "license": "MIT", "scripts": { + "postinstall": "node scripts/postinstall.js", "clean": "shx rm -rf bin", "setup": "npm install --quiet --no-progress", "prebuild:tests": "npm run clean && npm run tslint", diff --git a/scripts/postinstall.js b/scripts/postinstall.js new file mode 100644 index 000000000..989d6fd75 --- /dev/null +++ b/scripts/postinstall.js @@ -0,0 +1,16 @@ +#!/usr/bin/env node +"use strict"; + +const migrateUrl = + "https://patch.codemagic.io/docs/migration/migrating-from-codepush"; + +console.warn( + [ + "", + "[DEPRECATED] @code-push-next/react-native-code-push. Use", + "Codemagic Patch (@codemagic/react-native-patch) instead. This package is frozen:", + "no new features, no React Native version support.", + migrateUrl, + "", + ].join("\n") +); From dbe7b0c39200b3de1f17793a312f52ccab14753c Mon Sep 17 00:00:00 2001 From: zgoldie Date: Thu, 12 Nov 2026 17:09:17 +0000 Subject: [PATCH 2/2] Mention Patch dashboard, fingerprinting and RN support in deprecation copy. Give people a concrete reason to migrate, not only that this package is frozen. Co-authored-by: Cursor --- CodePush.js | 5 +++-- README.md | 2 +- package.json | 2 +- scripts/postinstall.js | 6 +++--- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/CodePush.js b/CodePush.js index e50107e7b..f9815e1b0 100644 --- a/CodePush.js +++ b/CodePush.js @@ -8,8 +8,9 @@ import hoistStatics from 'hoist-non-react-statics'; if (typeof __DEV__ !== "undefined" && __DEV__) { console.warn( "[CodePush] @code-push-next/react-native-code-push is deprecated in favor of Codemagic Patch " + - "(@codemagic/react-native-patch). This package is frozen (no new features, no new React Native " + - "version support). https://patch.codemagic.io/docs/migration/migrating-from-codepush" + "(@codemagic/react-native-patch), which includes a web dashboard, native fingerprinting and " + + "support for new React Native versions. " + + "https://patch.codemagic.io/docs/migration/migrating-from-codepush" ); } diff --git a/README.md b/README.md index 2f15e33a6..706ab9d0f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ > **DEPRECATED:** This package is frozen. No new features and no React Native version support will ship here. Last targeted support is in the React Native 0.82 era (`v10.4+`). > -> Migrate to [Codemagic Patch](https://patch.codemagic.io/docs/migration/migrating-from-codepush) (`@codemagic/react-native-patch`) instead, our improved over-the-air update tool. +> Use [Codemagic Patch](https://patch.codemagic.io/docs/migration/migrating-from-codepush) (`@codemagic/react-native-patch`) instead, which includes a web dashboard, native fingerprinting and support for new React Native versions. > > Migration guide: https://patch.codemagic.io/docs/migration/migrating-from-codepush diff --git a/package.json b/package.json index 7557b40d0..36f9b7eb0 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@code-push-next/react-native-code-push", "version": "10.4.3", - "description": "Deprecated in favor of Codemagic Patch. Frozen CodePush client (no new features, no new React Native version support). Migrate: https://patch.codemagic.io/docs/migration/migrating-from-codepush", + "description": "Deprecated in favor of Codemagic Patch (@codemagic/react-native-patch), which includes a web dashboard, native fingerprinting and support for new React Native versions. https://patch.codemagic.io/docs/migration/migrating-from-codepush", "main": "CodePush.js", "typings": "typings/react-native-code-push.d.ts", "homepage": "https://github.com/codemagic-ci-cd/react-native-code-push", diff --git a/scripts/postinstall.js b/scripts/postinstall.js index 989d6fd75..9b3bd3eb5 100644 --- a/scripts/postinstall.js +++ b/scripts/postinstall.js @@ -7,9 +7,9 @@ const migrateUrl = console.warn( [ "", - "[DEPRECATED] @code-push-next/react-native-code-push. Use", - "Codemagic Patch (@codemagic/react-native-patch) instead. This package is frozen:", - "no new features, no React Native version support.", + "[DEPRECATED] @code-push-next/react-native-code-push is deprecated in favor of", + "Codemagic Patch (@codemagic/react-native-patch), which includes a web dashboard,", + "native fingerprinting and support for new React Native versions.", migrateUrl, "", ].join("\n")