Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

liferay-npm-build-tools-common

Package Overview
Dependencies
Maintainers
1
Versions
117
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

liferay-npm-build-tools-common - npm Package Compare versions

Comparing version 2.15.1 to 2.16.0

21

lib/project/index.d.ts

@@ -72,6 +72,9 @@ /**

* tests.
* @param projectPath project's path in native format (whether absolute or
* relative to cwd)
* @param projectPath
* project's path in native format (whether absolute or relative to cwd)
* @param configFilePath
* optional path to configuration file (relative to `projectPath` if not
* given as an absolute path)
*/
loadFrom(projectPath: string): void;
loadFrom(projectPath: string, configFilePath?: string): void;
/**

@@ -95,3 +98,7 @@ * Requires a module in the context of the project (as opposed to the

*/
argv: string[];
argv: {
config: string;
'create-jar': boolean;
'dump-report': boolean;
};
/**

@@ -125,8 +132,14 @@ * Requires a tool module in the context of the project (as opposed to the

_loadPkgJson(): void;
/** Project relative path to build directory */
private _buildDir;
/** Absolute path to config file */
private _configFile;
private _npmbundlerrc;
private _pkgJson;
private _pkgManager;
/** Absolute path to project directory */
private _projectDir;
/** Project relative paths to source directories */
private _sources;
/** Absolute path to tools directory (usually project or preset dir) */
private _toolsDir;

@@ -133,0 +146,0 @@ private _versionsInfo;

26

lib/project/index.js

@@ -169,8 +169,12 @@ "use strict";

* tests.
* @param projectPath project's path in native format (whether absolute or
* relative to cwd)
* @param projectPath
* project's path in native format (whether absolute or relative to cwd)
* @param configFilePath
* optional path to configuration file (relative to `projectPath` if not
* given as an absolute path)
*/
loadFrom(projectPath) {
loadFrom(projectPath, configFilePath = '.npmbundlerrc') {
// First reset everything
this._buildDir = undefined;
this._configFile = undefined;
this._npmbundlerrc = undefined;

@@ -184,2 +188,5 @@ this._pkgJson = undefined;

this._projectDir = new file_path_1.default(path_1.default.resolve(projectPath));
this._configFile = new file_path_1.default(path_1.default.isAbsolute(configFilePath)
? configFilePath
: path_1.default.resolve(path_1.default.join(projectPath, configFilePath)));
this._toolsDir = this._projectDir;

@@ -224,11 +231,11 @@ // Load configuration files

const { _npmbundlerrc } = this;
if (argv.includes('-j') || argv.includes('--create-jar')) {
if (argv.config) {
this.loadFrom('.', argv.config);
}
if (argv['create-jar']) {
_npmbundlerrc['create-jar'] = true;
}
if (argv.includes('-r') || argv.includes('--dump-report')) {
if (argv['dump-report']) {
_npmbundlerrc['dump-report'] = true;
}
if (argv.includes('--no-tracking')) {
_npmbundlerrc['no-tracking'] = true;
}
}

@@ -273,4 +280,3 @@ /**

_loadNpmbundlerrc() {
const npmbundlerrcPath = this._projectDir.join('.npmbundlerrc')
.asNative;
const npmbundlerrcPath = this._configFile.asNative;
const config = fs_1.default.existsSync(npmbundlerrcPath)

@@ -277,0 +283,0 @@ ? read_json_sync_1.default(npmbundlerrcPath)

{
"name": "liferay-npm-build-tools-common",
"version": "2.15.1",
"version": "2.16.0",
"description": "Utility library for Liferay NPM Build Tools.",

@@ -14,3 +14,3 @@ "scripts": {

"escape-string-regexp": "^2.0.0",
"liferay-npm-bundler-preset-standard": "2.15.1",
"liferay-npm-bundler-preset-standard": "2.16.0",
"merge": "^1.2.1",

@@ -21,3 +21,3 @@ "properties": "^1.2.1",

},
"gitHead": "d3f746c7a0fbbdeb9e9321777396057317034423"
"gitHead": "e65dc5c74a4ca87a675a4e6168510b827ec1dd52"
}

@@ -221,8 +221,15 @@ /**

* tests.
* @param projectPath project's path in native format (whether absolute or
* relative to cwd)
* @param projectPath
* project's path in native format (whether absolute or relative to cwd)
* @param configFilePath
* optional path to configuration file (relative to `projectPath` if not
* given as an absolute path)
*/
loadFrom(projectPath: string): void {
loadFrom(
projectPath: string,
configFilePath: string = '.npmbundlerrc'
): void {
// First reset everything
this._buildDir = undefined;
this._configFile = undefined;
this._npmbundlerrc = undefined;

@@ -237,2 +244,7 @@ this._pkgJson = undefined;

this._projectDir = new FilePath(path.resolve(projectPath));
this._configFile = new FilePath(
path.isAbsolute(configFilePath)
? configFilePath
: path.resolve(path.join(projectPath, configFilePath))
);
this._toolsDir = this._projectDir;

@@ -280,16 +292,20 @@

*/
set argv(argv: string[]) {
set argv(argv: {
config: string;
'create-jar': boolean;
'dump-report': boolean;
}) {
const {_npmbundlerrc} = this;
if (argv.includes('-j') || argv.includes('--create-jar')) {
if (argv.config) {
this.loadFrom('.', argv.config);
}
if (argv['create-jar']) {
_npmbundlerrc['create-jar'] = true;
}
if (argv.includes('-r') || argv.includes('--dump-report')) {
if (argv['dump-report']) {
_npmbundlerrc['dump-report'] = true;
}
if (argv.includes('--no-tracking')) {
_npmbundlerrc['no-tracking'] = true;
}
}

@@ -336,4 +352,3 @@

_loadNpmbundlerrc(): void {
const npmbundlerrcPath = this._projectDir.join('.npmbundlerrc')
.asNative;
const npmbundlerrcPath = this._configFile.asNative;

@@ -398,9 +413,21 @@ const config = fs.existsSync(npmbundlerrcPath)

/** Project relative path to build directory */
private _buildDir: FilePath;
/** Absolute path to config file */
private _configFile: FilePath;
private _npmbundlerrc: object;
private _pkgJson: object;
private _pkgManager: PkgManager;
/** Absolute path to project directory */
private _projectDir: FilePath;
/** Project relative paths to source directories */
private _sources: FilePath[];
/** Absolute path to tools directory (usually project or preset dir) */
private _toolsDir: FilePath;
private _versionsInfo: Map<string, VersionInfo>;

@@ -407,0 +434,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc