Skip to content

Commit 231ce02

Browse files
authored
v2.0.0 Merge pull request #220 from SolidOS/newFace
Improvements
2 parents 8dfefc1 + f038b65 commit 231ce02

19 files changed

+863
-1361
lines changed

.babelrc

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

.browserslistrc

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

.github/workflows/ci.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ permissions:
55
on:
66
push:
77
branches:
8-
- "**"
8+
- main
99
pull_request:
1010
branches:
11-
- "**"
11+
- main
1212
workflow_dispatch:
1313

1414
jobs:
@@ -17,7 +17,6 @@ jobs:
1717
strategy:
1818
matrix:
1919
node-version:
20-
- 18.x
2120
- 20.x
2221
- 22.x
2322
steps:

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ You can see and try out a SolidOS Databrowser Webapp deployment at <https://soli
7575

7676
`browse.html`serves as a perfect example for Solid WebID authentication and for making use of mashlib functions and variables.
7777

78-
To run/test it locally we created a script `npm run startStaticOS`.
78+
To run/test locally we created a script `npm run start`.
7979

8080
### SolidOS Databrowser Frontend
8181

@@ -97,18 +97,18 @@ What does `global` mean in mashlib? We mean the `global object` which depends on
9797

9898
These are the most important window context/global variables and the sub-repos from which they are exported:
9999

