Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: allow overriding package.json type #2110

Merged
merged 1 commit into from
Apr 2, 2025

Conversation

JoshuaKGoldberg
Copy link
Owner

PR Checklist

Overview

🎁

Copy link

codecov bot commented Apr 2, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.80%. Comparing base (d8bb6d3) to head (bed3c77).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2110   +/-   ##
=======================================
  Coverage   99.80%   99.80%           
=======================================
  Files         127      127           
  Lines        5214     5214           
  Branches      361      361           
=======================================
  Hits         5204     5204           
  Misses         10       10           

☔ 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.

@JoshuaKGoldberg JoshuaKGoldberg merged commit f7c5561 into main Apr 2, 2025
14 checks passed
@JoshuaKGoldberg JoshuaKGoldberg deleted the block-package-json-allow-type branch April 2, 2025 21:42
Copy link

github-actions bot commented Apr 2, 2025

🎉 This is included in version v2.22.11 🎉

The release is available on:

Cheers! 📦🚀

@JoshuaKGoldberg JoshuaKGoldberg mentioned this pull request Apr 2, 2025
3 tasks
JoshuaKGoldberg added a commit that referenced this pull request Apr 3, 2025
## PR Checklist

- [x] Addresses an existing open issue: fixes #2111
- [x] That issue was marked as [`status: accepting
prs`](https://github.com/JoshuaKGoldberg/create-typescript-app/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22)
- [x] Steps in
[CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/create-typescript-app/blob/main/.github/CONTRIBUTING.md)
were taken

## Overview

Goes a different, more comprehensive direction than #2110. Instead of
encouraging a `blockPackageJson` it promotes `type` to a top-level
option. `--type commonjs` will now work if a user really wants.

`blockESLint` will now print its config as `eslint.config.mjs` if
`options.type` is `"commonjs"`. It's still `eslint.config.js` otherwise.

🎁
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.

🐛 Bug: blockPackageJson ignores addons.type if provided
1 participant