Skip to content

Commit

Permalink
feat: RNReanimated v2 (#29)
Browse files Browse the repository at this point in the history
* feat: RNReanimated v2

BREAKING CHANGE: drop reanimated v1

* chore(ci): setup GitHub Actions
  • Loading branch information
ken0x0a authored Nov 11, 2022
1 parent 70e80f7 commit 511db88
Show file tree
Hide file tree
Showing 14 changed files with 6,630 additions and 7,025 deletions.
104 changes: 0 additions & 104 deletions .circleci/config.yml

This file was deleted.

17 changes: 5 additions & 12 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
module.exports = {
extends: ['@ken0x0a/eslint-config'],
extends: ["@ken0x0a/eslint-config"],
rules: {
'@typescript-eslint/camelcase': [
'error',
/**
* - m: minus
* - p: plus
* - d: divide
* - t: times (multiply)
*/
{ allow: ['^UNSAFE_', '_m\\d+$', '_p\\d+$', '_d\\d+$', '_t\\d+$'] },
],
camelcase: 0,
"react/require-default-props": 0,
"@typescript-eslint/naming-convention": 0,
},
}
};
59 changes: 59 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: PR Check

on:
pull_request:
types: [opened, synchronize, reopened]
branches: [main]

jobs:
typecheck:
name: Type check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Type Check
run: yarn run type-check

lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Lint
run: yarn run lint
93 changes: 93 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: Publish

on:
push:
branches: [main]

jobs:
typecheck:
name: Type check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Type Check
run: yarn run type-check

lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Lint
run: yarn run lint

release:
name: Release
needs:
- typecheck
- lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.GH_TOKEN }}
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Release (semantic release)
run: npx semantic-release
env: # https://help.github.com/en/articles/workflow-syntax-for-github-actions#jobsjob_idstepsenv
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26 changes: 14 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,24 @@
"peerDependencies": {
"react": "*",
"react-native": "*",
"react-native-reanimated": "^1.4.0"
"react-native-reanimated": ">2.0.0"
},
"dependencies": {
"react-native-reanimated-hooks": "^2.0.0"
"react-native-reanimated-hooks": "^3.0.0"
},
"devDependencies": {
"@ken0x0a/configs": "2.5.27",
"@ken0x0a/eslint-config-react-deps": "6.1.7",
"@react-native-community/bob": "0.7.0",
"@types/react": "16.9.16",
"@types/react-native": "0.60.25",
"react": "16.9.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-36.0.0.tar.gz",
"react-native-reanimated": "^1.4.0",
"semantic-release": "^15.13.31",
"typescript": "3.7.3"
"@ken0x0a/configs": "^2.8.3",
"@ken0x0a/eslint-config-react-deps": "^6.3.1",
"@react-native-community/bob": "0.17.1",
"@semantic-release/changelog": "^6.0.1",
"@semantic-release/git": "^10.0.1",
"@types/react": "^18.0.25",
"@types/react-native": "0.70",
"react": "18.1.0",
"react-native": "0.70.5",
"react-native-reanimated": "^2.12.0",
"semantic-release": "^19.0.5",
"typescript": "4.8.4"
},
"@react-native-community/bob": {
"source": "src",
Expand Down
13 changes: 13 additions & 0 deletions release.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = {
branches: ["main"],
// https://github.com/semantic-release/semantic-release/blob/master/docs/usage/plugins.md
// https://github.com/semantic-release/semantic-release/blob/master/docs/extending/plugins-list.md
plugins: [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
"@semantic-release/npm",
"@semantic-release/github",
"@semantic-release/git",
],
};
Loading

0 comments on commit 511db88

Please sign in to comment.