babel-plugin-name-amd-modules
Advanced tools
Comparing version 2.19.3 to 2.19.4
@@ -6,7 +6,19 @@ "use strict"; | ||
*/ | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
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; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
@@ -13,0 +25,0 @@ }; |
{ | ||
"name": "babel-plugin-name-amd-modules", | ||
"version": "2.19.3", | ||
"author": "Liferay Frontend Infrastructure Team <pt-frontend-infrastructure@liferay.com>", | ||
"dependencies": { | ||
"liferay-npm-build-tools-common": "2.19.4" | ||
}, | ||
"description": "A Babel plugin to give name to AMD modules based on their path and package.", | ||
"main": "lib/index.js", | ||
"name": "babel-plugin-name-amd-modules", | ||
"repository": { | ||
"directory": "maintenance/projects/js-toolkit/packages/babel-plugin-name-amd-modules", | ||
"type": "git", | ||
"url": "https://github.com/liferay/liferay-frontend-projects.git" | ||
}, | ||
"scripts": { | ||
"build": "tsc && yarn copyfiles", | ||
"copyfiles": "node ../../scripts/copyfiles.js", | ||
"build": "tsc && yarn copyfiles", | ||
"prepublish": "yarn build" | ||
}, | ||
"dependencies": { | ||
"liferay-npm-build-tools-common": "2.19.3" | ||
}, | ||
"gitHead": "e64d58bad216574b5abf459929857588b3b7bfbf" | ||
"version": "2.19.4", | ||
"gitHead": "d341f385c91a7d50168a6ce8be978d2f03f6bedc" | ||
} |
@@ -10,3 +10,3 @@ # babel-plugin-name-amd-modules | ||
```javascript | ||
define([], function() {}); | ||
define([], function () {}); | ||
``` | ||
@@ -17,3 +17,3 @@ | ||
```javascript | ||
define('package@1.0.0/index', [], function() {}); | ||
define('package@1.0.0/index', [], function () {}); | ||
``` | ||
@@ -20,0 +20,0 @@ |
@@ -17,3 +17,3 @@ /** | ||
*/ | ||
export default function({types: t}) { | ||
export default function ({types: t}) { | ||
const nameVisitor = { | ||
@@ -101,2 +101,3 @@ ExpressionStatement(path, state) { | ||
// call after exiting Program node :-( | ||
path.traverse(nameVisitor, state); | ||
@@ -113,2 +114,3 @@ }, | ||
// Decompose module name | ||
const moduleNameParts = mod.splitModuleName(moduleName); | ||
@@ -124,2 +126,3 @@ | ||
// Override package name if needed | ||
if (packageName !== undefined && packageName !== '<package.json>') { | ||
@@ -130,2 +133,3 @@ result.packageName = packageName; | ||
// Remove prefixes if needed | ||
if (srcPrefixes) { | ||
@@ -141,3 +145,4 @@ for (const srcPrefix of srcPrefixes) { | ||
// Recompose module name | ||
return `${result.packageName}/${result.name}`; | ||
} |
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
Copyleft License
License(Experimental) Copyleft license information was found.
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
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 contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
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
2
342
1
0
13772
7
+ Addedbabel-plugin-add-module-metadata@2.19.4(transitive)
+ Addedbabel-plugin-alias-modules@2.19.4(transitive)
+ Addedbabel-plugin-namespace-amd-define@2.19.4(transitive)
+ Addedbabel-plugin-namespace-modules@2.19.4(transitive)
+ Addedbabel-plugin-normalize-requires@2.19.4(transitive)
+ Addedbabel-plugin-wrap-modules-amd@2.19.4(transitive)
+ Addedbabel-preset-liferay-standard@2.19.4(transitive)
+ Addedliferay-npm-build-tools-common@2.19.4(transitive)
+ Addedliferay-npm-bundler-plugin-exclude-imports@2.19.4(transitive)
+ Addedliferay-npm-bundler-plugin-inject-imports-dependencies@2.19.4(transitive)
+ Addedliferay-npm-bundler-plugin-inject-peer-dependencies@2.19.4(transitive)
+ Addedliferay-npm-bundler-plugin-namespace-packages@2.19.4(transitive)
+ Addedliferay-npm-bundler-plugin-replace-browser-modules@2.19.4(transitive)
+ Addedliferay-npm-bundler-plugin-resolve-linked-dependencies@2.19.4(transitive)
+ Addedliferay-npm-bundler-preset-standard@2.19.4(transitive)
- Removedbabel-plugin-add-module-metadata@2.19.3(transitive)
- Removedbabel-plugin-alias-modules@2.19.3(transitive)
- Removedbabel-plugin-namespace-amd-define@2.19.3(transitive)
- Removedbabel-plugin-namespace-modules@2.19.3(transitive)
- Removedbabel-plugin-normalize-requires@2.19.3(transitive)
- Removedbabel-plugin-wrap-modules-amd@2.19.3(transitive)
- Removedbabel-preset-liferay-standard@2.19.3(transitive)
- Removedliferay-npm-build-tools-common@2.19.3(transitive)
- Removedliferay-npm-bundler-plugin-exclude-imports@2.19.3(transitive)
- Removedliferay-npm-bundler-plugin-inject-imports-dependencies@2.19.3(transitive)
- Removedliferay-npm-bundler-plugin-inject-peer-dependencies@2.19.3(transitive)
- Removedliferay-npm-bundler-plugin-namespace-packages@2.19.3(transitive)
- Removedliferay-npm-bundler-plugin-replace-browser-modules@2.19.3(transitive)
- Removedliferay-npm-bundler-plugin-resolve-linked-dependencies@2.19.3(transitive)
- Removedliferay-npm-bundler-preset-standard@2.19.3(transitive)