CodeQL library for JavaScript/TypeScript
codeql/javascript-all 2.1.1-dev (changelog, source)
Search

Class PackageJson

A package.json configuration object.

Import path

import javascript

Direct supertypes

Indirect supertypes

Predicates

declaresDependency

Holds if this package declares a dependency (including optional, development and bundled dependencies) on the given version of the given package.

getAContributor

Gets information for a contributor to this package.

getADependenciesObject

Gets a JSON object describing a group of dependencies of this package of the kind specified by depkind: "" for normal dependencies, "dev" for devDependencies, "bundled" for bundledDependencies and "opt" for optionalDependencies.

getAFile

Gets a file for this package.

getAKeyword

Gets a keyword for this package.

getAManFile

Gets a manual page for this package.

getAuthor

Gets the author information of this package.

getBin

Gets the path of a command defined for this package.

getBlacklistedCpu

Gets a platform not supported by this package.

getBlacklistedOS

Gets an operating system not supported by this package.

getBugs

Gets the bug tracker information of this package.

getBundledDependencies

Gets the bundled dependencies of this package.

getCPUs

Gets information about platforms supported by this package.

getConfig

Gets configuration information for this package.

getDependencies

Gets the dependencies of this package.

getDescription

Gets the description of this package.

getDevDependencies

Gets the development dependencies of this package.

getDirectories

Gets information about the directories of this package.

getEngines

Gets the engine dependencies of this package.

getExportedModule

Gets the module exported under the given relative path.

getExportedPath

Gets the path to the file exported with the given relative path.

getFiles

Gets the array of files for this package.

getHomepage

Gets the homepage URL of this package.

getKeywords

Gets the array of keywords for this package.

getLicense

Gets the license information of this package.

getMain

Gets the main module of this package.

getMainModule

Gets the main module of this package.

getOSs

Gets information about operating systems supported by this package.

getOptionalDependencies

Gets the optional dependencies of this package.

getPackageName

Gets the name of this package. If the package is located under the package pkg1 and its relative path is foo/bar, then the resulting package name will be pkg1/foo/bar.

getPeerDependencies

Gets the peer dependencies of this package.

getPublishConfig

Gets publishing configuration information about this package.

getRepository

Gets repository information for this package.

getScripts

Gets information about the scripts of this package.

getTypings

Gets the types or typings field of this package.

getTypingsFile

Gets the file containing the typings of this package, which can either be from the types or typings field, or derived from the main or module fields.

getTypingsModule

Gets the module containing the typings of this package, which can either be from the types or typings field, or derived from the main or module fields.

getVersion

Gets the version of this package.

getWhitelistedCpu

Gets a platform supported by this package.

getWhitelistedOS

Gets an operating system supported by this package.

isEngineStrict

Holds if this package has strict engine requirements.

isPreferGlobal

Holds if this package prefers to be installed globally.

isPrivate

Holds if this is a private package.

Inherited predicates

getAPrimaryQlClass

Gets the primary QL class for the Locatable.

from JsonObject
getBooleanValue

If this is a boolean constant, gets its boolean value.

from JsonValue
getChild

Gets the ith child value of this value.

from JsonValue
getElementValue

If this is an array, gets the value of the ith element.

from JsonValue
getEndLine

Gets the line on which this element ends.

from Locatable
getFile

Gets the file this program element comes from.

from Locatable
getIntValue

If this is an integer constant, gets its numeric value.

from JsonValue
getJsonFile

Gets the JSON file containing this value.

from JsonValue
getLocation

Gets this element’s location.

from Locatable
getNumLines

Gets the number of lines covered by this element.

from Locatable
getParent

Gets the parent value to which this value belongs, if any.

from JsonValue
getPrimaryQlClasses

Gets a comma-separated list of the names of the primary CodeQL classes to which this element belongs.

from Locatable
getPropStringValue

Gets the string value of property name of this object.

from JsonObject
getPropValue

If this is an object, gets the value of property name.

from JsonValue
getStartLine

Gets the line on which this element starts.

from Locatable
getStringValue

If this is a string constant, gets the value of the string.

from JsonValue
isTopLevel

Holds if this JSON value is the top level element in its enclosing file.

from JsonValue
toString

Gets a textual representation of this element.

from JsonValue

Charpred