Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CI for unused dependencies #3372

Draft
wants to merge 27 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
b4fc7fe
update yarn.lock
latekvo Feb 3, 2025
80599ae
remove unnecessary expo devDep in root
latekvo Feb 3, 2025
63bbdc8
remove expo-font package
latekvo Feb 3, 2025
012739f
remove patch-package
latekvo Feb 3, 2025
acb85da
remove react test renderer
latekvo Feb 3, 2025
4339951
remove community CLI
latekvo Feb 3, 2025
01a1f32
remove invariant
latekvo Feb 3, 2025
f49aa7f
remove jest from basic example app
latekvo Feb 3, 2025
a44b5ad
remove unnecessary metro deps
latekvo Feb 3, 2025
ee358cf
remove missed jest references
latekvo Feb 3, 2025
4cd575a
remove unused react native function and component deps
latekvo Feb 3, 2025
55bd7df
Revert "remove expo-font package"
latekvo Feb 4, 2025
b462665
add prettier eslint plugin
latekvo Feb 4, 2025
a653db0
removed unused react-dom instances
latekvo Feb 4, 2025
d51d73a
add react-dom to docs
latekvo Feb 4, 2025
2af40df
(amend) update docs/react-dom to prior version
latekvo Feb 4, 2025
8730184
remove paper CI workflow
latekvo Feb 6, 2025
a5e0d19
Revert "(amend) update docs/react-dom to prior version"
latekvo Feb 6, 2025
4a2c291
remove last unnecessary deps from common example app
latekvo Feb 10, 2025
d4a0eda
add depcheck config for root and common example app
latekvo Feb 10, 2025
7eb6639
add depcheck CI
latekvo Feb 10, 2025
7303e65
Merge branch 'main' into @latekvo/clean-project-packages
latekvo Feb 10, 2025
e0378ae
remove unused FabricExample packages
latekvo Feb 12, 2025
3625f83
remove redundant types from FabricExample
latekvo Feb 12, 2025
dfe0473
fix workflow
latekvo Feb 12, 2025
fdc6b9e
remove overpedantic workflow path observation
latekvo Feb 12, 2025
936aed5
fix bumped docs react dom version
latekvo Feb 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .depcheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ignores: ["eslint-plugin-prettier"]
skip-missing: true
quiet: true
33 changes: 0 additions & 33 deletions .github/workflows/check-archs-consistency.yml

This file was deleted.

41 changes: 41 additions & 0 deletions .github/workflows/depcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Dependency Check
on:
pull_request:
paths:
- 'example/*'
- 'FabricExample/*'
- 'MacOSExample/*'
- 'docs/*'
- 'e2e/*'
- '**/*.{js,ts,tsx,json,md,mdx}'
push:
branches:
- main
workflow_dispatch:
jobs:
depcheck:
if: github.repository == 'software-mansion/react-native-gesture-handler'
runs-on: ubuntu-latest
strategy:
matrix:
working-directory: ['', example, FabricExample, MacOSExample, docs, e2e]
concurrency:
group: depcheck-${{ matrix.working-directory }}-${{ github.ref }}
cancel-in-progress: false
steps:
- name: checkout
uses: actions/checkout@v4
- name: Use Node.js 18
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'yarn'
- name: Install node dependencies
working-directory: ${{ matrix.working-directory }}
run: yarn
- name: Install depcheck
working-directory: ${{ matrix.working-directory }}
run: npm install -g [email protected]
- name: Run dependency check
working-directory: ${{ matrix.working-directory }}
run: npx depcheck
6 changes: 1 addition & 5 deletions FabricExample/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,9 @@
"test": "jest",
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
"ts-check": "yarn tsc --noEmit",
"lint-check": "yarn eslint src/ && yarn prettier --check src/",
"postinstall": "patch-package"
"lint-check": "yarn eslint src/ && yarn prettier --check src/"
},
"dependencies": {
"patch-package": "^6.5.0",
"postinstall-postinstall": "^2.1.0",
"react": "18.3.1",
"react-native": "0.77.0",
"react-native-gesture-handler": "link:../"
Expand All @@ -30,7 +27,6 @@
"@react-native/eslint-config": "0.77.0",
"@react-native/metro-config": "0.77.0",
"@react-native/typescript-config": "0.77.0",
"@types/jest": "^29.5.13",
"@types/react": "^18.2.6",
"@types/react-test-renderer": "^18.0.0",
"eslint": "^8.19.0",
Expand Down
Loading
Loading