Skip to content
Snippets Groups Projects
Select Git revision
  • 57aea566c2aaa3f468b739b56729effe85c6ef0c
  • main default protected
  • renovate/main-ghcr.io-renovatebot-base-image-10.x
  • renovate/main-ghcr.io-containerbase-devcontainer-13.x
  • next
  • revert-31645-feat/rename-gradle-wrapper-validation-action
  • renovate/main-redis-5.x
  • fix/36615b-branch-reuse-no-cache
  • chore/punycode
  • fix/36615-branch-reuse-bug
  • refactor/pin-new-value
  • feat/36219--git-x509-signing
  • feat/structured-logger
  • hotfix/39.264.1
  • feat/skip-dangling
  • gh-readonly-queue/next/pr-36034-7a061c4ca1024a19e2c295d773d9642625d1c2be
  • hotfix/39.238.3
  • refactor/gitlab-auto-approve
  • feat/template-strings
  • gh-readonly-queue/next/pr-35654-137d934242c784e0c45d4b957362214f0eade1d7
  • fix/32307-global-extends-merging
  • 41.31.1
  • 41.31.0
  • 41.30.5
  • 41.30.4
  • 41.30.3
  • 41.30.2
  • 41.30.1
  • 41.30.0
  • 41.29.1
  • 41.29.0
  • 41.28.2
  • 41.28.1
  • 41.28.0
  • 41.27.1
  • 41.27.0
  • 41.26.2
  • 41.26.1
  • 41.26.0
  • 41.25.1
  • 41.25.0
41 results

gitlab-bot-security.md

Blame
  • extract.spec.ts 3.70 KiB
    import { Fixtures } from '../../../../test/fixtures';
    import { GlobalConfig } from '../../../config/global';
    import type { RepoGlobalConfig } from '../../../config/types';
    import { extractPackageFile } from '.';
    
    const simplePodfile = Fixtures.get('Podfile.simple');
    const complexPodfile = Fixtures.get('Podfile.complex');
    
    const adminConfig: RepoGlobalConfig = { localDir: '' };
    
    describe('modules/manager/cocoapods/extract', () => {
      describe('extractPackageFile()', () => {
        it('extracts from simple file', async () => {
          GlobalConfig.set(adminConfig);
          const res = await extractPackageFile(simplePodfile, 'Podfile');
          expect(res?.deps).toMatchSnapshot([
            { depName: 'a' },
            { depName: 'a/sub' },
            { depName: 'b', currentValue: '1.2.3' },
            { depName: 'c', currentValue: '1.2.3' },
            { depName: 'd', skipReason: 'path-dependency' },
            { depName: 'e', skipReason: 'git-dependency' },
            { depName: 'f', skipReason: 'git-dependency' },
            { depName: 'g', datasource: 'git-tags', currentValue: '3.2.1' },
            { depName: 'h', currentValue: '0.0.1', datasource: 'github-tags' },
            { depName: 'i', packageName: 'foo/foo', datasource: 'github-tags' },
            { depName: 'j', packageName: 'bar/bar', datasource: 'gitlab-tags' },
            { depName: 'k', packageName: 'bar/bar', datasource: 'gitlab-tags' },
            {
              depName: 'l',
              packageName: 'https://example.com/baz/baz.git',
              datasource: 'git-tags',
            },
            {
              depName: 'm',
              packageName: 'git@example.com:baz/baz.git',
              datasource: 'git-tags',
            },
          ]);
        });
    
        it('extracts from complex file', async () => {
          GlobalConfig.set(adminConfig);
          const res = await extractPackageFile(complexPodfile, 'Podfile');
          expect(res?.deps).toMatchSnapshot([
            { depName: 'IQKeyboardManager', currentValue: '~> 6.5.0' },
            { depName: 'CYLTabBarController', currentValue: '~> 1.28.3' },
            { depName: 'PureLayout', currentValue: '~> 3.1.4' },
            { depName: 'AFNetworking/Serialization', currentValue: '~> 3.2.1' },
            { depName: 'AFNetworking/Security', currentValue: '~> 3.2.1' },
            { depName: 'AFNetworking/Reachability', currentValue: '~> 3.2.1' },
            { depName: 'AFNetworking/NSURLSession', currentValue: '~> 3.2.1' },
            { depName: 'MBProgressHUD', currentValue: '~> 1.1.0' },
            { depName: 'MJRefresh', currentValue: '~> 3.1.16' },
            { depName: 'MJExtension', currentValue: '~> 3.1.0' },
            { depName: 'TYPagerController', currentValue: '~> 2.1.2' },
            { depName: 'YYImage', currentValue: '~> 1.0.4' },
            { depName: 'SDWebImage', currentValue: '~> 5.0' },
            { depName: 'SDCycleScrollView', currentValue: '~> 1.80' },
            { depName: 'NullSafe', currentValue: '~> 2.0' },
            { depName: 'TZImagePickerController', currentValue: '~> 3.2.1' },
            { depName: 'TOCropViewController', currentValue: '~> 2.5.1' },
            { depName: 'FMDB', currentValue: '~> 2.7.5' },
            { depName: 'FDStackView', currentValue: '~> 1.0.1' },
            { depName: 'LYEmptyView', skipReason: 'unknown-version' },
            { depName: 'MMKV', currentValue: '~> 1.0.22' },
            { depName: 'fishhook', skipReason: 'unknown-version' },
            { depName: 'CocoaLumberjack', currentValue: '~> 3.5.3' },
            { depName: 'GZIP', currentValue: '~> 1.2' },
            { depName: 'LBXScan/LBXNative', currentValue: '~> 2.3' },
            { depName: 'LBXScan/LBXZXing', currentValue: '~> 2.3' },
            { depName: 'LBXScan/UI', currentValue: '~> 2.3' },
            { depName: 'MLeaksFinder', skipReason: 'unknown-version' },
            { depName: 'FBMemoryProfiler', skipReason: 'unknown-version' },
          ]);
        });
      });
    });