Skip to content
Open
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
a2abcb4
updated inrupt authn lib to latest
timea-solid Aug 26, 2025
f327aa5
merge main
timea-solid Aug 26, 2025
c8d34ed
Update src/authn/SolidAuthnLogic.ts
timea-solid Aug 26, 2025
908c8cf
ESM lib
timea-solid Aug 28, 2025
92ca4c6
updated configs && linting fixes
timea-solid Sep 3, 2025
e5f3f7d
replaced webpack with rollup
timea-solid Sep 3, 2025
f9d5d21
replaced webpack with rollup
timea-solid Sep 3, 2025
cc7e1b6
added jest coverage
timea-solid Sep 3, 2025
f51524a
drop node18
timea-solid Sep 3, 2025
b095cf0
updated ci versions
timea-solid Sep 3, 2025
47c4eab
moved form lib to dist and imporved npm publishing content
timea-solid Sep 3, 2025
616b9f9
updated readme
timea-solid Sep 3, 2025
183049d
cleaned up rollup config
timea-solid Sep 3, 2025
74baf17
small improvements
timea-solid Sep 3, 2025
22c8d8a
imporved jest and lint
timea-solid Sep 4, 2025
8e431bd
Update test/helpers/dataSetup.ts
timea-solid Sep 4, 2025
78ce629
revert copilot code change
timea-solid Sep 4, 2025
75b5e6d
added safe for tree-shaking
timea-solid Sep 4, 2025
c3986c3
deleted unused release file
timea-solid Sep 4, 2025
3e818fd
found a missing dep for jest
timea-solid Sep 4, 2025
caa433a
small improvements
timea-solid Sep 9, 2025
66a8779
updated teh release.yml
timea-solid Sep 9, 2025
4ce7677
merged main & updated readme with release info
timea-solid Sep 9, 2025
e3fbc78
decided to have only one release way
timea-solid Sep 10, 2025
42252ae
bundle test, polyfills, minified versions
timea-solid Sep 10, 2025
a4b452e
merge branch updateAuthn
timea-solid Sep 10, 2025
6d50cf3
bundle test and globals
timea-solid Sep 10, 2025
29d7a0d
clean SolidAuthnLogic
timea-solid Sep 10, 2025
08b6da4
switched out rollup for webpack
timea-solid Sep 10, 2025
1c3e6ea
decided to bundle everything, including rdflib
timea-solid Sep 10, 2025
c188582
improved docs and test example, added externalbundles
timea-solid Sep 10, 2025
509ddc5
renamed solid-logic umd to be without umd
timea-solid Sep 12, 2025
e368b0b
linting tests
timea-solid Sep 17, 2025
1c75a86
cleanup dep
timea-solid Sep 17, 2025
8f392e6
cleaned tsconfig
timea-solid Sep 17, 2025
7898142
minor improvements
timea-solid Sep 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions .babelrc

This file was deleted.

15 changes: 7 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,13 @@ jobs:
strategy:
matrix:
node-version:
- 18.x
- 20.x
- 22.x

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
Expand All @@ -51,15 +50,15 @@ jobs:
- uses: actions/download-artifact@v4
with:
name: build
- uses: actions/setup-node@v1
- uses: actions/setup-node@v4
with:
node-version: 20.x
- uses: rlespinasse/github-slug-action@v3.x
- uses: rlespinasse/github-slug-action@v4.x
- name: Append commit hash to package version
run: 'sed -i -E "s/(\"version\": *\"[^\"]+)/\1-${GITHUB_SHA_SHORT}/" package.json'
- name: Disable pre- and post-publish actions
run: 'sed -i -E "s/\"((pre|post)publish)/\"ignore:\1/" package.json'
- uses: JS-DevTools/npm-publish@v1
- uses: JS-DevTools/npm-publish@v2
with:
token: ${{ secrets.NPM_TOKEN }}
tag: ${{ env.GITHUB_REF_SLUG }}
Expand All @@ -72,12 +71,12 @@ jobs:
- uses: actions/download-artifact@v4
with:
name: build
- uses: actions/setup-node@v1
- uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Disable pre- and post-publish actions
run: 'sed -i -E "s/\"((pre|post)publish)/\"ignore:\1/" package.json'
- uses: JS-DevTools/npm-publish@v1
- uses: JS-DevTools/npm-publish@v2
with:
token: ${{ secrets.NPM_TOKEN }}
tag: latest
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
node_modules
lib
dist
coverage

