intern-systemjs-loader
Advanced tools
Comparing version 0.1.0 to 0.2.0
26
main.js
(function (global) { | ||
var realRequire, realDefine, | ||
nodeRequire = require, | ||
parentModule = typeof module !== 'undefined' && module.parent, | ||
slice = Array.prototype.slice, | ||
internBase = 'node_modules/intern', | ||
thisBase = 'node_modules/intern-systemjs-loader', | ||
polyfillUrl = 'node_modules/systemjs/dist/system-polyfills.js', | ||
systemJSUrl = 'node_modules/systemjs/dist/system.src.js', | ||
polyfillUrl = '/node_modules/systemjs/dist/system-polyfills.js', | ||
systemJSUrl = '/node_modules/systemjs/dist/system.src.js', | ||
requireQueue = [], | ||
@@ -52,3 +52,3 @@ defineQueue = [], | ||
fetch: function () { return ''; }, | ||
instantiate: function (load) { return nodeRequire(load.address); } | ||
instantiate: function (load) { return parentModule.require(load.address); } | ||
})); | ||
@@ -169,3 +169,21 @@ | ||
if (nodeRequire) { | ||
// Pre-cache punycode so that global define doesn't break it | ||
// see https://github.com/bestiejs/punycode.js/issues/47 | ||
nodeRequire('punycode'); | ||
// Require the loader and set global | ||
global.SystemJS = global.System = nodeRequire('systemjs'); | ||
// Fix decanonicalize so it doesn't add file:// to intern/ paths | ||
var decanonicalize = System.decanonicalize; | ||
System.decanonicalize = function (name, id) { | ||
var done = decanonicalize.call(this, name, id); | ||
if (/^intern\//.test(name)) { | ||
done = done.replace(/^file:\/\//, ''); | ||
} | ||
return done; | ||
}; | ||
swapLoader(); | ||
@@ -172,0 +190,0 @@ } |
{ | ||
"name": "intern-systemjs-loader", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"description": "A wrapper for using SystemJS as Intern's loader", | ||
"main": "index.js", | ||
"main": "main.js", | ||
"repository": "andyearnshaw/intern-systemjs-loader", | ||
@@ -7,0 +7,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
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
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
44263
657
0