5 Commits

Author SHA1 Message Date
Chris Daßler
cdc57e5212 Update peer dependency to support React Native >=0.78.0
- Bump version to 1.1.0-beta.6
- Change @react-native/metro-config peer dependency from >=0.79.0 to >=0.78.0
- This allows the package to work with React Native 0.78.x projects

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-17 12:01:38 +02:00
Chris Daßler
d6be6ec309 Update @react-native/metro-config peer dependency to >=0.79.0
Changed from >=0.79.4 to >=0.79.0 to avoid frequent updates.
This supports React Native 0.79.x series including 0.79.6.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-11 14:04:04 +02:00
Chris Daßler
163823dfd9 Lower @react-native/metro-config peer dependency to >=0.79.4
Support React Native 0.79.4 to avoid Flow v0.275.0 compatibility issues
that prevent Jest tests from running properly.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-11 13:34:55 +02:00
Chris Daßler
41df685c51 chore: bump version to 1.1.0-beta.3
- Lower @react-native/metro-config peer dependency to >=0.79.6
- Enables compatibility with React Native 0.79.x projects

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-11 12:57:26 +02:00
Chris Daßler
e05f091342 Fix Metro bundler refresh issue by preventing unnecessary file writes
- Only write auto-generated.d.ts when actual content changes
- Strip timestamp lines when comparing content to detect real changes
- Prevents Metro from refreshing when type content is unchanged
- Fixes flickering "Refreshing..." issue across all connected devices

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-05 22:40:57 +02:00
3 changed files with 53 additions and 5565 deletions

View File

@@ -253,13 +253,13 @@ async function updateGlobalTypes() {
const projectRoot = process.cwd(); const projectRoot = process.cwd();
const typesDir = path.join(projectRoot, 'src', 'types'); const typesDir = path.join(projectRoot, 'src', 'types');
const globalTypesPath = path.join(typesDir, 'auto-generated.d.ts'); const globalTypesPath = path.join(typesDir, 'auto-generated.d.ts');
let content = '/**\n'; let content = '/**\n';
content += ' * Auto-generated type declarations for remote IOR components\n'; content += ' * Auto-generated type declarations for remote IOR components\n';
content += ` * Generated at: ${new Date().toISOString()}\n`; content += ` * Generated at: ${new Date().toISOString()}\n`;
content += ' * DO NOT EDIT - This file is automatically maintained by metro-ior-resolver\n'; content += ' * DO NOT EDIT - This file is automatically maintained by metro-ior-resolver\n';
content += ' */\n\n'; content += ' */\n\n';
// Add all cached type definitions // Add all cached type definitions
for (const [ior, entry] of typeCache.entries()) { for (const [ior, entry] of typeCache.entries()) {
content += `// Source: ${entry.source || 'unknown'}`; content += `// Source: ${entry.source || 'unknown'}`;
@@ -272,16 +272,31 @@ async function updateGlobalTypes() {
content += entry.content; content += entry.content;
content += '\n\n'; content += '\n\n';
} }
// Ensure directory exists // Ensure directory exists
if (!fs.existsSync(typesDir)) { if (!fs.existsSync(typesDir)) {
fs.mkdirSync(typesDir, { recursive: true }); fs.mkdirSync(typesDir, { recursive: true });
} }
// Write the file // Only write if content has changed (compare without timestamp)
fs.writeFileSync(globalTypesPath, content, 'utf-8'); let shouldWrite = true;
if (fs.existsSync(globalTypesPath)) {
console.log(`[IOR Resolver] Updated auto-generated types: ${globalTypesPath}`); const existingContent = fs.readFileSync(globalTypesPath, 'utf-8');
// Remove timestamp lines for comparison
const stripTimestamp = (str) => str.replace(/ \* Generated at: .*\n/g, '').replace(/\/\/ Cached: .*\n/g, '');
if (stripTimestamp(existingContent) === stripTimestamp(content)) {
shouldWrite = false;
console.log(`[IOR Resolver] Type declarations unchanged, skipping write to prevent Metro refresh`);
}
}
if (shouldWrite) {
// Write the file
fs.writeFileSync(globalTypesPath, content, 'utf-8');
console.log(`[IOR Resolver] Updated auto-generated types: ${globalTypesPath}`);
}
} }
/** /**

5583
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{ {
"name": "@metatrom/ior-resolver", "name": "@metatrom/ior-resolver",
"version": "1.0.0", "version": "1.1.0-beta.6",
"description": "Interoperable Object Reference (IOR) resolver for Metro bundler and Node.js with support for local and remote component fetching", "description": "Interoperable Object Reference (IOR) resolver for Metro bundler and Node.js with support for local and remote component fetching",
"main": "index.js", "main": "index.js",
"types": "index.d.ts", "types": "index.d.ts",
@@ -60,7 +60,7 @@
"sync-fetch": "^0.5.2" "sync-fetch": "^0.5.2"
}, },
"peerDependencies": { "peerDependencies": {
"@react-native/metro-config": ">=0.80.0" "@react-native/metro-config": ">=0.78.0"
}, },
"peerDependenciesMeta": { "peerDependenciesMeta": {
"@react-native/metro-config": { "@react-native/metro-config": {