Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/npm_and_yarn/semver-5.7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewDongminYoo authored Aug 20, 2023
2 parents 99e5d56 + 7078fc8 commit c48e30a
Show file tree
Hide file tree
Showing 108 changed files with 7,754 additions and 5,942 deletions.
2 changes: 0 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
max_line_length = 120
trim_trailing_whitespace = true

[*.bat]
Expand Down Expand Up @@ -129,7 +128,6 @@ indent_size = 4
insert_final_newline = false
tab_width = 4


[*.properties]
ij_properties_align_group_field_declarations = false
ij_properties_keep_blank_lines = false
Expand Down
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ module.exports = {
'jsdoc/implements-on-classes': 'warn', // Recommended
'jsdoc/match-description': 'off',
'jsdoc/multiline-blocks': 'warn', // Recommended
'jsdoc/newline-after-description': 'warn', // Recommended
// 'jsdoc/newline-after-description': 'warn', // Recommended
'jsdoc/no-bad-blocks': 'off',
'jsdoc/no-defaults': 'off',
'jsdoc/no-missing-syntax': 'off',
Expand Down
3 changes: 2 additions & 1 deletion .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ runs:
with:
path: |
**/node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
${{ runner.os }}-yarn-
- name: Install dependencies
Expand Down
105 changes: 104 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Run unit tests
run: yarn test --maxWorkers=2 --coverage

build:
build-library:
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -46,3 +46,106 @@ jobs:

- name: Build package
run: yarn prepack

build-android:
runs-on: ubuntu-latest
env:
TURBO_CACHE_DIR: .turbo/android
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup
uses: ./.github/actions/setup

- name: Cache turborepo for Android
uses: actions/cache@v3
with:
path: ${{ env.TURBO_CACHE_DIR }}
key: ${{ runner.os }}-turborepo-android-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-turborepo-android-
- 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")
if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then
echo "TURBO_CACHE_HIT=1" >> $GITHUB_ENV
fi
- name: Install JDK
if: ${{ env.TURBO_CACHE_HIT != 1 }}
uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 11

- name: Finalize Android SDK
if: ${{ env.TURBO_CACHE_HIT != 1 }}
run: |
/bin/bash -c "yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses > /dev/null"
- name: Cache Gradle
if: ${{ env.TURBO_CACHE_HIT != 1 }}
uses: actions/cache@v3
with:
path: |
~/.gradle/wrapper
~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('example/android/gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Build example for Android
run: |
yarn turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}"
build-ios:
runs-on: macos-latest
env:
TURBO_CACHE_DIR: .turbo/ios
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup
uses: ./.github/actions/setup

- name: Cache turborepo for iOS
uses: actions/cache@v3
with:
path: ${{ env.TURBO_CACHE_DIR }}
key: ${{ runner.os }}-turborepo-ios-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-turborepo-ios-
- 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")
if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then
echo "TURBO_CACHE_HIT=1" >> $GITHUB_ENV
fi
- name: Cache cocoapods
if: env.TURBO_CACHE_HIT != 1
id: cocoapods-cache
uses: actions/cache@v3
with:
path: |
**/ios/Pods
key: ${{ runner.os }}-cocoapods-${{ hashFiles('example/ios/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-cocoapods-
- name: Install cocoapods
if: ${{ env.TURBO_CACHE_HIT != 1 && steps.cocoapods-cache.outputs.cache-hit != 'true' }}
run: |
yarn example pods
env:
NO_FLIPPER: 1

- name: Build example for iOS
run: |
yarn turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}"
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ android/app/libs
android/keystores/debug.keystore
android/keystores/release.keystore

# TurboRepo
.turbo/

# generated by bob
lib/

Expand Down
2 changes: 1 addition & 1 deletion .jsdoc-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"highlightTutorialCode": true
},
"opts": {
"template": "./node_modules/postman-jsdoc-theme",
"template": "https://github.com/postmanlabs/postman-jsdoc-theme",
"encoding": "utf8",
"destination": "./docs",
"recurse": true,
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.14.1
v18
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"singleQuote": true,
"semi": true,
"quoteProps": "consistent",
"bracketSameLine": true,
"trailingComma": "es5",
"printWidth": 120,
"overrides": [
{
"files": ["**/*.ts", "**/*.tsx"],
Expand Down
1 change: 1 addition & 0 deletions .trunk/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
*logs
*actions
*notifications
*tools
plugins
user_trunk.yaml
user.yaml
4 changes: 2 additions & 2 deletions .trunk/configs/.shellcheckrc
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ disable=SC2034 # foo appears unused. Verify it or export it.
# disable=SC2109 # Instead of [ a || b ], use [ a ] || [ b ].
# disable=SC2110 # In [\[..]], use || instead of -o.
# disable=SC2112 # 'function' keyword is non-standard. Delete it.
# disable=SC2114 # Warning: deletes a system directory.
# disable=SC2114 # Warning: deletes a system directory.
# disable=SC2115 # Use "${var:?}" to ensure this never expands to /* .
# disable=SC2116 # SC2116 Useless echo? Instead of 'cmd $(echo foo)', just use 'cmd foo'.
# disable=SC2117 # To run commands as another user, use su -c or sudo.
Expand Down Expand Up @@ -350,4 +350,4 @@ disable=SC2250 # Prefer putting braces around variable references even when not
# disable=SC2261 # Multiple redirections compete for stdout. Use cat, tee, or pass filenames instead.
# disable=SC2262 # This alias can't be defined and used in the same parsing unit. Use a function instead.
disable=SC2292 # Prefer [[ ]] over [ ] for tests in Bash/Ksh.
disable=SC2312 # Consider invoking this command separately to avoid masking its return value (or use '|| true' to ignore).
disable=SC2312 # Consider invoking this command separately to avoid masking its return value (or use '|| true' to ignore).
26 changes: 13 additions & 13 deletions .trunk/trunk.yaml
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
version: 0.1
cli:
version: 1.7.0
version: 1.14.0
plugins:
sources:
- id: trunk
ref: v0.0.13
ref: v1.1.0
uri: https://github.com/trunk-io/plugins
lint:
disabled:
- ktlint
- oxipng
- shfmt
- ktlint # 0.50.0
- oxipng # 8.0.0
- shfmt # 3.6.0
- git-diff-check
- gitleaks
- gitleaks # 8.17.0
enabled:
- swiftformat@0.51.4
- swiftlint@0.51.0
- yamllint@1.30.0
- swiftformat@0.52.2
- swiftlint@0.52.4
- yamllint@1.32.0
- [email protected]
- markdownlint@0.33.0
- markdownlint@0.35.0
- [email protected]
- prettier@2.8.7
- eslint@8.37.0
- [email protected].24
- prettier@3.0.2
- eslint@8.47.0
- [email protected].25
ignore:
- linters:
- shellcheck
Expand Down
19 changes: 1 addition & 18 deletions .watchmanconfig
Original file line number Diff line number Diff line change
@@ -1,18 +1 @@
{
"version": "2023.01.23.00",
"fsevents_latency": 0.05,
"gc_age_seconds": 3600,
"gc_interval_seconds": 7200,
"hint_num_dirs": 218537089,
"hint_num_files_per_dir": 64,
"idle_reap_age_seconds": 86400,
"ignore_dirs": [
"node_modules",
"build",
"lib",
".idea"
],
"ignore_vcs": [
".git"
]
}
{}
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
# Changelog

## [0.2.0](https://github.com/AndrewDongminYoo/react-native-step-counter/compare/v0.1.16...v0.2.0) (2023-08-20)

### Features

- upgrade react-native-reanimated from 2.17.0 to 3.2.0 ([#23](https://github.com/AndrewDongminYoo/react-native-step-counter/issues/23)) ([31aa2c8](https://github.com/AndrewDongminYoo/react-native-step-counter/commit/31aa2c874046cad9854a04e1046e6885f2117248))

### Bug Fixes

- 🎨 redefine of namespace `StepCounter` ([b8931ea](https://github.com/AndrewDongminYoo/react-native-step-counter/commit/b8931eacdca6be176d16874c69fe39059d154a03))
- 🚚 modified Android Code and Some Namespaces ([5dcfa6d](https://github.com/AndrewDongminYoo/react-native-step-counter/commit/5dcfa6da7dd64399b15c647f36cae9bdd32b16a6))
- 🚨 updated eslint, editorconfig, git, prettier, nvm, watchman, commitlint, ts ([a0a2bfb](https://github.com/AndrewDongminYoo/react-native-step-counter/commit/a0a2bfbe986dce754d0c64ccf80c5604d3446300))
- upgrade react-native from 0.71.6 to 0.71.7 ([531f12c](https://github.com/AndrewDongminYoo/react-native-step-counter/commit/531f12ccad8422cb229d6b04137392271bae0c45))
- upgrade react-native-gesture-handler from 2.10.2 to 2.11.0 ([27b5a5e](https://github.com/AndrewDongminYoo/react-native-step-counter/commit/27b5a5e11f8b615abbcd4c0e694076bab90ee9c8))
- upgrade react-native-gesture-handler from 2.9.0 to 2.10.0 ([e66302e](https://github.com/AndrewDongminYoo/react-native-step-counter/commit/e66302e67f94d21056715cc846765be2cd0a6bbc))
- upgrade react-native-reanimated from 2.15.0 to 2.16.0 ([07283ba](https://github.com/AndrewDongminYoo/react-native-step-counter/commit/07283ba094ac3e37f2477f6f34380407280972ec))

### Performance Improvements

- ⚡️ updated iOS example application configuration ([81561af](https://github.com/AndrewDongminYoo/react-native-step-counter/commit/81561af56c0ba56ee8ccf5795fc76c8600b02219))

### Documentation

- 📝 reformatted jsdoc generated api-document ([4d52438](https://github.com/AndrewDongminYoo/react-native-step-counter/commit/4d52438651c637134b6ce2da5649fa7db949bd2d))
- **example:** 📝 jsdoc-theme updated ([f7196b6](https://github.com/AndrewDongminYoo/react-native-step-counter/commit/f7196b624bda9ea1e6fc8ad020aab87bec4c5d88))

## [0.1.16](https://github.com/AndrewDongminYoo/react-native-step-counter/compare/v0.1.14...v0.1.16) (2023-04-11)

## [0.1.15](https://github.com/AndrewDongminYoo/react-native-step-counter/compare/v0.1.14...v0.1.15) (2023-04-08)
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ 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 > RNStepCounter`.
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 `RNStepCounter` under `Android`.
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

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

한국어 사용자는 [Korean version.](README.kr.md)를 참조하십시오.

A simple React Native package to count the number of steps taken by the user. This package uses the `StepCounter` (or Custom accelerometer-based step-counter) Sensor API on Android and the `Core Motion` framework on iOS to count the steps. It's built using Turbo Module, a new module development architecture for React Native. I made this library compatible with both new and legacy architectures. (Because the turbo module is still in the experimental stage. so it is not widely used.)
This library provides an interface for tracking the number of steps taken by the user in a React Native app. This package uses the `StepCounter` (or Custom accelerometer-based step-counter) Sensor API on Android and the `Core Motion` framework on iOS to count the steps. It's built using Turbo Module, a new module development architecture for React Native. I made this library compatible with both new and legacy architectures. (Because the turbo module is still in the experimental stage. so it is not widely used.)

## Installation

Expand Down
Loading

0 comments on commit c48e30a

Please sign in to comment.