Skip to content

Commit 8192b48

Browse files
binodnepaliCopilot
andauthored
feat!: v2 registry-first Bikram Sambat picker (web + Expo) (#27)
* chore: remove deprecated configuration files and update project structure for v2.0.0 * chore: enhance documentation and scripts for Hamro Patro data management and update package configuration * chore: update Node.js version in workflows and package configuration to support Node 24 * chore(co-pilot): potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * chore(co-pilot): potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * chore(co-pilot): potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * chore(co-pilot): potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * chore(co-pilot): potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * chore(co-pilot): potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * chore(co-pilot): potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * chore(co-pilot): potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 810f9b6 commit 8192b48

201 files changed

Lines changed: 823050 additions & 28354 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.commitlintrc.js‎

Lines changed: 0 additions & 1 deletion
This file was deleted.

‎.eslintrc.cjs‎

Lines changed: 0 additions & 18 deletions
This file was deleted.

‎.github/workflows/docs.yml‎

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Deploy docs
2+
3+
on:
4+
push:
5+
branches: [main]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: pages
15+
cancel-in-progress: false
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
24+
- name: Setup pnpm
25+
uses: pnpm/action-setup@v4
26+
27+
- name: Setup Node.js
28+
uses: actions/setup-node@v4
29+
with:
30+
node-version: 24
31+
cache: pnpm
32+
33+
- name: Install dependencies
34+
run: pnpm install --frozen-lockfile
35+
36+
- name: Build registry JSON
37+
run: pnpm registry:build
38+
39+
- name: Build docs site
40+
run: pnpm --filter @react-nepali-datetime-picker/docs build
41+
42+
- name: Upload Pages artifact
43+
uses: actions/upload-pages-artifact@v3
44+
with:
45+
path: apps/docs/.vitepress/dist
46+
47+
deploy:
48+
runs-on: ubuntu-latest
49+
needs: build
50+
environment:
51+
name: github-pages
52+
url: ${{ steps.deployment.outputs.page_url }}
53+
steps:
54+
- name: Deploy to GitHub Pages
55+
id: deployment
56+
uses: actions/deploy-pages@v4
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name: Refresh calendar data
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
years:
7+
description: 'BS year range to scrape (e.g. 2080-2089)'
8+
required: true
9+
default: '2080-2089'
10+
open_pr:
11+
description: 'Open a pull request with updated data'
12+
type: boolean
13+
default: true
14+
15+
permissions:
16+
contents: write
17+
pull-requests: write
18+
19+
concurrency:
20+
group: refresh-calendar-data
21+
cancel-in-progress: false
22+
23+
jobs:
24+
refresh:
25+
runs-on: ubuntu-latest
26+
timeout-minutes: 90
27+
steps:
28+
- name: Checkout
29+
uses: actions/checkout@v4
30+
31+
- name: Setup pnpm
32+
uses: pnpm/action-setup@v4
33+
34+
- name: Setup Node.js
35+
uses: actions/setup-node@v4
36+
with:
37+
node-version: 24
38+
cache: pnpm
39+
40+
- name: Install dependencies
41+
run: pnpm install --frozen-lockfile
42+
43+
- name: Scrape Hamro Patro
44+
run: pnpm data:scrape -- --years ${{ inputs.years }}
45+
46+
- name: Build calendar dataset
47+
run: pnpm data:build
48+
49+
- name: Validate calendar data
50+
run: pnpm data:validate
51+
52+
- name: Run tests
53+
run: pnpm test
54+
55+
- name: Rebuild registry JSON
56+
run: pnpm registry:build
57+
58+
- name: Summarize changes
59+
run: |
60+
echo '### Calendar data diff' >> "$GITHUB_STEP_SUMMARY"
61+
git diff --stat packages/core/src/data/bs-calendar.json >> "$GITHUB_STEP_SUMMARY" || true
62+
echo '' >> "$GITHUB_STEP_SUMMARY"
63+
echo '### Registry diff' >> "$GITHUB_STEP_SUMMARY"
64+
git diff --stat apps/docs/public/r apps/docs/public/r-native >> "$GITHUB_STEP_SUMMARY" || true
65+
66+
- name: Create pull request
67+
if: inputs.open_pr && success()
68+
uses: peter-evans/create-pull-request@v7
69+
with:
70+
commit-message: 'chore(data): refresh Hamro Patro calendar (${{ inputs.years }})'
71+
title: 'chore(data): refresh Hamro Patro calendar (${{ inputs.years }})'
72+
body: |
73+
Automated calendar data refresh from Hamro Patro.
74+
75+
**Year range:** `${{ inputs.years }}`
76+
77+
## Checklist for reviewers
78+
79+
- [ ] Review `daysInMonth` changes in `packages/core/src/data/bs-calendar.json`
80+
- [ ] Spot-check a few BS↔AD dates against [Hamro Patro](https://english.hamropatro.com/)
81+
- [ ] `pnpm data:validate` and `pnpm test` passed in CI
82+
83+
Docs deploy is unchanged until this PR merges to `main`.
84+
branch: chore/calendar-data-${{ github.run_id }}
85+
delete-branch: true
86+
labels: |
87+
calendar-data

‎.github/workflows/release.yml‎

Lines changed: 0 additions & 68 deletions
This file was deleted.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Validate calendar data
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'packages/core/src/data/**'
7+
- 'apps/docs/public/r/**'
8+
- 'apps/docs/public/r-native/**'
9+
- 'scripts/scrape-hamropatro.mjs'
10+
- 'scripts/generate-legacy-data.mjs'
11+
- 'scripts/validate-calendar-data.mjs'
12+
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
validate:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
23+
- name: Setup pnpm
24+
uses: pnpm/action-setup@v4
25+
26+
- name: Setup Node.js
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: 24
30+
cache: pnpm
31+
32+
- name: Install dependencies
33+
run: pnpm install --frozen-lockfile
34+
35+
- name: Validate calendar data
36+
run: pnpm data:validate
37+
38+
- name: Run tests
39+
run: pnpm test

‎.gitignore‎

Lines changed: 19 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,25 @@
1-
# Logs
2-
logs
3-
*.log
4-
npm-debug.log*
5-
yarn-debug.log*
6-
yarn-error.log*
7-
pnpm-debug.log*
8-
lerna-debug.log*
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
92

3+
# dependencies
104
node_modules
5+
.pnpm-store
6+
7+
# build
118
dist
12-
dist-ssr
13-
*.local
14-
analyse.html
15-
package-lock.json
16-
yarn.lock
17-
burn.lock
9+
.turbo
10+
apps/docs/.vitepress/dist
11+
apps/docs/.vitepress/cache
12+
13+
# scrape cache
14+
.cache
1815

19-
# Editor directories and files
20-
.vscode/*
21-
!.vscode/extensions.json
22-
.idea
16+
# env
17+
.env
18+
.env.*
19+
20+
# IDE
2321
.DS_Store
24-
*.suo
25-
*.ntvs*
26-
*.njsproj
27-
*.sln
28-
*.sw?
22+
*.log
2923

30-
# ignore files
31-
today.md
24+
# legacy (removed in v2)
25+
# demo-site, doc-site, src/ are deleted — data lives in packages/core

‎.husky/commit-msg‎

Lines changed: 0 additions & 4 deletions
This file was deleted.

‎.husky/pre-commit‎

Lines changed: 0 additions & 4 deletions
This file was deleted.

‎.lintstagedrc.js‎

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)