Skip to content

Commit 0542fa2

Browse files
Update dependencies (#1454)
* Update dependencies * npm install * npx npm-check-updates -u && npm install * standard --fix * globals in auth-buttons.js * Suppress some lint warnings * disable some more lint rules * disable some more lint rules * npm run standard passing * adapt to new sinon api * Fix http-proxy-middleware api change * downgrade bootstrap to get fonts back * all bar one integration test passing again * investigating cors-proxy-test * adapt to nock * bootstrap@3.4.1 * 3 JSON-LD related tests failing in mashlib-dev now * remove rp client key * remove rp client key for bob * remove more client keys from test resources * client keys generated by npm test * use mashlib/dist/databrowser.html * npm install * update published packages * solid-auth-cli is now a peerDependency of rdflib :/ * npm install --save-dev @solid/solid-auth-oidc@0.4.0 * update * solid-auth-cli is being moved from dependencies to devDependencies * npm install --save-dev @solid/solid-auth-oidc@0.3.0
1 parent 40544b2 commit 0542fa2

File tree

117 files changed

+5291
-6057
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

117 files changed

+5291
-6057
lines changed

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
sudo: false
22
language: node_js
33
node_js:
4-
- "8"
54
- "10"
65
- "lts/*"
76
- "node"

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@ also add to `config.json`
133133
```
134134

135135
### Upgrading from version <5.3
136-
Make sure you're running Node version 10 or later.
137136
Please take into account the [v5.3 upgrade notes](https://github.com/solid/node-solid-server/blob/master/CHANGELOG.md#530-upgrade-notes).
138137

139138
### Upgrading from version <5.0

bin/lib/cli-utils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ function loadConfig (program, options) {
3232
...options,
3333
version: program.version()
3434
}
35-
let configFile = argv['configFile'] || './config.json'
35+
const configFile = argv.configFile || './config.json'
3636

3737
try {
3838
const file = fs.readFileSync(configFile)
@@ -42,7 +42,7 @@ function loadConfig (program, options) {
4242
argv = { ...config, ...argv }
4343
} catch (err) {
4444
// If config file was specified, but it doesn't exist, stop with error message
45-
if (typeof argv['configFile'] !== 'undefined') {
45+
if (typeof argv.configFile !== 'undefined') {
4646
if (!fs.existsSync(configFile)) {
4747
console.log(red(bold('ERR')), 'Config file ' + configFile + ' doesn\'t exist.')
4848
process.exit(1)

bin/lib/cli.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,3 @@ function getVersion () {
3737
return version
3838
}
3939
}
40-

bin/lib/migrateLegacyResources.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ module.exports = function (program) {
2020
.action(async (opts) => {
2121
const verbose = opts.verbose
2222
const suffix = opts.suffix || '$.ttl'
23-
let paths = opts.path ? [ opts.path ] : [ 'data', 'config/templates' ]
23+
let paths = opts.path ? [opts.path] : ['data', 'config/templates']
2424
paths = paths.map(path => path.startsWith(Path.sep) ? path : Path.join(process.cwd(), path))
2525
try {
2626
for (const path of paths) {

bin/lib/options.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,8 +312,8 @@ module.exports = [
312312
if (!value.match(/^[0-9]+(,[0-9]+)*$/)) {
313313
return 'direct-port(s) must be a comma-separated list of integers.'
314314
}
315-
let list = value.split(/,/).map(v => parseInt(v))
316-
let bad = list.find(v => { return v < 1 || v > 65535 })
315+
const list = value.split(/,/).map(v => parseInt(v))
316+
const bad = list.find(v => { return v < 1 || v > 65535 })
317317
if (bad.length) {
318318
return 'redirect-http-from port(s) ' + bad + ' out of range'
319319
}

bin/lib/start.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,18 +44,18 @@ module.exports = function (program, server) {
4444
function bin (argv, server) {
4545
if (!argv.email) {
4646
argv.email = {
47-
host: argv['emailHost'],
48-
port: argv['emailPort'],
47+
host: argv.emailHost,
48+
port: argv.emailPort,
4949
secure: true,
5050
auth: {
51-
user: argv['emailAuthUser'],
52-
pass: argv['emailAuthPass']
51+
user: argv.emailAuthUser,
52+
pass: argv.emailAuthPass
5353
}
5454
}
55-
delete argv['emailHost']
56-
delete argv['emailPort']
57-
delete argv['emailAuthUser']
58-
delete argv['emailAuthPass']
55+
delete argv.emailHost
56+
delete argv.emailPort
57+
delete argv.emailAuthUser
58+
delete argv.emailAuthPass
5959
}
6060

6161
if (!argv.tokenTypesSupported) {

common/js/auth-buttons.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* global location, alert, solid */
12
/* Provide functionality for authentication buttons */
23

34
(({ auth }) => {
@@ -41,7 +42,7 @@
4142
const session = await auth.popupLogin()
4243
if (session) {
4344
// Make authenticated request to the server to establish a session cookie
44-
const {status} = await auth.fetch(location, { method: 'HEAD' })
45+
const { status } = await auth.fetch(location, { method: 'HEAD' })
4546
if (status === 401) {
4647
alert(`Invalid login.\n\nDid you set ${session.idp} as your OIDC provider in your profile ${session.webId}?`)
4748
await auth.logout()

common/js/solid.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -267,8 +267,8 @@
267267

268268
// Add the errors in the stack to the DOM
269269
this.errors.map((error) => {
270-
let text = document.createTextNode(error)
271-
let paragraph = document.createElement('p')
270+
const text = document.createTextNode(error)
271+
const paragraph = document.createElement('p')
272272
paragraph.appendChild(text)
273273
this.passwordHelpText.appendChild(paragraph)
274274
})
@@ -419,29 +419,29 @@
419419
* @returns {string[]}
420420
*/
421421
PasswordValidator.prototype.tokenize = function () {
422-
let tokenArray = []
423-
for (let i in arguments) {
422+
const tokenArray = []
423+
for (const i in arguments) {
424424
tokenArray.push(arguments[i])
425425
}
426426
return tokenArray.join(' ').split(' ')
427427
}
428428

429429
PasswordValidator.prototype.sha1 = function (str) {
430-
let buffer = new TextEncoder('utf-8').encode(str)
430+
const buffer = new TextEncoder('utf-8').encode(str)
431431

432432
return crypto.subtle.digest('SHA-1', buffer).then((hash) => {
433433
return this.hex(hash)
434434
})
435435
}
436436

437437
PasswordValidator.prototype.hex = function (buffer) {
438-
let hexCodes = []
439-
let view = new DataView(buffer)
438+
const hexCodes = []
439+
const view = new DataView(buffer)
440440
for (let i = 0; i < view.byteLength; i += 4) {
441-
let value = view.getUint32(i)
442-
let stringValue = value.toString(16)
441+
const value = view.getUint32(i)
442+
const stringValue = value.toString(16)
443443
const padding = '00000000'
444-
let paddedValue = (padding + stringValue).slice(-padding.length)
444+
const paddedValue = (padding + stringValue).slice(-padding.length)
445445
hexCodes.push(paddedValue)
446446
}
447447
return hexCodes.join('')

config/defaults.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
'use strict'
22

33
module.exports = {
4-
'auth': 'oidc',
5-
'localAuth': {
6-
'tls': true,
7-
'password': true
4+
auth: 'oidc',
5+
localAuth: {
6+
tls: true,
7+
password: true
88
},
9-
'configPath': './config',
10-
'dbPath': './.db',
11-
'port': 8443,
12-
'serverUri': 'https://localhost:8443',
13-
'webid': true,
14-
'strictOrigin': true,
15-
'trustedOrigins': [],
16-
'dataBrowserPath': 'default'
9+
configPath: './config',
10+
dbPath: './.db',
11+
port: 8443,
12+
serverUri: 'https://localhost:8443',
13+
webid: true,
14+
strictOrigin: true,
15+
trustedOrigins: [],
16+
dataBrowserPath: 'default'
1717

1818
// For use in Enterprises to configure a HTTP proxy for all outbound HTTP requests from the SOLID server (we use
1919
// https://www.npmjs.com/package/global-tunnel-ng).

0 commit comments

Comments
 (0)