This repository has been archived by the owner on Feb 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade deps and switch from commonjs -> module (#59)
* Upgrade deps and swithch from commonjs -> module Upgrades deps to latest. node-fetch no longer supports commonjs giving us some impetous to switch to module syntax. A few notes from the upgrade: * to import the package version from package.json we have to use new import assert syntax. Whilst nodejs supports this eslint requires a babel parser. Hence the inclusion of @babel/eslint-parser and @babel/plugin-syntax-import-assertions * node-fetch no longer supports form-data. Switched to formdata-node * base-x now returns a Uint8Array so we need to do some additional wrapping in a Buffer * mocharc.js moved to mocharc.cjs as mocha does not support import syntax for this * Bump @digicatapult/dscp-node * Add depcheck
- Loading branch information
1 parent
90b177f
commit c69d306
Showing
35 changed files
with
2,616 additions
and
1,377 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ignores: ["@babel/plugin-syntax-import-assertions"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
const { startServer } = require('./server') | ||
import { startServer } from './server.js' | ||
|
||
startServer() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,12 @@ | ||
const startApiStatus = require('./apiStatus') | ||
const startIpfsStatus = require('./ipfsStatus') | ||
const { buildCombinedHandler } = require('../util/statusPoll') | ||
import startApiStatus from './apiStatus.js' | ||
import startIpfsStatus from './ipfsStatus.js' | ||
import { buildCombinedHandler } from '../util/statusPoll.js' | ||
|
||
const startStatusHandlers = async () => { | ||
export const startStatusHandlers = async () => { | ||
const handlers = new Map() | ||
const [apiStatus, ipfsStatus] = await Promise.all([startApiStatus(), startIpfsStatus()]) | ||
handlers.set('api', apiStatus) | ||
handlers.set('ipfs', ipfsStatus) | ||
|
||
return buildCombinedHandler(handlers) | ||
} | ||
|
||
module.exports = { | ||
startStatusHandlers, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.