Merge branch 'master' into discord-oauth
This commit is contained in:
@@ -5,14 +5,14 @@ on:
|
||||
branches:
|
||||
tags:
|
||||
paths:
|
||||
- ".github/workflows/ci-test-backend.yml"
|
||||
- ".github/workflows/ci-backend.yml"
|
||||
- "backend/**"
|
||||
- "!backend/scripts/**"
|
||||
- "!**.md"
|
||||
pull_request:
|
||||
types: [opened, reopened]
|
||||
paths:
|
||||
- ".github/workflows/ci-test-backend.yml"
|
||||
- ".github/workflows/ci-backend.yml"
|
||||
- "backend/**"
|
||||
- "!backend/scripts/**"
|
||||
- "!**.md"
|
||||
@@ -33,6 +33,7 @@ jobs:
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.23"
|
||||
cache-dependency-path: backend
|
||||
|
||||
- name: test and build backend
|
||||
run: |
|
||||
|
||||
@@ -35,18 +35,17 @@ jobs:
|
||||
uses: pnpm/action-setup@v4.0.0
|
||||
id: pnpm-install
|
||||
with:
|
||||
version: 7
|
||||
version: 8
|
||||
run_install: false
|
||||
|
||||
- name: Get pnpm store directory
|
||||
id: pnpm-cache
|
||||
run: |
|
||||
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
|
||||
run: echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_ENV
|
||||
|
||||
- name: Setup pnpm cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
|
||||
path: ${{ env.pnpm_cache_dir }}
|
||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pnpm-store-
|
||||
@@ -79,18 +78,17 @@ jobs:
|
||||
uses: pnpm/action-setup@v4.0.0
|
||||
id: pnpm-install
|
||||
with:
|
||||
version: 7
|
||||
version: 8
|
||||
run_install: false
|
||||
|
||||
- name: Get pnpm store directory
|
||||
id: pnpm-cache
|
||||
run: |
|
||||
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
|
||||
run: echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_ENV
|
||||
|
||||
- name: Setup pnpm cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
|
||||
path: ${{ env.pnpm_cache_dir }}
|
||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pnpm-store-
|
||||
@@ -123,18 +121,17 @@ jobs:
|
||||
uses: pnpm/action-setup@v4.0.0
|
||||
id: pnpm-install
|
||||
with:
|
||||
version: 7
|
||||
version: 8
|
||||
run_install: false
|
||||
|
||||
- name: Get pnpm store directory
|
||||
id: pnpm-cache
|
||||
run: |
|
||||
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
|
||||
run: echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_ENV
|
||||
|
||||
- name: Setup pnpm cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
|
||||
path: ${{ env.pnpm_cache_dir }}
|
||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pnpm-store-
|
||||
|
||||
@@ -35,18 +35,17 @@ jobs:
|
||||
uses: pnpm/action-setup@v4.0.0
|
||||
id: pnpm-install
|
||||
with:
|
||||
version: 7
|
||||
version: 8
|
||||
run_install: false
|
||||
|
||||
- name: Get pnpm store directory
|
||||
id: pnpm-cache
|
||||
run: |
|
||||
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
|
||||
run: echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_ENV
|
||||
|
||||
- name: Setup pnpm cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
|
||||
path: ${{ env.pnpm_cache_dir }}
|
||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pnpm-store-
|
||||
@@ -79,18 +78,17 @@ jobs:
|
||||
uses: pnpm/action-setup@v4.0.0
|
||||
id: pnpm-install
|
||||
with:
|
||||
version: 7
|
||||
version: 8
|
||||
run_install: false
|
||||
|
||||
- name: Get pnpm store directory
|
||||
id: pnpm-cache
|
||||
run: |
|
||||
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
|
||||
run: echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_ENV
|
||||
|
||||
- name: Setup pnpm cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
|
||||
path: ${{ env.pnpm_cache_dir }}
|
||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pnpm-store-
|
||||
@@ -123,18 +121,17 @@ jobs:
|
||||
uses: pnpm/action-setup@v4.0.0
|
||||
id: pnpm-install
|
||||
with:
|
||||
version: 7
|
||||
version: 8
|
||||
run_install: false
|
||||
|
||||
- name: Get pnpm store directory
|
||||
id: pnpm-cache
|
||||
run: |
|
||||
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
|
||||
run: echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_ENV
|
||||
|
||||
- name: Setup pnpm cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
|
||||
path: ${{ env.pnpm_cache_dir }}
|
||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pnpm-store-
|
||||
@@ -161,7 +158,7 @@ jobs:
|
||||
uses: pnpm/action-setup@v4.0.0
|
||||
id: pnpm-install
|
||||
with:
|
||||
version: 7
|
||||
version: 8
|
||||
run_install: false
|
||||
|
||||
- name: Check bundle size
|
||||
@@ -191,18 +188,17 @@ jobs:
|
||||
uses: pnpm/action-setup@v4.0.0
|
||||
id: pnpm-install
|
||||
with:
|
||||
version: 7
|
||||
version: 8
|
||||
run_install: false
|
||||
|
||||
- name: Get pnpm store directory
|
||||
id: pnpm-cache
|
||||
run: |
|
||||
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
|
||||
run: echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_ENV
|
||||
|
||||
- name: Setup pnpm cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
|
||||
path: ${{ env.pnpm_cache_dir }}
|
||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pnpm-store-
|
||||
|
||||
@@ -32,7 +32,7 @@ jobs:
|
||||
- name: available platforms
|
||||
run: echo ${{ steps.buildx.outputs.platforms }}
|
||||
|
||||
- name: build and deploy master image to ghcr.io and dockerhub
|
||||
- name: build and deploy master image to ghcr.io
|
||||
if: ${{ github.ref == 'refs/heads/master' }}
|
||||
env:
|
||||
GITHUB_PACKAGE_TOKEN: ${{ secrets.PKG_TOKEN }}
|
||||
@@ -44,10 +44,10 @@ jobs:
|
||||
ref="$(echo ${GITHUB_REF} | cut -d'/' -f3)"
|
||||
echo GITHUB_REF - $ref
|
||||
echo ${GITHUB_PACKAGE_TOKEN} | docker login ghcr.io -u ${USERNAME} --password-stdin
|
||||
docker buildx build --push --no-cache --platform linux/amd64,linux/arm/v7,linux/arm64 \
|
||||
docker buildx build --push --no-cache --platform linux/amd64,linux/arm64 \
|
||||
-t ghcr.io/umputun/remark42-site:${ref} .
|
||||
|
||||
- name: deploy tagged (latest) to ghcr.io and dockerhub
|
||||
- name: deploy tagged (latest) to ghcr.io
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
||||
env:
|
||||
GITHUB_PACKAGE_TOKEN: ${{ secrets.PKG_TOKEN }}
|
||||
@@ -59,7 +59,7 @@ jobs:
|
||||
ref="$(echo ${GITHUB_REF} | cut -d'/' -f3)"
|
||||
echo "GITHUB_REF=$ref, GITHUB_SHA=${GITHUB_SHA}"
|
||||
echo ${GITHUB_PACKAGE_TOKEN} | docker login ghcr.io -u ${USERNAME} --password-stdin
|
||||
docker buildx build --push --no-cache --platform linux/amd64,linux/arm/v7,linux/arm64 \
|
||||
docker buildx build --push --no-cache --platform linux/amd64,linux/arm64 \
|
||||
-t ghcr.io/umputun/remark42-site:${ref} -t ghcr.io/umputun/remark42-site:latest .
|
||||
|
||||
- name: remote site deployment from master
|
||||
|
||||
@@ -4,6 +4,7 @@ on:
|
||||
push:
|
||||
branches: [master]
|
||||
paths:
|
||||
- ".github/workflows/e2e-tests.yml"
|
||||
- "frontend/apps/remark42/**"
|
||||
- "frontend/e2e/**"
|
||||
- "frontend/Dockerfile.e2e"
|
||||
@@ -11,6 +12,7 @@ on:
|
||||
pull_request:
|
||||
branches: [master]
|
||||
paths:
|
||||
- ".github/workflows/e2e-tests.yml"
|
||||
- "frontend/apps/remark42/**"
|
||||
- "frontend/e2e/**"
|
||||
- "frontend/Dockerfile.e2e"
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ COPY ./frontend/apps/remark42/package.json /srv/frontend/apps/remark42/
|
||||
RUN \
|
||||
if [[ -z "$SKIP_FRONTEND_BUILD" || -z "$SKIP_FRONTEND_TEST" ]]; then \
|
||||
apk add --no-cache --update git && \
|
||||
npm i -g pnpm@7; \
|
||||
npm i -g pnpm@8; \
|
||||
fi
|
||||
|
||||
RUN --mount=type=cache,id=pnpm,target=/root/.pnpm-store/v3 \
|
||||
|
||||
@@ -7,7 +7,7 @@ WORKDIR /srv/frontend
|
||||
COPY ./frontend/package.json ./frontend/pnpm-lock.yaml ./frontend/pnpm-workspace.yaml /srv/frontend/
|
||||
COPY ./frontend/apps/remark42/package.json /srv/frontend/apps/remark42/package.json
|
||||
|
||||
RUN apk add --no-cache --update git && npm i -g pnpm@7
|
||||
RUN apk add --no-cache --update git && npm i -g pnpm@8
|
||||
RUN --mount=type=cache,id=pnpm,target=/root/.pnpm-store/v3 pnpm i
|
||||
|
||||
FROM frontend-deps AS build-frontend
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# .husky/pre-commit
|
||||
|
||||
cd frontend
|
||||
pnpm lint-staged
|
||||
pnpm lint-staged || true
|
||||
|
||||
@@ -5,7 +5,7 @@ WORKDIR /frontend
|
||||
|
||||
COPY ./package.json ./pnpm-workspace.yaml ./pnpm-lock.yaml /frontend/
|
||||
COPY ./e2e/package.json /frontend/e2e/
|
||||
RUN corepack enable && corepack prepare pnpm@7.33.6 --activate && pnpm install
|
||||
RUN corepack enable && corepack prepare pnpm@8 --activate && pnpm install
|
||||
|
||||
COPY ./e2e/playwright.config.ts /frontend/e2e/
|
||||
COPY ./e2e/tests /frontend/e2e/tests/
|
||||
|
||||
@@ -22,9 +22,10 @@
|
||||
"translation:check": "node ./tasks/checkTranslation.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.15 <=17.*",
|
||||
"pnpm": "7.*"
|
||||
"node": ">=16.15 <=22.*",
|
||||
"pnpm": "8.*"
|
||||
},
|
||||
"packageManager": "pnpm@8.15.9",
|
||||
"dependencies": {
|
||||
"@github/markdown-toolbar-element": "^2.1.1",
|
||||
"@github/text-expander-element": "^2.2.2",
|
||||
|
||||
@@ -10,10 +10,10 @@
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@playwright/test": "^1.25.0",
|
||||
"@types/node": "^18.7.8",
|
||||
"nanoid": "^4.0.0",
|
||||
"@types/node": "^22.9.0",
|
||||
"nanoid": "^5.0.8",
|
||||
"playwright": "^1.25.0",
|
||||
"ts-node": "^10.9.1",
|
||||
"typescript": "^4.7.4"
|
||||
"typescript": "^5.6.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
"type-check:api": "turbo run type-check --filter=@remark42/api",
|
||||
"lint:api": "turbo run lint --filter=@remark42/api"
|
||||
},
|
||||
"packageManager": "pnpm@8.15.9",
|
||||
"devDependencies": {
|
||||
"husky": "^8.0.1",
|
||||
"lint-staged": "^13.0.3",
|
||||
|
||||
@@ -4,7 +4,7 @@ Implementation of API methods for Remark42
|
||||
|
||||
## Development
|
||||
|
||||
- If you don't have `pnpm` installed run `npm i -g pnpm@7`
|
||||
- If you don't have `pnpm` installed run `npm i -g pnpm@8`
|
||||
- Install dependencies `pnpm i`
|
||||
- Run development mode with `pnpm run dev`
|
||||
- Build lib with `pnpm run build`
|
||||
|
||||
@@ -29,22 +29,23 @@
|
||||
"type-check": "tsc --noEmit",
|
||||
"lint-staged:lint": "eslint --fix --ext .cjs,.mjs,.ts"
|
||||
},
|
||||
"packageManager": "pnpm@8.15.9",
|
||||
"devDependencies": {
|
||||
"@types/node": "^18.0.5",
|
||||
"@typescript-eslint/eslint-plugin": "^5.33.1",
|
||||
"@typescript-eslint/parser": "^5.33.1",
|
||||
"@vitest/coverage-c8": "^0.22.1",
|
||||
"eslint": "^8.18.0",
|
||||
"eslint-config-prettier": "^8.5.0",
|
||||
"eslint-plugin-prettier": "^4.2.1",
|
||||
"jsdom": "^20.0.0",
|
||||
"msw": "^0.44.1",
|
||||
"@types/node": "^18.19.64",
|
||||
"@typescript-eslint/eslint-plugin": "^8.13.0",
|
||||
"@typescript-eslint/parser": "^8.13.0",
|
||||
"@vitest/coverage-v8": "^2.1.4",
|
||||
"eslint": "^8.57.1",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"eslint-plugin-prettier": "^5.2.1",
|
||||
"jsdom": "^25.0.1",
|
||||
"msw": "^1.3.5",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"prettier": "^2.7.1",
|
||||
"prettier": "^3.3.3",
|
||||
"ts-node": "^10.9.1",
|
||||
"tslib": "^2.4.0",
|
||||
"typescript": "^4.7.4",
|
||||
"vitest": "^0.22.1",
|
||||
"typescript": "^4.9.5",
|
||||
"vitest": "^2.1.4",
|
||||
"whatwg-fetch": "^3.6.2"
|
||||
},
|
||||
"type": "module",
|
||||
|
||||
Generated
+3618
-2486
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1 @@
|
||||
20
|
||||
+2
-1
@@ -10,6 +10,7 @@
|
||||
"node": ">=20.11.1",
|
||||
"yarn": ">=1.22"
|
||||
},
|
||||
"packageManager": "yarn@1.22.22",
|
||||
"scripts": {
|
||||
"start": "npm-run-all dev",
|
||||
"dev": "npm-run-all -l clean build:css -p dev:css dev:11ty",
|
||||
@@ -21,7 +22,7 @@
|
||||
"clean": "rm -rf .tmp/* build/*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@11ty/eleventy": "^3.0.0",
|
||||
"@11ty/eleventy": "^2.0.1",
|
||||
"@11ty/eleventy-plugin-syntaxhighlight": "^5.0.0",
|
||||
"@tailwindcss/typography": "^0.5.15",
|
||||
"cross-env": "^7.0.3",
|
||||
|
||||
@@ -6,7 +6,7 @@ module.exports = async function getLatestReleaseVersion() {
|
||||
return currentData
|
||||
}
|
||||
try {
|
||||
const fetch = await import('node-fetch')
|
||||
const fetch = (await import('node-fetch')).default;
|
||||
const res = await fetch(
|
||||
'https://api.github.com/repos/umputun/remark42/releases'
|
||||
)
|
||||
|
||||
@@ -21,7 +21,7 @@ While developing, we set up environment which imitates real world example. We se
|
||||
You must have at least 2GB RAM or swap enabled for building.
|
||||
|
||||
- install [Node.js 16](https://nodejs.org/en/) or higher (we recommend using [NVM](https://github.com/nvm-sh/nvm) for node version autoswitch)
|
||||
- install [PNPM 7](https://pnpm.io/installation)
|
||||
- install [PNPM 8](https://pnpm.io/installation)
|
||||
- run `pnpm i` inside `./frontend`
|
||||
|
||||
Running `pnpm i` will set up pre-commit hooks into your git repository. They are used to reformat your frontend code using `prettier` and lint with `eslint` and `stylelint` before every commit.
|
||||
|
||||
+810
-543
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user