Skip to content

Commit

Permalink
Migrate to TS and functional components (#269)
Browse files Browse the repository at this point in the history
* Initial commit for v3

* Migrate to TS and function components

* Add changeset releae workflow
  • Loading branch information
mohebifar authored Mar 22, 2023
1 parent 53e7f0a commit f2b45c7
Show file tree
Hide file tree
Showing 73 changed files with 12,954 additions and 11,933 deletions.
7 changes: 0 additions & 7 deletions .babelrc

This file was deleted.

8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "master",
"updateInternalDependencies": "patch",
"ignore": []
}
5 changes: 5 additions & 0 deletions .changeset/wet-snakes-smash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"react-native-copilot": major
---

Migrate to TS and deprecate HOC
29 changes: 0 additions & 29 deletions .eslintrc

This file was deleted.

24 changes: 24 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/** @type {require("eslint").Linter.Config} */
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: [
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"standard-with-typescript",
"prettier",
],
overrides: [],
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
project: ["./tsconfig.json"],
},
plugins: ["react"],
rules: {
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/strict-boolean-expressions": "off",
},
};
2 changes: 2 additions & 0 deletions .flowconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[include]
./src
6 changes: 4 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
name: Bug report
about: Create a report to help us improve
labels:

labels:
---

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

**Input Code**

- REPL or Repo link if applicable:

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

**Environment**

- Device: [e.g. iPhone 8 Simulator]
- OS: [e.g. iOS12]
- `react-native-copilot`: [e.g. v2.4.1]
- `react-native`: [e.g. v0.57]
- `react-native-svg`: [e.g. v7.1.0]

**Possible Solution**

<!--- Only if you have suggestions on a fix for the bug -->

**Additional context/Screenshots**
Expand Down
3 changes: 1 addition & 2 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
---
name: Feature request
about: Suggest an idea for this project
labels:

labels:
---

**Is your feature request related to a problem? Please describe.**
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Release

on:
push:
branches:
- master

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3

- name: Setup Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16.x

- name: Install Dependencies
run: yarn

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
# This expects you to have a script called release which does a build for your packages and calls changeset publish
publish: yarn release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
npm-debug.*
.DS_Store
node_modules
dist
10 changes: 5 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
language: node_js
node_js:
- '10'
- "10"
script:
- yarn test
- yarn lint
- yarn test
- yarn lint
deploy:
provider: npm
email: "$NPM_AUTHOR"
Expand All @@ -12,5 +12,5 @@ deploy:
branch: master
env:
global:
- secure: lvFQZnQE/BYH/8OiVDM6QoE44Q67xbJEK6MDXwK0QIWKigjvwfSQRUx3cyMDiX6xUo92Qvmc0PHLzIE+Y6Ozp3fNkuxR1rAam0oiJmr3jgui4dhzFid5x9S+gZrT7KS+8h3PPNrKMSJ1ju5E7CbwdaPu+dEN+fUvfbfUa0VNlgO0Vwk9iWs229aypxo3vwgMMMgi8sS39p6Fr6C2CNMCFCOpVSshxAVnSfNIip+sQpuEdFszgjBrvGMjeslEG2PsagSzhx+liBQFbCrOKuhf0CFtH4utLDfIlr0XrP+boIL2WHwn8EwSbzPEFIbnYaPk5yyaFiI2F0RHTFL01xrsrLwiJD02za9Topb6REmHHT5wrleYExgIup3gWFJofQ7lGA2YwPuCk+68F0YHWDeuC4Is/N0wMgtex9LMQCd66H3CZJk77Pp72csrzI9fURj5QZOOacL+C175E1Il6fJ9OsCu6rhQM9vw/tFYp3YsA7mJaw/RMfEsJrjaA4hZgF8yQvAs4eO8CN/ROGHSbDS5q9K5RjvxkBt3pkJWR555pcpRUmfXpLYkZdNf8XQJF5WEZyAUwLebIZ8uWR0BdYg83EHKZyUyNVyez2wxZQHXYi1eIkiAs9nzQhyzTce60UiZqg4BnpbPtZZkep58fKCSxwM714LmoPWSCckfUlVYS/A=
- secure: aJkIQZhB2ZlI43R3jLM3C5nIMAJ7CytkuOlKJ0L3U5IsCoPxr9+Dxl0VCMivkrtGTjD/eoYJtPjkHWRQ56H0pF/zKWlv5LtUtZFZ4q3oGE33FlIQ7gA20hahn+4AbB3yyk0zlPUF1jrL+RmRGwc/ckeSdE28R/xKfAl7qRrCk41U6amvVjBYzXk37npGLJI31EUz7/IbQ5MB4S2hfrWnkjwr0QfNWm1D9c2YOTWXeYIlO92z3LZWRjv2qSkSudsanEStINL2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CSxwM714LmoPWSCckfUlVYS/A=
- secure: aJkIQZhB2ZlI43R3jLM3C5nIMAJ7CytkuOlKJ0L3U5IsCoPxr9+Dxl0VCMivkrtGTjD/eoYJtPjkHWRQ56H0pF/zKWlv5LtUtZFZ4q3oGE33FlIQ7gA20hahn+4AbB3yyk0zlPUF1jrL+RmRGwc/ckeSdE28R/xKfAl7qRrCk41U6amvVjBYzXk37npGLJI31EUz7/IbQ5MB4S2hfrWnkjwr0QfNWm1D9c2YOTWXeYIlO92z3LZWRjv2qSkSudsanEStINL2JNVdwy38pFVPKH0MroISUIZqCQmrLhXidmWOGntlDgAeQMjxjl9T11WFY/Qz2yqYoVgbl+EIoloNRLR3/LNRsOQBEcIRNV/hjwHb8NelsmPhuH6nJ0qN/ErADXnmDEtmVCjQoOsc5A5tuhd7HY0t28qdJXcf3gNoWc7HUdVvPOdTaQAZ755hg3aFn2nSgMOU8Ph0aWjiJWxdE9IaS4fG+UiSThHaKWoFKI+OVJRUMD1csRgIXo5bhAm6WcTSYyR+j36LZ0n9RhYcV1xVERYa9UL/RrbQT0vp9sWHKA5Ahsrzx/MQq13CuWkEh8duc26Td02soVPcnjB07dmehAfttEs9mzdHUEP3VkDZa6mrHOkXZVg/bbD2QuwK0PFymd12frXZVvi6V2C3PCGP57xnqPsYRfCAduKGuUE=
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"javascript.validate.enable": false
}
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Change Log

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [1.0.0] - 2017-06-05
## [1.0.0] - 2017-06-05
Loading

0 comments on commit f2b45c7

Please sign in to comment.