Skip to content

Comments

bug: make @types/express a peer dependency#2421

Merged
WilliamBergamin merged 2 commits intomainfrom
express-as-optional-dependency
Feb 10, 2025
Merged

bug: make @types/express a peer dependency#2421
WilliamBergamin merged 2 commits intomainfrom
express-as-optional-dependency

Conversation

@WilliamBergamin
Copy link
Contributor

@WilliamBergamin WilliamBergamin commented Feb 10, 2025

Summary

This aims to resolve #2409

In #2355 we moved @types/express from dependencies to devDependencies, this made @types/express not installed in users projects. This PR aims to make @types/express a peerDependency, peerDependencies are installed by default but developers can prevent the on disk installation of peer dependencies with the omit flag npm install --omit peer or completely ignore the installation of peer dependencies with the legacy-peer-deps flag npm install --legacy-peer-deps

Requirements (place an x in each [ ])

@WilliamBergamin WilliamBergamin added bug M-T: confirmed bug report. Issues are confirmed when the reproduction steps are documented dependencies Pull requests that update a dependency file labels Feb 10, 2025
@WilliamBergamin WilliamBergamin self-assigned this Feb 10, 2025
@codecov
Copy link

codecov bot commented Feb 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.59%. Comparing base (08f23cb) to head (c139fbe).
Report is 19 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2421   +/-   ##
=======================================
  Coverage   92.59%   92.59%           
=======================================
  Files          36       36           
  Lines        7472     7472           
  Branches      653      653           
=======================================
  Hits         6919     6919           
  Misses        545      545           
  Partials        8        8           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@zimeg zimeg added this to the 4.2.1 milestone Feb 10, 2025
Copy link
Member

@zimeg zimeg left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for investigating the and finding this fix 🙏 ✨

I confirmed this fixes builds with typescript that don't include @types/express which is a super nice unblock 🪓

@WilliamBergamin WilliamBergamin merged commit dcfbab3 into main Feb 10, 2025
18 checks passed
@WilliamBergamin WilliamBergamin deleted the express-as-optional-dependency branch February 10, 2025 22:02
@WilliamBergamin WilliamBergamin changed the title bug: make @types/express an optional peer dependency bug: make @types/express a peer dependency Mar 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug M-T: confirmed bug report. Issues are confirmed when the reproduction steps are documented dependencies Pull requests that update a dependency file semver:patch TypeScript-specific

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Express types should be included in dependencies

2 participants