Skip to content

Commit

Permalink
Merge branch 'fix/backward'
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewDongminYoo committed Oct 14, 2023
2 parents 1030b12 + 2565018 commit b5c3b09
Show file tree
Hide file tree
Showing 57 changed files with 15,682 additions and 17,319 deletions.
5 changes: 2 additions & 3 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,13 @@ runs:
with:
path: |
**/node_modules
.yarn/install-state.gz
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
${{ runner.os }}-yarn-
- name: Install dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: |
yarn install --cwd example --frozen-lockfile
yarn install --frozen-lockfile
run: yarn install --immutable
shell: bash
8 changes: 5 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
name: CI

permissions: read-all
on:
push:
branches:
Expand Down Expand Up @@ -69,7 +71,7 @@ jobs:
- name: Check turborepo cache for Android
run: |
TURBO_CACHE_STATUS=$(node -p "($(yarn --silent turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'build:android').cache.status")
TURBO_CACHE_STATUS=$(node -p "($(yarn turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'build:android').cache.status")
if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then
echo "TURBO_CACHE_HIT=1" >> $GITHUB_ENV
Expand Down Expand Up @@ -124,7 +126,7 @@ jobs:
- name: Check turborepo cache for iOS
run: |
TURBO_CACHE_STATUS=$(node -p "($(yarn --silent turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'build:ios').cache.status")
TURBO_CACHE_STATUS=$(node -p "($(yarn turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'build:ios').cache.status")
if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then
echo "TURBO_CACHE_HIT=1" >> $GITHUB_ENV
Expand All @@ -144,7 +146,7 @@ jobs:
- name: Install cocoapods
if: env.TURBO_CACHE_HIT != 1 && steps.cocoapods-cache.outputs.cache-hit != 'true'
run: |
yarn example pods
yarn pod-install example/ios
env:
NO_FLIPPER: 1

Expand Down
40 changes: 18 additions & 22 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
# OSX
#
.DS_Store

# Expo
# XDE
.expo/

# VSCode
.vscode/
jsconfig.json

# Firebase
**/google-services.json
**/GoogleService-Info.plist

# Xcode
#
build/
*.pbxuser
!default.pbxuser
Expand All @@ -27,56 +25,54 @@ xcuserdata
*.moved-aside
DerivedData
*.hmap
**/*.ipa
*.ipa
*.xcuserstate
project.xcworkspace

# Android/IJ
#
.classpath
.cxx
.gradle
.idea
.project
.cproject
.settings
local.properties
secrets.properties
android.iml
**/*.aab
**/*.apk

# CocoaPods
#
example/ios/Pods

# Ruby
example/vendor/

# node.js
#
node_modules/
npm-debug.log
yarn-debug.log
yarn-error.log
*.log

# BUCK
buck-out/
\.buckd/
android/app/libs
android/keystores/debug.keystore
android/keystores/release.keystore

# Yarn
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

# Expo
.expo/

# TurboRepo
.turbo/

# generated by bob
lib/

# Bundle artifact
*.jsbundle

# Environment
.env
xcode.env
.dccache

.wakatime-project
13 changes: 0 additions & 13 deletions .gitlab-ci.yml

This file was deleted.

1 change: 0 additions & 1 deletion .node-version

This file was deleted.

1 change: 0 additions & 1 deletion .ruby-version

This file was deleted.

30 changes: 21 additions & 9 deletions .trunk/trunk.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
version: 0.1
cli:
version: 1.14.0
version: 1.17.0
plugins:
sources:
- id: trunk
ref: v1.1.0
ref: v1.2.1
uri: https://github.com/trunk-io/plugins
lint:
disabled:
Expand All @@ -14,15 +14,19 @@ lint:
- git-diff-check
- gitleaks # 8.17.0
enabled:
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- markdownlint@0.35.0
- markdownlint@0.37.0
- [email protected]
- [email protected].2
- eslint@8.47.0
- [email protected].25
- [email protected].3
- eslint@8.51.0
- [email protected].26
ignore:
- linters:
- shellcheck
Expand All @@ -35,11 +39,19 @@ lint:
- '**/package-lock.json'
- '**/yarn.lock'
- '**/vendor/**'
- linters:
- checkov
- osv-scanner
- trivy
- trufflehog
paths:
- yarn.lock
- '**/releases/yarn-3.6.1.cjs'
runtimes:
enabled:
- [email protected]
- [email protected]
- java@11.0.13
- java@13.0.11
- [email protected]
actions:
enabled:
Expand Down
541 changes: 541 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

