Skip to content

Commit 4756782

Browse files
authored
fix: Revert "feat: move module out of RNC npm scope (#404)" (#405)
This reverts commit c618613.
1 parent 7df9f3c commit 4756782

File tree

5 files changed

+21
-20
lines changed

5 files changed

+21
-20
lines changed

README.md

+15-14
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
See this [issue](https://github.com/react-native-datetimepicker/datetimepicker/issues/313)
44

5-
Note: the module was recently moved out of the `@react-native-community` npm scope. Please install from `@react-native-datetimepicker/datetimepicker`.
5+
This repository was moved out of the react native community GH organization, in accordance to [this proposal](https://github.com/react-native-community/discussions-and-proposals/issues/176).
6+
The module is still published on `npm` under the old namespace (as documented) but will be published under a new namespace soon, with a major version bump.
67

78
# React Native DateTimePicker
89

@@ -79,18 +80,18 @@ React Native date & time picker component for iOS, Android and Windows.
7980

8081
## Expo users notice
8182

82-
This module is part of Expo - [see docs](https://docs.expo.io/versions/latest/sdk/date-time-picker/). However, Expo SDK may not contain the latest version of the module and therefore, the newest features and bugfixes may not be available in Expo. Follow installation instructions in Expo docs - Expo will automatically install the latest version compatible with your Expo SDK (which may _not_ be the latest version of the module available).
83+
This module is part of Expo - [see docs](https://docs.expo.io/versions/latest/sdk/date-time-picker/). However, Expo SDK may not contain the latest version of the module and therefore, the newest features and bugfixes may not be available in Expo. Use the command `expo install @react-native-community/datetimepicker` (not `yarn` or `npm`) to install this module - Expo will automatically install the latest version compatible with your Expo SDK (which may _not_ be the latest version of the module available).
8384

8485
## Getting started
8586

8687
```bash
87-
npm install @react-native-datetimepicker/datetimepicker --save
88+
npm install @react-native-community/datetimepicker --save
8889
```
8990

9091
or
9192

9293
```bash
93-
yarn add @react-native-datetimepicker/datetimepicker
94+
yarn add @react-native-community/datetimepicker
9495
```
9596

9697
Autolinking is not yet implemented on Windows, so [Manual installation](#windows) is needed.
@@ -104,7 +105,7 @@ If you are using RN >= 0.60, only run `npx pod-install`. Then rebuild your proje
104105
For RN < 0.60, you need to link the dependency using `react-native link`:
105106

106107
```bash
107-
react-native link @react-native-datetimepicker/datetimepicker
108+
react-native link @react-native-community/datetimepicker
108109
```
109110

110111
Then run `npx pod-install` and rebuild your project.
@@ -114,21 +115,21 @@ If this does not work, see [Manual installation](#manual-installation).
114115
## General Usage
115116

116117
```js
117-
import DateTimePicker from '@react-native-datetimepicker/datetimepicker';
118+
import DateTimePicker from '@react-native-community/datetimepicker';
118119
```
119120

120121
or
121122

122123
```js
123-
const DateTimePicker = require('@react-native-datetimepicker/datetimepicker');
124+
const DateTimePicker = require('@react-native-community/datetimepicker');
124125
```
125126

126127
### Basic usage with state
127128

128129
```js
129130
import React, {useState} from 'react';
130131
import {View, Button, Platform} from 'react-native';
131-
import DateTimePicker from '@react-native-datetimepicker/datetimepicker';
132+
import DateTimePicker from '@react-native-community/datetimepicker';
132133

133134
export const App = () => {
134135
const [date, setDate] = useState(new Date(1598051730000));
@@ -608,7 +609,7 @@ Please see [CONTRIBUTING.md](CONTRIBUTING.md)
608609
platform :ios, '8.0'
609610

610611
# Point to the installed version
611-
pod 'RNDateTimePicker', :path => '../node_modules/@react-native-datetimepicker/datetimepicker/RNDateTimePicker.podspec'
612+
pod 'RNDateTimePicker', :path => '../node_modules/@react-native-community/datetimepicker/RNDateTimePicker.podspec'
612613

613614
# React/React-Native specific pods
614615
pod 'React', :path => '../node_modules/react-native', :subspecs => [
@@ -640,16 +641,16 @@ Please see [CONTRIBUTING.md](CONTRIBUTING.md)
640641
1. Add the following lines to `android/settings.gradle`:
641642

642643
```gradle
643-
include ':@react-native-datetimepicker_datetimepicker'
644-
project(':@react-native-datetimepicker_datetimepicker').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-datetimepicker/datetimepicker/android')
644+
include ':@react-native-community_datetimepicker'
645+
project(':@react-native-community_datetimepicker').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-community/datetimepicker/android')
645646
```
646647

647648
2. Add the compile line to the dependencies in `android/app/build.gradle`:
648649

649650
```gradle
650651
dependencies {
651652
...
652-
implementation project(':@react-native-datetimepicker_datetimepicker')
653+
implementation project(':@react-native-community_datetimepicker')
653654
}
654655
```
655656

@@ -677,7 +678,7 @@ Please see [CONTRIBUTING.md](CONTRIBUTING.md)
677678

678679
1. Open the solution in Visual Studio 2019
679680
2. Right-click solution icon in Solution Explorer > Add > Existing Project
680-
Select 'D:\pathToYourApp\node_modules\@react-native-datetimepicker\datetimepicker\windows\DateTimePickerWindows\DateTimePickerWindows.vcxproj'
681+
Select 'D:\pathToYourApp\node_modules\@react-native-community\datetimepicker\windows\DateTimePickerWindows\DateTimePickerWindows.vcxproj'
681682

682683
##### **windows/myapp.sln**
683684

@@ -703,7 +704,7 @@ Add `PackageProviders().Append(winrt::DateTimePicker::ReactPackageProvider());`
703704
5. Run `yarn run start:ios` or `yarn run start:android` or `yarn run start:windows`
704705
6. To do any development on the library, open the example project (in the example folder!) in xCode or Android Studio. The example project depends on the library code, which you can edit and observe any changes in the example project.
705706

706-
[circle-ci-badge]: https://img.shields.io/circleci/project/github/react-native-datetimepicker/datetimepicker/master.svg?style=flat-square
707+
[circle-ci-badge]: https://img.shields.io/circleci/project/github/react-native-community/datetimepicker/master.svg?style=flat-square
707708
[circle-ci-status]: https://circleci.com/gh/react-native-datetimepicker/datetimepicker.svg?style=svg
708709
[support-badge]: https://img.shields.io/badge/platforms-android%20%7C%20ios%20%7C%20windows-lightgrey.svg?style=flat-square
709710
[license-badge]: https://img.shields.io/npm/l/@react-native-community/slider.svg?style=flat-square

RNDateTimePicker.podspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Pod::Spec.new do |s|
1111
s.author = package['author']
1212
s.homepage = package['homepage']
1313
s.platform = :ios, "10.0"
14-
s.source = { :git => "https://github.com/react-native-datetimepicker/datetimepicker", :tag => "v#{s.version}" }
14+
s.source = { :git => "https://github.com/react-native-community/datetimepicker", :tag => "v#{s.version}" }
1515
s.source_files = "ios/*.{h,m}"
1616
s.requires_arc = true
1717

example/App.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
TextInput,
1111
useColorScheme,
1212
} from 'react-native';
13-
import DateTimePicker from '@react-native-datetimepicker/datetimepicker';
13+
import DateTimePicker from '@react-native-community/datetimepicker';
1414
import SegmentedControl from '@react-native-community/segmented-control';
1515
import {Colors} from 'react-native/Libraries/NewAppScreen';
1616
import React, {useState} from 'react';

example/ios/Podfile.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ SPEC CHECKSUMS:
459459
React-RCTText: fae545b10cfdb3d247c36c56f61a94cfd6dba41d
460460
React-RCTVibration: 4356114dbcba4ce66991096e51a66e61eda51256
461461
ReactCommon: ed4e11d27609d571e7eee8b65548efc191116eb3
462-
RNDateTimePicker: 1da5ced941f52ef87c223da90225a7547c114bc3
462+
RNDateTimePicker: 8a51a2216c307769e69ef827293d59549ab1ca23
463463
Yoga: 3ebccbdd559724312790e7742142d062476b698e
464464
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a
465465

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@react-native-datetimepicker/datetimepicker",
2+
"name": "@react-native-community/datetimepicker",
33
"version": "3.1.0",
44
"description": "DateTimePicker component for React Native",
55
"main": "./src/index.js",
@@ -56,9 +56,9 @@
5656
],
5757
"license": "MIT",
5858
"bugs": {
59-
"url": "https://github.com/react-native-datetimepicker/datetimepicker/issues"
59+
"url": "https://github.com/react-native-community/datetimepicker/issues"
6060
},
61-
"homepage": "https://github.com/react-native-datetimepicker/datetimepicker#readme",
61+
"homepage": "https://github.com/react-native-community/datetimepicker#readme",
6262
"devDependencies": {
6363
"@babel/core": "^7.5.5",
6464
"@babel/runtime": "^7.5.5",

0 commit comments

Comments
 (0)