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

jspm-config

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jspm-config - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

4

dist/interfaces.d.ts

@@ -27,3 +27,3 @@ export interface Options {

baseURL: string;
packages: string;
packages?: string;
};

@@ -62,3 +62,3 @@ configFiles?: ConfigFiles;

jspmConfigs: Configs;
dependenciesJson: DependenciesJson;
dependenciesJson?: DependenciesJson;
}

@@ -65,0 +65,0 @@ export interface PathMap {

@@ -34,6 +34,20 @@ "use strict";

function readDependenciesJson(jspmPackageJson, options) {
var packages = jspmPackageJson.directories ?
jspmPackageJson.directories.packages :
constants_1.JSPM_PACKAGE_JSON_DEFAULT.directories.packages;
return fs_1.readJson(path.join(options.cwd, packages, '.dependencies.json')).catch(function (err) {
var packages;
if (jspmPackageJson.directories) {
if (jspmPackageJson.directories.packages) {
packages = jspmPackageJson.directories.packages;
}
else if (jspmPackageJson.directories.baseURL) {
packages = path.join(jspmPackageJson.directories.baseURL, constants_1.JSPM_PACKAGE_JSON_DEFAULT.directories.packages);
}
else {
packages = constants_1.JSPM_PACKAGE_JSON_DEFAULT.directories.packages;
}
}
else {
packages = constants_1.JSPM_PACKAGE_JSON_DEFAULT.directories.packages;
}
var filePath = path.join(options.cwd, packages, '.dependencies.json');
console.log(filePath);
return fs_1.readJson(filePath).catch(function (err) {
if (err.code === 'ENOENT') {

@@ -54,5 +68,3 @@ return;

function readJspmConfigs(jspmPackageJson, options) {
var baseURL = jspmPackageJson.directories ?
jspmPackageJson.directories.baseURL :
constants_1.JSPM_PACKAGE_JSON_DEFAULT.directories.baseURL;
var baseURL = jspmPackageJson.directories && jspmPackageJson.directories.baseURL || constants_1.JSPM_PACKAGE_JSON_DEFAULT.directories.baseURL;
var configFiles = extend(constants_1.JSPM_PACKAGE_JSON_DEFAULT.configFiles, jspmPackageJson.configFiles);

@@ -59,0 +71,0 @@ var cwd = options.cwd;

{
"name": "jspm-config",
"version": "0.3.0",
"version": "0.3.1",
"description": "Read jspm config and such",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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