Skip to content

Commit ccbd029

Browse files
committed
merged main
2 parents f947e1a + f4617fa commit ccbd029

325 files changed

Lines changed: 38988 additions & 27653 deletions

File tree

Some content is hidden

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

.babelrc

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

.eslintignore

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

.eslintrc

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

.github/dependabot.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "npm" # See documentation for possible values
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "weekly"
12+
- package-ecosystem: "github-actions"
13+
directory: "/"
14+
schedule:
15+
# Check for updates to GitHub Actions every week
16+
interval: "weekly"

.github/workflows/ci.yml

Lines changed: 43 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,27 @@ on:
77
pull_request:
88
branches:
99
- main
10+
workflow_dispatch:
1011

1112
jobs:
12-
test:
13+
build:
1314
runs-on: ubuntu-latest
1415
strategy:
1516
matrix:
16-
node-version:
17-
- 12.x
18-
- 14.x
19-
- 15.x
17+
node-version: [22, 24]
2018
steps:
21-
- uses: actions/checkout@v2
19+
- uses: actions/checkout@v6
2220
- name: Use Node.js ${{ matrix.node-version }}
23-
uses: actions/setup-node@v1
21+
uses: actions/setup-node@v6
2422
with:
2523
node-version: ${{ matrix.node-version }}
2624
- run: npm ci
2725
- run: npm test
26+
- run: npm run build
2827
- run: npm run doc
2928
- name: Save build
30-
if: matrix.node-version == '14.x'
31-
uses: actions/upload-artifact@v2
29+
if: matrix.node-version == 22
30+
uses: actions/upload-artifact@v7
3231
with:
3332
name: build
3433
path: |
@@ -37,52 +36,58 @@ jobs:
3736
retention-days: 1
3837

3938
gh-pages:
40-
needs: test
39+
needs: build
4140
runs-on: ubuntu-latest
4241
if: github.ref == 'refs/heads/main'
4342
steps:
44-
- uses: actions/download-artifact@v2
43+
- uses: actions/download-artifact@v8
4544
with:
4645
name: build
47-
- run: rm .gitignore
48-
- uses: peaceiris/actions-gh-pages@v3
46+
- uses: peaceiris/actions-gh-pages@v4
4947
with:
5048
github_token: ${{ secrets.GITHUB_TOKEN }}
5149
publish_dir: .
5250

53-
npm-publish-build:
54-
needs: test
51+
dependabot:
52+
name: 'Dependabot'
53+
needs: build # After the E2E and build jobs, if one of them fails, it won't merge the PR.
5554
runs-on: ubuntu-latest
55+
if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request'}} # Detect that the PR author is dependabot
56+
permissions:
57+
contents: write
58+
pull-requests: write
5659
steps:
57-
- uses: actions/download-artifact@v2
58-
with:
59-
name: build
60-
- uses: actions/setup-node@v1
61-
with:
62-
node-version: 14.x
63-
- uses: rlespinasse/github-slug-action@v3.x
64-
- name: Append commit hash to package version
65-
run: 'sed -i -E "s/(\"version\": *\"[^\"]+)/\1-${GITHUB_SHA_SHORT}/" package.json'
66-
- name: Disable pre- and post-publish actions
67-
run: 'sed -i -E "s/\"((pre|post)publish)/\"ignore:\1/" package.json'
68-
- uses: JS-DevTools/npm-publish@v1
69-
with:
70-
token: ${{ secrets.NPM_TOKEN }}
71-
tag: ${{ env.GITHUB_REF_SLUG }}
60+
- name: Enable auto-merge for Dependabot PRs
61+
run: gh pr merge --auto --merge "$PR_URL" # Use Github CLI to merge automatically the PR
62+
env:
63+
PR_URL: ${{github.event.pull_request.html_url}}
64+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
65+
66+
npm-publish-dev:
67+
needs: build
68+
uses: SolidOS/solidos/.github/workflows/publish-prerelease.yml@main
69+
with:
70+
node_version: 22
71+
7272
npm-publish-latest:
73-
needs: test
73+
needs: [build]
7474
runs-on: ubuntu-latest
7575
if: github.ref == 'refs/heads/main'
76+
permissions:
77+
id-token: write # Required for OIDC
78+
contents: read
7679
steps:
77-
- uses: actions/download-artifact@v2
80+
- uses: actions/download-artifact@v8
7881
with:
7982
name: build
80-
- uses: actions/setup-node@v1
83+
- uses: actions/setup-node@v6
8184
with:
82-
node-version: 14.x
85+
node-version: 22
86+
registry-url: 'https://registry.npmjs.org'
87+
- name: Update npm to latest (required for OIDC)
88+
run: npm install -g npm@latest
8389
- name: Disable pre- and post-publish actions
8490
run: 'sed -i -E "s/\"((pre|post)publish)/\"ignore:\1/" package.json'
85-
- uses: JS-DevTools/npm-publish@v1
86-
with:
87-
token: ${{ secrets.NPM_TOKEN }}
88-
tag: latest
91+
- name: Publish to npm
92+
if: github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]'
93+
run: npm publish --tag latest

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,7 @@ src/versionInfo.ts
55
.idea
66
.vscode
77
coverage
8-
Documentation/api
8+
docs/api
99
examples/storybook
10+
.history/
11+
docs/form-examples/solid-ui.js

