This is the NPM Plugin of jQAssistant.
It provides a scanner for package.json
files.
For more information on jQAssistant see https://jqassistant.org.
Add the plugin to the plugins section of the jqassistant.yml
configuration file:
jqassistant:
plugins:
# Includes the jQAssistant NPM plugin
- group-id: org.jqassistant.plugin
artifact-id: jqassistant-npm-plugin
version: 2.0.0-SNAPSHOT
scan:
include:
files:
- ${project.basedir}/package.json
The plugin provides a scanner which accepts files with the name package.json
and creates the structure as described in this section, using a subset of the items defined in https://docs.npmjs.com/cli/v9/configuring-npm/package-json and having nodes labeled with :NPM:Package:Json:File
as entry point.
The scanner creates nodes with the following labels:
-
:NPM:Package:Json:File
-
:NPM:Person
-
:NPM:Script
-
:NPM:Dependency
-
:NPM:Engine
-
Represents a package.json
file.
Name | Description |
---|---|
fileName |
The file name, relative to the scanned directory. |
name |
The name of the package. |
version |
The version of the package. |
description |
The description of the package. |
keywords |
The keywords of the package (array). |
homepage |
The homepage of the package. |
license |
The license of the package. |
files |
The array of file patterns that describing the entries to be included in the package. |
main |
The module id that is the primary entry point to the package. |
Name | Target label(s) | Cardinality | Description |
---|---|---|---|
HAS_AUTHOR |
:NPM:Person |
0..1 |
References the author of the package. |
HAS_CONTRIBUTOR |
:NPM:Person |
0..* |
References a contributor of the package. |
DECLARES_SCRIPT |
:NPM:Script |
0..* |
References a script declared in the package. |
DECLARES_DEPENDENCY |
:NPM:Dependency |
0..* |
References a dependency declared in the package. |
DECLARES_DEV_DEPENDENCY |
:NPM:Dependency |
0..* |
References a dev dependency declared in the package. |
DECLARES_PEER_DEPENDENCY |
:NPM:Dependency |
0..* |
References a peer dependency declared in the package. |
HAS_BUNDLED_DEPENDENCY |
:NPM:Dependency |
0..* |
References bundled dependencies declared in the package. |
DECLARES_ENGINE |
:NPM:Engine |
0..* |
References an engine declared in the package. |
DECLARES_OS |
:NPM:Os |
0..* |
References supported and blocked operating systems. |
Represents a person with contact information.
Name | Description |
---|---|
name |
The name of the person. |
The e-mail of the person. |
|
url |
The URL of the person. |
Represents a script with name and command.
Name | Description |
---|---|
name |
The name of the script. |
script |
The script command. |
Represents a dependency with name and version or location.
Name | Description |
---|---|
name |
The name of the dependency. |
dependency |
The version or location. |
Represents an engine with name and version.
Name | Description |
---|---|
name |
The name of the engine. |
engine |
The engine version. |