Skip to content

Commit a551b87

Browse files
authored
Setup yarn monorepo for packages (#988)
1 parent 4e630a9 commit a551b87

38 files changed

+790
-1140
lines changed

.github/workflows/main.yml renamed to .github/workflows/pull-request.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,24 @@
1-
name: react-native-app-auth CI
1+
name: Pull Request
22

33
on:
4-
push:
5-
branches: [ main ]
64
pull_request:
75
branches: [ main ]
86

97
jobs:
108
build:
119
runs-on: ubuntu-latest
12-
strategy:
13-
matrix:
14-
node-version: [10]
1510

1611
steps:
17-
- uses: actions/checkout@v2
12+
- uses: actions/checkout@v4
13+
14+
- name: Use Node.js
15+
uses: actions/setup-node@v4
16+
with:
17+
node-version: 18
18+
cache: 'yarn'
19+
1820
- name: Install dependencies
19-
run: yarn install --frozen-lockfile --non-interactive
21+
run: yarn install --frozen-lockfile
2022

2123
- name: Lint
2224
run: yarn run lint

.github/workflows/release.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ on:
33
push:
44
branches:
55
- main
6+
67
jobs:
78
release:
8-
name: Release
99
runs-on: ubuntu-latest
1010
permissions:
1111
contents: write
@@ -15,11 +15,15 @@ jobs:
1515
deployments: write
1616
packages: write
1717
pull-requests: write
18+
1819
steps:
19-
- uses: actions/checkout@v2
20-
- uses: actions/setup-node@v3
20+
- uses: actions/checkout@v4
21+
22+
- name: Use Node.js
23+
uses: actions/setup-node@v4
2124
with:
2225
node-version: 18
26+
cache: 'yarn'
2327

2428
- name: Install dependencies
2529
run: yarn install --frozen-lockfile

.npmignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

Example/metro.config.js

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11
const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config');
22

3+
const path = require('path');
4+
5+
const packagePath = path.resolve(
6+
path.join(__dirname, '..', 'packages', 'react-native-app-auth'),
7+
);
8+
9+
const extraNodeModules = {
10+
'react-native-app-auth': packagePath,
11+
};
12+
const watchFolders = [packagePath];
13+
314
/**
415
* Metro configuration
516
* https://facebook.github.io/metro/docs/configuration
617
*
718
* @type {import('metro-config').MetroConfig}
819
*/
9-
10-
const path = require('path');
11-
12-
const extraNodeModules = {
13-
'react-native-app-auth': path.resolve(path.join(__dirname, '..')),
14-
};
15-
const watchFolders = [path.resolve(path.join(__dirname, '..'))];
16-
1720
const config = {
1821
resolver: {
1922
extraNodeModules: new Proxy(extraNodeModules, {

Example/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "Example",
2+
"name": "rnaa-demo",
33
"version": "0.0.1",
44
"private": true,
55
"scripts": {
@@ -12,7 +12,7 @@
1212
"dependencies": {
1313
"react": "18.2.0",
1414
"react-native": "0.72.4",
15-
"react-native-app-auth": "link:../"
15+
"react-native-app-auth": "link:../packages/react-native-app-auth"
1616
},
1717
"devDependencies": {
1818
"@babel/core": "^7.20.0",

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
<a href="https://formidable.com/open-source/" target="_blank">
2-
<img alt="React Native App Auth — Formidable, We build the modern web" src="https://oss.nearform.com/api/banner?text=react+native+app+auth" />
1+
<a href="https://commerce.nearform.com/open-source/" target="_blank">
2+
<img alt="React Native App Auth" src="https://oss.nearform.com/api/banner?text=react+native+app+auth" />
33
</a>
44
<p align="center">
55
<strong>React native bridge for AppAuth - an SDK for communicating with OAuth2 providers</strong>

docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "website",
2+
"name": "rnaa-docs",
33
"version": "0.0.0",
44
"private": true,
55
"scripts": {

package.json

Lines changed: 10 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,8 @@
11
{
2-
"name": "react-native-app-auth",
3-
"version": "7.2.0",
2+
"name": "rnaa",
3+
"version": "1.0.0",
4+
"private": true,
45
"description": "React Native bridge for AppAuth for supporting any OAuth 2 provider",
5-
"main": "index.js",
6-
"types": "index.d.ts",
7-
"scripts": {
8-
"test": "jest",
9-
"lint": "eslint ."
10-
},
11-
"lint-staged": {
12-
"*.js": [
13-
"eslint --fix",
14-
"git add"
15-
],
16-
"*.ts": [
17-
"prettier --write",
18-
"git add"
19-
]
20-
},
21-
"files": [
22-
"android",
23-
"ios",
24-
"index.d.ts",
25-
"react-native-app-auth.podspec"
26-
],
276
"repository": {
287
"type": "git",
298
"url": "https://github.com/FormidableLabs/react-native-app-auth"
@@ -41,46 +20,13 @@
4120
"oauth2",
4221
"appauth"
4322
],
44-
"author": "[email protected]",
4523
"license": "MIT",
46-
"peerDependencies": {
47-
"react-native": ">=0.63.0"
48-
},
49-
"devDependencies": {
50-
"@changesets/cli": "^2.26.1",
51-
"@svitejs/changesets-changelog-github-compact": "^0.1.1",
52-
"babel-eslint": "10.0.3",
53-
"eslint": "6.8.0",
54-
"eslint-config-formidable": "4.0.0",
55-
"eslint-config-prettier": "6.9.0",
56-
"eslint-plugin-filenames": "1.3.2",
57-
"eslint-plugin-import": "2.19.1",
58-
"eslint-plugin-jest": "23.3.0",
59-
"eslint-plugin-prettier": "3.1.2",
60-
"eslint-plugin-promise": "4.2.1",
61-
"husky": "4.0.1",
62-
"jest": "24.9.0",
63-
"lint-staged": "9.5.0",
64-
"prettier": "1.19.1",
65-
"react": "16.9.0",
66-
"react-native": "0.61.5"
67-
},
68-
"dependencies": {
69-
"invariant": "2.2.4",
70-
"react-native-base64": "0.0.2"
71-
},
72-
"jest": {
73-
"preset": "react-native",
74-
"modulePathIgnorePatterns": [
75-
"<rootDir>/Example/"
76-
]
77-
},
78-
"husky": {
79-
"hooks": {
80-
"pre-commit": "lint-staged"
81-
}
24+
"scripts": {
25+
"changeset": "changeset",
26+
"lint": "yarn workspace react-native-app-auth lint",
27+
"test": "yarn workspace react-native-app-auth test"
8228
},
83-
"publishConfig": {
84-
"provenance": true
85-
}
29+
"workspaces": [
30+
"packages/*"
31+
]
8632
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
{
2+
"name": "react-native-app-auth",
3+
"version": "7.2.0",
4+
"description": "React Native bridge for AppAuth for supporting any OAuth 2 provider",
5+
"main": "index.js",
6+
"types": "index.d.ts",
7+
"scripts": {
8+
"test": "jest",
9+
"lint": "eslint ."
10+
},
11+
"files": [
12+
"android",
13+
"ios",
14+
"index.d.ts",
15+
"react-native-app-auth.podspec"
16+
],
17+
"repository": {
18+
"type": "git",
19+
"url": "https://github.com/FormidableLabs/react-native-app-auth"
20+
},
21+
"bugs": {
22+
"url": "https://github.com/FormidableLabs/react-native-app-auth/issues"
23+
},
24+
"homepage": "https://github.com/FormidableLabs/react-native-app-auth",
25+
"keywords": [
26+
"react",
27+
"react-native",
28+
"auth",
29+
"authentication",
30+
"oauth",
31+
"oauth2",
32+
"appauth"
33+
],
34+
"license": "MIT",
35+
"author": "Nearform Commerce (https://commerce.nearform.com)",
36+
"peerDependencies": {
37+
"react-native": ">=0.63.0"
38+
},
39+
"devDependencies": {
40+
"@changesets/cli": "^2.26.1",
41+
"@svitejs/changesets-changelog-github-compact": "^0.1.1",
42+
"babel-eslint": "10.0.3",
43+
"eslint": "6.8.0",
44+
"eslint-config-formidable": "4.0.0",
45+
"eslint-config-prettier": "6.9.0",
46+
"eslint-plugin-filenames": "1.3.2",
47+
"eslint-plugin-import": "2.19.1",
48+
"eslint-plugin-jest": "23.3.0",
49+
"eslint-plugin-prettier": "3.1.2",
50+
"eslint-plugin-promise": "4.2.1",
51+
"jest": "24.9.0",
52+
"prettier": "1.19.1",
53+
"react": "16.9.0",
54+
"react-native": "0.63.0"
55+
},
56+
"dependencies": {
57+
"invariant": "2.2.4",
58+
"react-native-base64": "0.0.2"
59+
},
60+
"jest": {
61+
"preset": "react-native"
62+
},
63+
"publishConfig": {
64+
"provenance": true
65+
}
66+
}

react-native-app-auth-Hero.png

-502 KB
Binary file not shown.

0 commit comments

Comments
 (0)