1
0
Fork 0

move files around

This commit is contained in:
Matthias Kretschmann 2022-05-12 00:00:19 +01:00
parent 7a1fcc20b6
commit 1d2a24ad2c
Signed by: m
GPG Key ID: 606EEEF3C479A91F
33 changed files with 2751 additions and 3472 deletions

View File

@ -28,13 +28,13 @@ const esModules = [
module.exports = {
rootDir: '../',
transform: {
'^.+\\.[jt]sx?$': ['babel-jest', { configFile: './jest/babel.config.js' }]
'^.+\\.[jt]sx?$': ['babel-jest', { configFile: './.jest/babel.config.js' }]
},
moduleNameMapper: {
'.+\\.(css|styl|less|sass|scss)$': 'identity-obj-proxy',
'.+\\.(jpg|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
'<rootDir>/jest/__mocks__/file-mock.js',
'\\.svg': '<rootDir>/jest/__mocks__/svgr-mock.js',
'<rootDir>/.jest/__mocks__/file-mock.js',
'\\.svg': '<rootDir>/.jest/__mocks__/svgr-mock.js',
'^@reach/router(.*)': '<rootDir>/node_modules/@gatsbyjs/reach-router$1'
},
testPathIgnorePatterns: ['node_modules', '.cache', 'public', 'coverage'],
@ -42,8 +42,8 @@ module.exports = {
globals: {
__PATH_PREFIX__: ''
},
setupFiles: ['<rootDir>/jest/loadershim.js'],
setupFilesAfterEnv: ['<rootDir>/jest/setup-test-env.ts'],
setupFiles: ['<rootDir>/.jest/loadershim.js'],
setupFilesAfterEnv: ['<rootDir>/.jest/setup-test-env.ts'],
collectCoverageFrom: ['src/**/*.{ts,tsx}', '!src/@types/**/*'],
testEnvironment: 'jsdom'
}

6133
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -10,8 +10,8 @@
"start": "gatsby develop --host 0.0.0.0",
"build": "gatsby build",
"ssr": "npm run build && serve -s public/",
"test": "npm run lint && jest -c jest/jest.config.js --coverage --silent",
"test:watch": "npm run lint && jest -c jest/jest.config.js --coverage --watch",
"test": "npm run lint && jest -c .jest/jest.config.js --coverage --silent",
"test:watch": "npm run lint && jest -c .jest/jest.config.js --coverage --watch",
"lint": "run-p --continue-on-error lint:js lint:css lint:md",
"lint:js": "eslint --ignore-path .gitignore --ext .js,.jsx,.ts,.tsx .",
"lint:css": "stylelint 'src/**/*.css'",
@ -38,30 +38,30 @@
"fast-exif": "^1.0.1",
"feather-icons": "^4.29.0",
"fraction.js": "^4.2.0",
"gatsby": "^4.13.1",
"gatsby-plugin-catch-links": "^4.13.0",
"gatsby-plugin-feed": "^4.13.0",
"gatsby-plugin-image": "^2.13.0",
"gatsby": "^4.14.0",
"gatsby-plugin-catch-links": "^4.14.0",
"gatsby-plugin-feed": "^4.14.0",
"gatsby-plugin-image": "^2.14.0",
"gatsby-plugin-lunr": "^1.5.2",
"gatsby-plugin-manifest": "^4.13.0",
"gatsby-plugin-manifest": "^4.14.0",
"gatsby-plugin-matomo": "^0.13.0",
"gatsby-plugin-meta-redirect": "^1.1.1",
"gatsby-plugin-offline": "^5.13.0",
"gatsby-plugin-react-helmet": "^5.13.0",
"gatsby-plugin-sharp": "^4.13.0",
"gatsby-plugin-sitemap": "^5.13.0",
"gatsby-plugin-offline": "^5.14.0",
"gatsby-plugin-react-helmet": "^5.14.0",
"gatsby-plugin-sharp": "^4.14.0",
"gatsby-plugin-sitemap": "^5.14.0",
"gatsby-plugin-svgr": "^3.0.0-beta.0",
"gatsby-redirect-from": "^0.5.0",
"gatsby-remark-autolink-headers": "^5.13.0",
"gatsby-remark-copy-linked-files": "^5.13.0",
"gatsby-remark-images": "^6.13.0",
"gatsby-remark-autolink-headers": "^5.14.0",
"gatsby-remark-copy-linked-files": "^5.14.0",
"gatsby-remark-images": "^6.14.0",
"gatsby-remark-images-medium-zoom": "^1.7.0",
"gatsby-remark-smartypants": "^5.13.0",
"gatsby-remark-smartypants": "^5.14.0",
"gatsby-remark-vscode": "^3.3.1",
"gatsby-source-filesystem": "^4.13.0",
"gatsby-source-graphql": "^4.13.0",
"gatsby-transformer-remark": "^5.13.0",
"gatsby-transformer-sharp": "^4.13.0",
"gatsby-source-filesystem": "^4.14.0",
"gatsby-source-graphql": "^4.14.0",
"gatsby-transformer-remark": "^5.14.0",
"gatsby-transformer-sharp": "^4.14.0",
"nord-visual-studio-code": "github:arcticicestudio/nord-visual-studio-code",
"pigeon-maps": "^0.21.0",
"pigeon-marker": "^0.3.4",
@ -75,7 +75,7 @@
"remark-rehype": "^10.1.0",
"slugify": "^1.6.5",
"unified": "^10.1.2",
"wagmi": "^0.3.4"
"wagmi": "^0.3.5"
},
"devDependencies": {
"@svgr/webpack": "^6.2.1",
@ -90,18 +90,17 @@
"@types/react-dom": "^18.0.3",
"@types/react-helmet": "^6.1.5",
"@types/react-transition-group": "^4.4.4",
"@types/shortid": "^0.0.29",
"@typescript-eslint/eslint-plugin": "^5.22.0",
"@typescript-eslint/parser": "^5.22.0",
"@typescript-eslint/eslint-plugin": "^5.23.0",
"@typescript-eslint/parser": "^5.23.0",
"@welldone-software/why-did-you-render": "^7.0.1",
"babel-preset-gatsby": "^2.13.0",
"babel-preset-gatsby": "^2.14.0",
"eslint": "^8.15.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-graphql": "^4.0.0",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-react": "^7.29.4",
"eslint-plugin-testing-library": "^5.4.0",
"eslint-plugin-testing-library": "^5.5.0",
"fs-extra": "^10.1.0",
"identity-obj-proxy": "^3.0.0",
"jest": "^28.1.0",
@ -112,7 +111,6 @@
"ora": "^6.1.0",
"postcss": "^8.4.13",
"prettier": "^2.6.2",
"shortid": "^2.2.16",
"stylelint": "^14.8.2",
"stylelint-config-css-modules": "^4.1.0",
"stylelint-config-prettier": "^9.0.3",

View File

@ -1,5 +1,5 @@
import React from 'react'
import testRender from '../../jest/testRender'
import testRender from '../../.jest/testRender'
import Layout from './Layout'
describe('Layout', () => {

View File

@ -1,6 +1,6 @@
import React from 'react'
// import { render } from '@testing-library/react'
import testRender from '../../../jest/testRender'
import testRender from '../../../.jest/testRender'
import Input from './Input'

View File

@ -2,7 +2,7 @@ import React from 'react'
import { render } from '@testing-library/react'
import Networks from './Networks'
import meta from '../../../jest/__fixtures__/meta.json'
import meta from '../../../.jest/__fixtures__/meta.json'
const { author, rss, jsonfeed } = meta.site.siteMetadata
const { twitter, github } = author

View File

@ -1,6 +1,5 @@
import React, { ReactElement } from 'react'
import { Link } from 'gatsby'
import shortid from 'shortid'
import { PageContext } from '../../@types/Post'
import Icon from '../atoms/Icon'
import {
@ -65,7 +64,7 @@ export default function Pagination({
{!isFirst && <PrevNext prevPagePath={prevPagePath} />}
{Array.from({ length: numPages }, (_, i) => (
<PageNumber
key={shortid.generate()}
key={i}
i={i}
slug={slug}
current={currentPageNumber === i + 1}

View File

@ -1,7 +1,7 @@
import React from 'react'
import { render } from '@testing-library/react'
import PostTeaser from './PostTeaser'
import post from '../../../jest/__fixtures__/post.json'
import post from '../../../.jest/__fixtures__/post.json'
describe('PostTeaser', () => {
it('renders correctly', () => {

View File

@ -1,5 +1,5 @@
import React from 'react'
import testRender from '../../../jest/testRender'
import testRender from '../../../.jest/testRender'
import Footer from './Footer'
describe('Footer', () => {

View File

@ -2,7 +2,7 @@ import React from 'react'
import { render } from '@testing-library/react'
import Archive from './Archive'
import data from '../../../jest/__fixtures__/posts.json'
import data from '../../../.jest/__fixtures__/posts.json'
describe('Archive', () => {
const pageContext = {

View File

@ -2,7 +2,7 @@ import React from 'react'
import { render } from '@testing-library/react'
import Photos from './Photos'
import data from '../../../jest/__fixtures__/photos.json'
import data from '../../../.jest/__fixtures__/photos.json'
describe('/photos', () => {
it('renders without crashing', () => {

View File

@ -11,7 +11,6 @@ import {
tags as styleTags
} from './Meta.module.css'
import { Post } from '../../../@types/Post'
import shortid from 'shortid'
import PostDate from '../../molecules/PostDate'
export default function PostMeta({ post }: { post: Post }): ReactElement {
@ -40,7 +39,7 @@ export default function PostMeta({ post }: { post: Post }): ReactElement {
<div className={styleTags}>
{tags.map((tag: string) => {
const url = `/archive/${slugify(tag)}/`
return <Tag key={shortid.generate()} name={tag} url={url} />
return <Tag key={tag} name={tag} url={url} />
})}
</div>
)}

View File

@ -2,9 +2,9 @@ import React from 'react'
import { render } from '@testing-library/react'
import Post from '.'
import post from '../../../../jest/__fixtures__/post.json'
import postWithMore from '../../../../jest/__fixtures__/postWithMore.json'
import link from '../../../../jest/__fixtures__/link.json'
import post from '../../../../.jest/__fixtures__/post.json'
import postWithMore from '../../../../.jest/__fixtures__/postWithMore.json'
import link from '../../../../.jest/__fixtures__/link.json'
describe('Post', () => {
const pageContext = {

View File

@ -2,7 +2,7 @@ import React from 'react'
import { render } from '@testing-library/react'
import Home from '../index'
import data from '../../../jest/__fixtures__/home.json'
import data from '../../../.jest/__fixtures__/home.json'
describe('/', () => {
it('renders without crashing', () => {

View File

@ -18,5 +18,5 @@
"plugins": [{ "name": "typescript-plugin-css-modules" }]
},
"exclude": ["node_modules", "public", ".cache", "*.js"],
"include": ["./src/**/*", "./scripts/*.ts", "./jest/**/*"]
"include": ["./src/**/*", "./scripts/*.ts", "./.jest/**/*"]
}