mirror of
https://github.com/luxfi/safe-wallet.git
synced 2026-07-26 22:53:37 +00:00
* feat(mobile): upgrade Expo SDK to v55 Upgrade Expo SDK from v54 to v55, along with React Native 0.83.4, React 19.2, and all related dependencies. Key changes: - Refactored @safe-global/theme to use sub-path exports to fix RN import resolution issues - Added react-native patch for Appearance.setColorScheme bug (facebook/react-native#08d176453) not yet in 0.83.4 release - Replaced Tamagui Skeleton with custom SafeSkeleton component - Updated expo config plugins for SDK 55 compatibility Co-authored-by: Hanzo Dev <dev@hanzo.ai> * fix: downgrade eslint-config-next to v15 to match next.js version eslint-config-next v16 requires next v16 but the project uses next v15.5.8. The v16 package tries to import next/dist/compiled/babel/ eslint-parser which doesn't exist in next v15. Co-authored-by: Hanzo Dev <dev@hanzo.ai> * fix: migrate packages away from eslint-config-next eslint-config-next requires next at runtime for its babel parser, but next is only installed in apps/web. After the Expo SDK v55 upgrade changed dependency hoisting, the parser became unreachable. - Create shared config/eslint/base.mjs using direct plugin imports - Migrate store, theme, utils, and tx-builder to the shared config - Add packageExtensions in .yarnrc.yml so eslint-config-next in apps/web can still resolve next as a peer dependency Co-authored-by: Hanzo Dev <dev@hanzo.ai> * chore: align react 19.2 across workspaces and fix MUI peer dep - Bump react/react-dom to 19.2.0 in web and tx-builder to match mobile - Add @mui/material as optional peer dependency in theme package to avoid duplicate installations causing type conflicts Co-authored-by: Hanzo Dev <dev@hanzo.ai> * chore(mobile): update storybook on mobile to v10 * fix(web): resolve @emotion/react hoisting issue after Expo SDK 55 upgrade Yarn 4's node-modules hoisting shifted after dependency graph changes, leaving @emotion/react only in apps/web/node_modules while @mui/styled-engine remained at root. Add webpack resolve aliases to ensure Next.js finds emotion packages from the web workspace. Co-authored-by: Hanzo Dev <dev@hanzo.ai> * fix(web): resolve @emotion hoisting issue in Jest config Same hoisting fix as next.config.mjs but for Jest's module resolution. Add moduleNameMapper entries for @emotion/react and @emotion/styled. Co-authored-by: Hanzo Dev <dev@hanzo.ai> * fix(tx-builder): prettier * fix: resolve type-check errors after Expo SDK 55 upgrade - Fix BlurView tint prop: map ColorSchemeName to valid BlurTint values - Replace @storybook/test imports with storybook/test (merged in v10) - Align @types/react (~19.2.10) and @types/react-dom (~19.2.0) across all workspaces to prevent duplicate @mui/material type mismatches - Spread visuallyHidden into sx prop for @types/react 19.2.x compat - Add @types/react, @types/react-dom, storybook to yarn version checker Co-authored-by: Hanzo Dev <dev@hanzo.ai> * chore: align more dependencies * chore(web): update storybook snapshot * fix(mobile): normalize color scheme and deduplicate MUI/emotion packages - Normalize useTheme colorScheme to 'light' | 'dark', never 'unspecified' so TamaguiProvider always receives a valid theme name - Update ColorScheme type to exclude 'unspecified' - Remove redundant ?? 'light' fallbacks in SafeThemeProvider - Align @emotion/* and @mui/icons-material versions across workspaces to prevent Yarn from creating duplicate lockfile resolutions - Remove emotion webpack/Jest aliases (no longer needed after dedup) - Add @emotion/react, @emotion/styled, @mui/material, @mui/icons-material to yarn version consistency checker Co-authored-by: Hanzo Dev <dev@hanzo.ai> --------- Co-authored-by: Hanzo Dev <dev@hanzo.ai>
101 lines
2.9 KiB
JavaScript
101 lines
2.9 KiB
JavaScript
/** @type {import('@yarnpkg/types')} */
|
|
const { defineConfig } = require('@yarnpkg/types')
|
|
|
|
const DEPS_TO_CHECK = [
|
|
'typescript',
|
|
'react',
|
|
'redux',
|
|
'react-redux',
|
|
'@reduxjs/toolkit',
|
|
'eslint',
|
|
'prettier',
|
|
'jest',
|
|
'jest-fixed-jsdom',
|
|
'msw',
|
|
'date-fns',
|
|
'@ledgerhq/context-module',
|
|
'@ledgerhq/device-management-kit',
|
|
'@ledgerhq/device-signer-kit-ethereum',
|
|
'@types/jest',
|
|
'@types/react',
|
|
'@types/react-dom',
|
|
'storybook',
|
|
'@emotion/react',
|
|
'@emotion/styled',
|
|
'@mui/material',
|
|
'@mui/icons-material',
|
|
'@safe-global/protocol-kit',
|
|
'@safe-global/safe-apps-sdk',
|
|
'@safe-global/safe-deployments',
|
|
'@safe-global/safe-modules-deployments',
|
|
'@cowprotocol/app-data',
|
|
]
|
|
|
|
/**
|
|
* Detect and report different versions of specified dependencies across workspaces
|
|
*
|
|
* @param {Context} context
|
|
* @param {string[]} depsToCheck - Array of dependency names to check
|
|
*/
|
|
function detectInconsistentVersions({ Yarn }, depsToCheck = DEPS_TO_CHECK) {
|
|
const inconsistentDeps = new Map()
|
|
|
|
for (const depName of depsToCheck) {
|
|
const depVersions = new Map()
|
|
|
|
// Collect all dependencies of this type across workspaces
|
|
for (const dependency of Yarn.dependencies({ ident: depName })) {
|
|
if (dependency.type === `peerDependencies`) continue
|
|
|
|
// Try different ways to get the workspace name
|
|
let workspaceName = 'unknown'
|
|
|
|
if (dependency.workspace) {
|
|
workspaceName =
|
|
dependency.workspace.manifest?.name ||
|
|
dependency.workspace.locator?.name ||
|
|
dependency.workspace.cwd?.split('/').pop() ||
|
|
dependency.workspace.anchoredDescriptor?.name ||
|
|
'root'
|
|
} else {
|
|
workspaceName = 'root'
|
|
}
|
|
|
|
const version = dependency.range
|
|
|
|
if (!depVersions.has(version)) {
|
|
depVersions.set(version, [])
|
|
}
|
|
depVersions.get(version).push(workspaceName)
|
|
}
|
|
|
|
// Only report if there are inconsistencies
|
|
if (depVersions.size > 1) {
|
|
inconsistentDeps.set(depName, depVersions)
|
|
} else if (depVersions.size === 1) {
|
|
const [version, workspaces] = depVersions.entries().next().value
|
|
console.log(`✅ ${depName} version ${version} is consistent across ${workspaces.length} workspace(s)`)
|
|
}
|
|
}
|
|
|
|
// Report inconsistencies
|
|
if (inconsistentDeps.size > 0) {
|
|
console.log('\n🔍 Version inconsistencies detected:')
|
|
for (const [depName, versions] of inconsistentDeps.entries()) {
|
|
console.log(`\n📦 ${depName}:`)
|
|
for (const [version, workspaces] of versions.entries()) {
|
|
console.log(` - ${version}: ${workspaces.join(', ')}`)
|
|
}
|
|
}
|
|
console.log('\n⚠️ Consider standardizing these dependency versions across all workspaces.\n')
|
|
} else {
|
|
console.log('\n✅ All specified dependencies have consistent versions across workspaces.\n')
|
|
}
|
|
}
|
|
|
|
module.exports = defineConfig({
|
|
constraints: async (ctx) => {
|
|
detectInconsistentVersions(ctx)
|
|
},
|
|
})
|