| hide_title | true |
|---|---|
| custom_edit_url | |
| pagination_prev | |
| pagination_next |
Home > @rushstack/node-core-library > PackageJsonLookup
This class provides methods for finding the nearest "package.json" for a folder and retrieving the name of the package. The results are cached.
Signature:
export declare class PackageJsonLookup |
Constructor |
Modifiers |
Description |
|---|---|---|
|
Constructs a new instance of the |
|
Property |
Modifiers |
Type |
Description |
|---|---|---|---|
|
|
A singleton instance of |
|
Method |
Modifiers |
Description |
|---|---|---|
|
Clears the internal file cache. | ||
|
This function is similar to PackageJsonLookup.loadPackageJson()<></>, except that it does not report an error if the | ||
|
|
A helper for loading the caller's own package.json file. | |
|
Loads the specified package.json file, if it is not already present in the cache. | ||
|
Returns the absolute path of a folder containing a package.json file, by looking upwards from the specified fileOrFolderPath. If no package.json can be found, undefined is returned. | ||
|
If the specified file or folder is part of a package, this returns the absolute path to the associated package.json file. | ||
|
This function is similar to PackageJsonLookup.tryLoadPackageJsonFor()<></>, except that it does not report an error if the | ||
|
If the specified file or folder is part of a package, this loads and returns the associated package.json file. |