Skip to content

V2.5.0#119

Merged
igor-starostenko merged 343 commits into
developfrom
v2.5.0
Jun 19, 2026
Merged

V2.5.0#119
igor-starostenko merged 343 commits into
developfrom
v2.5.0

Conversation

@igor-starostenko

Copy link
Copy Markdown
Owner

Major update to the website:

  • Dependency updates
  • Vitests for components and helpers
  • Test GitHub action
  • Agents instructions and skills added

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Major modernization pass to support Vitest-based unit testing, update module resolution/import paths, and add automation/docs for CI and agent workflows in this Next.js static site.

Changes:

  • Added Vitest + Testing Library setup (config, test scaffolding, and a migrated Lighthouse test).
  • Refactored many imports to explicit file paths/extensions and moved some components to dedicated *.jsx entry files.
  • Added CI test workflow + Yarn 4 / Node versioning + agent skill documentation/lockfiles.

Reviewed changes

Copilot reviewed 104 out of 118 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
vite.config.js Adds Vitest configuration and path aliases for tests.
src/test/setup.js Adds Testing Library jest-dom setup.
src/test/lighthouse.test.mjs Migrates Lighthouse checks into Vitest.
src/pages/index.js Updates Category import path.
src/pages/gallery.js Updates component import paths/extensions.
src/pages/feed.js Updates component import paths/extensions.
src/pages/about.js Updates component import paths/extensions.
src/pages/404.js Updates component import paths/extensions.
src/pages/[category]/[post].js Updates constants/components imports and dynamic import paths/extensions.
src/pages/[category].js Updates Category import path.
src/pages/_document.js Switches site config import to site-config.cjs.
src/helpers/schemaGenerator.test.js Adds Vitest coverage for schema generator helper.
src/helpers/mediaTemplates.test.js Adds Vitest coverage for mediaTemplates helper.
src/helpers/mediaTemplates.js Adjusts breakpoint import to explicit .js.
src/components/title/title.test.jsx Adds unit tests for Title component.
src/components/title/title.jsx Updates CSS module import to explicit .js.
src/components/selfie/selfie.test.jsx Adds unit tests with CSS module mocking.
src/components/selfie/selfie.jsx Updates CSS import to explicit .js.
src/components/selfie/selfie.css.js Updates Box/MEDIA imports to explicit paths/extensions.
src/components/recommendations/recommendations.jsx Updates imports for Hashtags/Image and CSS module.
src/components/pagination/pagination.test.jsx Adds unit tests for Pagination.
src/components/pagination/pagination.jsx Updates CSS import to explicit .js.
src/components/logo/logo.jsx Introduces Logo component using image wrapper.
src/components/layout/layout.test.jsx Adds unit tests for Layout with mocked dependencies.
src/components/layout/layout.jsx Updates imports for Header/Footer/constants/config and CSS module.
src/components/image/image.test.jsx Adds unit tests for Image wrapper.
src/components/image/image.jsx Fixes wrapper to use baseImage.jsx and renames export to Image.
src/components/image/flickrImage.jsx Updates BaseImage and icon/CSS imports.
src/components/image/baseImage.jsx Updates CSS import to explicit .js.
src/components/icons/youtubeIcon.jsx Adds new YouTube icon component.
src/components/icons/twitterIcon.jsx Adds new Twitter icon component.
src/components/icons/linkedinIcon.jsx Adds new LinkedIn icon component.
src/components/icons/index.jsx New icon barrel file exporting *Icon.jsx components.
src/components/icons/index.js Removes old icon barrel file.
src/components/icons/icons.test.jsx Adds smoke tests for icon components.
src/components/icons/githubIcon.jsx Adds new GitHub icon component.
src/components/icons/flickrIcon.jsx Adds new Flickr icon component.
src/components/icons/fivehundredpxIcon.jsx Adds new 500px icon component.
src/components/header/nav/nav.test.jsx Adds unit tests for Nav.
src/components/header/nav/nav.jsx Updates CSS import to explicit .js.
src/components/header/header.test.jsx Adds unit tests for Header with mocked CSS/Nav.
src/components/header/header.jsx Updates Nav and CSS imports.
src/components/header/header.css.js Updates MEDIA and Logo imports to explicit paths/extensions.
src/components/head/head.jsx Updates schemaGenerator and site config imports.
src/components/hashtags/index.js Removes old Hashtags implementation file.
src/components/hashtags/hashtags.test.jsx Adds unit tests for Hashtags.
src/components/hashtags/hashtags.jsx Adds new Hashtags component implementation.
src/components/gallery/gallery.test.jsx Adds unit tests for Gallery with dynamic import mocking.
src/components/gallery/gallery.jsx Updates dynamic imports for Carousel/Image to explicit paths/extensions.
src/components/footer/index.js Removes old Footer implementation file.
src/components/footer/footer.test.jsx Adds unit tests for Footer with mocked icons.
src/components/footer/footer.jsx Adds new Footer implementation with conditional social rendering.
src/components/filter/filter.test.jsx Adds unit tests for Filter.
src/components/filter/filter.jsx Updates Title/CSS imports to explicit paths/extensions.
src/components/date/date.test.jsx Adds unit tests for DateText.
src/components/date/date.jsx Adds DateText component implementation.
src/components/category/category.jsx Updates imports and Pagination dynamic import path/extension.
src/components/carousel/carousel.test.jsx Adds unit tests for Carousel modal.
src/components/carousel/carousel.jsx Adds Carousel modal component.
src/components/box/box.test.jsx Adds unit tests for Box.
src/components/box/box.jsx Adds Box component implementation.
src/components/article/article.test.jsx Adds unit tests for Article with extensive mocks.
src/components/article/article.jsx Updates Image/Hashtags/CSS and DateText dynamic import path/extension.
skills-lock.json Adds skills lockfile for agent skills.
SKILL.md Adds project skill metadata/instructions.
site-config.cjs Bumps version, refactors path usage, adjusts social config.
scripts/lighthouse.test.js Removes old Ava-based Lighthouse test.
scripts/favicons.cjs Updates to consume site-config.cjs and version field.
readme.md Updates project description, adds license badge, updates commands/docs.
package.json Adds Vitest/testing deps & scripts; updates engines and package manager metadata.
next.config.js Sets images.unoptimized: true for static export compatibility.
next-sitemap.config.js Switches config import to site-config.cjs.
Dockerfile Updates base image and Yarn install approach for Yarn 4.
CLAUDE.md Adds agent-oriented project notes.
babel.config.js Replaces .babelrc with repo-level Babel config file.
AGENTS.md Adds agent rules + build/test guidance.
.yarnrc.yml Adds Yarn Berry configuration.
.nvmrc Pins Node version for local/CI usage.
.gitignore Ignores coverage output and Yarn artifacts.
.github/workflows/test.yml Adds CI workflow to lint and run tests on PRs.
.babelrc Removes legacy Babel config file.
.agents/skills/next-upgrade/SKILL.md Adds Next.js upgrade skill doc.
.agents/skills/next-cache-components/SKILL.md Adds Cache Components skill doc.
.agents/skills/next-best-practices/suspense-boundaries.md Adds best-practice doc for Suspense boundaries.
.agents/skills/next-best-practices/SKILL.md Adds Next.js best-practices skill index doc.
.agents/skills/next-best-practices/self-hosting.md Adds best-practice doc for self-hosting.
.agents/skills/next-best-practices/scripts.md Adds best-practice doc for scripts/next/script.
.agents/skills/next-best-practices/runtime-selection.md Adds runtime selection guidance.
.agents/skills/next-best-practices/rsc-boundaries.md Adds RSC boundary rules and examples.
.agents/skills/next-best-practices/route-handlers.md Adds route handler guidance.
.agents/skills/next-best-practices/parallel-routes.md Adds parallel/intercepting routes guidance.
.agents/skills/next-best-practices/metadata.md Adds metadata API guidance.
.agents/skills/next-best-practices/image.md Adds image optimization guidance.
.agents/skills/next-best-practices/hydration-error.md Adds hydration troubleshooting guidance.
.agents/skills/next-best-practices/functions.md Adds Next.js function API reference.
.agents/skills/next-best-practices/font.md Adds font optimization guidance.
.agents/skills/next-best-practices/file-conventions.md Adds file conventions reference.
.agents/skills/next-best-practices/error-handling.md Adds error handling guidance.
.agents/skills/next-best-practices/directives.md Adds directives guidance.
.agents/skills/next-best-practices/debug-tricks.md Adds debugging tips (incl. MCP endpoint).
.agents/skills/next-best-practices/data-patterns.md Adds data fetching pattern guidance.
.agents/skills/next-best-practices/bundling.md Adds bundling guidance.
.agents/skills/next-best-practices/async-patterns.md Adds async API migration guidance.
.agents/skills/amplify-workflow/SKILL.md Adds Amplify workflow orchestration skill doc.
.agents/skills/amplify-workflow/scripts/prereq-check.sh Adds prereq validation script for Amplify workflow.
.agents/skills/amplify-workflow/references/frontend.md Adds frontend integration phase reference.
.agents/skills/amplify-workflow/references/deploy.md Adds deploy phase reference.
.agents/skills/amplify-workflow/references/backend.md Adds backend phase reference.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread babel.config.js Outdated
Comment thread .github/workflows/test.yml
Comment thread src/test/lighthouse.test.mjs Outdated
Comment thread src/test/lighthouse.test.mjs Outdated
Comment thread src/components/footer/footer.jsx Outdated
Comment thread Dockerfile Outdated
Comment thread src/components/head/head.test.jsx Outdated
Comment thread src/components/head/head.test.jsx Outdated
Comment thread src/components/head/head.test.jsx Outdated
Comment thread src/components/head/head.test.jsx Outdated
Comment thread src/components/head/head.test.jsx Outdated
Comment thread src/components/head/head.test.jsx Outdated
Comment thread src/components/head/head.test.jsx Outdated
igor-starostenko pushed a commit that referenced this pull request May 26, 2026
- head.test.jsx: Add proper validations to head component tests
- carousel.test.jsx: Fix test assertions for currentIndex prop usage
- baseImage.test.jsx: Add error event simulation tests
- flickrImage.jsx: Add backupSrc prop support
- baseImage.jsx: Remove unoptimized prop before spreading to prevent React warnings
- footer.test.jsx: Fix icon count assertion (4 rendered, not 6)
- [post].jsx: Remove unused 'page' variable