Large diffs are not rendered by default.

28 changes: 28 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs

Large diffs are not rendered by default.

874 changes: 874 additions & 0 deletions .yarn/releases/yarn-3.6.1.cjs

Large diffs are not rendered by default.

41 changes: 0 additions & 41 deletions .yarnclean

This file was deleted.

3 changes: 0 additions & 3 deletions .yarnrc

This file was deleted.

11 changes: 11 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
nodeLinker: node-modules
nmHoistingLimits: workspaces

plugins:
- path: scripts/pod-install.cjs
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
spec: "@yarnpkg/plugin-workspace-tools"

yarnPath: .yarn/releases/yarn-3.6.1.cjs
25 changes: 17 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,28 @@ We want this community to be friendly and respectful to each other. Please follo

## Development workflow

This project is a monorepo managed using [Yarn workspaces](https://yarnpkg.com/features/workspaces). It contains the following packages:

- The library package in the root directory.
- An example app in the `example/` directory.

To get started with the project, run `yarn` in the root directory to install the required dependencies for each package:

```sh
yarn
```

> While it's possible to use [`npm`](https://github.com/npm/cli), the tooling is built around [`yarn`](https://classic.yarnpkg.com/), so you'll have an easier time if you use `yarn` for development.
> Since the project relies on Yarn workspaces, you cannot use [`npm`](https://github.com/npm/cli) for development.
The [example app](/example/) demonstrates usage of the library. You need to run it to test any changes you make.

It is configured to use the local version of the library, so any changes you make to the library's source code will be reflected in the example app. Changes to the library's JavaScript code will be reflected in the example app without a rebuild, but native code changes will require a rebuild of the example app.

If you want to use Android Studio or XCode to edit the native code, you can open the `example/android` or `example/ios` directories respectively in those editors. To edit the Objective-C or Swift files, open `example/ios/StepCounterExample.xcworkspace` in XCode and find the source files at `Pods > Development Pods > react-native-step-counter`.

While developing, you can run the [example app](/example/) to test your changes. Any changes you make in your library's JavaScript code will be reflected in the example app without a rebuild. If you change any native code, then you'll need to rebuild the example app.
To edit the Java or Kotlin files, open `example/android` in Android studio and find the source files at `react-native-step-counter` under `Android`.

You can use various commands from the root directory to work with the project.

To start the packager:

Expand Down Expand Up @@ -45,7 +58,7 @@ By default, the example is configured to build with the old architecture. To run
2. For iOS, run:

```sh
RCT_NEW_ARCH_ENABLED=1 yarn example pods
RCT_NEW_ARCH_ENABLED=1 yarn pod-install example/ios
yarn example ios
```

Expand Down Expand Up @@ -82,10 +95,6 @@ Remember to add tests for your change if possible. Run the unit tests by:
yarn test
```

To edit the Objective-C or Swift files, open `example/ios/StepCounterExample.xcworkspace` in XCode and find the source files at `Pods > Development Pods > react-native-step-counter`.

To edit the Java or Kotlin files, open `example/android` in Android studio and find the source files at `react-native-step-counter` under `Android`.

### Commit message convention

We follow the [conventional commits specification](https://www.conventionalcommits.org/en) for our commit messages:
Expand Down Expand Up @@ -121,7 +130,7 @@ yarn release

The `package.json` file contains various scripts for common tasks:

- `yarn bootstrap`: setup project by installing all dependencies and pods.
- `yarn`: setup project by installing dependencies and pods - run with `POD_INSTALL=0` to skip installing pods.
- `yarn typecheck`: type-check files with TypeScript.
- `yarn lint`: lint files with ESLint.
- `yarn test`: run unit tests with Jest.
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MIT License

Copyright (c) 2023 Dongmin,Yoo
Copyright (c) 2023 Dongmin, Yu
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
Expand Down
Loading

0 comments on commit b5c3b09

Please sign in to comment.