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

commoner

Package Overview
Dependencies
Maintainers
1
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

commoner - npm Package Compare versions

Comparing version 0.5.5 to 0.5.6

3

lib/relative.js

@@ -37,4 +37,7 @@ var assert = require("assert");

arg.value = relativize(this.moduleId, arg.value);
return;
}
}
this.genericVisit(exp);
}

@@ -41,0 +44,0 @@ });

2

package.json

@@ -17,3 +17,3 @@ {

],
"version": "0.5.5",
"version": "0.5.6",
"homepage": "http://github.com/benjamn/commoner",

@@ -20,0 +20,0 @@ "repository": {

@@ -23,7 +23,8 @@ Commoner

Commoner also takes care to rewrite all `require` calls to use relative
module identifiers, so that the output files can be installed into any
subdirectory of a larger project, and external tools do not have to give
special treatment to top-level modules (or even know which modules are
top-level and which are nested).
Commoner also takes care to rewrite all `require` calls to use [relative module
identifiers](http://wiki.commonjs.org/wiki/Modules/1.1#Module_Identifiers),
so that the output files can be installed into any subdirectory of a
larger project, and external tools do not have to give special treatment
to top-level modules (or even know which modules are top-level and which
are nested).

@@ -30,0 +31,0 @@ Commoner was derived from an earlier, more opinionated tool called

@@ -152,11 +152,14 @@ var Watcher = require("../lib/watcher").Watcher;

function makeSource(id) {
var str = JSON.stringify(id);
return "require(" + str + ");\n" +
"require(function(){require(" + str + ")}())";
}
function helperP(requiredId, expected) {
return relativizeP(
"some/deeply/nested/module",
"require(" + JSON.stringify(requiredId) + ")"
makeSource(requiredId)
).then(function(source) {
assert.strictEqual(
source,
"require(" + JSON.stringify(expected) + ")"
);
assert.strictEqual(source, makeSource(expected));
});

@@ -163,0 +166,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