diff --git a/.github/workflows/code-deploy-producition-quick.yml b/.github/workflows/code-deploy-producition-quick.yml new file mode 100644 index 000000000..7ba72d508 --- /dev/null +++ b/.github/workflows/code-deploy-producition-quick.yml @@ -0,0 +1,47 @@ +name: '[CODE] Deploy production website (new data only)' + +on: + push: + branches: [main] + paths: + - react-native-libraries.json + +jobs: + detect_changes: + runs-on: ubuntu-latest + outputs: + data_changed: ${{ steps.filter.outputs.data_changed }} + other_changed: ${{ steps.filter.outputs.other_changed }} + steps: + - uses: actions/checkout@v6 + - id: filter + name: Detect changed paths + uses: dorny/paths-filter@v3 + with: + filters: | + data_changed: + - 'react-native-libraries.json' + other_changed: + - '**' + - '!react-native-libraries.json' + + build: + needs: detect_changes + if: ${{ needs.detect_changes.outputs.data_changed == 'true' && needs.detect_changes.outputs.other_changed != 'true' }} + runs-on: ubuntu-latest + environment: + name: production + url: https://reactnative.directory + steps: + - uses: actions/checkout@v6 + - name: Use Bun + uses: oven-sh/setup-bun@v2 + - name: Deploy + shell: bash + run: bunx vercel --force --token "$VERCEL_TOKEN" --prod --local-config /vercel-quick.json + env: + VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} + BLOB_READ_WRITE_TOKEN: ${{ secrets.BLOB_READ_WRITE_TOKEN }} + # https://spectrum.chat/zeit/now/solved-project-linking-and-ci-cd-pipelines~5e6eb62a-9d56-47ac-9e32-0d973a523787 + VERCEL_ORG_ID: 'team_IsLEAhLb9cZj6y1Bud9XYmeK' + VERCEL_PROJECT_ID: 'QmecQ8hTu4DUHv6js5U8L9pJ9vp54mg1bmRLWaS5RZCyt4' diff --git a/.github/workflows/vercel-cleanup-data-blobs.yml b/.github/workflows/vercel-cleanup-data-blobs.yml index e783af695..00233d56b 100644 --- a/.github/workflows/vercel-cleanup-data-blobs.yml +++ b/.github/workflows/vercel-cleanup-data-blobs.yml @@ -4,8 +4,8 @@ on: push: branches: [main] schedule: - # Run once a week on Thursday at midnight - https://crontab.guru/#0_0_*_*_2 - - cron: '0 0 * * 2' + # Run three time a week on Tuesday, Thursday, and Saturday at midnight - https://crontab.guru/#0 0 * * 2,4,6 + - cron: '0 0 * * 2,4,6' jobs: build: diff --git a/assets/check-data.json b/assets/check-data.json index 1871cd0dd..d0c67251e 100644 --- a/assets/check-data.json +++ b/assets/check-data.json @@ -7688,5 +7688,11 @@ }, "@getlimelight/sdk": { "newArchitecture": "untested" + }, + "react-native-litert-lm": { + "newArchitecture": "new-arch-only" + }, + "@thatkid02/react-native-pdf-viewer": { + "newArchitecture": "supported" } } \ No newline at end of file diff --git a/assets/data.json b/assets/data.json index e5db64d35..fed61fd8e 100644 --- a/assets/data.json +++ b/assets/data.json @@ -179300,13 +179300,164 @@ ], "popularity": 0.046, "topicSearchString": "node debugging devtools graphql network-inspector console-logs debugging-tool debugger node-debugger expo typescript" + }, + { + "githubUrl": "https://github.com/hung-yueh/react-native-litert-lm", + "npmPkg": "react-native-litert-lm", + "android": true, + "ios": true, + "newArchitecture": "new-arch-only", + "github": { + "urls": { + "repo": "https://github.com/hung-yueh/react-native-litert-lm", + "homepage": "https://github.com/hung-yueh/react-native-litert-lm#readme" + }, + "stats": { + "hasIssues": true, + "hasWiki": true, + "hasSponsorships": false, + "hasDiscussions": false, + "hasProjects": true, + "hasVulnerabilityAlerts": false, + "hasTopics": true, + "updatedAt": "2026-02-03T00:44:23Z", + "createdAt": "2026-01-21T19:08:42Z", + "pushedAt": "2026-02-03T00:44:23Z", + "forks": 0, + "issues": 0, + "subscribers": 0, + "stars": 0, + "dependencies": 1 + }, + "name": "react-native-litert-lm", + "fullName": "hung-yueh/react-native-litert-lm", + "isPrivate": false, + "description": "High-performance LLM inference for React Native using LiteRT-LM. Optimized for Gemma 3n and other on-device language models.", + "topics": [ + "nitro", + "litert", + "litert-lm", + "llm", + "gemma", + "gemma-3n", + "ai", + "machine-learning", + "on-device", + "inference", + "expo" + ], + "license": { + "key": "mit", + "name": "MIT License", + "spdxId": "MIT", + "url": "http://choosealicense.com/licenses/mit/", + "id": "MDc6TGljZW5zZTEz" + }, + "hasTypes": true, + "newArchitecture": false, + "isArchived": false, + "hasReadme": true, + "hasNativeCode": true, + "configPlugin": false, + "moduleType": "nitro" + }, + "npm": { + "downloads": 212, + "weekDownloads": 0, + "size": 426887, + "versionsCount": 3, + "latestRelease": "0.2.0", + "latestReleaseDate": "2026-02-03T00:44:21.714Z", + "hasReadme": true + }, + "score": 25, + "matchingScoreModifiers": [ + "Recently updated", + "Has a README file", + "Has a description" + ], + "popularity": -1, + "topicSearchString": "nitro litert litert-lm llm gemma gemma-3n ai machine-learning on-device inference expo" + }, + { + "githubUrl": "https://github.com/thatkid02/react-native-pdf-viewer", + "npmPkg": "@thatkid02/react-native-pdf-viewer", + "examples": [ + "https://github.com/thatkid02/react-native-pdf-viewer/tree/main/example" + ], + "ios": true, + "android": true, + "newArchitecture": true, + "github": { + "urls": { + "repo": "https://github.com/thatkid02/react-native-pdf-viewer", + "homepage": "https://github.com/thatkid02/react-native-pdf-viewer#readme" + }, + "stats": { + "hasIssues": true, + "hasWiki": true, + "hasSponsorships": false, + "hasDiscussions": false, + "hasProjects": true, + "hasVulnerabilityAlerts": false, + "hasTopics": true, + "updatedAt": "2026-02-03T05:27:43Z", + "createdAt": "2026-02-01T15:04:52Z", + "pushedAt": "2026-02-03T05:27:43Z", + "forks": 0, + "issues": 0, + "subscribers": 0, + "stars": 0, + "dependencies": 0 + }, + "name": "@thatkid02/react-native-pdf-viewer", + "fullName": "thatkid02/react-native-pdf-viewer", + "isPrivate": false, + "registry": "https://registry.npmjs.org/", + "description": "Simple pdf viewer for ios(using PdfKit) and android(PdfRenderer) with thumbnails generation", + "topics": [ + "ios", + "android" + ], + "license": { + "key": "mit", + "name": "MIT License", + "spdxId": "MIT", + "url": "http://choosealicense.com/licenses/mit/", + "id": "MDc6TGljZW5zZTEz" + }, + "hasTypes": true, + "newArchitecture": false, + "isArchived": false, + "hasReadme": true, + "hasNativeCode": true, + "configPlugin": false, + "moduleType": "nitro" + }, + "npm": { + "downloads": 109, + "weekDownloads": 0, + "size": 325052, + "versionsCount": 2, + "latestRelease": "0.0.2", + "latestReleaseDate": "2026-02-03T05:19:17.389Z", + "hasReadme": true + }, + "score": 25, + "matchingScoreModifiers": [ + "Recently updated", + "Has a README file", + "Has a description" + ], + "popularity": -1, + "topicSearchString": "ios android" } ], "topics": { - "ios": 1114, - "android": 1087, + "ios": 1115, + "android": 1088, "component": 382, - "expo": 370, + "expo": 371, "typescript": 167, "javascript": 105, "web": 94, @@ -179319,8 +179470,8 @@ "library": 55, "picker": 54, "navigation": 47, + "nitro": 43, "modal": 42, - "nitro": 42, "svg": 37, "video": 36, "module": 35, @@ -179365,9 +179516,9 @@ "new-architecture": 18, "notification": 18, "popup": 18, + "ai": 17, "gesture-handler": 17, "loading": 17, - "ai": 16, "carousel": 16, "chart": 16, "css": 16, @@ -179451,6 +179602,7 @@ "font": 10, "fs": 10, "google": 10, + "llm": 10, "media": 10, "pinch": 10, "popover": 10, @@ -179476,7 +179628,6 @@ "html": 9, "images": 9, "immutable": 9, - "llm": 9, "music": 9, "node": 9, "opengl": 9, @@ -180015,6 +180166,7 @@ "local-network": 3, "localstorage": 3, "logger": 3, + "machine-learning": 3, "maestro": 3, "magnetometer": 3, "management": 3, @@ -180426,6 +180578,7 @@ "in-app-updates": 2, "in-view": 2, "inapp": 2, + "inference": 2, "info": 2, "initials": 2, "inner-shadow": 2, @@ -180476,7 +180629,6 @@ "lock-screen": 2, "lodash": 2, "lottie-splash-screen": 2, - "machine-learning": 2, "mail": 2, "mansonry": 2, "mapbox-gl": 2, @@ -180543,6 +180695,7 @@ "offlinefirst": 2, "oidc": 2, "old-architecture": 2, + "on-device": 2, "one-tap-signin": 2, "one-time-code": 2, "onesignal-notifications": 2, @@ -182118,6 +182271,8 @@ "gcdhttpserver": 1, "gdpr": 1, "gemini": 1, + "gemma": 1, + "gemma-3n": 1, "generate": 1, "generate-qr": 1, "generating-barcodes": 1, @@ -182399,7 +182554,6 @@ "indicators": 1, "indoor-maps": 1, "indoor-positioning": 1, - "inference": 1, "infinite-picker": 1, "infinite-scroll-picker": 1, "infinite-scroll-wheel-picker": 1, @@ -182620,6 +182774,8 @@ "list-box": 1, "listitem": 1, "lite": 1, + "litert": 1, + "litert-lm": 1, "live-data": 1, "live-markdown": 1, "livekit": 1, @@ -182989,7 +183145,6 @@ "okhttp": 1, "okta": 1, "on-demand": 1, - "on-device": 1, "on-device-inference": 1, "on-device-llm": 1, "on-device-ml": 1, diff --git a/package.json b/package.json index d1d1512ba..0cec2d8d5 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "scripts": { "start": "next dev --webpack", "build": "bun data:update && bun llms:generate && next build --webpack", + "build:quick": "bun data:update-missing --missing-only && bun llms:generate && next build --webpack", "preview": "next build --webpack && next start", "lint": "oxlint --type-aware && oxfmt --check", "lint:fix": "oxlint --type-aware --fix && oxfmt", diff --git a/scripts/build-and-score-data.ts b/scripts/build-and-score-data.ts index 37f82d598..f219f47d2 100644 --- a/scripts/build-and-score-data.ts +++ b/scripts/build-and-score-data.ts @@ -211,11 +211,11 @@ async function buildAndScoreData() { } return library; }), - topics, + topics: sortTopics(topicCounts), } : { libraries: newDataEntry ? [...libraries, newDataEntry] : libraries, - topics, + topics: sortTopics(topicCounts), }; fileContent = JSON.stringify(content, null, 2); diff --git a/scripts/calculate-score.ts b/scripts/calculate-score.ts index 542158c29..e88df344e 100644 --- a/scripts/calculate-score.ts +++ b/scripts/calculate-score.ts @@ -38,9 +38,6 @@ const MIN_GITHUB_STARS = 25; const DATE_NOW = Date.now(); const WEEK_IN_MS = 6048e5; -console.log('Min score:', MIN_SCORE); -console.log('Max score:', MAX_SCORE); - export function calculatePopularityScore(data: LibraryType) { if (!data?.npm || !data.npm?.downloads || !data.npm?.weekDownloads) { return { diff --git a/scripts/recalculate-scores.ts b/scripts/recalculate-scores.ts index b7158a7a1..770b5a873 100644 --- a/scripts/recalculate-scores.ts +++ b/scripts/recalculate-scores.ts @@ -2,6 +2,7 @@ import fs from 'node:fs'; import path from 'node:path'; import { type DataAssetType } from '~/types'; +import { MAX_SCORE, MIN_SCORE } from '~/util/scoring'; import data from '../assets/data.json'; @@ -11,6 +12,9 @@ const LIBRARIES_JSON_PATH = path.join('assets', 'data.json'); console.log('🧮 Recalculating popularity and directory scores'); +console.log('Min score:', MIN_SCORE); +console.log('Max score:', MAX_SCORE); + const { libraries, ...rest } = data as DataAssetType; const processedLibraries = libraries .map(lib => calculatePopularityScore(lib)) diff --git a/vercel-quick.json b/vercel-quick.json new file mode 100644 index 000000000..7d79e8e1f --- /dev/null +++ b/vercel-quick.json @@ -0,0 +1,9 @@ +{ + "$schema": "https://openapi.vercel.sh/vercel.json", + "buildCommand": "bun build:quick", + "build": { + "env": { + "GITHUB_TOKEN": "@github_token" + } + } +} diff --git a/vercel.json b/vercel.json index 294b5145d..3f652d323 100644 --- a/vercel.json +++ b/vercel.json @@ -1,4 +1,5 @@ { + "$schema": "https://openapi.vercel.sh/vercel.json", "build": { "env": { "GITHUB_TOKEN": "@github_token"