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

@schematics/update

Package Overview
Dependencies
Maintainers
2
Versions
348
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@schematics/update - npm Package Compare versions

Comparing version 0.6.3 to 0.6.4

6

package.json
{
"name": "@schematics/update",
"version": "0.6.3",
"version": "0.6.4",
"description": "Schematics specific to updating packages",

@@ -17,4 +17,4 @@ "keywords": [

"dependencies": {
"@angular-devkit/core": "0.6.3",
"@angular-devkit/schematics": "0.6.3",
"@angular-devkit/core": "0.6.4",
"@angular-devkit/schematics": "0.6.4",
"npm-registry-client": "^8.5.1",

@@ -21,0 +21,0 @@ "semver": "^5.3.0",

@@ -9,26 +9,37 @@ "use strict";

const npmPackageJsonCache = new Map();
function getNpmConfigOption(option) {
return new rxjs_1.Observable(obs => {
try {
child_process_1.exec(`npm get ${option}`, (error, data) => {
if (error) {
obs.next();
const npmConfigOptionCache = new Map();
function getNpmConfigOption(option, scope, tryWithoutScope) {
if (scope && tryWithoutScope) {
return rxjs_1.concat(getNpmConfigOption(option, scope), getNpmConfigOption(option)).pipe(operators_1.filter(result => !!result), operators_1.defaultIfEmpty(), operators_1.first());
}
const fullOption = `${scope ? scope + ':' : ''}${option}`;
let value = npmConfigOptionCache.get(fullOption);
if (value) {
return value;
}
const subject = new rxjs_1.ReplaySubject(1);
try {
child_process_1.exec(`npm get ${fullOption}`, (error, data) => {
if (error) {
subject.next();
}
else {
data = data.trim();
if (!data || data === 'undefined' || data === 'null') {
subject.next();
}
else {
data = data.trim();
if (!data || data === 'undefined' || data === 'null') {
obs.next();
}
else {
obs.next(data);
}
subject.next(data);
}
obs.complete();
});
}
catch (_a) {
obs.next();
obs.complete();
}
});
}
subject.complete();
});
}
catch (_a) {
subject.next();
subject.complete();
}
value = subject.asObservable();
npmConfigOptionCache.set(fullOption, value);
return value;
}

@@ -44,4 +55,4 @@ /**

function getNpmPackageJson(packageName, registryUrl, logger) {
const scope = packageName.startsWith('@') ? packageName.split('/')[0] : null;
return rxjs_1.concat(rxjs_1.of(registryUrl), scope ? getNpmConfigOption(scope + ':registry') : rxjs_1.of(undefined), getNpmConfigOption('registry')).pipe(operators_1.filter(partialUrl => !!partialUrl), operators_1.first(), operators_1.map(partialUrl => {
const scope = packageName.startsWith('@') ? packageName.split('/')[0] : undefined;
return (registryUrl ? rxjs_1.of(registryUrl) : getNpmConfigOption('registry', scope, true)).pipe(operators_1.map(partialUrl => {
if (!partialUrl) {

@@ -97,2 +108,2 @@ partialUrl = 'https://registry.npmjs.org/';

exports.getNpmPackageJson = getNpmPackageJson;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnBtLmpzIiwic291cmNlUm9vdCI6Ii4vIiwic291cmNlcyI6WyJwYWNrYWdlcy9zY2hlbWF0aWNzL3VwZGF0ZS91cGRhdGUvbnBtLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBUUEsaURBQXFDO0FBQ3JDLCtCQUE2RDtBQUM3RCw4Q0FBd0U7QUFDeEUsMkJBQTJCO0FBRzNCLE1BQU0sY0FBYyxHQUFHLE9BQU8sQ0FBQyxxQkFBcUIsQ0FBQyxDQUFDO0FBRXRELE1BQU0sbUJBQW1CLEdBQUcsSUFBSSxHQUFHLEVBQWdELENBQUM7QUFHcEYsNEJBQTRCLE1BQWM7SUFDeEMsTUFBTSxDQUFDLElBQUksaUJBQVUsQ0FBcUIsR0FBRyxDQUFDLEVBQUU7UUFDOUMsSUFBSSxDQUFDO1lBQ0gsb0JBQUksQ0FBQyxXQUFXLE1BQU0sRUFBRSxFQUFFLENBQUMsS0FBSyxFQUFFLElBQUksRUFBRSxFQUFFO2dCQUN4QyxFQUFFLENBQUMsQ0FBQyxLQUFLLENBQUMsQ0FBQyxDQUFDO29CQUNWLEdBQUcsQ0FBQyxJQUFJLEVBQUUsQ0FBQztnQkFDYixDQUFDO2dCQ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fSxcbiAgICAgICAgICAgIHNzbDoge1xuICAgICAgICAgICAgICAuLi4ob3B0aW9uc1syXSA9PT0gJ2ZhbHNlJ1xuICAgICAgICAgICAgICAgID8geyBzdHJpY3Q6IGZhbHNlIH1cbiAgICAgICAgICAgICAgICA6IChvcHRpb25zWzJdID09PSAndHJ1ZSdcbiAgICAgICAgICAgICAgICAgICA/IHsgc3RyaWN0OiB0cnVlIH1cbiAgICAgICAgICAgICAgICAgICA6IHt9KSksXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIH0pO1xuICAgICAgICAgIGNsaWVudC5sb2cubGV2ZWwgPSAnc2lsZW50JztcbiAgICAgICAgICBjb25zdCBwYXJhbXMgPSB7XG4gICAgICAgICAgICB0aW1lb3V0OiAzMDAwMCxcbiAgICAgICAgICB9O1xuXG4gICAgICAgICAgY2xpZW50LmdldChcbiAgICAgICAgICAgIGZ1bGxVcmwsXG4gICAgICAgICAgICBwYXJhbXMsXG4gICAgICAgICAgICAoZXJyb3I6IG9iamVjdCwgZGF0YTogTnBtUmVwb3NpdG9yeVBhY2thZ2VKc29uKSA9PiB7XG4gICAgICAgICAgICBpZiAoZXJyb3IpIHtcbiAgICAgICAgICAgICAgc3ViamVjdC5lcnJvcihlcnJvcik7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHN1YmplY3QubmV4dChkYXRhKTtcbiAgICAgICAgICAgIHN1YmplY3QuY29tcGxldGUoKTtcbiAgICAgICAgICB9KTtcblxuICAgICAgICAgIG1heWJlUmVxdWVzdCA9IHN1YmplY3QuYXNPYnNlcnZhYmxlKCk7XG4gICAgICAgICAgbnBtUGFja2FnZUpzb25DYWNoZS5zZXQoZnVsbFVybC50b1N0cmluZygpLCBtYXliZVJlcXVlc3QpO1xuXG4gICAgICAgICAgcmV0dXJuIG1heWJlUmVxdWVzdDtcbiAgICAgICAgfSksXG4gICAgICApO1xuICAgIH0pLFxuICApO1xuXG59XG4iXX0=
//# sourceMappingURL=data:application/json;base64,eyJ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XSxcbiAgICAgICAgICAgICAgaHR0cHM6IG9wdGlvbnNbMV0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgc3NsOiB7XG4gICAgICAgICAgICAgIC4uLihvcHRpb25zWzJdID09PSAnZmFsc2UnXG4gICAgICAgICAgICAgICAgPyB7IHN0cmljdDogZmFsc2UgfVxuICAgICAgICAgICAgICAgIDogKG9wdGlvbnNbMl0gPT09ICd0cnVlJ1xuICAgICAgICAgICAgICAgICAgID8geyBzdHJpY3Q6IHRydWUgfVxuICAgICAgICAgICAgICAgICAgIDoge30pKSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgfSk7XG4gICAgICAgICAgY2xpZW50LmxvZy5sZXZlbCA9ICdzaWxlbnQnO1xuICAgICAgICAgIGNvbnN0IHBhcmFtcyA9IHtcbiAgICAgICAgICAgIHRpbWVvdXQ6IDMwMDAwLFxuICAgICAgICAgIH07XG5cbiAgICAgICAgICBjbGllbnQuZ2V0KFxuICAgICAgICAgICAgZnVsbFVybCxcbiAgICAgICAgICAgIHBhcmFtcyxcbiAgICAgICAgICAgIChlcnJvcjogb2JqZWN0LCBkYXRhOiBOcG1SZXBvc2l0b3J5UGFja2FnZUpzb24pID0+IHtcbiAgICAgICAgICAgIGlmIChlcnJvcikge1xuICAgICAgICAgICAgICBzdWJqZWN0LmVycm9yKGVycm9yKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgc3ViamVjdC5uZXh0KGRhdGEpO1xuICAgICAgICAgICAgc3ViamVjdC5jb21wbGV0ZSgpO1xuICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgbWF5YmVSZXF1ZXN0ID0gc3ViamVjdC5hc09ic2VydmFibGUoKTtcbiAgICAgICAgICBucG1QYWNrYWdlSnNvbkNhY2hlLnNldChmdWxsVXJsLnRvU3RyaW5nKCksIG1heWJlUmVxdWVzdCk7XG5cbiAgICAgICAgICByZXR1cm4gbWF5YmVSZXF1ZXN0O1xuICAgICAgICB9KSxcbiAgICAgICk7XG4gICAgfSksXG4gICk7XG5cbn1cbiJdfQ==
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