Skip to content

サンプルプログラムのパッケージを最新にアップデート#941

Open
chvmvd wants to merge 1 commit intomainfrom
update-sample-packages
Open

サンプルプログラムのパッケージを最新にアップデート#941
chvmvd wants to merge 1 commit intomainfrom
update-sample-packages

Conversation

@chvmvd
Copy link
Contributor

@chvmvd chvmvd commented Mar 8, 2026

サンプルプログラムで用いられているパッケージを最新にアップデートしました。ただし、Prismaが関連しているものについてはアップデートしていません。
また、全件ではありませんが、代表的なもの16件を選びそれらについて動作確認を行いました。

  • パッケージのバージョンを最新のものにアップデート
    アップデートしたパッケージは次の通りです。
    • mathjs:14.5.3 → 15.1.1
    • express:5.1.0 → 5.2.1
    • vite:7.1.7 → 7.3.1
    • @faker-js/faker:10.0.0 → 10.3.0
    • canvas-confetti:1.9.3 → 1.9.4
    • typescript:5.8.3 → 5.9.3
  • package-lock.jsonを再生成
  • パッケージのアップデートに伴う対応
    • Viteのテンプレートが変更されていたため、最新のものに合わせた

@cloudflare-workers-and-pages
Copy link

Deploying utcode-learn with  Cloudflare Pages  Cloudflare Pages

Latest commit: cadeec4
Status: ✅  Deploy successful!
Preview URL: https://27ec55e3.utcode-learn.pages.dev
Branch Preview URL: https://update-sample-packages.utcode-learn.pages.dev

View logs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

変更前から動いていなかったため、合わせて修正しました。これは、以前にReact v19にアップデートしたことに伴う変更漏れと思われます。
また、次のような理由からtype-only importを使う必要がありました。

'JSX' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@chvmvd chvmvd requested a review from Copilot March 8, 2026 08:40
@chvmvd
Copy link
Contributor Author

chvmvd commented Mar 8, 2026

@codex review

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates all sample project dependencies to their latest versions (excluding Prisma-related packages). It also applies Vite's updated template conventions across React sample projects.

Changes:

  • Bumped package versions across all samples: mathjs 14→15, express 5.1→5.2, vite 7.0/7.1→7.3, @faker-js/faker 10.0→10.3, canvas-confetti 1.9.3→1.9.4, typescript 5.8→5.9, and React-related packages to latest
  • Aligned React+Vite sample projects with latest Vite template: removed vite-env.d.ts files, added "types" to tsconfig.app.json/tsconfig.node.json, and updated ESLint configs to use defineConfig and reactHooks.configs.flat.recommended
  • Added explicit import type { JSX } from "react" in another-test-score/App.tsx to accommodate React 19.2's type changes

Reviewed changes

Copilot reviewed 73 out of 121 changed files in this pull request and generated no comments.

Show a summary per file
File Description
docs/4-advanced/04-react/index.mdx Updated React/types version numbers in documentation snippet
docs/4-advanced/04-react/_samples/*/package.json Bumped React, Vite, ESLint, TypeScript, and related package versions
docs/4-advanced/04-react/_samples/*/eslint.config.js Updated to defineConfig from eslint/config and reactHooks.configs.flat.recommended
docs/4-advanced/04-react/_samples/*/tsconfig.app.json Added "types": ["vite/client"] per new Vite template
docs/4-advanced/04-react/_samples/*/tsconfig.node.json Added "types": ["node"] per new Vite template
docs/4-advanced/04-react/_samples/*/src/vite-env.d.ts Removed (replaced by tsconfig types field)
docs/4-advanced/04-react/_samples/another-test-score/src/App.tsx Added import type { JSX } for React 19.2 compatibility
docs/4-advanced/04-react/_samples/todo-declarative/tsconfig.json Added "types": ["vite/client"]
docs/4-advanced/03-typescript/_samples/apply/package.json Bumped TypeScript version
docs/4-advanced/02-bundler/_samples/*/package.json Bumped vite, faker, canvas-confetti versions
docs/4-advanced/01-cookie/_samples/*/package.json Bumped express version
docs/4-advanced/01-cookie/index.mdx Updated express version in documentation snippet
docs/3-web-servers/*/package.json Bumped express version across all web server samples
docs/3-web-servers/04-module/_samples/mathjs/package.json Bumped mathjs version
Various package-lock.json files Regenerated lock files for updated dependencies
Files not reviewed (25)
  • docs/3-web-servers/04-module/_samples/mathjs/package-lock.json: Language not supported
  • docs/3-web-servers/05-server/_samples/app-use/package-lock.json: Language not supported
  • docs/3-web-servers/05-server/_samples/complex-html/package-lock.json: Language not supported
  • docs/3-web-servers/05-server/_samples/express-server/package-lock.json: Language not supported
  • docs/3-web-servers/05-server/_samples/html-external-resources/package-lock.json: Language not supported
  • docs/3-web-servers/05-server/_samples/nth/package-lock.json: Language not supported
  • docs/3-web-servers/05-server/_samples/server-or-client/package-lock.json: Language not supported
  • docs/3-web-servers/05-server/_samples/static-hosting-naive/package-lock.json: Language not supported
  • docs/3-web-servers/05-server/_samples/static-hosting-smart/package-lock.json: Language not supported
  • docs/3-web-servers/06-fetch-api/_samples/currency-converter/package-lock.json: Language not supported
  • docs/3-web-servers/06-fetch-api/_samples/exchange-rates/package-lock.json: Language not supported
  • docs/3-web-servers/06-fetch-api/_samples/fetch-open-status-json/package-lock.json: Language not supported
  • docs/3-web-servers/06-fetch-api/_samples/fetch-open-status/package-lock.json: Language not supported
  • docs/3-web-servers/06-fetch-api/_samples/fetch-weather-json/package-lock.json: Language not supported
  • docs/3-web-servers/06-fetch-api/_samples/fetch-weather/package-lock.json: Language not supported
  • docs/3-web-servers/07-fetch-api-post/_samples/bank-account/package-lock.json: Language not supported
  • docs/3-web-servers/07-fetch-api-post/_samples/book-search/package-lock.json: Language not supported
  • docs/3-web-servers/07-fetch-api-post/_samples/chat-app/package-lock.json: Language not supported
  • docs/3-web-servers/07-fetch-api-post/_samples/coffee-sales/package-lock.json: Language not supported
  • docs/4-advanced/01-cookie/_samples/cookie-counter/package-lock.json: Language not supported
  • docs/4-advanced/02-bundler/_samples/canvas-confetti/package-lock.json: Language not supported
  • docs/4-advanced/02-bundler/_samples/faker/package-lock.json: Language not supported
  • docs/4-advanced/02-bundler/_samples/run-npm-package-on-browsers/package-lock.json: Language not supported
  • docs/4-advanced/03-typescript/_samples/apply/package-lock.json: Language not supported
  • docs/4-advanced/04-react/_samples/todo-declarative/package-lock.json: Language not supported

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

You can also share your feedback on Copilot code review. Take the survey.

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. Swish!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chvmvd chvmvd marked this pull request as ready for review March 8, 2026 08:49
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.

2 participants