### VisualStudioCode Patch ###
# Ignore all local history of files
.history
.idea
.vscode

src/versionInfo.ts
1 change: 0 additions & 1 deletion .npmignore

This file was deleted.

25 changes: 23 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,28 @@
# solid-logic
Core business logic of SolidOS

# Adendum
<img src="https://raw.githubusercontent.com/solid/community-server/main/templates/images/solid.svg" alt="[Solid logo]" height="150" align="right"/>

[![MIT license](https://img.shields.io/github/license/solidos/solidos)](https://github.com/solidos/solidos/blob/main/LICENSE.md)


Core business logic of SolidOS which can be used for any webapp as well.

# How to use

Either `npm install solid-logic` or in your HTML use directly `solid-logic.js` from `dist` folder.

# How to develop

Check the scripts in the `package.json` for build, watch, lint and test.

# Used stack

* TypeScript + Babel
* Jest
* ESLint
* Rollup

# History

Solid-logic was a move to separate business logic from UI functionality so that people using different UI frameworks could use logic code.

Expand Down
6 changes: 6 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export default {
presets: [
['@babel/preset-env', { targets: { node: 'current' } }],
'@babel/preset-typescript'
]
}
49 changes: 25 additions & 24 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,29 +1,30 @@
const {
defineConfig,
} = require("eslint/config");
import tsParser from '@typescript-eslint/parser'
import tseslintPlugin from '@typescript-eslint/eslint-plugin'
import tseslint from 'typescript-eslint'
import importPlugin from 'eslint-plugin-import'

const tsParser = require("@typescript-eslint/parser");
const typescriptEslint = require("@typescript-eslint/eslint-plugin");
const js = require("@eslint/js");

const {
FlatCompat,
} = require("@eslint/eslintrc");

const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});

module.exports = defineConfig([{
export default [
...tseslint.configs.recommended,
{
files: ['src/**/*.ts', 'test/**/*.test.ts'],
ignores: ['dist/**', 'node_modules/**'],
languageOptions: {
parser: tsParser,
parser: tsParser,
parserOptions: {
project: ['./tsconfig.json', './tsconfig.test.json'],
sourceType: 'module',
},
},

plugins: {
"@typescript-eslint": typescriptEslint,
'@typescript-eslint': tseslintPlugin,
import: importPlugin,
},

extends: compat.extends("eslint:recommended", "plugin:@typescript-eslint/recommended"),
}]);
rules: {
'semi': ['error', 'never'],
'quotes': ['error', 'single'],
'no-unused-vars': 'off', // handled by TS
'@typescript-eslint/no-unused-vars': ['warn'],
'@typescript-eslint/no-explicit-any': 'warn',
},
},
]
21 changes: 14 additions & 7 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
module.exports = {
verbose: true,
/** @type {import('jest').Config} */
export default {
// verbose: true, // Uncomment for detailed test output
collectCoverage: true,
coverageDirectory: 'coverage',
testEnvironment: 'jsdom',
testEnvironmentOptions: {
customExportConditions: ['node']
customExportConditions: ['node'],
},
setupFilesAfterEnv: [
'./test/helpers/setup.ts'
]
}
testPathIgnorePatterns: ['/node_modules/', '/dist/'],
transform: {
'^.+\\.[tj]sx?$': ['babel-jest', { configFile: './babel.config.js' }],
},
setupFilesAfterEnv: ['./test/helpers/setup.ts'],
testMatch: ['**/__tests__/**/*.ts?(x)', '**/?(*.)+(spec|test).ts?(x)'],
roots: ['<rootDir>/src', '<rootDir>/test'],
}
Loading