• Version 1.4.1
  • Published
  • 23.6 kB
  • 4 dependencies
  • Apache-2.0 license


npm i @snyk/composer-lockfile-parser
yarn add @snyk/composer-lockfile-parser
pnpm add @snyk/composer-lockfile-parser


Generate a dep tree given a composer.lock file



function buildDepTree

buildDepTree: (
lockFileContent: string,
manifestFileContent: string,
defaultProjectName: string,
systemVersions: SystemPackages,
includeDev?: boolean
) => ComposerParserResponse;

    function buildDepTreeFromFiles

    buildDepTreeFromFiles: (
    basePath: string,
    lockFileName: string,
    systemVersions: SystemPackages,
    includeDev?: boolean
    ) => ComposerParserResponse;


      interface ComposerJsonFile

      interface ComposerJsonFile {}
      • Manifest file related types

      property 'require-dev'

      'require-dev'?: ComposerDependencies;

        property extra

        extra: ComposerExtras;

          property name

          name: string;

            property require

            require: ComposerDependencies;

              property version

              version?: string;

                interface ComposerLockFile

                interface ComposerLockFile {}

                  property 'packages-dev'

                  'packages-dev'?: LockFilePackage[];

                    property packages

                    packages: LockFilePackage[];

                      interface ComposerParserResponse

                      interface ComposerParserResponse {}
                      • Response type

                      property dependencies

                      dependencies: DepTreeDependencies;

                        property hasDevDependencies

                        hasDevDependencies: boolean;

                          property name

                          name: string;

                            property packageFormatVersion

                            packageFormatVersion: 'composer:0.0.1';

                              property version

                              version: string;

                                interface SystemPackages

                                interface SystemPackages {}
                                • Helper types

                                index signature

                                [depName: string]: string;

                                  Package Files (2)

                                  Dependencies (4)

                                  Dev Dependencies (7)

                                  Peer Dependencies (0)

                                  No peer dependencies.


                                  To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                  You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@snyk/composer-lockfile-parser.

                                  • Markdown
                                  • HTML
                                    <a href="https://www.jsdocs.io/package/@snyk/composer-lockfile-parser"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>