Skip to content

Commit

Permalink
Merge pull request #102 from stscoundrel/release/2024-02
Browse files Browse the repository at this point in the history
Release/2024 02
  • Loading branch information
stscoundrel committed Feb 24, 2024
2 parents 2ef01ea + 4e97f27 commit 419624e
Show file tree
Hide file tree
Showing 19 changed files with 11,540 additions and 7,765 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/coverage-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: yarn install --production=false
- run: yarn install
- run: yarn test:coverage
env:
CI: true
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: yarn install --production=false
- run: yarn install
- run: yarn lint
env:
CI: true
2 changes: 1 addition & 1 deletion .github/workflows/test-unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: yarn install --production=false
- run: yarn install
- run: yarn test:unit
env:
CI: true
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,12 @@ yarn-error.log*
tests/integration/logs
/public/sw.js
public/workbox-*.js

# Yarn
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
893 changes: 893 additions & 0 deletions .yarn/releases/yarn-4.1.0.cjs

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.1.0.cjs
28 changes: 16 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,33 +35,37 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"reset-css": "^5.0.2",
"sass": "^1.70.0",
"scandinavian-dictionary-crosslinker": "^0.5.0",
"sass": "^1.71.1",
"scandinavian-dictionary-crosslinker": "^0.6.0",
"sharp": "^0.33.2",
"sitemap": "^7.1.1",
"slugify": "^1.6.6",
"teljari": "^1.1.1"
},
"devDependencies": {
"@types/jest": "^29.5.11",
"@types/node": "^20.11.7",
"@types/react": "^18.2.48",
"@typescript-eslint/eslint-plugin": "^6.19.1",
"@typescript-eslint/parser": "^6.19.1",
"cypress": "^13.6.3",
"eslint": "^8.56.0",
"@types/jest": "^29.5.12",
"@types/node": "^20.11.20",
"@types/react": "^18.2.58",
"@typescript-eslint/eslint-plugin": "^7.0.2",
"@typescript-eslint/parser": "^7.0.2",
"cypress": "^13.6.6",
"eslint": "^8.57.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-next": "^14.1.0",
"eslint-plugin-cypress": "^2.15.1",
"eslint-plugin-jest": "^27.6.3",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jest": "^27.9.0",
"eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"identity-obj-proxy": "^3.0.0",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"next-router-mock": "^0.9.11",
"next-router-mock": "^0.9.12",
"node-mocks-http": "^1.14.1",
"react-test-renderer": "^18.2.0",
"ts-node": "^10.9.2",
"typescript": "^5.3.3"
}
},
"packageManager": "yarn@4.1.0"
}
4 changes: 4 additions & 0 deletions src/components/Crosslinks/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ export default function Crosslinks({ crosslinks }: CrossLinkProps) {
return 'Old Icelandic - Geir Zoëga\'s Dictionary'
}

if (source === 'old-danish') {
return 'Old Danish - Otto Kalkar\'s Dictionary'
}

return ''
}

