-
Notifications
You must be signed in to change notification settings - Fork 38
Release/2.0.22 #2263
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
Merged
Merged
Release/2.0.22 #2263
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
13b1fe6
move search bar outside the largetitle header
Isthisanmol f90d6c4
Update apps/expo/features/catalog/screens/CatalogItemsScreen.tsx
Isthisanmol 14e62bc
revert the files and wrap listheader with tab screen
Isthisanmol 3761317
wrap listheader with tabscreen
Isthisanmol d782930
📝 docs: clarify NATIVEWIND token must be exported before bun install
andrew-bierman 3a555b9
📝 docs: prefer .env.local over shell export for NATIVEWIND token
andrew-bierman 3105e69
Merge pull request #2225 from PackRat-AI/docs/nativewind-token-setup
andrew-bierman 34c4f3f
Fix/Header-title-missing
Isthisanmol 2434f50
Merge pull request #2227 from PackRat-AI/main
mikib0 5428fb2
handle nullable packId and ensure trip dates render immediately
Isthisanmol 1529a39
fix/trip-form-issues
Isthisanmol 06e48dd
fix(expo): consistent fixed search bar in tab screens
mikib0 8e713ce
Merge pull request #2261 from PackRat-AI:fix/fixed-searchbar-tab-screens
mikib0 63fec7d
fix(expo): #2256 broken search UI layout
mikib0 c87bc8f
Merge pull request #2262 from PackRat-AI/fix/2256-broken-search-ui-la…
mikib0 53df809
chore: bump version to v2.0.22
mikib0 92722e8
chore: update bun lockfile
mikib0 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,77 +1,71 @@ | ||
| #!/usr/bin/env bun | ||
|
|
||
| /** | ||
| * Configure dependencies for installation | ||
| * Verify that GitHub Packages auth is available for `bun install`. | ||
| * | ||
| * This script ensures that GitHub packages authentication is properly set up | ||
| * for installing private packages from the GitHub Package Registry. | ||
| * IMPORTANT: Bun reads bunfig.toml at process startup, BEFORE this preinstall | ||
| * hook runs. That means we cannot inject PACKRAT_NATIVEWIND_UI_GITHUB_TOKEN | ||
| * into the parent process — the variable must already be exported in the | ||
| * shell that invokes `bun install`. This script's job is to detect a missing | ||
| * token early and print the exact command to fix it. | ||
| * | ||
| * It runs automatically before `bun install` via the preinstall hook. | ||
| * | ||
| * Token Usage Pattern: | ||
| * - Local development: GitHub CLI token (from `gh auth token`) → PACKRAT_NATIVEWIND_UI_GITHUB_TOKEN | ||
| * - CI/CD: Uses PACKRAT_NATIVEWIND_UI_GITHUB_TOKEN directly from secrets | ||
| * - The token is used by bunfig.toml to authenticate with npm.pkg.github.com | ||
| * | ||
| * Requirements: | ||
| * - Local development: GitHub CLI must be installed and authenticated with `read:packages` scope | ||
| * - CI/CD: PACKRAT_NATIVEWIND_UI_GITHUB_TOKEN environment variable must be set | ||
| * Expected flow: | ||
| * - Local dev: `export PACKRAT_NATIVEWIND_UI_GITHUB_TOKEN=$(gh auth token)` then `bun install` | ||
| * - CI/CD: PACKRAT_NATIVEWIND_UI_GITHUB_TOKEN set from repo secrets | ||
| */ | ||
|
|
||
| import { $ } from 'bun'; | ||
|
|
||
| async function configureDeps() { | ||
| try { | ||
| // Check if we're in a CI environment | ||
| const isCI = | ||
| process.env.CI === '1' || process.env.CI === 'true' || process.env.GITHUB_ACTIONS === 'true'; | ||
| const TOKEN_VAR = 'PACKRAT_NATIVEWIND_UI_GITHUB_TOKEN'; | ||
|
|
||
| if (isCI) { | ||
| // In CI, bunfig.toml will use PACKRAT_NATIVEWIND_UI_GITHUB_TOKEN | ||
| if (!process.env.PACKRAT_NATIVEWIND_UI_GITHUB_TOKEN) { | ||
| console.error('❌ PACKRAT_NATIVEWIND_UI_GITHUB_TOKEN not found in CI'); | ||
| console.error('Please ensure PACKRAT_NATIVEWIND_UI_GITHUB_TOKEN is set in your CI secrets'); | ||
| process.exit(1); | ||
| } | ||
| console.log('✓ Using PACKRAT_NATIVEWIND_UI_GITHUB_TOKEN for CI authentication'); | ||
| return; | ||
| } | ||
| function isCI(): boolean { | ||
| return ( | ||
| process.env.CI === '1' || process.env.CI === 'true' || process.env.GITHUB_ACTIONS === 'true' | ||
| ); | ||
| } | ||
|
|
||
| // For local development, check if PACKRAT_NATIVEWIND_UI_GITHUB_TOKEN is already set | ||
| if (process.env.PACKRAT_NATIVEWIND_UI_GITHUB_TOKEN) { | ||
| console.log('✓ PACKRAT_NATIVEWIND_UI_GITHUB_TOKEN already set in environment'); | ||
| return; | ||
| } | ||
| function printLocalFix(): void { | ||
| console.error(`\n❌ ${TOKEN_VAR} is not exported in your shell.`); | ||
| console.error('\nBun reads bunfig.toml before the preinstall hook runs, so the token'); | ||
| console.error('must be present in the parent shell. Run one of:\n'); | ||
| console.error(' # Inline'); | ||
| console.error(` export ${TOKEN_VAR}=$(gh auth token)`); | ||
| console.error(' bun install\n'); | ||
| console.error(' # One-liner'); | ||
| console.error(` ${TOKEN_VAR}=$(gh auth token) bun install\n`); | ||
| console.error(' # Persist — add to ~/.zshrc or ~/.bashrc'); | ||
| console.error(` export ${TOKEN_VAR}=$(gh auth token 2>/dev/null)\n`); | ||
| console.error('If gh is not set up yet:'); | ||
| console.error(' gh auth login'); | ||
| console.error(' gh auth refresh -h github.com -s read:packages'); | ||
| } | ||
|
|
||
| // Try to get token from GitHub CLI | ||
| const ghStatus = await $`gh auth status`.quiet().nothrow(); | ||
| async function configureDeps() { | ||
| if (process.env[TOKEN_VAR]) { | ||
| console.log(`✓ ${TOKEN_VAR} is set — bun install will authenticate to GitHub Packages`); | ||
| return; | ||
| } | ||
|
|
||
| if (ghStatus.exitCode === 0) { | ||
| // Note: gh auth status doesn't show read:packages in the output even when it's granted | ||
| // The token will work if the user has followed the authentication steps | ||
| if (isCI()) { | ||
| console.error(`❌ ${TOKEN_VAR} not found in CI environment`); | ||
| console.error(`Set ${TOKEN_VAR} in your CI secrets and expose it to this job.`); | ||
| process.exit(1); | ||
| } | ||
|
|
||
| // Get the GitHub token from gh CLI and set it as PACKRAT_NATIVEWIND_UI_GITHUB_TOKEN | ||
| const token = await $`gh auth token`.text(); | ||
| process.env.PACKRAT_NATIVEWIND_UI_GITHUB_TOKEN = token.trim(); | ||
| console.log('✓ Using GitHub CLI token for authentication'); | ||
| } else { | ||
| console.error('❌ GitHub CLI not found or not authenticated'); | ||
| console.error('\nTo fix this:'); | ||
| console.error('1. Install GitHub CLI: https://cli.github.com'); | ||
| console.error('2. Authenticate: gh auth login'); | ||
| console.error('3. Add packages scope: gh auth refresh -h github.com -s read:packages'); | ||
| console.error( | ||
| '\nAlternatively, set PACKRAT_NATIVEWIND_UI_GITHUB_TOKEN environment variable with a personal access token', | ||
| ); | ||
| process.exit(1); | ||
| } | ||
| } catch (error) { | ||
| console.error('❌ Configuration failed:', error); | ||
| const ghStatus = await $`gh auth status`.quiet().nothrow(); | ||
| if (ghStatus.exitCode !== 0) { | ||
| console.error('❌ GitHub CLI not found or not authenticated.\n'); | ||
| console.error('1. Install GitHub CLI: https://cli.github.com'); | ||
| console.error('2. Authenticate: gh auth login'); | ||
| console.error('3. Add packages scope: gh auth refresh -h github.com -s read:packages'); | ||
| console.error(`4. Then export ${TOKEN_VAR}=$(gh auth token) and re-run bun install.`); | ||
| process.exit(1); | ||
| } | ||
|
|
||
| printLocalFix(); | ||
| process.exit(1); | ||
| } | ||
|
|
||
| // Only run if this is the main module | ||
| if (import.meta.main) { | ||
| configureDeps(); | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
apps/expo/components/LargeTitleHeaderSearchContentContainer.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| import { useColorScheme } from '@packrat/ui/nativewindui'; | ||
| import { Platform, SafeAreaView, View } from 'react-native'; | ||
|
|
||
| export const LargeTitleHeaderSearchContentContainer = ({ | ||
| children, | ||
| }: { | ||
| children: React.ReactNode; | ||
| }) => { | ||
| const { colors } = useColorScheme(); | ||
|
|
||
| const Container = Platform.OS === 'ios' ? SafeAreaView : View; | ||
|
|
||
| return <Container style={{ flex: 1, backgroundColor: colors.background }}>{children}</Container>; | ||
| }; | ||
|
mikib0 marked this conversation as resolved.
|
||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.