Fixes multiple Copilot review comments:
- head component validations
- currentIndex prop verification in carousel tests
- backupSrc prop handling
- unoptimized prop warnings
- icon count tests
- unused variable cleanup

Also included related fixes:
- vitest.config.js: Added global.css.js alias
- babel.config.js: Fixed to use CommonJS module.exports
- Dockerfile: Updated Node version from 25 to 26
- workflow test.yml: Added corepack enable step

All tests passing: 34 files, 173 tests
hercules-igorstar and others added 23 commits May 31, 2026 01:38
…est mocks

1. Add output:'export' to next.config.js for native static site generation
2. Fix ESM sitemap config with static import from .cjs file
3. Update test files to use correct import paths for page components
4. Fix lint script quoting in package.json
5. Update gallery test to mock RowsPhotoAlbum instead of PhotoAlbum
- Add useCallback to CarouselModal handlePrev/handleNext
- Move handleScroll logic inside useEffect in category.jsx
- Remove deprecated .eslintignore file
- Fix alt-text warning in image.test.jsx
- src/contentClient.js: exit with error if CONTENTFUL_SPACE_ID or CONTENTFUL_ACCESS_TOKEN not set
- scripts/contentful_import.js: support both CONTENTFUL_ACCESS_TOKEN and CONTENTFUL_PAT for flexibility

Also fixed src/components/head/head.jsx: inline schema generation to fix Safari bug
- contentful_import.js → contentful-import.js
- contentful_assets.js → contentful-assets.js
- contentful_backup.js → contentful-backup.js
Copilot AI and others added 29 commits June 19, 2026 05:31
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
- Test addContentfulParams with various URL formats
- Test makeBlurDataURL for success/error cases
- Test addBlurDataURLs with direct images and nested paths
- Verify blurDataURL is always null (not undefined) for serialization
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
- Add format and quality params to addContentfulParams
- Export addContentfulParams as named export
- Test format parameter (f=webp, f=png) - Test quality parameter (q=80, q=85, q=90) - Test both format and quality together - Test existing query params preservation - Test empty/null value handling
Changed 'separator' from mutable variable to computed inline values in catch block fallback
…ality

- Update expected params from f/q to fm/q (Contentful API change) - Default format is 'webp', quality is 30 per imageConfig - Fix hash fragment test to include default params
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@igor-starostenko igor-starostenko merged commit 9fe492b into develop Jun 19, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants