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.1.6 to 0.2.0

8

dist/interfaces.d.ts

@@ -14,5 +14,13 @@ export interface Options {

}
export declare type Browser = string | Overrides;
export interface Overrides {
[dependency: string]: string;
}
export interface JspmPackageJson {
name: string;
main: string;
version?: string;
typings?: string;
browser?: Browser;
browserTypings?: Browser;
directories?: {

@@ -19,0 +27,0 @@ baseURL: string;

25

dist/readProjectConfig.js

@@ -107,15 +107,20 @@ "use strict";

function extractJspmPackageJson(packageJson) {
var result = pick(packageJson, [
'name',
'version',
'main',
'browser',
'typings',
'browserTypings',
'directories',
'configFiles',
'dependencies',
'peerDependencies',
'devDependencies'
]);
if (packageJson.jspm === true) {
return pick(packageJson, [
'name',
'main',
'directories',
'configFiles',
'dependencies',
'peerDependencies',
'devDependencies'
]);
return result;
}
else if (typeof packageJson.jspm === 'object') {
return packageJson.jspm;
return extend(result, packageJson.jspm);
}

@@ -122,0 +127,0 @@ else {

3

dist/resolve.d.ts
import Promise = require('any-promise');
import { Options, DependencyBranch, DependencyTree } from './interfaces';
import { Options, DependencyBranch, DependencyTree, JspmPackageJson } from './interfaces';
export declare function resolveAll(options: Options): Promise<DependencyBranch>;
export declare function resolveByPackageJson(pjson: JspmPackageJson, options: Options): DependencyBranch;
export declare function resolve(moduleName: string, options: Options): Promise<DependencyTree>;

@@ -7,10 +7,12 @@ "use strict";

.then(function (pjson) {
return readProjectConfig_1.readJspmConfigs(pjson, options);
})
.then(function (configs) {
var dependencyInfo = getDependencyInfo(configs);
return readMap(dependencyInfo.map, dependencyInfo.paths, dependencyInfo.packages);
return resolveByPackageJson(pjson, options);
});
}
exports.resolveAll = resolveAll;
function resolveByPackageJson(pjson, options) {
var configs = readProjectConfig_1.readJspmConfigs(pjson, options);
var dependencyInfo = getDependencyInfo(configs);
return readMap(dependencyInfo.map, dependencyInfo.paths, dependencyInfo.packages);
}
exports.resolveByPackageJson = resolveByPackageJson;
function resolve(moduleName, options) {

@@ -17,0 +19,0 @@ return readProjectConfig_1.readJspmPackageJson(options)

{
"name": "jspm-config",
"version": "0.1.6",
"version": "0.2.0",
"description": "Read jspm config and such",

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

# jspm config
[![Build Status](https://travis-ci.org/unional/jspm-config.svg?branch=master)](https://travis-ci.org/unional/jspm-config)
[![NPM version][npm-image]][npm-url]
[![Travis status][travis-image]][travis-url]
## Roadmap
- [ ] `resolve()`
- [x] `resolve()` and `resolveAll()`
- for `typings i jspm:<pkg>`

@@ -26,1 +27,6 @@ - [ ] `discoverTypings()` or `configSystemJS()` or `configJspm()`

[SystemJS Resolution Specification](https://github.com/systemjs/systemjs/blob/599d89cbe9f4fb39a39f6c52b619cbd1f1da6ffc/docs/resolution-algorithm.md#resolution-specification)
[npm-image]: https://img.shields.io/npm/v/jspm-config.svg?style=flat
[npm-url]: https://npmjs.org/package/jspm-config
[travis-image]: https://travis-ci.org/unional/jspm-config.svg?branch=master
[travis-url]: https://travis-ci.org/unional/jspm-config

Sorry, the diff of this file is not supported yet

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