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

feat: support cjs and esm both by tshy #7

Merged
merged 2 commits into from
Jun 23, 2024
Merged

feat: support cjs and esm both by tshy #7

merged 2 commits into from
Jun 23, 2024

Conversation

fengmk2
Copy link
Member

@fengmk2 fengmk2 commented Jun 23, 2024

BREAKING CHANGE: drop Node.js < 18.19.0 support

part of eggjs/egg#3644

eggjs/egg#5257

Summary by CodeRabbit

  • New Features

    • Introduced CI workflows for Node.js and release processes with GitHub Actions.
    • Added TypeScript configuration for strict type-checking.
    • Implemented middleware function for overriding HTTP methods.
  • Bug Fixes

    • N/A
  • Documentation

    • Updated README.md with new badges, TypeScript import syntax, and a contributors section.
    • Updated LICENSE file with revised copyright information.
  • Chores

    • Updated .gitignore to exclude specific files and directories.
    • Updated dependencies, scripts, and metadata in package.json.

BREAKING CHANGE: drop Node.js < 18.19.0 support

part of eggjs/egg#3644

eggjs/egg#5257
Copy link

coderabbitai bot commented Jun 23, 2024

Warning

Review failed

The pull request is closed.

Walkthrough

The changes focus on enhancing the koa-override package with TypeScript support, updated dependencies, CI/CD workflows, and standardized ESLint configurations. This includes new GitHub Actions for CI and release processes, modifications to the .gitignore and LICENSE files for better project structure, and the addition of a middleware function for HTTP method overriding. Documentation improvements comprise updates to the README.md and package.json for more accurate project details.

Changes

File / Path Change Summary
.eslintrc Updated ESLint configuration to include TypeScript and node prefix rules.
.github/workflows/nodejs.yml, ... Added CI and release workflows using Node.js versions and specific secrets.
.gitignore Ignored additional files and directories like .tshy*, .eslintcache, dist, and coverage.
LICENSE Updated to reflect new copyright holders and years.
README.md Refactored import statements to TypeScript syntax, updated badges, and added contributors section.
package.json Updated dependencies, scripts, engines, homepage, repository URLs, keywords, and author information.
src/index.ts Introduced a new middleware function for HTTP method overriding with TypeScript.
test/index.test.ts Updated test cases with specific imports from koa and bodyParser, and modified error messages and method overrides.
tsconfig.json Added a TypeScript configuration with strict typing, ES2022 targeting, and NodeNext module settings.

Poem

In lines of code, enhancements glow,
TypeScript flows where JavaScript used to go.
CI pipelines keep our work in check,
GitHub Actions now direct our tech.
With ESLint rules and well-defined goals,
Our project thrives, and seamless rolls.
Cheers to progress, with code so bright,
In the world of software, koa-override takes flight.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

socket-security bot commented Jun 23, 2024

Copy link

socket-security bot commented Jun 23, 2024

👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

Ignoring: npm/[email protected]

View full report↗︎

Next steps

Take a deeper look at the dependency

Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.

Remove the package

If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.

Mark a package as acceptable risk

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of ecosystem/package-name@version specifiers. e.g. @SocketSecurity ignore npm/[email protected] or ignore all packages with @SocketSecurity ignore-all

@fengmk2
Copy link
Member Author

fengmk2 commented Jun 23, 2024

@SocketSecurity ignore npm/[email protected]

Copy link

codecov bot commented Jun 23, 2024

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@fengmk2 fengmk2 self-assigned this Jun 23, 2024
@fengmk2 fengmk2 merged commit f021708 into master Jun 23, 2024
9 checks passed
@fengmk2 fengmk2 deleted the next-major branch June 23, 2024 15:39
fengmk2 pushed a commit that referenced this pull request Jun 23, 2024
[skip ci]

## [4.0.0](v3.0.0...v4.0.0) (2024-06-23)

### ⚠ BREAKING CHANGES

* drop Node.js < 18.19.0 support

part of eggjs/egg#3644

eggjs/egg#5257

### Features

* support cjs and esm both by tshy ([#7](#7)) ([f021708](f021708))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant