liferay-npm-bundler-plugin-inject-imports-dependencies
Advanced tools
Comparing version 2.6.2 to 2.6.3-alpha.126
@@ -1,45 +0,42 @@ | ||
'use strict'; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.default = function (_ref, _ref2) { | ||
var rootPkgJson = _ref.rootPkgJson, | ||
globalConfig = _ref.globalConfig, | ||
config = _ref.config, | ||
log = _ref.log; | ||
var pkgJson = _ref2.pkgJson; | ||
var imports = config.imports || globalConfig.imports || {}; | ||
imports = (0, _imports.normalizeImportsConfig)(imports); | ||
pkgJson.dependencies = pkgJson.dependencies || {}; | ||
Object.keys(imports).forEach(function (namespace) { | ||
Object.keys(imports[namespace]).forEach(function (pkgName) { | ||
var localName = ns.addNamespace(pkgName, rootPkgJson); | ||
var importVersion = imports[namespace][pkgName]; | ||
var importName = namespace === '' ? pkgName : ns.addNamespace(pkgName, { name: namespace }); | ||
pkgJson.dependencies[importName] = importVersion; | ||
if (pkgJson.dependencies[localName] !== undefined && pkgJson.dependencies[localName] !== importVersion) { | ||
log.info('inject-imports-dependencies', 'Injected dependency', importName + '@' + importVersion, '(however, note that the same dependency in package.json', 'has different constraints:', localName + '@' + pkgJson.dependencies[localName] + ')'); | ||
} else { | ||
log.info('inject-imports-dependencies', 'Injected dependency', importName + '@' + importVersion); | ||
} | ||
}); | ||
}); | ||
"use strict"; | ||
/** | ||
* © 2017 Liferay, Inc. <https://liferay.com> | ||
* | ||
* SPDX-License-Identifier: LGPL-3.0-or-later | ||
*/ | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||
result["default"] = mod; | ||
return result; | ||
}; | ||
var _namespace = require('liferay-npm-build-tools-common/lib/namespace'); | ||
var ns = _interopRequireWildcard(_namespace); | ||
var _imports = require('liferay-npm-build-tools-common/lib/imports'); | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } | ||
//# sourceMappingURL=index.js.map | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const ns = __importStar(require("liferay-npm-build-tools-common/lib/namespace")); | ||
const imports_1 = require("liferay-npm-build-tools-common/lib/imports"); | ||
/** | ||
* @return {void} | ||
*/ | ||
function default_1({ config, globalConfig, log, rootPkgJson }, { pkgJson }) { | ||
let imports = config.imports || globalConfig.imports || {}; | ||
imports = imports_1.normalizeImportsConfig(imports); | ||
pkgJson.dependencies = pkgJson.dependencies || {}; | ||
Object.keys(imports).forEach(namespace => { | ||
Object.keys(imports[namespace]).forEach(pkgName => { | ||
const localName = ns.addNamespace(pkgName, rootPkgJson); | ||
const importVersion = imports[namespace][pkgName]; | ||
const importName = namespace === '' | ||
? pkgName | ||
: ns.addNamespace(pkgName, { name: namespace }); | ||
pkgJson.dependencies[importName] = importVersion; | ||
if (pkgJson.dependencies[localName] !== undefined && | ||
pkgJson.dependencies[localName] !== importVersion) { | ||
log.info('inject-imports-dependencies', 'Injected dependency', `${importName}@${importVersion}`, '(however, note that the same dependency in package.json', 'has different constraints:', `${localName}@${pkgJson.dependencies[localName]})`); | ||
} | ||
else { | ||
log.info('inject-imports-dependencies', 'Injected dependency', `${importName}@${importVersion}`); | ||
} | ||
}); | ||
}); | ||
} | ||
exports.default = default_1; |
{ | ||
"name": "liferay-npm-bundler-plugin-inject-imports-dependencies", | ||
"version": "2.6.2", | ||
"version": "2.6.3-alpha.126+f9a8cd2", | ||
"description": "A liferay-npm-bundler plugin to force injection of declared imports as dependencies.", | ||
"main": "lib/index.js", | ||
"scripts": { | ||
"build": "babel --source-maps -D -d lib src", | ||
"prepublish": "npm run build" | ||
"copyfiles": "node ../../scripts/copyfiles.js", | ||
"build": "tsc && yarn copyfiles", | ||
"prepublish": "yarn build" | ||
}, | ||
"devDependencies": { | ||
"babel-cli": "^6.24.1", | ||
"babel-preset-es2015": "^6.24.1" | ||
"dependencies": { | ||
"liferay-npm-build-tools-common": "2.6.3-alpha.126+f9a8cd2" | ||
}, | ||
"dependencies": { | ||
"liferay-npm-build-tools-common": "2.6.2" | ||
} | ||
"gitHead": "f9a8cd23c70ecc6fff238bea906286c1c6cb2ecc" | ||
} |
@@ -0,1 +1,7 @@ | ||
/** | ||
* © 2017 Liferay, Inc. <https://liferay.com> | ||
* | ||
* SPDX-License-Identifier: LGPL-3.0-or-later | ||
*/ | ||
import PluginLogger from 'liferay-npm-build-tools-common/lib/plugin-logger'; | ||
@@ -23,3 +29,3 @@ import plugin from '../index'; | ||
imports: { | ||
'provider': { | ||
provider: { | ||
'pkg-a': '^1.0.0', | ||
@@ -89,3 +95,3 @@ 'pkg-b': '^2.0.0', | ||
imports: { | ||
'provider': { | ||
provider: { | ||
'pkg-a': '^1.0.0', | ||
@@ -92,0 +98,0 @@ 'pkg-b': '^3.0.0', |
@@ -0,1 +1,7 @@ | ||
/** | ||
* © 2017 Liferay, Inc. <https://liferay.com> | ||
* | ||
* SPDX-License-Identifier: LGPL-3.0-or-later | ||
*/ | ||
import * as ns from 'liferay-npm-build-tools-common/lib/namespace'; | ||
@@ -7,6 +13,3 @@ import {normalizeImportsConfig} from 'liferay-npm-build-tools-common/lib/imports'; | ||
*/ | ||
export default function( | ||
{rootPkgJson, globalConfig, config, log}, | ||
{pkgJson} | ||
) { | ||
export default function({config, globalConfig, log, rootPkgJson}, {pkgJson}) { | ||
let imports = config.imports || globalConfig.imports || {}; | ||
@@ -13,0 +16,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
Copyleft License
License(Experimental) Copyleft license information was found.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
Non-permissive License
License(Experimental) A license not known to be considered permissive was found.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No License Found
License(Experimental) License information could not be found.
Found 1 instance in 1 package
0
14847
8
3
70
195
2
1
- Removedliferay-npm-build-tools-common@2.6.2(transitive)
- Removedread-json-sync@2.0.1(transitive)
Updatedliferay-npm-build-tools-common@2.6.3-alpha.126+f9a8cd2