Expand Down
9 changes: 9 additions & 0 deletions src/components/Footer/__snapshots__/Footer.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,15 @@ exports[`Footer component Matches snapshot 1`] = `
Related dictionary projects
</h4>
<ul>
<li>
<a
href="https://old-danish-dictionary.vercel.app/"
rel="noopener noreferrer"
target="_blank"
>
Otto Kalkar's Old Danish Dictionary
</a>
</li>
<li>
<a
href="https://old-norwegian-dictionary.vercel.app/"
Expand Down
6 changes: 6 additions & 0 deletions src/components/Footer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ export default function Footer({ letters }: FooterProps) {
<nav className={styles.nav}>
<h4 className={styles.navTitle}>Related dictionary projects</h4>
<ul>
<li>
<ExternalLink
title="Otto Kalkar's Old Danish Dictionary"
href="https://old-danish-dictionary.vercel.app/"
/>
</li>
<li>
<ExternalLink
title="Dictionary of the Old Norwegian Language"
Expand Down
18 changes: 18 additions & 0 deletions src/components/Layout/__snapshots__/Layout.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,15 @@ exports[`Layout component Letter layout Matches snapshot 1`] = `
Related dictionary projects
</h4>
<ul>
<li>
<a
href="https://old-danish-dictionary.vercel.app/"
rel="noopener noreferrer"
target="_blank"
>
Otto Kalkar's Old Danish Dictionary
</a>
</li>
<li>
<a
href="https://old-norwegian-dictionary.vercel.app/"
Expand Down Expand Up @@ -1530,6 +1539,15 @@ exports[`Layout component Word layout Matches snapshot 1`] = `
Related dictionary projects
</h4>
<ul>
<li>
<a
href="https://old-danish-dictionary.vercel.app/"
rel="noopener noreferrer"
target="_blank"
>
Otto Kalkar's Old Danish Dictionary
</a>
</li>
<li>
<a
href="https://old-norwegian-dictionary.vercel.app/"
Expand Down
10 changes: 5 additions & 5 deletions tests/unit/lib/services/crosslinks.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const entry1: DictionaryEntry = {
slug: 'aremark',
}

// Dummy entry which produces cross links
// Dummy entry which produces crosslinks
const entry2: DictionaryEntry = {
headword: '',
partOfSpeech: [''],
Expand All @@ -38,10 +38,6 @@ describe('Crosslinks service tests', () => {

test('Returns crosslinks when slugs match', () => {
const expected = [
{
url: 'https://old-norwegian-dictionary.vercel.app/word/fadir',
source: 'old-norwegian',
},
{
url: 'https://cleasby-vigfusson-dictionary.vercel.app/word/fadir',
source: 'old-norse',
Expand All @@ -50,6 +46,10 @@ describe('Crosslinks service tests', () => {
url: 'https://old-icelandic.vercel.app/word/fadir',
source: 'old-icelandic',
},
{
url: 'https://old-norwegian-dictionary.vercel.app/word/fadir',
source: 'old-norwegian',
},
]

const result = getCrossLinks(entry2)
Expand Down
9 changes: 9 additions & 0 deletions tests/unit/pages/__snapshots__/404.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,15 @@ exports[`404 page page Matches snapshot 1`] = `
Related dictionary projects
</h4>
<ul>
<li>
<a
href="https://old-danish-dictionary.vercel.app/"
rel="noopener noreferrer"
target="_blank"
>
Otto Kalkar's Old Danish Dictionary
</a>
</li>
<li>
<a
href="https://old-norwegian-dictionary.vercel.app/"
Expand Down
9 changes: 9 additions & 0 deletions tests/unit/pages/__snapshots__/index.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -857,6 +857,15 @@ exports[`Index page Matches snapshot 1`] = `
Related dictionary projects
</h4>
<ul>
<li>
<a
href="https://old-danish-dictionary.vercel.app/"
rel="noopener noreferrer"
target="_blank"
>
Otto Kalkar's Old Danish Dictionary
</a>
</li>
<li>
<a
href="https://old-norwegian-dictionary.vercel.app/"
Expand Down
9 changes: 9 additions & 0 deletions tests/unit/pages/__snapshots__/search.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,15 @@ exports[`Search page: render Matches snapshot 1`] = `
Related dictionary projects
</h4>
<ul>
<li>
<a
href="https://old-danish-dictionary.vercel.app/"
rel="noopener noreferrer"
target="_blank"
>
Otto Kalkar's Old Danish Dictionary
</a>
</li>
<li>
<a
href="https://old-norwegian-dictionary.vercel.app/"
Expand Down
9 changes: 9 additions & 0 deletions tests/unit/pages/__snapshots__/sources.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -3820,6 +3820,15 @@ exports[`Sources page Matches snapshot 1`] = `
Related dictionary projects
</h4>
<ul>
<li>
<a
href="https://old-danish-dictionary.vercel.app/"
rel="noopener noreferrer"
target="_blank"
>
Otto Kalkar's Old Danish Dictionary
</a>
</li>
<li>
<a
href="https://old-norwegian-dictionary.vercel.app/"
Expand Down
9 changes: 9 additions & 0 deletions tests/unit/pages/letter/__snapshots__/letter.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -5460,6 +5460,15 @@ exports[`Letter page: render Matches snapshot 1`] = `
Related dictionary projects
</h4>
<ul>
<li>
<a
href="https://old-danish-dictionary.vercel.app/"
rel="noopener noreferrer"
target="_blank"
>
Otto Kalkar's Old Danish Dictionary
</a>
</li>
<li>
<a
href="https://old-norwegian-dictionary.vercel.app/"
Expand Down
9 changes: 9 additions & 0 deletions tests/unit/pages/word/__snapshots__/word.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -774,6 +774,15 @@ exports[`Word page: render & usage Matches snapshot 1`] = `
Related dictionary projects
</h4>
<ul>
<li>
<a
href="https://old-danish-dictionary.vercel.app/"
rel="noopener noreferrer"
target="_blank"
>
Otto Kalkar's Old Danish Dictionary
</a>
</li>
<li>
<a
href="https://old-norwegian-dictionary.vercel.app/"
Expand Down
Loading

0 comments on commit 419624e

Please sign in to comment.