Skip to content

Commit 66d32b6

Browse files
authored
chore: migrate to new namespace (#155)
1 parent 3670d63 commit 66d32b6

File tree

5 files changed

+25
-22
lines changed

5 files changed

+25
-22
lines changed

.github/workflows/publish.yml

+3
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,6 @@ jobs:
2727
run: yarn
2828
- name: ESLint Checks
2929
run: yarn ci:publish
30+
env:
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

README.md

+17-17
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,38 @@
11

2-
# `@react-native-community/picker`
2+
# `@react-native-picker/picker`
33

44

55

6-
[![npm version](https://img.shields.io/npm/v/@react-native-community/picker.svg)](https://www.npmjs.com/package/@react-native-community/picker)
7-
[![Build](https://github.com/react-native-picker/picker/workflows/Build/badge.svg)](https://github.com/react-native-picker/picker/actions) ![Supports Android, iOS, MacOS, and Windows](https://img.shields.io/badge/platforms-android%20|%20ios|%20macos|%20windows-lightgrey.svg) ![MIT License](https://img.shields.io/npm/l/@react-native-community/picker.svg) [![Lean Core Extracted](https://img.shields.io/badge/Lean%20Core-Extracted-brightgreen.svg)](https://github.com/facebook/react-native/issues/23313)
6+
[![npm version](https://img.shields.io/npm/v/@react-native-picker/picker.svg)](https://www.npmjs.com/package/@react-native-picker/picker)
7+
[![Build](https://github.com/react-native-picker/picker/workflows/Build/badge.svg)](https://github.com/react-native-picker/picker/actions) ![Supports Android, iOS, MacOS, and Windows](https://img.shields.io/badge/platforms-android%20|%20ios|%20macos|%20windows-lightgrey.svg) ![MIT License](https://img.shields.io/npm/l/@react-native-picker/picker.svg) [![Lean Core Extracted](https://img.shields.io/badge/Lean%20Core-Extracted-brightgreen.svg)](https://github.com/facebook/react-native/issues/23313)
88

99
| Android | iOS | PickerIOS | Windows | MacOS |
1010
| --- | --- | --- | --- | --- |
1111
| <img src="./screenshots/picker-android.png" width="150"> | <img src="./screenshots/picker-ios.png" width="150"> | <img src="./screenshots/pickerios-ios.png" width="150"> | <img src="./screenshots/picker-windows.png" width="300"> | <img src="./screenshots/picker-macos.png" width="300">
1212

1313
## Supported Versions
1414

15-
| @react-native-community/picker | react-native |
15+
| @react-native-picker/picker | react-native |
1616
| --- | --- |
1717
| >= 1.2.0 | 0.60+ or 0.59+ with [Jetifier](https://www.npmjs.com/package/jetifier) |
1818
| >= 1.0.0 | 0.57 |
1919

2020
## For Managed Workflow users using Expo 37
2121
This component is not supported in the managed workflow for expo sdk 37. Please import the `Picker` from `react-native`.
22-
See more info [here](https://github.com/react-native-community/react-native-picker/issues/45#issuecomment-633163973)
22+
See more info [here](https://github.com/react-native-picker/picker/issues/45#issuecomment-633163973)
2323

2424
## Getting started
2525

26-
`$ npm install @react-native-community/picker --save`
26+
`$ npm install @react-native-picker/picker --save`
2727

2828
or
2929

30-
`$ yarn add @react-native-community/picker`
30+
`$ yarn add @react-native-picker/picker`
3131

3232
### For [email protected] or above
3333

3434
As [[email protected]](https://reactnative.dev/blog/2019/07/03/version-60) or above supports autolinking, so there is no need to run linking process.
35-
Read more about autolinking [here](https://github.com/react-native-community/cli/blob/master/docs/autolinking.md).
35+
Read more about autolinking [here](https://github.com/react-native-picker/cli/blob/master/docs/autolinking.md).
3636

3737
#### iOS
3838
CocoaPods on iOS needs this extra step
@@ -49,7 +49,7 @@ No additional step is required.
4949

5050
1. Open the solution in Visual Studio 2019
5151
2. Right-click Solution icon in Solution Explorer > Add > Existing Project
52-
Select `D:\dev\RNTest\node_modules\@react-native-community\picker\windows\ReactNativePicker\ReactNativePicker.vcxproj`
52+
Select `D:\dev\RNTest\node_modules\@react-native-picker\picker\windows\ReactNativePicker\ReactNativePicker.vcxproj`
5353

5454
##### **windows/myapp.sln**
5555
Add a reference to `ReactNativePicker` to your main application project. From Visual Studio 2019:
@@ -75,15 +75,15 @@ pod install
7575

7676
### Mostly automatic installation (react-native < 0.60)
7777

78-
`$ react-native link @react-native-community/picker`
78+
`$ react-native link @react-native-picker/picker`
7979

8080
### Manual installation (react-native < 0.60)
8181

8282

8383
#### iOS
8484

8585
1. In XCode, in the project navigator, right click `Libraries``Add Files to [your project's name]`
86-
2. Go to `node_modules`` @react-native-community/picker` and add `RNCPicker.xcodeproj`
86+
2. Go to `node_modules`` @react-native-picker/picker` and add `RNCPicker.xcodeproj`
8787
3. In XCode, in the project navigator, select your project. Add `libRNCPicker.a` to your project's `Build Phases``Link Binary With Libraries`
8888
4. Run your project (`Cmd+R`)<
8989

@@ -94,17 +94,17 @@ pod install
9494
- Add `new RNCPickerPackage()` to the list returned by the `getPackages()` method
9595
2. Append the following lines to `android/settings.gradle`:
9696
```
97-
include ': @react-native-community/picker'
98-
project(': @react-native-community/picker').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-community/picker/android')
97+
include ': @react-native-picker/picker'
98+
project(': @react-native-picker/picker').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-picker/picker/android')
9999
```
100100
3. Insert the following lines inside the dependencies block in `android/app/build.gradle`:
101101
```
102-
implementation project(path: ':@react-native-community_picker')
102+
implementation project(path: ':@react-native-picker_picker')
103103
```
104104
#### MacOS
105105

106106
1. In XCode, in the project navigator, right click `Libraries``Add Files to [your project's name]`
107-
2. Go to `node_modules`` @react-native-community/picker` and add `RNCPicker.xcodeproj`
107+
2. Go to `node_modules`` @react-native-picker/picker` and add `RNCPicker.xcodeproj`
108108
3. In XCode, in the project navigator, select your project. Add `libRNCPicker.a` to your project's `Build Phases``Link Binary With Libraries`
109109
4. Run your project (`Cmd+R`)<
110110

@@ -115,10 +115,10 @@ Renders the native picker component on iOS and Android. Example:
115115

116116
#### Usage
117117

118-
Import Picker from `@react-native-community/picker`
118+
Import Picker from `@react-native-picker/picker`
119119

120120
```javascript
121-
import {Picker} from '@react-native-community/picker';
121+
import {Picker} from '@react-native-picker/picker';
122122
```
123123

124124
Create state which will be used by the `Picker`

RNCPicker.podspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Pod::Spec.new do |s|
1212
s.homepage = package['homepage']
1313
s.platforms = { :ios => "9.0", :osx => "10.14" }
1414

15-
s.source = { :git => "https://github.com/react-native-community/react-native-picker.git", :tag => "v#{s.version}" }
15+
s.source = { :git => "https://github.com/react-native-picker/picker.git", :tag => "v#{s.version}" }
1616
s.ios.source_files = "ios/**/*.{h,m}"
1717
s.osx.source_files = "macos/**/*.{h,m}"
1818

babel.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module.exports = {
55
'module-resolver',
66
{
77
alias: {
8-
'@react-native-community/picker': './js',
8+
'@react-native-picker/picker': './js',
99
},
1010
cwd: 'babelrc',
1111
},

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"name": "@react-native-community/picker",
2+
"name": "@react-native-picker/picker",
33
"version": "1.8.1",
4-
"homepage": "https://github.com/react-native-community/react-native-picker#readme",
4+
"homepage": "https://github.com/react-native-picker/picker#readme",
55
"description": "React Native Picker for iOS & Android",
66
"main": "./js/index.js",
77
"types": "./typings/index.d.ts",
@@ -120,6 +120,6 @@
120120
},
121121
"repository": {
122122
"type": "git",
123-
"url": "https://github.com/react-native-community/react-native-picker.git"
123+
"url": "https://github.com/react-native-picker/picker.git"
124124
}
125125
}

0 commit comments

Comments
 (0)