Skip to content

Commit d661f77

Browse files
authored
Merge pull request #569 from SolidOS/updateDep
Update dep & fix vulnerabilities
2 parents 8f006f2 + f4f5f5c commit d661f77

File tree

85 files changed

+16424
-24205
lines changed

Some content is hidden

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

85 files changed

+16424
-24205
lines changed

.babelrc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"@babel/preset-typescript"
55
],
66
"plugins": [
7-
"@babel/plugin-proposal-class-properties",
8-
"@babel/plugin-proposal-optional-chaining",
7+
"@babel/plugin-transform-class-properties",
8+
"@babel/plugin-transform-optional-chaining",
99
"@babel/plugin-transform-async-to-generator",
1010
"@babel/plugin-transform-runtime"
1111
]

.eslintignore

Lines changed: 0 additions & 7 deletions
This file was deleted.

.eslintrc

Lines changed: 0 additions & 24 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ jobs:
2828
- run: npm test
2929
- run: npm run build
3030
- run: npm run doc
31-
- run: npm run build-storybook
3231
- name: Save build
3332
if: matrix.node-version == '20.x'
3433
uses: actions/upload-artifact@v4

.storybook/main.js

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
1-
module.exports = {
2-
stories: ["../src/**/*.stories.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
1+
export default {
2+
stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
3+
34
addons: [
4-
"@storybook/addon-links",
5-
"@storybook/addon-actions",
6-
"@storybook/addon-essentials"
5+
'@storybook/addon-links',
6+
'@storybook/addon-actions',
7+
'@storybook/addon-essentials'
78
],
8-
core: {
9-
builder: "webpack5"
9+
10+
framework: {
11+
name: '@storybook/html-webpack5',
12+
options: {}
13+
},
14+
15+
docs: {
16+
autodocs: true
1017
}
11-
}
18+
}

.storybook/preview.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
export const parameters = {
3-
actions: { argTypesRegex: "^on[A-Z].*" },
4-
}
2+
actions: { argTypesRegex: '^on[A-Z].*' },
3+
}

eslint.config.mjs

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
import { defineConfig, globalIgnores } from 'eslint/config'
2+
import typescriptEslint from '@typescript-eslint/eslint-plugin'
3+
import globals from 'globals'
4+
import tsParser from '@typescript-eslint/parser'
5+
import neostandard from 'neostandard'
6+
7+
export default defineConfig([
8+
...neostandard(),
9+
globalIgnores([
10+
'lib/*',
11+
'**/*.html',
12+
'**/*.md',
13+
'**/*.json',
14+
'Documentation/*',
15+
'node_modules/*',
16+
'coverage/*',
17+
'dist/*',
18+
'test/*',
19+
'examples/*'
20+
]),
21+
{
22+
plugins: {
23+
'@typescript-eslint': typescriptEslint,
24+
},
25+
26+
languageOptions: {
27+
globals: {
28+
...globals.browser,
29+
...globals.node,
30+
Atomics: 'readonly',
31+
SharedArrayBuffer: 'readonly',
32+
},
33+
34+
parser: tsParser,
35+
},
36+
37+
files: ['src/**/*.js', 'src/**/*.ts', 'src/**/*.cjs', 'src/**/*.mjs'],
38+
39+
rules: {
40+
'no-console': 'error',
41+
'no-unused-vars': 'off',
42+
43+
'@typescript-eslint/no-unused-vars': ['warn', {
44+
argsIgnorePattern: '^_',
45+
varsIgnorePattern: '^_',
46+
}],
47+
},
48+
},
49+
])

examples/matrix/test-matrix.js

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -6,36 +6,36 @@ window.$rdf = UI.rdf
66
document.addEventListener('DOMContentLoaded', function () {
77
/// ///////////////////////////////////////////
88

9-
var kb = UI.store
10-
var dom = document
9+
const kb = UI.store
10+
const dom = document
1111

12-
var ICAL = $rdf.Namespace('http://www.w3.org/2002/12/cal/ical#')
13-
var SCHED = $rdf.Namespace('http://www.w3.org/ns/pim/schedule#')
14-
var DC = $rdf.Namespace('http://purl.org/dc/elements/1.1/')
12+
const ICAL = $rdf.Namespace('http://www.w3.org/2002/12/cal/ical#')
13+
const SCHED = $rdf.Namespace('http://www.w3.org/ns/pim/schedule#')
14+
const DC = $rdf.Namespace('http://purl.org/dc/elements/1.1/')
1515

16-
var uri = window.location.href
17-
var base = (window.document.title = uri.slice(0, uri.lastIndexOf('/') + 1))
18-
var testDocURI = base + 'test.ttl' // imaginary doc - just use its URL
19-
var testDoc = $rdf.sym(testDocURI)
20-
var subjectURI = testDocURI + '#event1'
21-
var meURI = testDocURI + '#a0'
22-
var me = kb.sym(meURI)
16+
const uri = window.location.href
17+
const base = (window.document.title = uri.slice(0, uri.lastIndexOf('/') + 1))
18+
const testDocURI = base + 'test.ttl' // imaginary doc - just use its URL
19+
const testDoc = $rdf.sym(testDocURI)
20+
const subjectURI = testDocURI + '#event1'
21+
const meURI = testDocURI + '#a0'
22+
const me = kb.sym(meURI)
2323

2424
// var forms_uri = window.document.title = base+ 'forms.ttl';
2525

26-
var subject = kb.sym(subjectURI)
27-
var div = dom.getElementById('UITestArea')
26+
const subject = kb.sym(subjectURI)
27+
const div = dom.getElementById('UITestArea')
2828

29-
var showResults = function () {
29+
const showResults = function () {
3030
// Now the form for responsing to the poll
3131
//
3232

3333
// div.appendChild(dom.createElement('hr'))
3434

35-
var invitation = subject
35+
const invitation = subject
3636

37-
var query = new $rdf.Query('Responses')
38-
var v = {}
37+
const query = new $rdf.Query('Responses')
38+
const v = {}
3939
;['time', 'author', 'value', 'resp', 'cell'].map(function (x) {
4040
query.vars.push((v[x] = $rdf.variable(x)))
4141
})
@@ -50,24 +50,24 @@ document.addEventListener('DOMContentLoaded', function () {
5050
@prefix ical: <http://www.w3.org/2002/12/cal/icaltzd#>.\n\
5151
@prefix dc: <http://purl.org/dc/elements/1.1/>.\n";
5252
*/
53-
var prologue = dom.getElementById('Prologue').textContent
53+
const prologue = dom.getElementById('Prologue').textContent
5454

5555
// var config = dom.getElementById('Config').textContent;
5656
// $rdf.parse(prologue + config, kb, testDocURI, 'text/turtle') // str, kb, base, contentType
5757

58-
var tests = dom.getElementById('TestData').children
59-
var inputText = function (tr) {
58+
const tests = dom.getElementById('TestData').children
59+
const inputText = function (tr) {
6060
return tr.children[0].children[0].textContent
6161
}
62-
var output = function (tr) {
62+
const output = function (tr) {
6363
return tr.children[1]
6464
}
65-
var t = 0
65+
let t = 0
6666
$rdf.parse(prologue + inputText(tests[t]), kb, testDocURI, 'text/turtle') // str, kb, base, contentType
6767

68-
var options = {}
68+
const options = {}
6969

70-
var setAxes = function () {
70+
const setAxes = function () {
7171
options.set_x = kb.each(subject, SCHED('option')) // @@@@@ option -> dtstart in future
7272
options.set_x = options.set_x.map(function (opt) {
7373
return kb.any(opt, ICAL('dtstart'))
@@ -83,8 +83,8 @@ document.addEventListener('DOMContentLoaded', function () {
8383
// var possibleTimes = kb.each(invitation, SCHED('option'))
8484
// .map(function (opt) { return kb.any(opt, ICAL('dtstart')) })
8585

86-
var displayTheMatrix = function () {
87-
var matrix = div.appendChild(
86+
const displayTheMatrix = function () {
87+
const matrix = div.appendChild(
8888
UI.matrix.matrixForQuery(
8989
dom,
9090
query,
@@ -98,7 +98,7 @@ document.addEventListener('DOMContentLoaded', function () {
9898

9999
matrix.setAttribute('class', 'matrix')
100100

101-
var refreshButton = dom.createElement('button')
101+
const refreshButton = dom.createElement('button')
102102
refreshButton.textContent = 'refresh'
103103
refreshButton.addEventListener(
104104
'click',
@@ -111,9 +111,9 @@ document.addEventListener('DOMContentLoaded', function () {
111111
}
112112

113113
// @@ Give other combos too-- see schedule ontology
114-
var possibleAvailabilities = [SCHED('No'), SCHED('Maybe'), SCHED('Yes')]
114+
const possibleAvailabilities = [SCHED('No'), SCHED('Maybe'), SCHED('Yes')]
115115

116-
var dataPointForNT = []
116+
const dataPointForNT = []
117117

118118
// var doc = testDoc
119119
options.set_y = options.set_y.filter(function (z) {
@@ -122,8 +122,8 @@ document.addEventListener('DOMContentLoaded', function () {
122122
options.set_y.push(me) // Put me on the end
123123

124124
options.cellFunction = function (cell, x, y, value) {
125-
var refreshColor = function () {
126-
var bg = kb.any(value, UI.ns.ui('backgroundColor'))
125+
const refreshColor = function () {
126+
const bg = kb.any(value, UI.ns.ui('backgroundColor'))
127127
if (bg) {
128128
cell.setAttribute(
129129
'style',
@@ -135,13 +135,13 @@ document.addEventListener('DOMContentLoaded', function () {
135135
refreshColor()
136136
}
137137
if (y.sameTerm(me)) {
138-
var callback = function () {
138+
const callback = function () {
139139
refreshColor()
140140
} // @@ may need that
141-
var selectOptions = {}
142-
var predicate = SCHED('availabilty')
143-
var cellSubject = dataPointForNT[x.toNT()]
144-
var selector = UI.widgets.makeSelectForOptions(
141+
const selectOptions = {}
142+
const predicate = SCHED('availabilty')
143+
const cellSubject = dataPointForNT[x.toNT()]
144+
const selector = UI.widgets.makeSelectForOptions(
145145
dom,
146146
kb,
147147
cellSubject,
@@ -157,16 +157,16 @@ document.addEventListener('DOMContentLoaded', function () {
157157
}
158158
}
159159

160-
var matrix = displayTheMatrix()
160+
const matrix = displayTheMatrix()
161161

162-
var agenda = []
162+
const agenda = []
163163

164-
var nextTest = function nextTest () {
164+
const nextTest = function nextTest () {
165165
// First take a copy of the DOM the klast test produced
166166
output(tests[t]).appendChild(matrix.cloneNode(true))
167167

168168
t += 1
169-
var test = tests[t]
169+
const test = tests[t]
170170
if (!test) return
171171

172172
kb.removeMany(undefined, undefined, undefined, testDoc) // Flush out previous test data

jest-environment-jsdom.js

Lines changed: 0 additions & 18 deletions
This file was deleted.

jest.config.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
module.exports = {
22
verbose: true,
33
// https://github.com/paralleldrive/cuid2/issues/44#issuecomment-1531731695
4-
testEnvironment: './jest-environment-jsdom.js', // had to extend; see https://github.com/jsdom/jsdom/issues/2524
4+
testEnvironment: 'jsdom', // had to extend; see https://github.com/jsdom/jsdom/issues/2524
55
testMatch: [
6-
'**/?(*.)+(spec|test).[tj]s?(x)' ],
6+
'**/?(*.)+(spec|test).[tj]s?(x)'],
77
setupFilesAfterEnv: [
88
'./test/helpers/setup.ts'
99
],
10-
transformIgnorePatterns: ["/node_modules/(?!lit-html).+\\.js"],
10+
transformIgnorePatterns: ['/node_modules/(?!lit-html).+\\.js'],
1111
testEnvironmentOptions: {
12-
customExportConditions: ['node']
12+
customExportConditions: ['node']
1313
}
1414

1515
}

0 commit comments

Comments
 (0)