.npmignore

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

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v12.7.0
1+
v22.22.0

.storybook/main.js

Lines changed: 38 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,42 @@
1-
module.exports = {
2-
stories: [
3-
"../src/**/*.stories.@(js|jsx|ts|tsx|mdx)"
4-
],
1+
export default {
2+
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
3+
54
addons: [
6-
"@storybook/addon-links",
7-
"@storybook/addon-essentials"
5+
'@storybook/addon-links',
6+
'@storybook/addon-essentials',
7+
'@storybook/addon-mdx-gfm',
8+
'@storybook/addon-webpack5-compiler-swc'
89
],
10+
11+
framework: {
12+
name: '@storybook/html-webpack5',
13+
options: {}
14+
},
15+
16+
docs: {
17+
autodocs: true
18+
},
919
webpackFinal: async (config) => {
10-
config.externals = {
11-
'fs': 'null',
12-
'node-uuid': 'null',
13-
'node-fetch': 'fetch',
14-
'isomorphic-fetch': 'fetch',
15-
'xmldom': 'window',
16-
'text-encoding': 'TextEncoder',
17-
'whatwg-url': 'window',
18-
'@trust/webcrypto': 'crypto'
20+
// For Storybook, we DON'T externalize rdflib and solid-logic
21+
// Instead, we let webpack bundle them from node_modules
22+
23+
// Handle Node.js modules for browser
24+
config.resolve.fallback = {
25+
...config.resolve.fallback,
26+
path: false,
27+
fs: false,
28+
crypto: false,
29+
stream: false,
30+
util: false,
31+
buffer: false
1932
}
20-
// Return the altered config
21-
return config;
22-
},
23-
};
33+
34+
// Alias $rdf to rdflib for solid-logic compatibility
35+
config.resolve.alias = {
36+
...config.resolve.alias,
37+
$rdf: 'rdflib'
38+
}
39+
40+
return config
41+
}
42+
}

.storybook/preview.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1+
// For backward compatibility, provide rdflib and solid-logic as globals
2+
import * as rdflib from 'rdflib'
3+
import * as solidLogic from 'solid-logic'
14

2-
export const parameters = {
3-
actions: { argTypesRegex: "^on[A-Z].*" },
4-
}
5+
// Some legacy code might expect these as globals
6+
if (typeof window !== 'undefined') {
7+
window.$rdf = rdflib
8+
window.SolidLogic = solidLogic
9+
}
10+
11+
export const parameters = {}

0 commit comments

Comments
 (0)