Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/silent-roses-carry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@callstack/brownfield-cli': patch
'@callstack/react-native-brownfield': patch
---

fix: dependencies versions and vulnerabilities
1 change: 1 addition & 0 deletions apps/RNApp/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ ruby '>= 3.1.0'
gem 'activesupport', '~> 7.2.3', '>= 7.2.3.1'
gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1'
gem 'concurrent-ruby', '< 1.3.8'
gem 'json', '~> 2.19.9'
gem 'xcodeproj', '< 1.26.0'

# Ruby 3.4.0 has removed some libraries from the standard library.
Expand Down
3 changes: 2 additions & 1 deletion apps/RNApp/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ GEM
mutex_m
i18n (1.14.8)
concurrent-ruby (~> 1.0)
json (2.19.2)
json (2.19.9)
logger (1.7.0)
minitest (5.27.0)
molinillo (0.8.0)
Expand Down Expand Up @@ -110,6 +110,7 @@ DEPENDENCIES
bigdecimal
cocoapods (>= 1.13, != 1.15.1, != 1.15.0)
concurrent-ruby (< 1.3.8)
json (~> 2.19.9)
logger
mutex_m
nkf
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,14 @@
"@types/babel__core": "^7.20.5",
"@types/babel__preset-env": "^7.10.0",
"@types/node": "^25.5.0",
"@vitest/coverage-v8": "^4.1.0",
"@vitest/coverage-v8": "4.1.11",
"eslint": "^9.39.3",
"globals": "^17.3.0",
"nodemon": "^3.1.14",
"prettier": "^3.8.1",
"ts-json-schema-generator": "^2.9.0",
"typescript": "5.9.3",
"vitest": "^4.1.4"
"vitest": "4.1.11"
},
"engines": {
"node": ">=20"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,69 +110,49 @@ describe('stripFrameworkBinary', () => {
const archInfo = execSync(`xcrun lipo -info "${binaryPath}"`, {
encoding: 'utf-8',
});
expect(archInfo).toContain('arm64');
expect(archInfo).toContain('x86_64');
}
);

it.skipIf(!isDarwin)('handles multiple slices', () => {
const xcframeworkPath = createMockXcframework(
tempDir,
'TestFramework',
['ios-arm64', 'ios-arm64_x86_64-simulator']
);

stripFrameworkBinary(xcframeworkPath);
it.skipIf(!isDarwin)('handles multiple slices', () => {
const xcframeworkPath = createMockXcframework(tempDir, 'TestFramework', [
'ios-arm64',
'ios-arm64_x86_64-simulator',
]);

const newContent = fs.readFileSync(binaryPath);
expect(newContent.toString()).not.toBe(originalContent);
stripFrameworkBinary(xcframeworkPath);

const archInfo = execSync(`xcrun lipo -info "${binaryPath}"`, {
encoding: 'utf-8',
});
expect(archInfo).toContain('arm64');
expect(archInfo).toContain('x86_64');
});
const deviceBinary = path.join(
xcframeworkPath,
'ios-arm64',
'TestFramework.framework',
'TestFramework'
);
const simBinary = path.join(
xcframeworkPath,
'ios-arm64_x86_64-simulator',
'TestFramework.framework',
'TestFramework'
);

it('handles multiple slices', () => {
const xcframeworkPath = createMockXcframework(
tempDir,
'TestFramework',
['ios-arm64', 'ios-arm64_x86_64-simulator']
);

stripFrameworkBinary(xcframeworkPath);

const deviceBinary = path.join(
xcframeworkPath,
'ios-arm64',
'TestFramework.framework',
'TestFramework'
);
const simBinary = path.join(
xcframeworkPath,
'ios-arm64_x86_64-simulator',
'TestFramework.framework',
'TestFramework'
);

expect(fs.existsSync(deviceBinary)).toBe(true);
expect(fs.existsSync(simBinary)).toBe(true);
expect(mockLoggerSuccess).toHaveBeenCalledOnce();
});
expect(fs.existsSync(deviceBinary)).toBe(true);
expect(fs.existsSync(simBinary)).toBe(true);
expect(mockLoggerSuccess).toHaveBeenCalledOnce();
});

it('ignores non-ios directories', () => {
const xcframeworkPath = createMockXcframework(
tempDir,
'TestFramework',
['ios-arm64']
);
fs.mkdirSync(path.join(xcframeworkPath, 'macos-arm64'), {
recursive: true,
});
it.skipIf(!isDarwin)('ignores non-ios directories', () => {
const xcframeworkPath = createMockXcframework(tempDir, 'TestFramework', [
'ios-arm64',
]);
fs.mkdirSync(path.join(xcframeworkPath, 'macos-arm64'), {
recursive: true,
});

stripFrameworkBinary(xcframeworkPath);
stripFrameworkBinary(xcframeworkPath);

expect(mockLoggerSuccess).toHaveBeenCalledOnce();
});
}
);
expect(mockLoggerSuccess).toHaveBeenCalledOnce();
});

it('warns and skips unknown slice types', () => {
const xcframeworkPath = createMockXcframework(tempDir, 'TestFramework', [
Expand Down
4 changes: 2 additions & 2 deletions packages/react-native-brownfield/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
"@react-native/babel-preset": "0.83.2",
"@types/jest": "^30.0.0",
"@types/react": "^19.1.1",
"@vitest/coverage-v8": "^4.1.0",
"@vitest/coverage-v8": "4.1.11",
"eslint": "^9.39.3",
"globals": "^17.3.0",
"import": "^0.0.6",
Expand All @@ -122,7 +122,7 @@
"react-native": "0.83.2",
"react-native-builder-bob": "^0.41.0",
"typescript": "5.9.3",
"vitest": "^4.1.4"
"vitest": "4.1.11"
},
"codegenConfig": {
"name": "ReactNativeBrownfield",
Expand Down
Loading
Loading