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

async-define

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

async-define - npm Package Compare versions

Comparing version 3.1.0 to 3.2.0

5

bin/async-define-bundle.js

@@ -16,2 +16,3 @@ #! /usr/bin/env node

var scriptPath = argv.script || argv.s;
var hasSourceMaps = argv.sourcemaps;

@@ -34,4 +35,6 @@ exportVar = exportVar ? exportVar.split(',') : [];

script: script,
scriptName: scriptName
scriptName: scriptName,
hasSourceMaps: typeof hasSourceMaps !== 'undefined',
}));
process.exit();

@@ -38,0 +41,0 @@

3

package.json
{
"name": "async-define",
"version": "3.1.0",
"version": "3.2.0",
"description": "Coordinate the execution of asynchronous scripts",

@@ -39,4 +39,5 @@ "main": "lib/asyncDefine.js",

"handlebars": "^4.0.5",
"magic-string": "^0.22.4",
"minimist": "^1.2.0"
}
}

@@ -172,2 +172,3 @@ asyncDefine

* -script (-s): the path of the script to wrap into asyncDefine
* -sourcemaps: produce sourcemaps
Example:

@@ -174,0 +175,0 @@ ```

@@ -27,2 +27,3 @@ var fs = require('fs');

var scriptName = opts.scriptName;
var hasSourceMaps = opts.hasSourceMaps;

@@ -51,8 +52,12 @@ var mainTemplate = '../templates/main.hbs';

var map = s.generateMap({
source: scriptName,
file: scriptName + '.map',
includeContent: true
}); // generates a v3 sourcemap
return s.toString() + '\n//# sourceMappingURL=' + map.toUrl();
var output = s.toString();
if (hasSourceMaps) {
var map = s.generateMap({
source: scriptName,
file: scriptName + '.map',
includeContent: true
}); // generates a v3 sourcemap
output += '\n//# sourceMappingURL=' + map.toUrl();
}
return output;
}

@@ -59,0 +64,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