-
Notifications
You must be signed in to change notification settings - Fork 27
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
v2.0.0 - Major Release (Proposal) #26
Conversation
Hi @Phillip9587, I like the idea of aligning with Express, and I understand that this is a proposal, maybe for the future if you want to continue doing this in other packages, you can open an issue, just like it was done in compression and response-time, so that the captains of each package are informed and it aligns with the future plans they have for their package |
I agree with @bjohansebas. Also making huge PRs is not ideal, as they can be blocked for a while due to multiple conversations on different topics. This also makes it harder for others to review. 👍 Convert this into an issue will be the way to go @Phillip9587 :) |
@Phillip9587 I do love this PR but I think we need to take it in a couple of steps, just because there's some other changes I also want to make to the package that's likely to conflict. I'm not sure about shipping both CJS and MJS, or bumping the minimum node right now unless we're also making other breaking changes.
I would like to see this.
I'm in favor of both, but prefer to avoid adding too many config files or churning on tooling. |
Would be great to have ESM support for this library, but I totally appreciate that is easy for me to say as a non maintainer! 😄 |
@bjohansebas @UlisesGascon @blakeembrey Thanks for your feedback. I wrote a proposal: #27 |
This pull request proposes a new major version (v2.0.0) of the
content-type
package. This is only a proposal and was opened to start the discussion.Breaking Changes:
express
package.New Features & Enhancements:
Dual Package Support:
index.cjs
) from the ESM Entrypoint (index.mjs
).Updated CI Pipeline:
actions/setup-node
action is used instead ofnvm
because it caches Node.js versions on the action runners.Native Testing with Node.js:
mocha
andnyc
with Node.js’ native test runner andc8
for code coverage. This reduces dependencies and simplifies the testing setup, making it more lightweight and aligned with Node.js standards.ESLint Configuration Update:
Script for Ensuring CJS File Consistency:
index.cjs
file is up to date with the ESM build. This ensures both module formats stay consistent.To Be Discussed:
Should TypeScript types be added directly to the package?:
@types/content-type
package, TypeScript types could be added directly to the package.@types/content-type
needs to be deprecated.Should the
husky
package be used for pre-push hooks?:husky
package could be used to add a pre-push hook that runs thecheck-build
script to ensure the build is consistent before pushing changes.Should a formatter like Prettier be used?:
Again, this is just a proposal and up for discussion. No hard feelings if the changes are not accepted!