From f0ff64b7be96ff3e7d18d0db97c754f362bf280d Mon Sep 17 00:00:00 2001 From: Jason Safaiyeh Date: Sat, 25 Jan 2020 20:46:16 -0800 Subject: [PATCH 1/3] Chaneg name --- README.md | 18 +++++++++--------- index.d.ts | 2 +- index.js | 6 +++--- ios/react-native-cookies.podspec | 2 +- package.json | 10 +++++----- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 9a9c24b..ee6f84c 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Currently lacking support for Windows, Web, and Expo. Support for these platform ## Installation ``` -yarn add @react-native-community/react-native-cookies +yarn add @react-native-community/cookies ``` @@ -24,7 +24,7 @@ yarn add @react-native-community/react-native-cookies ### Automatic (recommended) ``` -react-native link @react-native-community/react-native-cookies +react-native link @react-native-community/cookies ``` ### Manual @@ -34,21 +34,21 @@ If automatic linking does not work, you can manually link this library by follow #### iOS 1. Open your project in Xcode, right click on `Libraries` and click `Add - Files to "Your Project Name"` Look under `node_modules/@react-native-community/react-native-cookies/ios` and add `RNCookieManagerIOS.xcodeproj`. + Files to "Your Project Name"` Look under `node_modules/@react-native-community/cookies/ios` and add `RNCookieManagerIOS.xcodeproj`. 2. Add `libRNCookieManagerIOS.a` to `Build Phases -> Link Binary With Libraries. 3. Clean and rebuild your project #### Android -Run `react-native link` to link the react-native-cookies library. +Run `react-native link` to link the cookies library. Or if you have trouble, make the following additions to the given files manually: **android/settings.gradle** ```gradle -include ':@react-native-community_react-native-cookies' -project(':@react-native-community_react-native-cookies').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-community/react-native-cookies/android') +include ':@react-native-community_cookies' +project(':@react-native-community_cookies').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-community/cookies/android') ``` **android/app/build.gradle** @@ -56,7 +56,7 @@ project(':@react-native-community_react-native-cookies').projectDir = new File(r ```gradle dependencies { ... - implementation project(':@react-native-community_react-native-cookies') + implementation project(':@react-native-community_cookies') } ``` @@ -85,7 +85,7 @@ protected List getPackages() { ## Usage ```javascript -import CookieManager from '@react-native-community/react-native-cookies'; +import CookieManager from '@react-native-community/cookies'; // set a cookie (IOS ONLY) CookieManager.set({ @@ -156,7 +156,7 @@ To use this _CookieManager_ with WebKit-Support we extended the interface with t ##### Usage ```javascript -import CookieManager from '@react-native-community/react-native-cookies'; +import CookieManager from '@react-native-community/cookies'; const useWebKit = true; diff --git a/index.d.ts b/index.d.ts index 61e6a4c..6594d9b 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,4 +1,4 @@ -declare module "@react-native-community/react-native-cookies" { +declare module "@react-native-community/cookies" { export interface Cookie { name: string; value: string; diff --git a/index.js b/index.js index bdce697..6736046 100644 --- a/index.js +++ b/index.js @@ -15,19 +15,19 @@ let CookieManager; if (Platform.OS === 'ios') { invariant( RNCookieManagerIOS, - 'react-native-cookies: Add RNCookieManagerIOS.h and RNCookieManagerIOS.m to your Xcode project', + '@react-native-community/cookies: Add RNCookieManagerIOS.h and RNCookieManagerIOS.m to your Xcode project', ); CookieManager = RNCookieManagerIOS; } else if (Platform.OS === 'android') { invariant( RNCookieManagerAndroid, - 'react-native-cookies: Import libraries to android "react-native link react-native-cookies"', + '@react-native-community/cookies: Import libraries to android "react-native link @react-native-community/cookies"', ); CookieManager = RNCookieManagerAndroid; } else { invariant( CookieManager, - 'react-native-cookies: Invalid platform. This library only supports Android and iOS.', + '@react-native-community/cookies: Invalid platform. This library only supports Android and iOS.', ); } diff --git a/ios/react-native-cookies.podspec b/ios/react-native-cookies.podspec index e2682b8..65afde4 100644 --- a/ios/react-native-cookies.podspec +++ b/ios/react-native-cookies.podspec @@ -9,7 +9,7 @@ Pod::Spec.new do |s| s.homepage = package['homepage'] s.license = package['license'] s.author = "safaiyeh" - s.source = { :git => "git@github.com:react-native-community/react-native-cookies.git", :tag => "v#{s.version}" } + s.source = { :git => "git@github.com:react-native-community/cookies.git", :tag => "v#{s.version}" } s.requires_arc = true s.platform = :ios, "7.0" s.preserve_paths = "*.framework" diff --git a/package.json b/package.json index 0f527e5..4be2322 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,11 @@ { - "name": "@react-native-community/react-native-cookies", + "name": "@react-native-community/cookies", "version": "1.1.1", "description": "Cookie Manager for React Native", "repository": { "type": "git", - "url": "git+https://github.com/react-native-community/react-native-cookies.git", - "baseUrl": "https://github.com/react-native-community/react-native-cookies" + "url": "git+https://github.com/react-native-community/cookies.git", + "baseUrl": "https://github.com/react-native-community/xwcookies" }, "keywords": [ "react native", @@ -23,9 +23,9 @@ "licenseFilename": "LICENSE", "readmeFilename": "README.md", "bugs": { - "url": "https://github.com/react-native-community/react-native-cookies/issues" + "url": "https://github.com/react-native-community/cookies/issues" }, - "homepage": "https://github.com/react-native-community/react-native-cookies#readme", + "homepage": "https://github.com/react-native-community/cookies#readme", "main": "index.js", "types": "index.d.ts", "scripts": { From a5520f6937b5cdb7e9c79668cafaee5b037b8dff Mon Sep 17 00:00:00 2001 From: Jason Safaiyeh Date: Sat, 25 Jan 2020 20:50:33 -0800 Subject: [PATCH 2/3] Breaking change warning --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index ee6f84c..d327533 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,9 @@ Cookie Manager for React Native This module was ported from [joeferraro/react-native-cookies](https://github.com/joeferraro/react-native-cookies). This would not exist without the work of the original author, [Joe Ferraro](https://github.com/joeferraro). +## Important notices & Breaking Changes +- v1.1.1 >= will be published to `@react-native-community/cookies`. `@react-native-community/react-native-cookies` is now deprecated as of v1.1.1. + ## Maintainers - [Jason Safaiyeh](https://github.com/safaiyeh) ([Twitter @safaiyeh](https://twitter.com/safaiyeh)) from [Sumo Logic](https://www.sumologic.com) From 3528a3abcd3b9548af7a8d5ce98134a2457f4630 Mon Sep 17 00:00:00 2001 From: Jason Safaiyeh Date: Sat, 25 Jan 2020 20:52:35 -0800 Subject: [PATCH 3/3] Update typo --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4be2322..8fcb6bc 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "repository": { "type": "git", "url": "git+https://github.com/react-native-community/cookies.git", - "baseUrl": "https://github.com/react-native-community/xwcookies" + "baseUrl": "https://github.com/react-native-community/cookies" }, "keywords": [ "react native",