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

babel-plugin-name-amd-modules

Package Overview
Dependencies
Maintainers
13
Versions
121
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-name-amd-modules - npm Package Compare versions

Comparing version 2.19.3 to 2.19.4

16

lib/index.js

@@ -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 @@ };

20

package.json
{
"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}`;
}
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