Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CodePush.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ 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), which includes a web dashboard, native fingerprinting and " +
"support for new React Native versions. " +
"https://patch.codemagic.io/docs/migration/migrating-from-codepush"
);
}

let NativeCodePush = require("react-native").NativeModules.CodePush;
const PackageMixins = require("./package-mixins")(NativeCodePush);

Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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+`).
>
> 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

# React Native Module for CodePush

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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 (@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",
Expand All @@ -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",
Expand Down
16 changes: 16 additions & 0 deletions scripts/postinstall.js
Original file line number Diff line number Diff line change
@@ -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 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")
);
Loading