Skip to content

Commit c618613

Browse files
authored
feat: move module out of RNC npm scope (#404)
* feat: move module out of RNC npm scope * fix some leftovers
1 parent 4049be2 commit c618613

File tree

5 files changed

+20
-21
lines changed

5 files changed

+20
-21
lines changed

README.md

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22

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

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.
5+
Note: the module was recently moved out of the `@react-native-community` npm scope. Please install from `@react-native-datetimepicker/datetimepicker`.
76

87
# React Native DateTimePicker
98

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

8180
## Expo users notice
8281

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).
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).
8483

8584
## Getting started
8685

8786
```bash
88-
npm install @react-native-community/datetimepicker --save
87+
npm install @react-native-datetimepicker/datetimepicker --save
8988
```
9089

9190
or
9291

9392
```bash
94-
yarn add @react-native-community/datetimepicker
93+
yarn add @react-native-datetimepicker/datetimepicker
9594
```
9695

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

107106
```bash
108-
react-native link @react-native-community/datetimepicker
107+
react-native link @react-native-datetimepicker/datetimepicker
109108
```
110109

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

117116
```js
118-
import DateTimePicker from '@react-native-community/datetimepicker';
117+
import DateTimePicker from '@react-native-datetimepicker/datetimepicker';
119118
```
120119

121120
or
122121

123122
```js
124-
const DateTimePicker = require('@react-native-community/datetimepicker');
123+
const DateTimePicker = require('@react-native-datetimepicker/datetimepicker');
125124
```
126125

127126
### Basic usage with state
128127

129128
```js
130129
import React, {useState} from 'react';
131130
import {View, Button, Platform} from 'react-native';
132-
import DateTimePicker from '@react-native-community/datetimepicker';
131+
import DateTimePicker from '@react-native-datetimepicker/datetimepicker';
133132

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

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

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

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

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

650649
```gradle
651650
dependencies {
652651
...
653-
implementation project(':@react-native-community_datetimepicker')
652+
implementation project(':@react-native-datetimepicker_datetimepicker')
654653
}
655654
```
656655

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

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

683682
##### **windows/myapp.sln**
684683

@@ -704,7 +703,7 @@ Add `PackageProviders().Append(winrt::DateTimePicker::ReactPackageProvider());`
704703
5. Run `yarn run start:ios` or `yarn run start:android` or `yarn run start:windows`
705704
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.
706705

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

RNDateTimePicker.podspec

Lines changed: 1 addition & 1 deletion
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-community/datetimepicker", :tag => "v#{s.version}" }
14+
s.source = { :git => "https://github.com/react-native-datetimepicker/datetimepicker", :tag => "v#{s.version}" }
1515
s.source_files = "ios/*.{h,m}"
1616
s.requires_arc = true
1717

example/App.js

Lines changed: 1 addition & 1 deletion
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-community/datetimepicker';
13+
import DateTimePicker from '@react-native-datetimepicker/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

Lines changed: 1 addition & 1 deletion
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: 8a51a2216c307769e69ef827293d59549ab1ca23
462+
RNDateTimePicker: 1da5ced941f52ef87c223da90225a7547c114bc3
463463
Yoga: 3ebccbdd559724312790e7742142d062476b698e
464464
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a
465465

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@react-native-community/datetimepicker",
2+
"name": "@react-native-datetimepicker/datetimepicker",
33
"version": "3.0.9",
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-community/datetimepicker/issues"
59+
"url": "https://github.com/react-native-datetimepicker/datetimepicker/issues"
6060
},
61-
"homepage": "https://github.com/react-native-community/datetimepicker#readme",
61+
"homepage": "https://github.com/react-native-datetimepicker/datetimepicker#readme",
6262
"devDependencies": {
6363
"@babel/core": "^7.5.5",
6464
"@babel/runtime": "^7.5.5",

0 commit comments

Comments
 (0)