mirror of
https://github.com/theoludwig/theoludwig.git
synced 2024-11-05 04:51:30 +01:00
fix: update dependencies to latest
This commit is contained in:
parent
d76db36dbc
commit
042a861f58
@ -1,12 +1,5 @@
|
||||
.vscode
|
||||
.git
|
||||
.env
|
||||
.*
|
||||
!.npmrc
|
||||
build
|
||||
.next
|
||||
coverage
|
||||
node_modules
|
||||
tmp
|
||||
temp
|
||||
.DS_Store
|
||||
.lighthouseci
|
||||
.vercel
|
||||
|
@ -10,7 +10,6 @@
|
||||
},
|
||||
"rules": {
|
||||
"prettier/prettier": "error",
|
||||
"unicorn/prefer-node-protocol": "error",
|
||||
"@next/next/no-img-element": "off"
|
||||
}
|
||||
}
|
||||
|
2
.github/workflows/analyze.yml
vendored
2
.github/workflows/analyze.yml
vendored
@ -16,7 +16,7 @@ jobs:
|
||||
language: ['javascript']
|
||||
|
||||
steps:
|
||||
- uses: 'actions/checkout@v3.1.0'
|
||||
- uses: 'actions/checkout@v3.3.0'
|
||||
|
||||
- name: 'Initialize CodeQL'
|
||||
uses: 'github/codeql-action/init@v2'
|
||||
|
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
@ -10,10 +10,10 @@ jobs:
|
||||
build:
|
||||
runs-on: 'ubuntu-latest'
|
||||
steps:
|
||||
- uses: 'actions/checkout@v3.1.0'
|
||||
- uses: 'actions/checkout@v3.3.0'
|
||||
|
||||
- name: 'Use Node.js'
|
||||
uses: 'actions/setup-node@v3.5.1'
|
||||
uses: 'actions/setup-node@v3.6.0'
|
||||
with:
|
||||
node-version: '18.x'
|
||||
cache: 'npm'
|
||||
|
13
.github/workflows/lint.yml
vendored
13
.github/workflows/lint.yml
vendored
@ -10,10 +10,10 @@ jobs:
|
||||
lint:
|
||||
runs-on: 'ubuntu-latest'
|
||||
steps:
|
||||
- uses: 'actions/checkout@v3.1.0'
|
||||
- uses: 'actions/checkout@v3.3.0'
|
||||
|
||||
- name: 'Use Node.js'
|
||||
uses: 'actions/setup-node@v3.5.1'
|
||||
uses: 'actions/setup-node@v3.6.0'
|
||||
with:
|
||||
node-version: '18.x'
|
||||
cache: 'npm'
|
||||
@ -30,8 +30,8 @@ jobs:
|
||||
- name: 'lint:markdown'
|
||||
run: 'npm run lint:markdown'
|
||||
|
||||
- name: 'lint:typescript'
|
||||
run: 'npm run lint:typescript'
|
||||
- name: 'lint:eslint'
|
||||
run: 'npm run lint:eslint'
|
||||
|
||||
- name: 'lint:prettier'
|
||||
run: 'npm run lint:prettier'
|
||||
@ -40,8 +40,3 @@ jobs:
|
||||
uses: 'dotenv-linter/action-dotenv-linter@v2'
|
||||
with:
|
||||
github_token: ${{ secrets.github_token }}
|
||||
|
||||
- name: 'lint:docker'
|
||||
uses: 'hadolint/hadolint-action@v1.6.0'
|
||||
with:
|
||||
dockerfile: './Dockerfile'
|
||||
|
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
@ -8,7 +8,7 @@ jobs:
|
||||
release:
|
||||
runs-on: 'ubuntu-latest'
|
||||
steps:
|
||||
- uses: 'actions/checkout@v3.1.0'
|
||||
- uses: 'actions/checkout@v3.3.0'
|
||||
with:
|
||||
fetch-depth: 0
|
||||
persist-credentials: false
|
||||
@ -21,7 +21,7 @@ jobs:
|
||||
git_commit_gpgsign: true
|
||||
|
||||
- name: 'Use Node.js'
|
||||
uses: 'actions/setup-node@v3.5.1'
|
||||
uses: 'actions/setup-node@v3.6.0'
|
||||
with:
|
||||
node-version: '18.x'
|
||||
cache: 'npm'
|
||||
|
12
.github/workflows/test.yml
vendored
12
.github/workflows/test.yml
vendored
@ -10,10 +10,10 @@ jobs:
|
||||
test-unit:
|
||||
runs-on: 'ubuntu-latest'
|
||||
steps:
|
||||
- uses: 'actions/checkout@v3.1.0'
|
||||
- uses: 'actions/checkout@v3.3.0'
|
||||
|
||||
- name: 'Use Node.js'
|
||||
uses: 'actions/setup-node@v3.5.1'
|
||||
uses: 'actions/setup-node@v3.6.0'
|
||||
with:
|
||||
node-version: '18.x'
|
||||
cache: 'npm'
|
||||
@ -27,10 +27,10 @@ jobs:
|
||||
test-lighthouse:
|
||||
runs-on: 'ubuntu-latest'
|
||||
steps:
|
||||
- uses: 'actions/checkout@v3.1.0'
|
||||
- uses: 'actions/checkout@v3.3.0'
|
||||
|
||||
- name: 'Use Node.js'
|
||||
uses: 'actions/setup-node@v3.5.1'
|
||||
uses: 'actions/setup-node@v3.6.0'
|
||||
with:
|
||||
node-version: '18.x'
|
||||
cache: 'npm'
|
||||
@ -52,10 +52,10 @@ jobs:
|
||||
test-e2e:
|
||||
runs-on: 'ubuntu-latest'
|
||||
steps:
|
||||
- uses: 'actions/checkout@v3.1.0'
|
||||
- uses: 'actions/checkout@v3.3.0'
|
||||
|
||||
- name: 'Use Node.js'
|
||||
uses: 'actions/setup-node@v3.5.1'
|
||||
uses: 'actions/setup-node@v3.6.0'
|
||||
with:
|
||||
node-version: '18.x'
|
||||
cache: 'npm'
|
||||
|
@ -1,11 +1,5 @@
|
||||
{
|
||||
"config": {
|
||||
"default": true,
|
||||
"MD013": false,
|
||||
"MD024": false,
|
||||
"MD033": false,
|
||||
"MD041": false
|
||||
},
|
||||
"globs": ["**/*.{md,mdx}"],
|
||||
"ignores": ["**/node_modules"]
|
||||
"ignores": ["**/node_modules"],
|
||||
"customRules": ["markdownlint-rule-relative-links"]
|
||||
}
|
||||
|
8
.markdownlint.json
Normal file
8
.markdownlint.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"default": true,
|
||||
"relative-links": true,
|
||||
"extends": "markdownlint/style/prettier",
|
||||
"MD024": false,
|
||||
"MD033": false,
|
||||
"MD041": false
|
||||
}
|
32
Dockerfile
32
Dockerfile
@ -1,21 +1,27 @@
|
||||
FROM node:18.12.1 AS dependencies
|
||||
WORKDIR /usr/src/app
|
||||
FROM node:18.13.0 AS builder-dependencies
|
||||
WORKDIR /usr/src/application
|
||||
COPY ./package*.json ./
|
||||
RUN npm install
|
||||
|
||||
FROM node:18.12.1 AS builder
|
||||
WORKDIR /usr/src/app
|
||||
FROM node:18.13.0 AS runner-dependencies
|
||||
WORKDIR /usr/src/application
|
||||
ENV NODE_ENV=production
|
||||
COPY ./package*.json ./
|
||||
RUN npm install --omit=dev --ignore-scripts
|
||||
|
||||
FROM node:18.13.0 AS builder
|
||||
WORKDIR /usr/src/application
|
||||
COPY --from=builder-dependencies /usr/src/application/node_modules ./node_modules
|
||||
COPY ./ ./
|
||||
COPY --from=dependencies /usr/src/app/node_modules ./node_modules
|
||||
RUN npm run build
|
||||
|
||||
FROM node:18.12.1 AS runner
|
||||
WORKDIR /usr/src/app
|
||||
FROM gcr.io/distroless/nodejs18-debian11:latest AS runner
|
||||
WORKDIR /usr/src/application
|
||||
ENV NODE_ENV=production
|
||||
ENV NEXT_TELEMETRY_DISABLED=1
|
||||
COPY --from=builder /usr/src/app/.next/standalone ./
|
||||
COPY --from=builder /usr/src/app/.next/static ./.next/static
|
||||
COPY --from=builder /usr/src/app/public ./public
|
||||
COPY --from=builder /usr/src/app/locales ./locales
|
||||
COPY --from=builder /usr/src/app/next.config.js ./next.config.js
|
||||
CMD ["node", "server.js"]
|
||||
COPY --from=builder /usr/src/application/.next/standalone ./
|
||||
COPY --from=builder /usr/src/application/.next/static ./.next/static
|
||||
COPY --from=builder /usr/src/application/public ./public
|
||||
COPY --from=builder /usr/src/application/locales ./locales
|
||||
COPY --from=builder /usr/src/application/next.config.js ./next.config.js
|
||||
CMD ["./server.js"]
|
||||
|
1746
jsonresume-theme-custom/package-lock.json
generated
1746
jsonresume-theme-custom/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -13,9 +13,9 @@
|
||||
"modern-normalize": "1.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "18.11.11",
|
||||
"@types/node": "18.11.18",
|
||||
"date-and-time": "2.4.1",
|
||||
"vite": "3.2.5",
|
||||
"vite": "4.0.4",
|
||||
"vite-plugin-html": "3.2.0"
|
||||
}
|
||||
}
|
||||
|
19277
package-lock.json
generated
19277
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
52
package.json
52
package.json
@ -18,7 +18,7 @@
|
||||
"lint:commit": "commitlint",
|
||||
"lint:editorconfig": "editorconfig-checker",
|
||||
"lint:markdown": "markdownlint-cli2",
|
||||
"lint:typescript": "eslint \"**/*.{js,jsx,ts,tsx}\" --ignore-path \".gitignore\"",
|
||||
"lint:eslint": "eslint \"**/*.{js,jsx,ts,tsx}\" --ignore-path \".gitignore\"",
|
||||
"lint:prettier": "prettier \".\" --check --ignore-path \".gitignore\"",
|
||||
"lint:staged": "lint-staged",
|
||||
"test:unit": "cypress run --component",
|
||||
@ -37,13 +37,13 @@
|
||||
"@fortawesome/free-brands-svg-icons": "6.2.1",
|
||||
"@fortawesome/free-solid-svg-icons": "6.2.1",
|
||||
"@fortawesome/react-fontawesome": "0.2.0",
|
||||
"@giscus/react": "2.2.4",
|
||||
"@giscus/react": "2.2.6",
|
||||
"clsx": "1.2.1",
|
||||
"date-and-time": "2.4.1",
|
||||
"gray-matter": "4.0.3",
|
||||
"html-react-parser": "3.0.4",
|
||||
"next": "13.0.6",
|
||||
"next-mdx-remote": "4.2.0",
|
||||
"html-react-parser": "3.0.7",
|
||||
"next": "13.1.1",
|
||||
"next-mdx-remote": "4.2.1",
|
||||
"next-pwa": "5.6.0",
|
||||
"next-themes": "0.2.1",
|
||||
"next-translate": "1.6.0",
|
||||
@ -53,46 +53,48 @@
|
||||
"rehype-raw": "6.1.1",
|
||||
"rehype-slug": "5.1.0",
|
||||
"remark-gfm": "3.0.1",
|
||||
"sharp": "0.31.2",
|
||||
"shiki": "0.11.1",
|
||||
"sharp": "0.31.3",
|
||||
"shiki": "0.12.1",
|
||||
"unified": "10.1.2",
|
||||
"unist-util-visit": "4.1.1",
|
||||
"universal-cookie": "4.0.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@commitlint/cli": "17.3.0",
|
||||
"@commitlint/config-conventional": "17.3.0",
|
||||
"@commitlint/cli": "17.4.1",
|
||||
"@commitlint/config-conventional": "17.4.0",
|
||||
"@lhci/cli": "0.10.0",
|
||||
"@saithodev/semantic-release-backmerge": "2.1.2",
|
||||
"@semantic-release/git": "10.0.1",
|
||||
"@tailwindcss/typography": "0.5.8",
|
||||
"@types/node": "18.11.11",
|
||||
"@tailwindcss/typography": "0.5.9",
|
||||
"@tsconfig/strictest": "1.0.2",
|
||||
"@types/node": "18.11.18",
|
||||
"@types/react": "18.0.26",
|
||||
"@types/unist": "2.0.6",
|
||||
"@typescript-eslint/eslint-plugin": "5.46.0",
|
||||
"@typescript-eslint/eslint-plugin": "5.48.1",
|
||||
"autoprefixer": "10.4.13",
|
||||
"cypress": "12.0.1",
|
||||
"cypress": "12.3.0",
|
||||
"editorconfig-checker": "4.0.2",
|
||||
"eslint": "8.29.0",
|
||||
"eslint": "8.31.0",
|
||||
"eslint-config-conventions": "6.0.0",
|
||||
"eslint-config-next": "13.0.6",
|
||||
"eslint-config-prettier": "8.5.0",
|
||||
"eslint-config-next": "13.1.1",
|
||||
"eslint-config-prettier": "8.6.0",
|
||||
"eslint-plugin-import": "2.26.0",
|
||||
"eslint-plugin-prettier": "4.2.1",
|
||||
"eslint-plugin-promise": "6.1.1",
|
||||
"eslint-plugin-unicorn": "45.0.1",
|
||||
"html-w3c-validator": "1.2.1",
|
||||
"husky": "8.0.2",
|
||||
"eslint-plugin-unicorn": "45.0.2",
|
||||
"html-w3c-validator": "1.2.2",
|
||||
"husky": "8.0.3",
|
||||
"jsonresume-theme-custom": "file:./jsonresume-theme-custom",
|
||||
"lint-staged": "13.1.0",
|
||||
"markdownlint-cli2": "0.5.1",
|
||||
"postcss": "8.4.19",
|
||||
"prettier": "2.8.1",
|
||||
"prettier-plugin-tailwindcss": "0.2.0",
|
||||
"markdownlint-cli2": "0.6.0",
|
||||
"markdownlint-rule-relative-links": "1.1.1",
|
||||
"postcss": "8.4.21",
|
||||
"prettier": "2.8.2",
|
||||
"prettier-plugin-tailwindcss": "0.2.1",
|
||||
"semantic-release": "19.0.5",
|
||||
"start-server-and-test": "1.15.1",
|
||||
"start-server-and-test": "1.15.2",
|
||||
"tailwindcss": "3.2.4",
|
||||
"typescript": "4.9.4",
|
||||
"vercel": "28.8.0"
|
||||
"vercel": "28.11.0"
|
||||
}
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ const BlogPostPage: NextPage<BlogPostPageProps> = (props) => {
|
||||
export const getStaticProps: GetStaticProps<BlogPostPageProps> = async (
|
||||
context
|
||||
) => {
|
||||
const slug = context?.params?.slug
|
||||
const slug = context?.params?.['slug']
|
||||
const { getPostBySlug } = await import('utils/blog')
|
||||
const post = await getPostBySlug(slug)
|
||||
if (post == null || (post != null && !post.frontmatter.isPublished)) {
|
||||
|
@ -1,24 +1,21 @@
|
||||
{
|
||||
"extends": "@tsconfig/strictest/tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"target": "ESNext",
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "node",
|
||||
"allowJs": true,
|
||||
"checkJs": true,
|
||||
"jsx": "preserve",
|
||||
"sourceMap": true,
|
||||
"removeComments": true,
|
||||
"noEmit": true,
|
||||
"strict": true,
|
||||
"types": ["cypress"],
|
||||
"baseUrl": ".",
|
||||
"esModuleInterop": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"lib": ["dom", "dom.iterable", "esnext"],
|
||||
"skipLibCheck": true,
|
||||
"lib": ["dom", "dom.iterable", "ESNext"],
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"incremental": true
|
||||
"incremental": true,
|
||||
"exactOptionalPropertyTypes": false
|
||||
},
|
||||
"exclude": ["dist", ".next", "out", "next.config.js"],
|
||||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"]
|
||||
|
@ -38,6 +38,9 @@ export const getPosts = async (): Promise<PostMetadata[]> => {
|
||||
const postsWithTime = await Promise.all(
|
||||
posts.map(async (postFilename) => {
|
||||
const [slug, extension] = postFilename.split('.')
|
||||
if (slug == null || extension == null) {
|
||||
throw new Error('Invalid postFilename.')
|
||||
}
|
||||
const blogPostPath = path.join(POSTS_PATH, `${slug}.${extension}`)
|
||||
const blogPostContent = await fs.promises.readFile(blogPostPath, {
|
||||
encoding: 'utf8'
|
||||
|
Loading…
Reference in New Issue
Block a user