Skip to content

Commit

Permalink
#284: updated to latest datapackage-js.
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Mulholland committed Apr 26, 2018
1 parent cf08ccb commit 1f3a4fa
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
"bootstrap": "3.3.7",
"components-font-awesome": "^5.0.6",
"csv": "^2.0.0",
"datapackage": "^1.0.5",
"datapackage": "^1.0.6",
"escape-regexp": "^0.0.1",
"etl": "^0.5.8",
"fs-extra": "~5.0.0",
Expand Down
12 changes: 7 additions & 5 deletions src/main/url.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,14 @@ async function loadPackage(urlText) {
mainWindow.webContents.send('closeLoadingScreen')
return
}
tmp.file({ mode: '0644', prefix: 'datapackage-', postfix: '.json' }, function _tempFileCreated(err, path, fd) {
if (err) throw err
if (urlText.endsWith('.json')) {
tmp.file({ mode: '0644', prefix: 'datapackage-', postfix: '.json' }, function _tempFileCreated(err, path, fd) {
if (err) throw err

console.log('File: ', path)
console.log('File: ', path)
// console.log('Filedescriptor: ', fd);
})
})
}
await loadResources(dataPackageJson, mainWindow)
}

Expand All @@ -76,7 +78,7 @@ async function loadPackageJson(json, mainWindow) {
const dataPackage = await Package.load(json)
return dataPackage
} catch (error) {
// console.log(`There was a problem loading the package: ${json}`, error)
console.log(`There was a problem loading the package: ${json}`, error)
dialog.showMessageBox(mainWindow, {
type: 'warning',
title: `Unable to load Data Package`,
Expand Down
20 changes: 18 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3099,7 +3099,7 @@ data-uri-to-buffer@1:
version "1.2.0"
resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-1.2.0.tgz#77163ea9c20d8641b4707e8f18abdf9a78f34835"

datapackage@^1.0.5:
datapackage@^1.0.6:
version "1.0.6"
resolved "https://registry.yarnpkg.com/datapackage/-/datapackage-1.0.6.tgz#75f8e0466041fa0123f335cf440d5088cc6160c7"
dependencies:
Expand Down Expand Up @@ -9750,7 +9750,23 @@ table@4.0.2:
slice-ansi "1.0.0"
string-width "^2.1.1"

tableschema@^1.2.1, tableschema@^1.7.0:
tableschema@^1.2.1:
version "1.9.1"
resolved "https://registry.yarnpkg.com/tableschema/-/tableschema-1.9.1.tgz#4814e1b6ca7b81b94dc8e5d7ea197e3d84c212f3"
dependencies:
axios "^0.17.1"
csv "^1.1.1"
csv-sniffer "^0.1.1"
d3-time-format "^0.3.2"
es6-error "^4.0.2"
lodash "^4.13.1"
moment "~2.21.0"
regenerator-runtime "^0.11.0"
stream-to-async-iterator "^0.2.0"
tv4 "^1.2.7"
validator "^9.2.0"

tableschema@^1.7.0:
version "1.9.0"
resolved "https://registry.yarnpkg.com/tableschema/-/tableschema-1.9.0.tgz#afc67dd3893028bc3445feb66e52f4f90b6e473c"
dependencies:
Expand Down

0 comments on commit 1f3a4fa

Please sign in to comment.