Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
42 changes: 25 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ jobs:
- 14.x
- 16.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 @@ -28,7 +28,7 @@ jobs:
- run: npm run build
- name: Save build
if: matrix.node-version == '14.x'
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: build
path: |
Expand All @@ -39,37 +39,45 @@ jobs:
npm-publish-build:
needs: test
runs-on: ubuntu-latest
permissions:
id-token: write # Required for OIDC
contents: read
steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
with:
name: build
- uses: actions/setup-node@v1
- uses: actions/setup-node@v4
with:
node-version: 14.x
node-version: 20.x
registry-url: 'https://registry.npmjs.org'
- name: Update npm to latest (required for OIDC)
run: npm install -g npm@latest
- uses: rlespinasse/github-slug-action@v3.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
with:
token: ${{ secrets.NPM_TOKEN }}
tag: ${{ env.GITHUB_REF_SLUG }}
- name: Publish to npm
run: npm publish --tag ${{ env.GITHUB_REF_SLUG }}

npm-publish-latest:
needs: test
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
permissions:
id-token: write # Required for OIDC
contents: read
steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
with:
name: build
- uses: actions/setup-node@v1
- uses: actions/setup-node@v4
with:
node-version: 14.x
node-version: 20.x
registry-url: 'https://registry.npmjs.org'
- name: Update npm to latest (required for OIDC)
run: npm install -g npm@latest
- 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
with:
token: ${{ secrets.NPM_TOKEN }}
tag: latest
- name: Publish to npm
run: npm publish --tag latest
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "",
"repository": {
"type": "git",
"url": "https://github.com/solid/markdown-pane.git"
"url": "https://github.com/SolidOS/markdown-pane.git"
},
"main": "lib/index.js",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
NewPaneOptions,
PaneDefinition,
} from "pane-registry";
import { NamedNode, sym } from "rdflib";
import { IndexedFormula, NamedNode, sym } from "rdflib";
import { icons, store } from "solid-ui";
import { saveMarkdown } from "./service";
import { Container } from "./container";
Expand All @@ -18,7 +18,7 @@ export const Pane: PaneDefinition = {
subject: NamedNode,
context: DataBrowserContext
): string | null {
const t = context.session.store.findTypeURIs(subject);
const t = (context.session.store as IndexedFormula).findTypeURIs(subject);
if (t["http://www.w3.org/ns/iana/media-types/text/markdown#Resource"]) {
return "Markdown";
}
Expand Down