Skip to content

Commit f2b45c7

Browse files
authored
Migrate to TS and functional components (#269)
* Initial commit for v3 * Migrate to TS and function components * Add changeset releae workflow
1 parent 53e7f0a commit f2b45c7

Some content is hidden

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

73 files changed

+12954
-11933
lines changed

.babelrc

Lines changed: 0 additions & 7 deletions
This file was deleted.

.changeset/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4+
with multi-package repos, or single-package repos to help you version and publish your code. You can
5+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6+
7+
We have a quick list of common questions to get you started engaging with this project in
8+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)

.changeset/config.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3+
"changelog": "@changesets/cli/changelog",
4+
"commit": false,
5+
"fixed": [],
6+
"linked": [],
7+
"access": "restricted",
8+
"baseBranch": "master",
9+
"updateInternalDependencies": "patch",
10+
"ignore": []
11+
}

.changeset/wet-snakes-smash.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"react-native-copilot": major
3+
---
4+
5+
Migrate to TS and deprecate HOC

.eslintrc

Lines changed: 0 additions & 29 deletions
This file was deleted.

.eslintrc.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/** @type {require("eslint").Linter.Config} */
2+
module.exports = {
3+
env: {
4+
browser: true,
5+
es2021: true,
6+
},
7+
extends: [
8+
"plugin:react/recommended",
9+
"plugin:react-hooks/recommended",
10+
"standard-with-typescript",
11+
"prettier",
12+
],
13+
overrides: [],
14+
parserOptions: {
15+
ecmaVersion: "latest",
16+
sourceType: "module",
17+
project: ["./tsconfig.json"],
18+
},
19+
plugins: ["react"],
20+
rules: {
21+
"@typescript-eslint/explicit-function-return-type": "off",
22+
"@typescript-eslint/strict-boolean-expressions": "off",
23+
},
24+
};

.flowconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[include]
2+
./src

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
22
name: Bug report
33
about: Create a report to help us improve
4-
labels:
5-
4+
labels:
65
---
76

87
**Current Behavior**
98
A clear and concise description of the behavior.
109

1110
**Input Code**
11+
1212
- REPL or Repo link if applicable:
1313

1414
```js
@@ -19,13 +19,15 @@ var your => (code) => here;
1919
A clear and concise description of what you expected to happen (or code).
2020

2121
**Environment**
22+
2223
- Device: [e.g. iPhone 8 Simulator]
2324
- OS: [e.g. iOS12]
2425
- `react-native-copilot`: [e.g. v2.4.1]
2526
- `react-native`: [e.g. v0.57]
2627
- `react-native-svg`: [e.g. v7.1.0]
2728

2829
**Possible Solution**
30+
2931
<!--- Only if you have suggestions on a fix for the bug -->
3032

3133
**Additional context/Screenshots**

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
---
22
name: Feature request
33
about: Suggest an idea for this project
4-
labels:
5-
4+
labels:
65
---
76

87
**Is your feature request related to a problem? Please describe.**

.github/workflows/release.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
concurrency: ${{ github.workflow }}-${{ github.ref }}
9+
10+
jobs:
11+
release:
12+
name: Release
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout Repo
16+
uses: actions/checkout@v3
17+
18+
- name: Setup Node.js 16.x
19+
uses: actions/setup-node@v3
20+
with:
21+
node-version: 16.x
22+
23+
- name: Install Dependencies
24+
run: yarn
25+
26+
- name: Create Release Pull Request or Publish to npm
27+
id: changesets
28+
uses: changesets/action@v1
29+
with:
30+
# This expects you to have a script called release which does a build for your packages and calls changeset publish
31+
publish: yarn release
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)