forked from react-native-community/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: podfile parsing on invalid yaml (react-native-community#810)
- Loading branch information
Showing
3 changed files
with
47 additions
and
1 deletion.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
packages/platform-ios/src/link-pods/__fixtures__/PodfileWithInvalidKey.lock
This file contains 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,16 @@ | ||
PODS: | ||
- MyPackage (1.0.0) | ||
|
||
EXTERNAL SOURCES: | ||
ExternalInterface: | ||
:path: !ruby/object:Pathname | ||
path: "../node_modules/MyOtherPackage/ios" | ||
|
||
SPEC CHECKSUMS: | ||
MyPackage: 77fd5fb102a4a5eedafa2c2b0245ceb7b7c15e45 | ||
MyOtherPackage: a9bb76128853e98a9ef6d12b0c8c91debc9bc475 | ||
|
||
|
||
PODFILE CHECKSUM: a8110dc7c367fc529b8b6a1084258784444d62ec | ||
|
||
COCOAPODS: 1.7.5 |
22 changes: 22 additions & 0 deletions
22
packages/platform-ios/src/link-pods/__tests__/getDependenciesFromPodfileLock.test.ts
This file contains 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 @@ | ||
/** | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
* | ||
*/ | ||
|
||
import getDependenciesFromPodfileLock from '../getDependenciesFromPodfileLock'; | ||
|
||
const path = require('path'); | ||
|
||
const PODFILES_PATH = path.join(__dirname, '../__fixtures__/'); | ||
|
||
describe('pods::getDependenciesFromPodfileLock', () => { | ||
it('only parses parts of the lock file that are valid yaml', () => { | ||
const podfileDeps = getDependenciesFromPodfileLock( | ||
path.join(PODFILES_PATH, 'PodfileWithInvalidKey.lock'), | ||
); | ||
expect(podfileDeps).toEqual(['MyPackage', 'MyOtherPackage']); | ||
}); | ||
}); |
This file contains 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