diff --git a/__tests__/extensions.test.ts b/__tests__/extensions.test.ts index a772ce6e..f1112ead 100644 --- a/__tests__/extensions.test.ts +++ b/__tests__/extensions.test.ts @@ -131,15 +131,17 @@ describe('Extension tests', () => { it('checking addExtensionOnDarwin', async () => { let darwin: string = await extensions.addExtension( - 'Xdebug, pcov, grpc, igbinary, imagick, protobuf, swoole, sqlite, oci8, pdo_oci, :intl, ast-beta, grpc-1.2.3', + 'amqp, Xdebug, pcov, grpc, igbinary, imagick, imap, protobuf, swoole, sqlite, oci8, pdo_oci, :intl, ast-beta, grpc-1.2.3', '7.2', 'darwin' ); + expect(darwin).toContain('add_brew_extension amqp extension'); expect(darwin).toContain('add_brew_extension xdebug zend_extension'); expect(darwin).toContain('add_brew_extension pcov extension'); expect(darwin).toContain('add_brew_extension grpc extension'); expect(darwin).toContain('add_brew_extension igbinary extension'); expect(darwin).toContain('add_brew_extension imagick extension'); + expect(darwin).toContain('add_brew_extension imap extension'); expect(darwin).toContain('add_brew_extension protobuf extension'); expect(darwin).toContain('add_brew_extension swoole extension'); expect(darwin).toContain('add_extension sqlite3'); diff --git a/dist/index.js b/dist/index.js index fc323c29..0eae1200 100644 --- a/dist/index.js +++ b/dist/index.js @@ -2896,11 +2896,11 @@ async function addExtensionDarwin(extension_csv, version) { case /(5\.[3-6]|7\.0)pcov/.test(version_extension): add_script += await utils.getUnsupportedLog('pcov', version, 'darwin'); return; - // match 5.6xdebug to 8.9xdebug, 5.6igbinary to 8.9igbinary - // match 5.6grpc to 7.4grpc, 5.6imagick to 7.4imagick, 5.6protobuf to 7.4protobuf, 5.6swoole to 7.4swoole + // 5.6igbinary to 8.9igbinary, 5.6imap to 8.9imap, match 5.6xdebug to 8.9xdebug, + // match 5.6amqp to 7.4amqp, 5.6grpc to 7.4grpc, 5.6imagick to 7.4imagick, 5.6protobuf to 7.4protobuf, 5.6swoole to 7.4swoole // match 7.1pcov to 8.9pcov - case /(5\.6|7\.[0-4]|8\.[0-9])(xdebug|igbinary)/.test(version_extension): - case /(5\.6|7\.[0-4])(grpc|imagick|protobuf|swoole)/.test(version_extension): + case /(5\.6|7\.[0-4]|8\.[0-9])(igbinary|imap|xdebug)/.test(version_extension): + case /(5\.6|7\.[0-4])(amqp|grpc|imagick|protobuf|swoole)/.test(version_extension): case /(7\.[1-4]|8\.[0-9])pcov/.test(version_extension): add_script += await utils.joins('\nadd_brew_extension', ext_name, ext_prefix); return; diff --git a/src/extensions.ts b/src/extensions.ts index 47321727..404f1219 100644 --- a/src/extensions.ts +++ b/src/extensions.ts @@ -66,11 +66,13 @@ export async function addExtensionDarwin( case /(5\.[3-6]|7\.0)pcov/.test(version_extension): add_script += await utils.getUnsupportedLog('pcov', version, 'darwin'); return; - // match 5.6xdebug to 8.9xdebug, 5.6igbinary to 8.9igbinary - // match 5.6grpc to 7.4grpc, 5.6imagick to 7.4imagick, 5.6protobuf to 7.4protobuf, 5.6swoole to 7.4swoole + // 5.6igbinary to 8.9igbinary, 5.6imap to 8.9imap, match 5.6xdebug to 8.9xdebug, + // match 5.6amqp to 7.4amqp, 5.6grpc to 7.4grpc, 5.6imagick to 7.4imagick, 5.6protobuf to 7.4protobuf, 5.6swoole to 7.4swoole // match 7.1pcov to 8.9pcov - case /(5\.6|7\.[0-4]|8\.[0-9])(xdebug|igbinary)/.test(version_extension): - case /(5\.6|7\.[0-4])(grpc|imagick|protobuf|swoole)/.test( + case /(5\.6|7\.[0-4]|8\.[0-9])(igbinary|imap|xdebug)/.test( + version_extension + ): + case /(5\.6|7\.[0-4])(amqp|grpc|imagick|protobuf|swoole)/.test( version_extension ): case /(7\.[1-4]|8\.[0-9])pcov/.test(version_extension):