Skip to content

Commit 5764a2e

Browse files
authored
Merge branch 'master' into master
2 parents b88011f + 4876d0e commit 5764a2e

File tree

142 files changed

+33037
-8240
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

142 files changed

+33037
-8240
lines changed

.circleci/config.yml

Lines changed: 0 additions & 98 deletions
This file was deleted.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
name: 🐛 Report a bug
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: 'bug'
6+
assignees: ''
7+
---
8+
9+
### Current behaviour
10+
<!-- Describe your issue in detail -->
11+
12+
### Expected behaviour
13+
<!-- A clear and concise description of what you expected to happen -->
14+
15+
### How to reproduce?
16+
<!-- Help us to reproduce the issue and describe the steps -->
17+
<!-- Attach code example on snack.expo.dev or in a GitHub repo -->
18+
19+
### Preview
20+
<!-- Include screenshots or video if applicable. -->
21+
22+
### What have you tried so far?
23+
<!-- List down the steps you have tried to fix or identify the issue. -->
24+
25+
### Your Environment
26+
27+
| software | version
28+
| --------------------- | -------
29+
| ios | x
30+
| android | x
31+
| react-native | x.x.x
32+
| react-native-paper | x.x.x
33+
| node | x.x.x
34+
| npm or yarn | x.x.x
35+
| expo sdk | x.x.x

.github/ISSUE_TEMPLATE/feature.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: 🗣 Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: 'feature request'
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/ISSUE_TEMPLATE/question.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
name: 💬 Question
3+
about: You need help with React Native Paper Dates.
4+
title: ''
5+
labels: 'question'
6+
assignees: ''
7+
8+
---
9+
10+
### Ask your Question
11+
<!-- A clear and concise question describing the concern -->

.github/actions/setup/action.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Setup
2+
description: Setup Node.js and install dependencies
3+
4+
runs:
5+
using: composite
6+
steps:
7+
- name: Setup Node.js
8+
uses: actions/setup-node@v3
9+
with:
10+
node-version-file: .nvmrc
11+
12+
- name: Cache dependencies
13+
id: yarn-cache
14+
uses: actions/cache@v3
15+
with:
16+
path: |
17+
**/node_modules
18+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
19+
restore-keys: |
20+
${{ runner.os }}-yarn-
21+
22+
- name: Install dependencies
23+
if: steps.yarn-cache.outputs.cache-hit != 'true'
24+
run: |
25+
yarn install --cwd example --frozen-lockfile
26+
yarn install --frozen-lockfile
27+
shell: bash

.github/workflows/check-repro.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Check for repro
2+
on:
3+
issues:
4+
types: [opened, edited]
5+
issue_comment:
6+
types: [created, edited]
7+
8+
jobs:
9+
check-repro:
10+
if: ${{ github.event.label.name == 'bug' }}
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/github-script@v3
14+
with:
15+
github-token: ${{ secrets.GITHUB_TOKEN }}
16+
script: |
17+
const user = context.payload.sender.login;
18+
const body = context.payload.comment
19+
? context.payload.comment.body
20+
: context.payload.issue.body;
21+
const regex = new RegExp(
22+
`https?:\\/\\/((github\\.com\\/${user}\\/[^/]+\\/?[\\s\\n]+)|(snack\\.expo\\.dev\\/.+))`,
23+
'gm'
24+
);
25+
if (regex.test(body)) {
26+
await github.issues.addLabels({
27+
issue_number: context.issue.number,
28+
owner: context.repo.owner,
29+
repo: context.repo.repo,
30+
labels: ['repro provided'],
31+
});
32+
try {
33+
await github.issues.removeLabel({
34+
issue_number: context.issue.number,
35+
owner: context.repo.owner,
36+
repo: context.repo.repo,
37+
name: 'needs repro',
38+
});
39+
} catch (error) {
40+
if (!/Label does not exist/.test(error.message)) {
41+
throw error;
42+
}
43+
}
44+
} else {
45+
if (context.eventName !== 'issues') {
46+
return;
47+
}
48+
const body = "Hey! Thanks for opening the issue. The issue doesn't seem to contain a link to a repro (a [snack.expo.dev](https://snack.expo.dev) link or link to a GitHub repo under your username).\n\nCan you provide a [minimal repro](https://stackoverflow.com/help/minimal-reproducible-example) which demonstrates the issue? A repro will help us debug the issue faster. Please try to keep the repro as small as possible and make sure that we can run it without additional setup.";
49+
const comments = await github.issues.listComments({
50+
issue_number: context.issue.number,
51+
owner: context.repo.owner,
52+
repo: context.repo.repo,
53+
});
54+
if (comments.data.some(comment => comment.body === body)) {
55+
return;
56+
}
57+
await github.issues.createComment({
58+
issue_number: context.issue.number,
59+
owner: context.repo.owner,
60+
repo: context.repo.repo,
61+
body,
62+
});
63+
await github.issues.addLabels({
64+
issue_number: context.issue.number,
65+
owner: context.repo.owner,
66+
repo: context.repo.repo,
67+
labels: ['needs repro'],
68+
});
69+
}

.github/workflows/ci.yml

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
branches:
8+
- master
9+
10+
jobs:
11+
lint:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v3
16+
17+
- name: Setup
18+
uses: ./.github/actions/setup
19+
20+
- name: Lint files
21+
run: yarn lint
22+
23+
- name: Typecheck files
24+
run: yarn typecheck
25+
26+
test:
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: Checkout
30+
uses: actions/checkout@v3
31+
32+
- name: Setup
33+
uses: ./.github/actions/setup
34+
35+
- name: Run unit tests
36+
run: yarn test --maxWorkers=2 --coverage
37+
38+
build:
39+
runs-on: ubuntu-latest
40+
steps:
41+
- name: Checkout
42+
uses: actions/checkout@v3
43+
44+
- name: Setup
45+
uses: ./.github/actions/setup
46+
47+
- name: Build package
48+
run: yarn prepack
49+
release:
50+
runs-on: ubuntu-latest
51+
if: github.ref == 'refs/heads/master'
52+
steps:
53+
- name: Checkout
54+
uses: actions/checkout@v3
55+
with:
56+
fetch-depth: 0
57+
- name: Setup
58+
uses: ./.github/actions/setup
59+
- name: git config
60+
run: |
61+
git config user.name "${GITHUB_ACTOR}"
62+
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
63+
- run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> .npmrc
64+
- run: yarn release
65+
env:
66+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
67+
deploy-example:
68+
runs-on: ubuntu-latest
69+
if: github.ref == 'refs/heads/master'
70+
steps:
71+
- name: Checkout
72+
uses: actions/checkout@v3
73+
with:
74+
fetch-depth: 0
75+
- name: Setup
76+
uses: ./.github/actions/setup
77+
- run: yarn build-example
78+
- name: Deploy example
79+
uses: jakejarvis/s3-sync-action@master
80+
with:
81+
args: --acl public-read --follow-symlinks --delete
82+
env:
83+
AWS_S3_BUCKET: www.reactnativepaperdates.com
84+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
85+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
86+
AWS_REGION: 'eu-central-1'
87+
SOURCE_DIR: 'example/web-build' # optional: defaults to entire repository
88+
89+
90+
91+
92+
93+

0 commit comments

Comments
 (0)