Skip to content

Commit 5c95911

Browse files
fix: use correct podSpecPath param instead of podspecPath
1 parent d8a50bf commit 5c95911

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

src/platforms/iOS.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export interface IOSPlatformConfiguration {
99
* @deprecated use `podspecPath` instead
1010
* */
1111
podSpecJsonPath?: string | undefined
12-
podspecPath: string | undefined
12+
podSpecPath: string | undefined
1313
dependencyName: string | undefined
1414
displayName: string | undefined
1515
}
@@ -18,7 +18,7 @@ export type IOSResolveContext = Pick<GenerateNotesContext, 'cwd' | 'logger'>
1818

1919
export const resolve = async (
2020
{ cwd, logger }: IOSResolveContext,
21-
{ podSpecJsonPath, podspecPath, dependencyName }: IOSPlatformConfiguration
21+
{ podSpecJsonPath, podSpecPath, dependencyName }: IOSPlatformConfiguration
2222
) => {
2323
if (!cwd) {
2424
throw new Error(`Current working directory is required to detect iOS dependency version range.`)
@@ -29,8 +29,8 @@ export const resolve = async (
2929
}
3030

3131
let podspecPathParam: string | undefined
32-
if (podspecPath) {
33-
podspecPathParam = podspecPath
32+
if (podSpecPath) {
33+
podspecPathParam = podSpecPath
3434
} else if (podSpecJsonPath) {
3535
logger.warn('[DEPRECATED] Use `platforms.iOS.podspecPath` instead of `platform.iOS.podSpecJsonPath`.')
3636
podspecPathParam = podSpecJsonPath

test/iOS.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ describe('Test for iOS platform', () => {
1313

1414
it('returns correct version with json', async () => {
1515
const iosVersion = await resolve(ctx, {
16-
podspecPath: 'test/project/ios/podspec.json',
16+
podSpecPath: 'test/project/ios/podspec.json',
1717
dependencyName,
1818
displayName: undefined,
1919
})
@@ -32,7 +32,7 @@ describe('Test for iOS platform', () => {
3232

3333
it('returns correct version with dsl', async () => {
3434
const iosVersion = await resolve(ctx, {
35-
podspecPath: 'test/project/ios/Test.podspec',
35+
podSpecPath: 'test/project/ios/Test.podspec',
3636
dependencyName,
3737
displayName: undefined,
3838
})
@@ -42,7 +42,7 @@ describe('Test for iOS platform', () => {
4242
it('throws error when file not found', async () => {
4343
await expect(
4444
resolve(ctx, {
45-
podspecPath: 'nonExists',
45+
podSpecPath: 'nonExists',
4646
dependencyName,
4747
displayName: undefined,
4848
})
@@ -56,7 +56,7 @@ describe('Test for iOS platform', () => {
5656
})
5757

5858
await expect(
59-
resolve(ctx, { podspecPath: 'not-readable.podspec.json', dependencyName, displayName: undefined })
59+
resolve(ctx, { podSpecPath: 'not-readable.podspec.json', dependencyName, displayName: undefined })
6060
).rejects.toThrowErrorMatchingSnapshot('podspecNotReadable')
6161

6262
readFileSyncMock.mockRestore()
@@ -65,7 +65,7 @@ describe('Test for iOS platform', () => {
6565
it('throws error when path is a directory', async () => {
6666
await expect(
6767
resolve(ctx, {
68-
podspecPath: 'test',
68+
podSpecPath: 'test',
6969
dependencyName,
7070
displayName: undefined,
7171
})

test/index.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const cwd = process.cwd()
99
const pluginConfig = {
1010
platforms: {
1111
iOS: {
12-
podspecPath: 'test/project/ios/podspec.json',
12+
podSpecPath: 'test/project/ios/podspec.json',
1313
dependencyName: 'FingerprintPro',
1414
displayName: 'Fingerprint iOS SDK',
1515
},

0 commit comments

Comments
 (0)