Skip to content

Commit

Permalink
Merge pull request #246 from FACT-Finder/renovate/major-all
Browse files Browse the repository at this point in the history
Update all (major)
  • Loading branch information
UweBenary authored Jun 24, 2024
2 parents c7bbd1f + c34574f commit 1311f69
Show file tree
Hide file tree
Showing 10 changed files with 1,489 additions and 975 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ jobs:
steps:
- uses: actions/checkout@v4
- run: git fetch --prune --unshallow
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '21'
- name: cache node_modules
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
node_modules
Expand All @@ -22,7 +22,7 @@ jobs:
- run: yarn --frozen-lockfile
- run: yarn docs build
- run: yarn lerna run test
- uses: codecov/codecov-action@v3.1.6
- uses: codecov/codecov-action@v4.5.0
- run: yarn lerna run format-check
- run: yarn lerna run lint-check
- run: yarn lerna run build
12 changes: 6 additions & 6 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '21'
- name: cache node_modules
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
node_modules
Expand All @@ -29,12 +29,12 @@ jobs:
env:
BUILD_VERSION: ${{ env.VERSION }}
- name: upload build artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: build
path: packages/snage/build/npm
- name: upload docs artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: docs
path: site
Expand All @@ -44,7 +44,7 @@ jobs:
needs: build
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: build
path: packages/snage/build/npm
Expand Down Expand Up @@ -78,7 +78,7 @@ jobs:
needs: build
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: docs
path: site
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '21'
- name: cache node_modules
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
node_modules
Expand All @@ -28,7 +28,7 @@ jobs:
env:
BUILD_VERSION: ${{ env.VERSION }}
- name: upload build artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: build
path: packages/snage/build/npm
Expand All @@ -38,7 +38,7 @@ jobs:
needs: build
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: build
path: packages/snage/build/npm
Expand All @@ -61,7 +61,7 @@ jobs:
needs: build
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: build
path: packages/snage/build/npm
Expand All @@ -87,7 +87,7 @@ jobs:
needs: [build, release-artifact]
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: build
- name: Get Version
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
},
"devDependencies": {
"eslint-config-prettier": "9.1.0",
"eslint-plugin-jest": "27.9.0",
"eslint-plugin-jest": "28.6.0",
"eslint-plugin-promise": "6.2.0",
"eslint-plugin-react-hooks": "4.6.2",
"eslint-plugin-unicorn": "48.0.1",
"lerna": "7.4.2"
"eslint-plugin-unicorn": "54.0.0",
"lerna": "8.1.3"
},
"resolutions": {
"@types/react": "18.3.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/snage/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:20.14.0-alpine
FROM node:22.3.0-alpine
RUN apk add --no-cache git
WORKDIR /snage
COPY build/npm/snage.js /snage
Expand Down
10 changes: 5 additions & 5 deletions packages/snage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"fp-ts": "2.16.6",
"io-ts": "2.2.21",
"parsimmon": "1.18.1",
"prom-client": "14.2.0",
"prom-client": "15.1.2",
"semver": "7.6.2",
"string-similarity": "4.0.4",
"winston": "3.13.0",
Expand All @@ -46,30 +46,30 @@
"@types/query-string": "6.3.0",
"@types/semver": "7.5.8",
"@types/string-similarity": "4.0.2",
"@types/supertest": "2.0.16",
"@types/supertest": "6.0.2",
"@types/winston": "2.4.4",
"@types/yaml": "1.9.7",
"copy-webpack-plugin": "9.1.0",
"env-editor": "0.5.0",
"get-port": "7.1.0",
"jest": "29.7.0",
"jest-junit": "16.0.0",
"lerna": "7.4.2",
"lerna": "8.1.3",
"nock": "13.5.4",
"nodemon": "3.1.3",
"npm-run-all": "4.1.5",
"portable-fetch": "3.0.0",
"prettier": "3.3.2",
"snage-ui": "*",
"supertest": "6.3.4",
"supertest": "7.0.0",
"ts-jest": "29.1.5",
"ts-loader": "9.5.1",
"ts-node": "10.9.2",
"tslib": "2.6.3",
"typescript": "5.4.5",
"webpack": "5.92.0",
"webpack-cli": "5.1.4",
"webpack-dev-server": "4.15.2",
"webpack-dev-server": "5.0.4",
"webpack-shell-plugin-next": "2.3.1"
}
}
6 changes: 3 additions & 3 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
"github-markdown-css": "5.6.1",
"react": "18.3.1",
"react-dom": "18.3.1",
"react-markdown": "8.0.7",
"react-markdown": "9.0.1",
"react-scripts": "5.0.1",
"react-syntax-highlighter": "15.5.0",
"react-virtualized": "9.22.5",
"remark-gfm": "3.0.1",
"remark-gfm": "4.0.0",
"typescript": "5.4.5",
"use-debounce": "9.0.4"
"use-debounce": "10.0.1"
},
"scripts": {
"lint-check": "eslint -c \"../../eslint.yaml\" \"src/**/*.ts\" \"src/**/*.tsx\"",
Expand Down
8 changes: 4 additions & 4 deletions packages/ui/src/Note.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import {ApiNote} from '../../shared/type';
import {Markdown} from './Markdown';
import {ReactMarkdown} from './ReactMarkdown';
import Chip from '@mui/material/Chip';
import {Link, Paper, Typography} from '@mui/material';
import {NavigateNote} from './state';
Expand Down Expand Up @@ -29,7 +29,7 @@ export const FullNote: React.FC<{

return (
<>
<Markdown content={'# ' + summary} navigateNote={navigateNote} />
<ReactMarkdown content={'# ' + summary} navigateNote={navigateNote} />
<div style={{marginBottom: 15}}>
<FieldChips
fieldOrder={fieldOrder}
Expand All @@ -44,7 +44,7 @@ export const FullNote: React.FC<{
NO CONTENT
</Typography>
) : (
<Markdown content={content} navigateNote={navigateNote} />
<ReactMarkdown content={content} navigateNote={navigateNote} />
)}
</>
);
Expand Down Expand Up @@ -109,7 +109,7 @@ export const SummaryNote = React.memo(
style={{...style, cursor: 'pointer', padding: 10, paddingLeft: 20, margin: 5}}
onClick={() => selectNote(entry)}
>
<Markdown content={'# ' + summary} navigateNote={navigateNote} />
<ReactMarkdown content={'# ' + summary} navigateNote={navigateNote} />
<FieldChips
fieldOrder={fieldOrder}
onChipClick={onChipClick}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import React from 'react';
import ReactMarkdown from 'react-markdown';
import {Prism as SyntaxHighlighter} from 'react-syntax-highlighter';
import makeStyles from '@mui/styles/makeStyles';
import {Link, Theme} from '@mui/material';
import LinkIcon from '@mui/icons-material/Link';
import remarkGfm from 'remark-gfm';
import {getStateFromURL, NavigateNote} from './state';
import {CodeComponent} from 'react-markdown/lib/ast-to-react';
import {ReactMarkdownOptions} from 'react-markdown/lib/react-markdown';
import Markdown from 'react-markdown';

const useStyles = makeStyles(
(theme: Theme) => ({
Expand All @@ -32,20 +30,20 @@ const useStyles = makeStyles(
{name: 'Markdown'}
);

export const Markdown = React.memo(({content, navigateNote}: {content: string; navigateNote: NavigateNote}) => {
export const ReactMarkdown = React.memo(({content, navigateNote}: {content: string; navigateNote: NavigateNote}) => {
const classes = useStyles();
return (
<ReactMarkdown
<Markdown
components={renderers(navigateNote)}
remarkPlugins={[remarkGfm]}
className={classes.root + ' markdown-body'}
>
{content}
</ReactMarkdown>
</Markdown>
);
});

const MarkdownCodeBlock: CodeComponent = ({node, inline, className, children, style: _ignored, ...props}) => {
const MarkdownCodeBlock: React.FC<any> = ({inline, className, children, ...props}) => {
const classes = useStyles();
const match = /language-(\w+)/.exec(className ?? '');
return !inline && match ? (
Expand Down Expand Up @@ -111,7 +109,7 @@ const HeadingRenderer: React.FC<any> = ({level, children}) => {
]);
};

const renderers: (n: NavigateNote) => ReactMarkdownOptions['components'] = (navigateNote) => ({
const renderers: (n: NavigateNote) => any = (navigateNote) => ({
code: MarkdownCodeBlock,
a: MarkdownLink(navigateNote),
h1: HeadingRenderer,
Expand Down
Loading

0 comments on commit 1311f69

Please sign in to comment.