Comparing version 1.0.0 to 2.0.0-alpha.0
26
index.js
@@ -1,3 +0,3 @@ | ||
var path = require('path'); | ||
var arcResolver = require('arc-resolver'); | ||
let path = require('path'); | ||
let AdaptiveFS = require('arc-fs'); | ||
@@ -7,22 +7,12 @@ module.exports = function(lasso, config) { | ||
postResolve: function(resolvedInfo, lassoContext) { | ||
var original = resolvedInfo.path; | ||
if (/\.arc$/.test(original)) { | ||
try { | ||
resolvedInfo.path = require.resolve(arcResolver.adaptResource(resolvedInfo.path, lassoContext.flags.flagMap)); | ||
} catch(e) { | ||
console.error(e); | ||
throw e; | ||
} | ||
} | ||
if (original != resolvedInfo.path) { | ||
let afs = new AdaptiveFS({ flags: lassoContext.flags.flagMap }); | ||
let originalPath = resolvedInfo.path; | ||
let adaptedPath = resolvedInfo.path = afs.resolveSync(originalPath); | ||
if (originalPath != adaptedPath) { | ||
delete resolvedInfo.meta; | ||
console.log(original, '→', path.relative(path.dirname(original), resolvedInfo.path)); | ||
// console.log(originalPath, '→', path.relative(path.dirname(originalPath), adaptedPath)); | ||
} | ||
} | ||
} | ||
lasso.dependencies.registerRequireType('arc', { | ||
read: function() { | ||
return 'throw new Error("Something went wrong with the arc-lasso plugin. The read function should not be called");'; | ||
} | ||
}); | ||
} |
{ | ||
"name": "arc-lasso", | ||
"version": "1.0.0", | ||
"version": "2.0.0-alpha.0", | ||
"description": "", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "mocha" | ||
}, | ||
"scripts": {}, | ||
"author": "Michael Rawlings <ml.rawlings@gmail.com>", | ||
"license": "ISC", | ||
"license": "MIT", | ||
"dependencies": { | ||
"arc-resolver": "^1.0.0", | ||
"resolve": "^1.1.7" | ||
"arc-fs": "^2.0.0-alpha.0" | ||
}, | ||
"devDependencies": { | ||
"chai": "^3.5.0", | ||
"lerna": "^2.0.0-rc.5", | ||
"mocha": "^3.2.0" | ||
} | ||
"lasso": "^3.1.3", | ||
"mocha": "^3.2.0", | ||
"nyc": "^11.3.0" | ||
}, | ||
"gitHead": "4772d05c45bc1bfbc988b7ac97a96295b452c650" | ||
} |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
1
1
1058
4
2
14
2
1
+ Addedarc-fs@^2.0.0-alpha.0
+ Addedarc-flag-parser@2.0.0(transitive)
+ Addedarc-fs@2.0.6(transitive)
+ Addedarc-resolver@2.0.6(transitive)
- Removedarc-resolver@^1.0.0
- Removedresolve@^1.1.7
- Removedarc-resolver@1.0.1(transitive)
- Removedfunction-bind@1.1.2(transitive)
- Removedhasown@2.0.2(transitive)
- Removedis-core-module@2.16.1(transitive)
- Removedpath-parse@1.0.7(transitive)
- Removedresolve@1.22.10(transitive)
- Removedsupports-preserve-symlinks-flag@1.0.0(transitive)