| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
BREAKING CHANGE: drop Node.js < 18 support eggjs/egg#5257
|
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
🚮 Removed packages: npm/egg-bin@4.20.0, npm/egg-ci@1.19.1, npm/eslint-config-egg@7.5.1, npm/eslint@5.16.0, npm/mm@2.5.0 |
Sorry, something went wrong.
|
🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎ To accept the risk, merge this PR and you will not be notified again.
Next stepsWhat is an install script?Install scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts. Packages should not be running non-essential scripts during install and there are often solutions to problems people solve with install scripts that can be run at publish time instead. What is protestware?This package is a joke, parody, or includes undocumented or hidden behavior unrelated to its primary function. Consider that consuming this package my come along with functionality unrelated to its primary purpose. Take a deeper look at the dependencyTake 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 packageIf 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 riskTo 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/foo@1.0.0 or ignore all packages with @SocketSecurity ignore-all
|
Sorry, something went wrong.
WalkthroughThe project underwent significant updates, including enhanced ESLint configurations for TypeScript and Node.js, the addition of CI/CD workflows for testing and releasing with GitHub Actions, and expanded .gitignore entries. The package.json file saw numerous updates in dependencies, scripts, and metadata. New TypeScript files were introduced for the main functionality and tests, and the README.md was updated to reflect these changes. Changes
Poem
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 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed. CodeRabbit Configration File (.coderabbit.yaml)
Documentation and Community
|
Sorry, something went wrong.
There was a problem hiding this comment.
Actionable comments posted: 1
Review detailsConfiguration used: CodeRabbit UI
Review profile: CHILL
Files that changed from the base of the PR and between 8a43ff8 and e835707.
Files selected for processing (9)README.mdAdditional comments not posted (3)[style] ~3-~3: Using many exclamation marks might seem excessive (in this case: 3 exclamation marks for a text that’s 454 characters long) (EN_EXCESSIVE_EXCLAMATION)
Context: ...e [![NPM version][npm-image]][npm-url][![Test coverage][codecov-image]][codecov-url] [![Known Vulnerabilities][snyk-image]][sny...
.eslintrc (1)README.md (1)2-5: Updated ESLint configuration to support TypeScript and enforce node prefix rules.
package.json (1)1-32: Updated README with new badges and ES module installation instructions.
Tools LanguageTool[style] ~3-~3: Using many exclamation marks might seem excessive (in this case: 3 exclamation marks for a text that’s 454 characters long) (EN_EXCESSIVE_EXCLAMATION)
Context: ...e [![NPM version][npm-image]][npm-url][![Test coverage][codecov-image]][codecov-url] [![Known Vulnerabilities][snyk-image]][sny...
Line range hint 4-69: Updated package.json to support new Node.js engine, enhance scripts, and update dependencies.
Sorry, something went wrong.
| export function getType(type: string): string | false { | ||
| if (!typeLRUCache) { | ||
| typeLRUCache = new LRU(100); | ||
| } | ||
| let mimeType = typeLRUCache.get<string | false>(type); | ||
| if (mimeType === undefined) { | ||
| mimeType = mimeTypes.contentType(type); | ||
| typeLRUCache.set(type, mimeType); | ||
| } | ||
| return mimeType; | ||
| } |
There was a problem hiding this comment.
Ensure typeLRUCache is initialized before use to prevent runtime errors.
- let typeLRUCache: LRU;
+ let typeLRUCache: LRU = new LRU(100);‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
| export function getType(type: string): string | false { | |
| if (!typeLRUCache) { | |
| typeLRUCache = new LRU(100); | |
| } | |
| let mimeType = typeLRUCache.get<string | false>(type); | |
| if (mimeType === undefined) { | |
| mimeType = mimeTypes.contentType(type); | |
| typeLRUCache.set(type, mimeType); | |
| } | |
| return mimeType; | |
| } | |
| export function getType(type: string): string | false { | |
| let typeLRUCache: LRU = new LRU(100); | |
| let mimeType = typeLRUCache.get<string | false>(type); | |
| if (mimeType === undefined) { | |
| mimeType = mimeTypes.contentType(type); | |
| typeLRUCache.set(type, mimeType); | |
| } | |
| return mimeType; | |
| } |
Sorry, something went wrong.
[skip ci] ## [2.0.0](v1.0.1...v2.0.0) (2024-06-08) ### ⚠ BREAKING CHANGES * drop Node.js < 18 support eggjs/egg#5257 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced Node.js CI workflow for automated testing and releases. - Added TypeScript support and enforced node prefix rules in ESLint configuration. - **Documentation** - Updated README with new badges and revised installation/usage instructions. - **Chores** - Updated `.gitignore` to include `dist` directory and `.tshy*` files. - Updated `package.json` with new dependencies, scripts, and metadata. - **Tests** - Added tests for caching content types functionality. <!-- end of auto-generated comment: release notes by coderabbit.ai --> ### Features * support cjs and esm both ([#1](#1)) ([2683290](2683290))
| Back | FazBrowse Home | New Git URL |
BREAKING CHANGE: drop Node.js < 18 support
eggjs/egg#5257
Summary by CodeRabbit
New Features
Documentation
Chores
Tests