100-
- [**solid-logic**](https://github.com/solidos/solid-logic/blob/f606b31382a416ee6188930c3ca05cb4ae73cbda/src/index.ts#L29) exports among others: `solidLogicSingleton`, `authn`, `authSession`, `store`, `chat`, `profile`
100+
- [**solid-logic**](https://github.com/solidos/solid-logic/blob/f606b31382a416ee6188930c3ca05cb4ae73cbda/src/index.ts#L29) exports among others: `SolidLogic`
101101
- [**pane-registry**](https://github.com/solidos/pane-registry) is exported entirely through the pane-registry variable
102102
- [**solid-ui**](https://github.com/solidos/solid-ui/blob/c5a8888d6cb61363bc0445be007e3c96de593338/src/index.ts#L79) exports among others: authn, store, rdf, dom under the `UI` variable
103103
- [**solid-panes**](https://github.com/solidos/solid-panes/blob/033f48f8987364cb131455b13e8b0637da95a5ab/src/index.ts#L53) exports getOutliner and the entire solid-ui through the `UI` variable, and solid-panes itself can be used through the `panes` variable
104104

105105
For backward compatibility reasons, there are now different ways to make use of the same variables from mashlib. For example:
106106

107-
- to make use of the UI (solid-ui) one can use `UI` or `panes.UI`
108-
- authentication session, part of solid-logic, can be called as `authSession` or `UI.authn.authSession` or `panes.UI.authn.authSession`
109-
- the store (from solid-logic) can be used as `store` or `UI.store` or `panes.UI.store`
110-
- rdflib is entirely acessible as `UI.rdf` or `panes.UI.rdf`
111-
- the currentUser function is called as `authn.currentUser()` or `UI.auth.currentUser()` or `panes.UI.authn.currentUser()`
107+
- to make use of the UI (solid-ui) one can use `UI` BUT NOT `panes.UI` anymore
108+
- authentication session, part of solid-logic, can be called as `SolidLogic.authSession` BUT NOT `UI.authn.authSession` nor `panes.UI.authn.authSession` anymore
109+
- the store (from solid-logic) can be used as `SolidLogic.store` BUT NOT `UI.store` nor `panes.UI.store` anymore
110+
- rdflib NOT entirely acessible as `UI.rdf` or `panes.UI.rdf` anymore but as `$rdf`
111+
- the currentUser function is called as `SolidLogic.authn.currentUser()` BUT NOT `UI.auth.currentUser()` nor `panes.UI.authn.currentUser()` anymore
112112

113113
You can see example usage in the [SolidOS Databrowser Webapp code](https://github.com/solidos/mashlib/blob/main/static/browse.html#L11).
114114

@@ -130,7 +130,7 @@ Some packages have been moved and with them some functions too. Here we report o
130130
Functions that moved:
131131

132132
* `currentUser`, `checkUser`, `saveUser`, `offlineTestID` are now part of `solid-logic/authn/SolidAuthnLogic.ts`-> this is because `authn` itself moved to solid-logic.
133-
* `setACLUserPublic`, `fetchACLRel` are not part of `solid-logic/src/acl/aclLogic.ts/` and are exported in [index.ts](https://github.com/solidos/solid-logic/blob/f606b31382a416ee6188930c3ca05cb4ae73cbda/src/index.ts#L12).
133+
* `setACLUserPublic`, `fetchACLRel` are now part of `solid-logic/src/acl/aclLogic.ts/` and are exported in [index.ts](https://github.com/solidos/solid-logic/blob/f606b31382a416ee6188930c3ca05cb4ae73cbda/src/index.ts#L12).
134134
* `loadIndex`, `loadTypeIndexes`, `ensureTypeIndexes`, `registerInTypeIndex` and are exported in [index.ts](https://github.com/solidos/solid-logic/blob/f606b31382a416ee6188930c3ca05cb4ae73cbda/src/index.ts#L16).
135135

136136
## The databrowser hack: upgrading your browser

babel.config.mjs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
export default {
2+
presets: [
3+
['@babel/preset-env', {
4+
targets: {
5+
browsers: ['> 1%', 'last 3 versions', 'not dead']
6+
}
7+
}],
8+
'@babel/preset-typescript',
9+
],
10+
plugins: [
11+
'@babel/plugin-transform-runtime'
12+
]
13+
}

eslint.config.mjs

Lines changed: 53 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,63 @@
1-
import typescriptEslint from "@typescript-eslint/eslint-plugin";
2-
import globals from "globals";
3-
import tsParser from "@typescript-eslint/parser";
1+
import globals from 'globals'
2+
import tsParser from '@typescript-eslint/parser'
43

5-
export default [{
6-
ignores: ["**/dist"],
7-
}, {
8-
plugins: {
9-
"@typescript-eslint": typescriptEslint,
4+
export default [
5+
{
6+
ignores: [
7+
'node_modules/**',
8+
'dist/**',
9+
],
1010
},
11+
{
12+
files: ['src/**/*.js', 'src/**/*.cjs', 'src/**/*.mjs'],
1113

12-
languageOptions: {
14+
languageOptions: {
1315
globals: {
1416
...globals.browser,
1517
...globals.node,
16-
Atomics: "readonly",
17-
SharedArrayBuffer: "readonly",
18+
Atomics: 'readonly',
19+
SharedArrayBuffer: 'readonly',
20+
}
1821
},
22+
rules: {
23+
// Code style - match TypeScript settings
24+
semi: ['error', 'never'],
25+
quotes: ['error', 'single'],
1926

20-
parser: tsParser,
21-
},
22-
files: ["src/**/*.ts"],
23-
rules: {
24-
"no-unused-vars": ["warn", {
25-
argsIgnorePattern: "^_",
26-
varsIgnorePattern: "^_",
27-
}],
27+
// Strict checking - match TypeScript strictness
28+
'no-console': 'error',
29+
'no-unused-vars': 'error', // Match TypeScript noUnusedLocals: true
30+
'no-undef': 'error',
31+
strict: ['error', 'global'], // Match TypeScript alwaysStrict: true
2832

29-
"@typescript-eslint/no-unused-vars": ["warn", {
30-
argsIgnorePattern: "^_",
31-
varsIgnorePattern: "^_",
32-
}],
33+
// Additional strictness to match TypeScript behavior
34+
'no-implicit-globals': 'error',
35+
'prefer-const': 'error', // Encourage immutability
36+
'no-var': 'error', // Use let/const only
37+
'no-redeclare': 'error'
38+
},
3339
},
34-
}];
40+
{
41+
files: ["src/**/*.ts"],
42+
languageOptions: {
43+
globals: {
44+
...globals.browser,
45+
...globals.node,
46+
Atomics: "readonly",
47+
SharedArrayBuffer: "readonly",
48+
},
49+
parser: tsParser,
50+
parserOptions: {
51+
project: ['./tsconfig.json']
52+
},
53+
},
54+
55+
rules: {
56+
semi: ['error', 'never'],
57+
quotes: ['error', 'single'],
58+
// Disable ESLint rules that TypeScript handles better
59+
'no-unused-vars': 'off', // TypeScript handles this via noUnusedLocals
60+
'no-undef': 'off', // TypeScript handles undefined variables
61+
},
62+
}
63+
]

local-webpack.config.js

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

0 commit comments

Comments
 (0)