Comparing version 0.1.3 to 0.1.4
{ | ||
"name" : "link", | ||
"version" : "0.1.3", | ||
"version" : "0.1.4", | ||
"description" : "Module runtime and converter for Labeled Modules, CommonJS and AMD.", | ||
@@ -14,3 +14,3 @@ "homepage" : "http://github.com/calyptus/link.js", | ||
"dependencies" : {}, | ||
"engines" : { "node": "> 0.4.x < 0.7.0" }, | ||
"engines" : { "node": "> 0.4.x < 0.9.0" }, | ||
"repository" : {"type": "git", "url": "git://github.com/calyptus/link.js.git"}, | ||
@@ -17,0 +17,0 @@ "main" : "./Source/Node/link.js", |
@@ -1,2 +0,2 @@ | ||
version: 0.12; | ||
version: 0.14; | ||
@@ -384,3 +384,3 @@ (function(){ | ||
return typeof token === 'undefined' || | ||
(token.type === Punctuator && '!(=:,[{++--;&&||^'.indexOf(token.value) >= 0) || | ||
(token.type === Punctuator && '})]'.indexOf(token.value) == -1) || | ||
(token.type === Keyword && isKeyword(token.value)); | ||
@@ -532,3 +532,4 @@ } | ||
ch = source[index]; | ||
if (isWhiteSpace(ch) || isLineTerminator(ch) || isPunctuator(ch)) // "'? | ||
if (isWhiteSpace(ch) || isLineTerminator(ch) || isPunctuator(ch) || | ||
ch == '\'' || ch == '"') | ||
break; | ||
@@ -535,0 +536,0 @@ id += nextChar(); |
#!/usr/bin/env node | ||
version: 0.12; | ||
version: 0.14; | ||
@@ -4,0 +4,0 @@ // TODO: Enable clean debugging by keeping runtime boilerplate within the 62 characters Node does. |
@@ -1,2 +0,2 @@ | ||
version: 0.12; | ||
version: 0.14; | ||
@@ -284,3 +284,3 @@ (function(debuggableRun, simpleRun, getGlobal){ | ||
required.push(require(deps[i])); | ||
factory = factory.apply(exports, required); | ||
factory = factory.apply(module.exports, required); | ||
} | ||
@@ -287,0 +287,0 @@ if (factory && id){ |
@@ -324,2 +324,10 @@ with(require('../Source/Node/link')) | ||
it("should allow a define factory without dependencies", function(){ | ||
expect(require('./nodejs/simple-define').exported).toEqual('object'); | ||
}); | ||
it("should allow a factory without dependencies to assign to this", function(){ | ||
expect(require('./nodejs/define-this').exported).toEqual('object'); | ||
}); | ||
}); | ||
@@ -326,0 +334,0 @@ |
@@ -41,3 +41,5 @@ if (typeof require !== 'undefined') var parse = require('../Source/Library/link').parse; | ||
default: { | ||
ebar = bah && /regexp/.test("string"); | ||
ebar = bah && /regexp/.test("string") | ||
? /regexp/ : !/regexp/; | ||
return"string" | ||
} | ||
@@ -56,3 +58,3 @@ } | ||
// Avoid browser dead code elimination | ||
sample = "foo;\n var foo = function named(){};\n bar = 2\n\n labeled: function bah(){\n var x,z;\n y = 10;\n }\n\n bah = foo;\n\n exports: var efoo, ebar;\n\n var someVariable = {\n obj: initializer,\n obj2: function(a,b){\n return function(){\n exports.foobar = '';\n exports.fooz = 2;\n return a / b / c;\n }\n var c;\n }\n }, someOtherVariable\n\n exports.nooz = 'zoon';\n\n exports: bar;\n\n foo();\n\n exports: function foobar(){\n exports: function shouldNotFindThis(){}\n }\n "; | ||
sample = "foo;\n var foo = function named(){};\n bar = 2\n\n labeled: function bah(){\n var x,z;\n y = 10;\n }\n\n bah = foo;\n\n exports: var efoo, ebar;\n\n var someVariable = {\n obj: initializer,\n obj2: function(a,b){\n return function(){\n exports.foobar = '';\n exports.fooz = 2;\n return a / b / c;\n }\n var c;\n }\n }, someOtherVariable\n\n switch (\"x\"){\n case \"x\": {\n exports.nooz = 'zoon';\n }\n default: {\n ebar = bah && /regexp/.test(\"string\")\n ? /regexp/ : !/regexp/;\n return\"string\"\n }\n }\n\nexports: bar;\n\n foo();\n\n exports: function foobar(){\n exports: function shouldNotFindThis(){}\n }\n "; | ||
@@ -71,2 +73,3 @@ it('should find all declared global variables', function(){ | ||
var module = parse(sample); | ||
console.log(module.expectedVariables); | ||
expect(module.expectedVariables.length).toEqual(4); | ||
@@ -92,3 +95,3 @@ }); | ||
var module = parse(sample); | ||
expect(module.tokens.length).toEqual(13 + 3 + 3 + 2 + 3); | ||
expect(module.tokens.length).toEqual(13 + 3 + 3 + 2 + 2 + 3); | ||
}); | ||
@@ -95,0 +98,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
AI-detected potential security risk
Supply chain riskAI has determined that this package may contain potential security issues or vulnerabilities.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 17 instances in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
1
100
17
18
4
165360
30
4827