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

chi-datapackage

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chi-datapackage - npm Package Compare versions

Comparing version 3.0.0 to 3.0.1

3

CHANGELOG.md

@@ -9,2 +9,5 @@ CHANGELOG

## 3.0.1 (2016-08-24)
* Ensure paths are always POSIX
## 3.0.0 (2016-08-19)

@@ -11,0 +14,0 @@ * Assign cuid to resources without name

9

dist/lib/fetch.js

@@ -5,7 +5,14 @@ 'use strict';

var path = require('path');
var readFile = require('fs').readFile;
var debug = require('debug')('fetch');
function fetchTextFromURL(url) {
debug('fecthing', url);
if (url.indexOf('file://') === 0) {
url = url.replace('file://', '');
if (path.sep === '\\') {
url = path.normalize(url).replace(/^\\/, '');
}
return new Promise(function (resolve, reject) {

@@ -29,4 +36,2 @@ readFile(url, 'utf8', function (err, res) {

// TODO: Browser
module.exports = fetchTextFromURL;

@@ -8,2 +8,3 @@ 'use strict';

var debug = require('debug')('Loader');
var parse = require('json5').parse;

@@ -26,3 +27,9 @@

}
return require('path').resolve;
var path = require('path');
return function (url) {
url = path.resolve(url) // ensures path is absolute
.replace(/\\/g, '/'); // ensures path is POSIX, ready to be a url
return url[0] === '/' ? url : '/' + url;
};
}();

@@ -29,0 +36,0 @@

{
"name": "chi-datapackage",
"version": "3.0.0",
"version": "3.0.1",
"description": "Normalize datapackage and datapackage resources",

@@ -77,3 +77,3 @@ "main": "index.js",

"d3-time-format": "^2.0.2",
"datapackage-identifier": "^0.4.1",
"datapackage-identifier": "^0.4.2",
"debug": "^2.2.0",

@@ -80,0 +80,0 @@ "deep-extend": "^0.4.1",

require('isomorphic-fetch');
const path = require('path');
const readFile = require('fs').readFile;
const debug = require('debug')('fetch');
function fetchTextFromURL (url) {
debug('fecthing', url);
if (url.indexOf('file://') === 0) {
url = url.replace('file://', '');
if (path.sep === '\\') {
url = path.normalize(url).replace(/^\\/, '');
}
return new Promise((resolve, reject) => {

@@ -27,4 +34,2 @@ readFile(url, 'utf8', (err, res) => {

// TODO: Browser
module.exports = fetchTextFromURL;
'use strict';
const debug = require('debug')('Loader');
const parse = require('json5').parse;

@@ -21,3 +22,10 @@

}
return require('path').resolve;
const path = require('path');
return url => {
url = path
.resolve(url) // ensures path is absolute
.replace(/\\/g, '/'); // ensures path is POSIX, ready to be a url
return (url[0] === '/') ? url : `/${url}`;
};
})();

@@ -24,0 +32,0 @@

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