Skip to content

Commit

Permalink
Merge pull request #389 from tableflip/feat/upgrade-deps
Browse files Browse the repository at this point in the history
Upgrades all the dependencies!
  • Loading branch information
lidel authored Feb 21, 2018
2 parents f91107d + 9dc2bc4 commit b968f01
Show file tree
Hide file tree
Showing 5 changed files with 880 additions and 462 deletions.
12 changes: 8 additions & 4 deletions add-on/src/lib/ipfs-companion.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ module.exports = async function init () {
browser.tabs.onActivated.addListener(onActivatedTab)
browser.runtime.onMessage.addListener(onRuntimeMessage)
browser.runtime.onConnect.addListener(onRuntimeConnect)
// browser.protocol exists only in Brave

if (runtime.hasNativeProtocolHandler) {
console.log(`[ipfs-companion] registerStringProtocol available. Adding ipfs:// handler`)
console.log('[ipfs-companion] registerStringProtocol available. Adding ipfs:// handler')
browser.protocol.registerStringProtocol('ipfs', createIpfsUrlProtocolHandler(() => ipfs))
} else {
console.log('[ipfs-companion] browser.protocol.registerStringProtocol not available, native protocol will not be registered')
Expand Down Expand Up @@ -158,7 +158,11 @@ module.exports = async function init () {
const info = {
ipfsNodeType: state.ipfsNodeType,
peerCount: state.peerCount,
repoStats: state.repoStats,
// Convert big.js numbers into strings before sending.
// Chrome uses JSON.stringify to send objects over port.postMessage whereas
// Firefox uses structured clone. It means that on the other side FF gets
// a weird object (not a big.js number object) unless we stringify first.
repoStats: JSON.parse(JSON.stringify(state.repoStats)),
gwURLString: state.gwURLString,
pubGwURLString: state.pubGwURLString,
currentTab: await browser.tabs.query({active: true, currentWindow: true}).then(tabs => tabs[0])
Expand Down Expand Up @@ -402,7 +406,7 @@ module.exports = async function init () {

async function updateBrowserActionBadge () {
if (typeof browser.browserAction.setBadgeBackgroundColor === 'undefined') {
// Firefox for Android does not have this UI, so we just skip it
// Firefox for Android does not have this UI, so we just skip it
return
}

Expand Down
1 change: 1 addition & 0 deletions add-on/src/popup/browser-action/browser-action.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@import url('../../../ui-kit/tachyons.css');
@import url('../heartbeat.css');
@import url('mdc.switch.css');

.bg-near-white--hover:hover {
Expand Down
4 changes: 2 additions & 2 deletions add-on/src/popup/browser-action/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,13 @@ module.exports = (state, emitter) => {
async function updatePageActionsState (status) {
// IPFS contexts require access to background page
// which is denied in Private Browsing mode
const bg = await getBackgroundPage(status)
const bg = await getBackgroundPage()

// Check if current page is an IPFS one
const ipfsContext = bg && status && status.ipfsPageActionsContext

state.isIpfsContext = !!ipfsContext
state.currentTabUrl = status.currentTab.url
state.currentTabUrl = status.currentTab ? status.currentTab.url : null

if (state.isIpfsContext) {
// There is no point in displaying actions that require API interaction if API is down
Expand Down
34 changes: 16 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,9 @@
"preferGlobal": false,
"devDependencies": {
"babel-preset-env": "1.6.1",
"babel-preset-es2015": "6.24.1",
"babel-preset-es2017": "6.24.1",
"babelify": "8.0.0",
"brfs": "1.4.4",
"browserify": "14.5.0",
"browserify": "16.1.0",
"browserify-package-json": "1.0.1",
"chai": "4.1.2",
"cross-env": "5.1.3",
Expand All @@ -67,34 +65,34 @@
"husky": "0.14.3",
"ignore-styles": "5.0.1",
"mem-storage-area": "1.0.3",
"mocha": "4.0.1",
"mocha": "5.0.1",
"mocha-jenkins-reporter": "0.3.10",
"nodemon": "1.14.11",
"nodemon": "1.15.1",
"npm-run-all": "4.1.2",
"nyc": "11.4.1",
"shx": "0.2.2",
"sinon": "4.1.2",
"sinon-chrome": "2.2.1",
"sinon": "4.3.0",
"sinon-chrome": "2.2.4",
"standard": "10.0.3",
"uglifyify": "4.0.5",
"watchify": "3.9.0",
"web-ext": "2.3.2"
"watchify": "3.10.0",
"web-ext": "2.4.0"
},
"dependencies": {
"choo": "6.6.1",
"choo": "6.8.0",
"doc-sniff": "1.0.1",
"file-type": "7.3.0",
"ipfs": "0.27.6",
"ipfs-api": "17.2.7",
"ipfs-css": "0.1.0",
"ipfs-postmsg-proxy": "2.7.0",
"file-type": "7.6.0",
"ipfs": "0.27.7",
"ipfs-api": "18.1.1",
"ipfs-css": "0.2.0",
"ipfs-postmsg-proxy": "2.8.0",
"is-ipfs": "0.3.2",
"is-svg": "2.1.0",
"is-svg": "3.0.0",
"lru_map": "0.3.3",
"mime-types": "2.1.17",
"mime-types": "2.1.18",
"p-queue": "2.3.0",
"prundupify": "1.0.0",
"tachyons": "4.9.0",
"tachyons": "4.9.1",
"webextension-polyfill": "0.1.2"
}
}
Loading

0 comments on commit b968f01

Please sign in to comment.