-
Notifications
You must be signed in to change notification settings - Fork 36
feat: multichain support #338
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
Changes from all commits
Commits
Show all changes
431 commits
Select commit
Hold shift + click to select a range
9f1c20f
Merge pull request #381 from reown-com/feat/multi-phantom
ignaciosantise 27836a8
chore: siwe fixes
ignaciosantise 2fbad8b
chore: improved default network logic + network image handling
ignaciosantise 6b8bd6a
chore: default network + network button improvements
ignaciosantise ca73aba
chore: show new chain image instead of current
ignaciosantise a87b109
Merge pull request #382 from reown-com/feat/multi-networks
ignaciosantise 7b2e1ea
chore: set sdk version based on adapters
ignaciosantise d19ceeb
chore: send improvemens + enabled solana send
ignaciosantise af4287e
chore: fix evm test
ignaciosantise e20b52c
chore: remove gas params in send transaction interface
ignaciosantise 7295078
chore: code style
ignaciosantise a297fe7
chore: fixed send flow call
ignaciosantise 9875d7f
chore: removed circular dependency + improved types
ignaciosantise 96cce7c
chore: send network to signtransaction
ignaciosantise 1601290
Merge pull request #383 from reown-com/feat/solana-send
ignaciosantise a261b7b
feat: coinbase connector for multichain refactor (#388)
ignaciosantise 8b593d7
chore: merge onramp to multichain (#392)
ignaciosantise ee35bf3
chore: removed old changeset files
ignaciosantise 3b78775
chore: use native redirect in coinbase/phantom connectors, exclude ne…
ignaciosantise 26e1d2d
chore: commented evm adapter subscription
ignaciosantise 9a29054
chore: call modalclose on siwe only when needed
ignaciosantise e4fcc46
chore: removed unused accountcontroller code, fixed tests
ignaciosantise 9b2b509
chore: migrate to valtio v2 + required react-native to 0.72 (#393)
ignaciosantise 3eec116
feat: added ens resolve for evm (#397)
ignaciosantise 6165c78
chore: bump react-native-builder-bob (#398)
ignaciosantise 92d9656
chore: remove alpha tag from action
ignaciosantise d203f62
fix: animations for multichain (#399)
ignaciosantise e4dcc4b
chore: minor fixes and improvements (#400)
ignaciosantise 7eea011
fix: provider chain (#401)
ignaciosantise b44bd76
chore: unified types in common package, separated in multiple files (…
ignaciosantise 69e5e21
chore: enabled new lint rules (#403)
ignaciosantise 08af64a
chore: added marginbottom to network view, check supported before fet…
ignaciosantise 8ffe564
chore: added extra check in case provider is undefined
ignaciosantise e194b2e
chore: improved phantom connector deeplink listeners (#404)
ignaciosantise 62dc58b
chore: changed alpha version + gh action
ignaciosantise f6b1791
chore: update package versions after alpha release
github-actions[bot] 6a11137
chore: added extra margin to network view bottom
ignaciosantise 9a4ef90
fix: small fixes (#406)
ignaciosantise 421d1b3
chore: removed method validation from coinbase provider
ignaciosantise b6acddd
chore: improvements (#408)
ignaciosantise 709c059
chore: improved custom wallet image loading
ignaciosantise e547df6
chore: reload transactions after chain change
ignaciosantise 9cc7359
feat: implemented solflare connector (#409)
ignaciosantise 405b39b
chore: added store link to external connect view
ignaciosantise c8bdd98
fix: added check installed for custom wallets + animation issues on a…
ignaciosantise 12bc913
fix: compare imageSrc prop in CardSelect component memo logic
ignaciosantise 91fa1de
chore: removed background from reown button
ignaciosantise 64c9177
fix: modal height calculation + animation improvements (#411)
ignaciosantise 74cbcaa
fix: use correct chain ID on request
ignaciosantise a5e3166
feat: filter wallets based on configured networks (#412)
ignaciosantise 49dddd7
chore: update package versions after alpha release
github-actions[bot] cd02dbd
chore: added changeset file
ignaciosantise 8379356
chore: update package versions after alpha release
github-actions[bot] 767906f
fix: correctly set modal height
ignaciosantise 50cd01b
chore: unified all-wallet lists in a single component
ignaciosantise 1f3b033
chore: use walletlist in loader component
ignaciosantise 7e02b87
chore: ui adjustments in swap/send/onramp flows
ignaciosantise 8d5b992
chore: improved modal backdrop component
ignaciosantise e02228f
chore: decreased modal max size so it doesnt conflict with statusbar …
ignaciosantise 5559f6d
chore: fixed max height in some modals and views
ignaciosantise d618e44
chore: ui improvements in swap when keyboard is open
ignaciosantise 429e2c8
chore: removed keyboardavoidingview as now views with keyboard use th…
ignaciosantise 626ec00
chore: add custom wallets to loading item calc in all wallet list
ignaciosantise bde9364
chore: removed maxWidth from useCustomDimensions hook as it was confu…
ignaciosantise cc1270c
chore: added index to key extractor in case wallet id is not present
ignaciosantise 674f1f8
chore: minor changes
ignaciosantise 058c901
chore: small ui change in wallet card item
ignaciosantise cf9224c
chore: improved loading items logic in all wallets list
ignaciosantise 102b417
fix: solved keyboard issue on selector modal on android
ignaciosantise f792da6
fix: reload transactions when account type changes
ignaciosantise ba06092
fix: upgrade wallet button now links to proper site
ignaciosantise 77833b6
chore: minor text issues
ignaciosantise 78033ac
chore: update text
ignaciosantise 33eb668
chore: added no available tokens screen in onramp, set USD as default…
ignaciosantise 07884d5
chore: check in payment currency array for the fallback payment currency
ignaciosantise 9dafeb0
Merge pull request #430 from reown-com/fix/ui-changes
ignaciosantise 021dd48
chore: detect unsupported network
ignaciosantise 22918a2
chore: removed comment
ignaciosantise 816ce76
Merge pull request #431 from reown-com/fix/multi-network
ignaciosantise 6fafcff
fix: check supported chains before getting transaction list
ignaciosantise b7ae7db
fix: solved issue with siwe & unsupported chain view + removed unused…
ignaciosantise 60d742f
chore: added a timeout to installed wallet fetch + loading network/cu…
ignaciosantise aed6e71
Merge pull request #432 from reown-com/fix/siwe
ignaciosantise 5715f06
fix: correctly adding listeners to wagmi connector
ignaciosantise ea033f2
Merge branch 'feat/multichain' into fix/wagmi-connector
ignaciosantise 345754a
chore: code fixes
ignaciosantise fa685c1
chore: code fixes
ignaciosantise e599061
chore: removed display_uri handlers from wagmi connector
ignaciosantise b4eaf68
chore: added minHeight to connecting views
ignaciosantise 6fbbeea
Merge pull request #433 from reown-com/fix/wagmi-connector
ignaciosantise def0705
fix: load token list correctly on swaps
ignaciosantise 2b8f95e
Merge pull request #435 from reown-com/fix/swap-balance
ignaciosantise 1fdd0f5
chore: renamed internal components
ignaciosantise 20a7bd3
fix: added option to add chains in metamask connections
ignaciosantise 49fef7c
chore: code improvements
ignaciosantise db910aa
chore: return empty object if namespaces is undefined
ignaciosantise 97bbca6
chore: added null check
ignaciosantise 7962d57
Merge pull request #436 from reown-com/fix/add-chain
ignaciosantise f584157
chore: using deferred values for inputs + fixed placeholder for setti…
ignaciosantise 64f0014
fix: open account default for eoa wallets when using hook
ignaciosantise ff286d1
fix: only emit wagmi events if the changes are evm related
ignaciosantise 1601d93
chore: added chain to useAccount hook
ignaciosantise 5111f28
chore: removed deferred value logic from inputs
ignaciosantise 67d6089
Merge pull request #437 from reown-com/chore/improvements
ignaciosantise 9c62262
fix: update connection state correctly when chain is changed
ignaciosantise 7bebbee
chore: use AppKit useAccount hook instead of wagmi for multichain
ignaciosantise 2c46625
Merge pull request #438 from reown-com/fix/state-update
ignaciosantise 7228343
chore: show custom wallets after certified ones, added them in search…
ignaciosantise 4aa904d
chore: put custom wallets after recommended if there's no certified w…
ignaciosantise b2b5130
Merge pull request #439 from reown-com/chore/custom-wallets
ignaciosantise cee21dd
chore: added safe-area-context to improve modal height & spacing
ignaciosantise dc1e2a2
chore: improved keyboard handling in send & swap views
ignaciosantise fa94b1b
Merge branch 'feat/multichain' into feat/safe-area
ignaciosantise ddb5e27
chore: removed unused hook
ignaciosantise 8040290
chore: removed unused prop
ignaciosantise f2f254a
Merge pull request #440 from reown-com/feat/safe-area
ignaciosantise b740504
chore: solved issue with modal background
ignaciosantise 06aeeb3
fix: added workaround to fix modal bottom background color line
ignaciosantise b5212ce
feat: change appkit theme mode automatically if no default value is set
ignaciosantise 49b4fa1
Merge pull request #441 from reown-com/feat/theme-mode
ignaciosantise 18b3763
Merge remote-tracking branch 'origin/develop' into feat/multichain
ignaciosantise 7f1370c
chore: changeset alpha
ignaciosantise e0e21ce
feat: allow opening qr code view via hook, renamed view to WalletConnect
ignaciosantise 299405f
fix: solved re-render issues in useAppKit hook
ignaciosantise c1675b9
Merge pull request #447 from reown-com/fix/hook-memo
ignaciosantise 3dc560a
chore: added useAppKitState hook
ignaciosantise 634be65
chore: added hook memoization improvements
ignaciosantise eb5eec7
chore: style change on app sample
ignaciosantise 19a1d93
Merge pull request #448 from reown-com/chore/state-hook
ignaciosantise 5f666ea
fix: changed modal wrapper view to be pressable so it closes the moda…
ignaciosantise 35e2811
chore: changed margin of onramp loading view
ignaciosantise 6b7f3b3
chore: added some perf improvements on components
ignaciosantise c039374
chore: remove not needed dependency on spinner memo
ignaciosantise e7943b6
chore: added eslint plugin again
ignaciosantise 2ecda36
Merge pull request #449 from reown-com/chore/improvements
ignaciosantise fefba65
chore: changed useLayoutEffect to useEffect on route transition
ignaciosantise 59385df
chore: added changeset to publish alpha
ignaciosantise b19d205
Merge branch 'develop' into feat/multichain
ignaciosantise 1dc3594
chore: update package versions after alpha release
github-actions[bot] b7ad20b
chore: WIP siwx
ignaciosantise 088066c
fix: solved bouncing issue on connecting view
ignaciosantise d85c185
fix: removed pressable wrapper around modal that made it close when p…
ignaciosantise c0d3172
chore: disable transition animations until android issue is solved
ignaciosantise 63d524a
chore: removed unused import
ignaciosantise 2927e4b
Merge pull request #454 from reown-com/fix/ui-fixes
ignaciosantise 71ad585
Merge branch 'feat/multichain' into feat/siwx
ignaciosantise d11d8e4
feat: implemented reown authentication
ignaciosantise 12cafdf
chore: added signMessage to bitcoin adapter
ignaciosantise 7e66a89
fix: init walletconnect connector always
ignaciosantise 25f1d26
Merge branch 'feat/multichain' into feat/siwx
ignaciosantise 9793a48
chore: removed siwe package
ignaciosantise 6a098d7
chore: added siwx events
ignaciosantise 37d9296
chore: renamed siwx sign view
ignaciosantise b9619d4
chore: added 1CA for evm
ignaciosantise bf17878
chore: removed unnecesary siwx package
ignaciosantise c7eabc7
chore: renamed siwx types folder
ignaciosantise 1e56822
chore: dont send data to auth on 1ca sessions
ignaciosantise b1eb2fb
chore: removed namespace validation from siwx + added long auth snack
ignaciosantise 48d6329
chore: typo in log
ignaciosantise c712dd7
chore: removed commented code
ignaciosantise 2967f7b
chore: added alert on sign message error
ignaciosantise 3a0771f
chore: added chainID to signmessage, added alert if sign error
ignaciosantise 7450bdb
chore: added alerts
ignaciosantise 50c08cd
chore: added alerts
ignaciosantise 5b57017
chore: removed alerts
ignaciosantise cf66265
chore: add content type header
ignaciosantise 47e2cd9
chore: changed wallet info for external wallets
ignaciosantise ed546f8
chore: code improvements
ignaciosantise d94e040
fix: close modal if siwx is not enabled
ignaciosantise 91ec8e6
fix: cover case were wallet return bitcoin signature already in base64
ignaciosantise 27710fc
fix: return hex signature on bitcoin adapter and removed toLowerCase
ignaciosantise f0f58f0
chore: added chain id in provider calls from sample app
ignaciosantise cb15ea3
chore: added chain to provider requests
ignaciosantise 33cbdf0
chore: return bitcoin signature in base64
ignaciosantise ca2a707
fix: encode transaction in base58 for solflare and phantom
ignaciosantise d56e337
fix: added non-native token send logic for solana
ignaciosantise 28f3f6d
fix: removed units from solana transaction + capture reject error
ignaciosantise 78c2dd6
fix: correctly update balances
ignaciosantise 3b0239d
chore: removed todo
ignaciosantise b837ea9
chore: added chain id in sample request
ignaciosantise 72fad26
chore: set signOutOnDisconnect default value on reown auth
ignaciosantise 07e4f4d
chore: removed unused props from reown type
ignaciosantise c9fdc50
chore: sample app fix
ignaciosantise e884045
Merge pull request #456 from reown-com/feat/siwx
ignaciosantise e319709
fix: solved test minor issues
ignaciosantise 776c43f
chore: commented reown auth import
ignaciosantise f6c7b31
Merge pull request #458 from reown-com/fix/tests
ignaciosantise 1361252
fix: added MMKV to storage type of coinbase connector
ignaciosantise df2cd9e
chore: add small delay before calling add session in siwx
ignaciosantise 712be36
chore: close authenticating snack when modal is close on siwx
ignaciosantise 8f5372e
chore: export siwx types on appkit package
ignaciosantise 1a2c4ba
chore: bump valtio and universal provider
ignaciosantise fb3bf1e
chore: update package versions after alpha release
github-actions[bot] 53ff4fa
chore: bump alpha
ignaciosantise 367beff
chore: update package versions after alpha release
github-actions[bot] 87f913a
chore: replaced custom headers with query params
ignaciosantise 8a2cba5
Merge pull request #459 from reown-com/chore/query-params
ignaciosantise bd846b7
Merge branch 'develop' into feat/multichain
ignaciosantise 21802b0
feat: added logger to track appkit info and errors easier, also loggi…
ignaciosantise 3567a30
chore: code improvements & suggestions
ignaciosantise 7f51285
chore: lint
ignaciosantise e1b5c60
chore: removed circular dependency, fixed onramp test
ignaciosantise d250732
chore: check react native debug boolean when setting debug prop
ignaciosantise f41cf38
chore: changed log test
ignaciosantise fc86e07
chore: log only when debug is enabled
ignaciosantise 5e747fe
chore: removed retention hours logic
ignaciosantise e104538
chore: changed log text
ignaciosantise f6b24d8
Merge pull request #461 from reown-com/feat/logger
ignaciosantise 40dafaf
feat: improving events
ignaciosantise dc744b3
chore: added reconnect event
ignaciosantise e1acdf4
chore: updated universal provider dep
ignaciosantise 188ab6c
Merge pull request #467 from reown-com/chore/update-provider
ignaciosantise b58329b
chore: added missing installed boolean
ignaciosantise e02b409
chore: added some initialize props + changed linkType prop name
ignaciosantise b8cf55d
chore: code improvements
ignaciosantise ef9db7a
Merge pull request #466 from reown-com/feat/events
ignaciosantise 3efe03d
chore: moved to 2.0.0 version + fixed changelogs
ignaciosantise 18d0e29
fix: move appkit to a singleton instance to avoid re-initializations
ignaciosantise 0d6d682
chore: use globalThis instead of global
ignaciosantise c97a91c
chore: throw error on createAppKit
ignaciosantise 167da43
Merge branch 'develop' into feat/multichain
ignaciosantise 8c6cbcd
Merge branch 'feat/multichain' into fix/singleton-appkit
ignaciosantise 2bb0b34
chore: fix lint
ignaciosantise 8bc9189
chore: code improvements
ignaciosantise 29442ce
chore: use logController for appkit create errors
ignaciosantise ed218dd
chore: code improvements
ignaciosantise f6cc8a1
chore: solved lint issues
ignaciosantise 2d54d27
Merge pull request #469 from reown-com/fix/singleton-appkit
ignaciosantise b857bae
fix: solved issue with unsupported network popup + solved issue with …
ignaciosantise 3aa765f
chore: code improvements
ignaciosantise 157bcc5
chore: code improvements
ignaciosantise 9fbb3cf
Merge pull request #472 from reown-com/fix/wrong-chain
ignaciosantise f610f5e
chore: added react-native-compat import on appkit package
ignaciosantise 1afe1ee
Merge pull request #473 from reown-com/chore/added-import
ignaciosantise 8ad23b3
chore: removed active chain check when switching network
ignaciosantise d55383b
chore: removed __DEV__ check from LogController, removed LogControlle…
ignaciosantise 2c3cce8
chore: added options debug check back
ignaciosantise 9f7ca30
chore: removed dev check
ignaciosantise ebbc342
Merge pull request #474 from reown-com/chore/logcontroller
ignaciosantise 2878d5f
chore: added prepublish ci command
ignaciosantise 766a31a
chore: send wallet impression events
ignaciosantise cc70284
chore: code improvements
ignaciosantise 1adc141
chore: code improvements
ignaciosantise f454081
Merge pull request #475 from reown-com/chore/wallet-impression
ignaciosantise 85aa3f7
fix: added trycatch for safe provider access
ignaciosantise 0e62184
chore: log error in useProvider hook
ignaciosantise 9c9885f
chore: code improvements
ignaciosantise 09233b6
Merge pull request #476 from reown-com/fix/provider-hook
ignaciosantise c2bb4bd
Merge branch 'chore/changeset' into feat/multichain
ignaciosantise 8444e2e
chore: updated appkit version
ignaciosantise File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
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 |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| --- | ||
| '@reown/appkit-coinbase-react-native': patch | ||
| '@reown/appkit-bitcoin-react-native': patch | ||
| '@reown/appkit-react-native': patch | ||
| '@reown/appkit-common-react-native': patch | ||
| '@reown/appkit-ethers-react-native': patch | ||
| '@reown/appkit-solana-react-native': patch | ||
| '@reown/appkit-wagmi-react-native': patch | ||
| '@reown/appkit-core-react-native': patch | ||
| '@reown/appkit-ui-react-native': patch | ||
| --- | ||
|
|
||
| Release v2.0.1 stable version |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,170 @@ | ||
| const { execSync, spawnSync } = require('child_process'); | ||
| const fs = require('fs'); | ||
| const path = require('path'); | ||
|
|
||
| // Helper function to run commands and handle errors | ||
| function runCommand(command, args, options) { | ||
| console.log( | ||
| `Executing: ${command} ${args.join(' ')} ${options && options.cwd ? `in ${options.cwd}` : ''}` | ||
| ); | ||
| const result = spawnSync(command, args, { stdio: 'inherit', ...options }); | ||
| if (result.error) { | ||
| console.error(`Error executing ${command}:`, result.error); | ||
| throw result.error; | ||
| } | ||
| if (result.status !== 0) { | ||
| const message = `Command failed: ${command} ${args.join(' ')} exited with status ${ | ||
| result.status | ||
| }`; | ||
| console.error(message); | ||
| throw new Error(message); | ||
| } | ||
| return result; | ||
| } | ||
|
|
||
| console.log('Starting initial package publishing process...'); | ||
|
|
||
| let packagesToPublish = []; | ||
| const rootDir = process.cwd(); | ||
|
|
||
| const packagesToExclude = ['@apps/native', '@apps/gallery', 'appkit-react-native']; | ||
|
|
||
| try { | ||
| // Get workspace info using yarn workspaces list --json | ||
| // Yarn v1 outputs newline-delimited JSON objects | ||
| const rawOutput = execSync('yarn workspaces list --json', { encoding: 'utf8' }); | ||
| const lines = rawOutput | ||
| .trim() | ||
| .split('\n') | ||
| .filter(line => line.trim() !== ''); | ||
| const workspacePackages = lines.map(line => JSON.parse(line)); | ||
|
|
||
| for (const pkgData of workspacePackages) { | ||
| console.log(`[DEBUG] Processing workspace entry: ${JSON.stringify(pkgData)}`); | ||
|
|
||
| // Skip the root package (identified by location '.') or any package without a defined location | ||
| if (pkgData.location === '.' || !pkgData.location) { | ||
| console.log( | ||
| `[DEBUG] Skipping root or undefined location package: ${pkgData.name} at ${pkgData.location}` | ||
| ); | ||
| continue; | ||
| } | ||
|
|
||
| // Skip excluded packages | ||
| if (packagesToExclude.includes(pkgData.name)) { | ||
| console.log(`Skipping excluded package: ${pkgData.name}`); | ||
| continue; | ||
| } | ||
|
|
||
| const pkgName = pkgData.name; | ||
| const pkgDir = path.resolve(rootDir, pkgData.location); | ||
|
|
||
| // Check if package exists on npm | ||
| console.log(`Checking NPM status for ${pkgName}...`); | ||
| const npmViewResult = spawnSync('npm', ['view', pkgName, 'version'], { encoding: 'utf8' }); | ||
|
|
||
| // If npm view exits with 0 and has output, package exists. | ||
| // Otherwise (non-zero exit or empty output), it likely doesn't. | ||
| if (npmViewResult.status === 0 && npmViewResult.stdout && npmViewResult.stdout.trim() !== '') { | ||
| console.log( | ||
| `Package ${pkgName} (version: ${npmViewResult.stdout.trim()}) already exists on NPM. Skipping initial publish.` | ||
| ); | ||
| } else { | ||
| console.log( | ||
| `Package ${pkgName} does not appear to exist on NPM or has no published versions.` | ||
| ); | ||
| if (fs.existsSync(path.join(pkgDir, 'package.json'))) { | ||
| const packageJsonContent = fs.readFileSync(path.join(pkgDir, 'package.json'), 'utf8'); | ||
| const parsedPackageJson = JSON.parse(packageJsonContent); | ||
| console.log( | ||
| `[DEBUG] package.json for ${pkgName}: private=${parsedPackageJson.private}, version=${parsedPackageJson.version}` | ||
| ); // Added for debugging | ||
| packagesToPublish.push({ name: pkgName, dir: pkgDir }); | ||
| } else { | ||
| console.warn(`Skipping ${pkgName}: package.json not found in ${pkgDir}`); | ||
| } | ||
| } | ||
| } | ||
| } catch (error) { | ||
| console.error('Error processing workspace info or checking NPM status:', error.message); | ||
| process.exit(1); // Critical error, exit | ||
| } | ||
|
|
||
| if (packagesToPublish.length === 0) { | ||
| console.log('No new packages to publish initially.'); | ||
| } else { | ||
| console.log( | ||
| `Found ${packagesToPublish.length} new package(s) to publish initially: ${packagesToPublish | ||
| .map(p => p.name) | ||
| .join(', ')}` | ||
| ); | ||
|
|
||
| // Conditionally run changeset:prepublish if there are packages to publish | ||
| if (packagesToPublish.length > 0) { | ||
| console.log('New packages found. Running changeset:prepublish to build packages...'); | ||
| try { | ||
| runCommand('yarn', ['run', 'changeset:prepublish']); // Assumes it runs from rootDir | ||
| console.log('changeset:prepublish completed successfully.'); | ||
| } catch (prepublishError) { | ||
| console.error('Failed to run changeset:prepublish:', prepublishError.message); | ||
| process.exit(1); // Exit if build fails, as publishing would also fail | ||
| } | ||
| } | ||
| } | ||
|
|
||
| let hasPublishErrors = false; | ||
| for (const pkg of packagesToPublish) { | ||
| console.log(`[DEBUG] Attempting to publish from list: ${JSON.stringify(pkg)}`); // Added for debugging | ||
| console.log(`Attempting to publish ${pkg.name} from ${pkg.dir} with alpha tag...`); | ||
| const packageJsonPath = path.join(pkg.dir, 'package.json'); | ||
| let originalPackageJson = ''; | ||
| try { | ||
| originalPackageJson = fs.readFileSync(packageJsonPath, 'utf8'); | ||
| const parsedPackageJson = JSON.parse(originalPackageJson); | ||
|
|
||
| if (parsedPackageJson.private === true) { | ||
| console.log(`Package ${pkg.name} is private, skipping initial publish.`); | ||
| continue; // Skip to the next package | ||
| } | ||
|
|
||
| console.log(`Temporarily setting version of ${pkg.name} to 0.0.1 for initial publish.`); | ||
| parsedPackageJson.version = '0.0.1'; | ||
| fs.writeFileSync(packageJsonPath, JSON.stringify(parsedPackageJson, null, 2)); | ||
|
|
||
| runCommand('yarn', ['npm', 'publish', '--access', 'public', '--tag', 'alpha'], { | ||
| cwd: pkg.dir | ||
| }); | ||
| // console.log( | ||
| // `DRY RUN: Would publish ${pkg.name} from ${pkg.dir} with version 0.0.1 and alpha tag.` | ||
| // ); | ||
| // console.log( | ||
| // `DRY RUN: Command would be: yarn npm publish --access public --tag alpha (in ${pkg.dir})` | ||
| // ); | ||
| } catch (publishError) { | ||
| // runCommand already logs error details if it's from there | ||
| console.error(`Failed to publish ${pkg.name}: ${publishError.message}`); | ||
| hasPublishErrors = true; // Mark that an error occurred but continue trying other packages | ||
| } finally { | ||
| // Restore original package.json | ||
| if (originalPackageJson) { | ||
| console.log(`Restoring original package.json for ${pkg.name}.`); | ||
| try { | ||
| fs.writeFileSync(packageJsonPath, originalPackageJson); | ||
| } catch (restoreError) { | ||
| console.error( | ||
| `CRITICAL: Failed to restore original package.json for ${pkg.name}: ${restoreError.message}` | ||
| ); | ||
| // This is a more critical error, as it leaves the repo in a modified state. | ||
| // Depending on desired behavior, you might want to ensure this error is highly visible | ||
| // or even causes the entire workflow to fail more loudly. | ||
| hasPublishErrors = true; // Ensure the overall process is marked as failed. | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| console.log('Initial package publishing process finished.'); | ||
| if (hasPublishErrors) { | ||
| console.error('One or more packages failed during initial publishing.'); | ||
| process.exit(1); // Exit with error if any package failed to publish | ||
| } | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -60,5 +60,6 @@ android.iml | |
| # vscode | ||
| .vscode/launch.json | ||
|
|
||
| # cursor | ||
| .cursor/mcp.json | ||
| # Cursor | ||
| .cursor | ||
| .cursor/mcp.json | ||
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 @@ | ||
| 22.17.0 |
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,9 +1,16 @@ | ||
| /apps | ||
| .yarn/ | ||
| .github/ | ||
| .changeset/ | ||
| .env* | ||
| .vscode/ | ||
| .github/ | ||
| .maestro/ | ||
| .cursor/ | ||
| .turbo/ | ||
| .vscode/ | ||
| .yarn/ | ||
| .yarnrc.yml | ||
| .yarn.lock | ||
| playwright-report/ | ||
| test-results/ | ||
| /apps | ||
| .env* | ||
| __mocks__/ | ||
| scripts/ | ||
| scripts/ | ||
| CHANGELOG.md |
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
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.