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

install

Package Overview
Dependencies
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

install - npm Package Compare versions

Comparing version 0.9.4 to 0.9.5

9

install.js

@@ -97,7 +97,6 @@ makeInstaller = function (options) {

var resolvedPromise = Promise.resolve();
var lastPrefetchPromise = resolvedPromise;
var resolvedPromise;
var lastPrefetchPromise;
Module.prototype.prefetch = function (id) {
var previousPromise = lastPrefetchPromise;
var module = this;

@@ -107,2 +106,6 @@ var parentFile = getOwn(filesByModuleId, module.id);

resolvedPromise = resolvedPromise || Promise.resolve();
lastPrefetchPromise = lastPrefetchPromise || resolvedPromise;
var previousPromise = lastPrefetchPromise;
function walk(module) {

@@ -109,0 +112,0 @@ var file = getOwn(filesByModuleId, module.id);

@@ -1,1 +0,1 @@

makeInstaller=function(n){"use strict";function e(n,e){return o(n)&&(p(M,n,e),i(j)&&j(O)),O}function t(n){this.id=n,this.children=[],this.childrenById={}}function r(n,e){return B.call(n,e)&&n[e]}function o(n){return"object"==typeof n&&null!==n}function i(n){return"function"==typeof n}function u(n){return"string"==typeof n}function s(n){return new Error("Cannot find module '"+n+"'")}function c(n){function e(e){var t=b(n,e);if(t)return l(t,n.module);var r=s(e);if(i(A))return A(e,n.module.id,r);throw r}return i(g)&&(e=g(e,n.module.id)),e.extensions=v(n).slice(0),e.resolve=function(e){var t=b(n,e);if(t)return t.module.id;var r=s(e);if(A&&i(A.resolve))return A.resolve(e,n.module.id,r);throw r},e}function f(n,e){var r=this;r.parent=e=e||null,r.module=new t(n),E[n]=r,r.contents=null,r.deps={}}function l(n,e){var t=n.contents,r=n.module;if(!t){if(n.stub)return n.stub;throw s(r.id)}if(!B.call(r,"exports")){if(e){r.parent=e;var o=e.children;Array.isArray(o)&&o.push(r)}i(r.useNode)&&r.useNode()||t(r.require=r.require||c(n),r.exports=n.stub||{},r,n.module.id,n.parent.module.id),r.loaded=!0}return i(r.runModuleSetters)&&r.runModuleSetters(),r.exports}function d(n){return n&&o(n.contents)}function a(n){return n&&null===n.contents}function p(n,e,t){Array.isArray(e)?(e.forEach(function(t){u(t)?n.deps[t]=n.module.id:i(t)?e=t:o(t)&&(n.stub=n.stub||{},h(t,function(e,t){n.stub[t]=e}))}),i(e)||(e=null)):i(e)||u(e)||o(e)||(e=null),e&&(n.contents=n.contents||(o(e)?{}:e),o(e)&&d(n)&&h(e,function(e,o){if(".."===o)i=n.parent;else{var i=r(n.contents,o);i||(i=n.contents[o]=new f(n.module.id.replace(/\/*$/,"/")+o,n),i.options=t)}p(i,e,t)}))}function h(n,e,t){Object.keys(n).forEach(function(t){e.call(this,n[t],t)},t)}function v(n){return n.options&&n.options.extensions||I}function m(n,e,t){for(;n&&!d(n);)n=n.parent;if(!n||!e||"."===e)return n;if(".."===e)return n.parent;var o=r(n.contents,e);if(t&&(!o||d(o)))for(var i=0;i<t.length;++i){var u=r(n.contents,e+t[i]);if(u&&!d(u))return u}return o}function y(n,e,t){var r=e.split("/");return r.every(function(e,o){return n=o<r.length-1?m(n,e):m(n,e,t)}),n}function w(n,e){var t=e&&e.module;n&&t&&(n.childrenById[t.id]=t)}function b(n,e,t,r){var t=t||n.module,o=v(n);for(n="/"===e.charAt(0)?y(M,e,o):"."===e.charAt(0)?y(n,e,o):x(n,e,o);d(n);){if(r=r||[],r.indexOf(n)<0){r.push(n);var i,s=m(n,"package.json"),c=s&&l(s,t);if(c&&q.some(function(n){return u(i=c[n])})&&(w(t,s),n=y(n,i,o)||b(n,i,t,r)))continue}n=m(n,"index.js")}return n&&u(n.contents)&&(n=b(n,n.contents,t,r)),w(t,n),n}function x(n,e,t){if(i(k)&&(e=k(e,n.module.id)),u(e)){for(var r;n&&!r;n=n.parent)r=d(n)&&y(n,"node_modules/"+e,t);return r}}n=n||{};var I=n.extensions||[".js",".json"],j=n.onInstall,g=n.wrapRequire,k=n.override,A=n.fallback,q=n.mainFields||(n.browser?["browser","main"]:["main"]),B={}.hasOwnProperty,E={},M=new f("/",new f("/..")),O=c(M);e.fetch=function(){throw new Error("fetch not implemented")},t.prototype.resolve=function(n){return this.require.resolve(n)};var P=Promise.resolve(),N=P;return t.prototype.prefetch=function(n){function t(n){var e=r(E,n.id);a(e)&&!e.pending&&(e.pending=!0,o=o||{},o[n.id]=e.options,h(e.deps,function(n,t){b(e,t)}),h(n.childrenById,t))}{var o,i=N,u=this;r(E,u.id)}return N=P.then(function(){var r=u.resolve(n);return h(u.childrenById,t),Promise.resolve(o&&e.fetch(o)).then(function(n){function t(){return n&&e(n),r}return i.then(t,t)})})},e.Module=t,e},"object"==typeof exports&&(exports.makeInstaller=makeInstaller);
makeInstaller=function(n){"use strict";function e(n,e){return o(n)&&(p(M,n,e),i(j)&&j(O)),O}function r(n){this.id=n,this.children=[],this.childrenById={}}function t(n,e){return B.call(n,e)&&n[e]}function o(n){return"object"==typeof n&&null!==n}function i(n){return"function"==typeof n}function u(n){return"string"==typeof n}function s(n){return new Error("Cannot find module '"+n+"'")}function c(n){function e(e){var r=b(n,e);if(r)return l(r,n.module);var t=s(e);if(i(A))return A(e,n.module.id,t);throw t}return i(g)&&(e=g(e,n.module.id)),e.extensions=v(n).slice(0),e.resolve=function(e){var r=b(n,e);if(r)return r.module.id;var t=s(e);if(A&&i(A.resolve))return A.resolve(e,n.module.id,t);throw t},e}function f(n,e){var t=this;t.parent=e=e||null,t.module=new r(n),E[n]=t,t.contents=null,t.deps={}}function l(n,e){var r=n.contents,t=n.module;if(!r){if(n.stub)return n.stub;throw s(t.id)}if(!B.call(t,"exports")){if(e){t.parent=e;var o=e.children;Array.isArray(o)&&o.push(t)}i(t.useNode)&&t.useNode()||r(t.require=t.require||c(n),t.exports=n.stub||{},t,n.module.id,n.parent.module.id),t.loaded=!0}return i(t.runModuleSetters)&&t.runModuleSetters(),t.exports}function d(n){return n&&o(n.contents)}function a(n){return n&&null===n.contents}function p(n,e,r){Array.isArray(e)?(e.forEach(function(r){u(r)?n.deps[r]=n.module.id:i(r)?e=r:o(r)&&(n.stub=n.stub||{},h(r,function(e,r){n.stub[r]=e}))}),i(e)||(e=null)):i(e)||u(e)||o(e)||(e=null),e&&(n.contents=n.contents||(o(e)?{}:e),o(e)&&d(n)&&h(e,function(e,o){if(".."===o)i=n.parent;else{var i=t(n.contents,o);i||(i=n.contents[o]=new f(n.module.id.replace(/\/*$/,"/")+o,n),i.options=r)}p(i,e,r)}))}function h(n,e,r){Object.keys(n).forEach(function(r){e.call(this,n[r],r)},r)}function v(n){return n.options&&n.options.extensions||I}function m(n,e,r){for(;n&&!d(n);)n=n.parent;if(!n||!e||"."===e)return n;if(".."===e)return n.parent;var o=t(n.contents,e);if(r&&(!o||d(o)))for(var i=0;i<r.length;++i){var u=t(n.contents,e+r[i]);if(u&&!d(u))return u}return o}function y(n,e,r){var t=e.split("/");return t.every(function(e,o){return n=o<t.length-1?m(n,e):m(n,e,r)}),n}function w(n,e){var r=e&&e.module;n&&r&&(n.childrenById[r.id]=r)}function b(n,e,r,t){var r=r||n.module,o=v(n);for(n="/"===e.charAt(0)?y(M,e,o):"."===e.charAt(0)?y(n,e,o):x(n,e,o);d(n);){if(t=t||[],t.indexOf(n)<0){t.push(n);var i,s=m(n,"package.json"),c=s&&l(s,r);if(c&&q.some(function(n){return u(i=c[n])})&&(w(r,s),n=y(n,i,o)||b(n,i,r,t)))continue}n=m(n,"index.js")}return n&&u(n.contents)&&(n=b(n,n.contents,r,t)),w(r,n),n}function x(n,e,r){if(i(k)&&(e=k(e,n.module.id)),u(e)){for(var t;n&&!t;n=n.parent)t=d(n)&&y(n,"node_modules/"+e,r);return t}}n=n||{};var I=n.extensions||[".js",".json"],j=n.onInstall,g=n.wrapRequire,k=n.override,A=n.fallback,q=n.mainFields||(n.browser?["browser","main"]:["main"]),B={}.hasOwnProperty,E={},M=new f("/",new f("/..")),O=c(M);e.fetch=function(){throw new Error("fetch not implemented")},r.prototype.resolve=function(n){return this.require.resolve(n)};var P,N;return r.prototype.prefetch=function(n){function r(n){var e=t(E,n.id);a(e)&&!e.pending&&(e.pending=!0,o=o||{},o[n.id]=e.options,h(e.deps,function(n,r){b(e,r)}),h(n.childrenById,r))}{var o,i=this;t(E,i.id)}P=P||Promise.resolve(),N=N||P;var u=N;return N=P.then(function(){var t=i.resolve(n);return h(i.childrenById,r),Promise.resolve(o&&e.fetch(o)).then(function(n){function r(){return n&&e(n),t}return u.then(r,r)})})},e.Module=r,e},"object"==typeof exports&&(exports.makeInstaller=makeInstaller);

@@ -18,3 +18,3 @@ {

],
"version": "0.9.4",
"version": "0.9.5",
"license": "MIT",

@@ -21,0 +21,0 @@ "homepage": "http://github.com/benjamn/install",

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