hooks
hooks copied to clipboard
feat: add @midwayjs/dev-pack to accelerate local development
Ref:
- https://github.com/midwayjs/hooks/issues/334
- https://github.com/midwayjs/hooks/issues/300
- https://github.com/midwayjs/hooks/issues/298
- https://github.com/midwayjs/hooks/issues/373
- https://github.com/midwayjs/hooks/issues/374
- https://github.com/midwayjs/hooks/issues/391
⚠️ No Changeset found
Latest commit: 479c50b3d57eeff980b967aacd8c33afb8cab87d
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
Codecov Report
Base: 89.13% // Head: 81.85% // Decreases project coverage by -7.27%
:warning:
Coverage data is based on head (
479c50b
) compared to base (ab0943f
). Patch coverage: 68.50% of modified lines in pull request are covered.
Additional details and impacted files
@@ Coverage Diff @@
## main #337 +/- ##
==========================================
- Coverage 89.13% 81.85% -7.28%
==========================================
Files 42 45 +3
Lines 773 937 +164
Branches 144 166 +22
==========================================
+ Hits 689 767 +78
- Misses 84 169 +85
- Partials 0 1 +1
Impacted Files | Coverage Δ | |
---|---|---|
packages/hooks-core/src/api/index.ts | 100.00% <ø> (ø) |
|
packages/hooks-core/src/api/operator/http.ts | 100.00% <ø> (ø) |
|
packages/hooks-core/src/api/operator/middleware.ts | 100.00% <ø> (ø) |
|
packages/hooks-internal/src/hydrate.ts | 33.33% <ø> (ø) |
|
packages/hooks-internal/src/router/file.ts | 100.00% <ø> (ø) |
|
packages/hooks-internal/src/util.ts | 100.00% <ø> (ø) |
|
packages/hooks-upload/src/index.ts | 100.00% <ø> (ø) |
|
packages/hooks/src/api/operator/serverless.ts | 46.15% <0.00%> (-3.85%) |
:arrow_down: |
packages/serve/src/index.ts | 88.00% <ø> (ø) |
|
packages/test-util/src/index.ts | 0.00% <0.00%> (ø) |
|
... and 24 more |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
Socket Security Pull Request Report
Dependency issues detected. If you merge this pull request, you will not be alerted to the instances of these issues again.
📜 Install scripts
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.
Package | Script field | Location |
---|---|---|
[email protected] (added) | postinstall |
package.json via [email protected] |
😵💫 Bin script confusion
This package has multiple bin scripts with the same name. This can cause non-deterministic behavior when installing or could be a sign of a supply chain attack
Consider removing one of the conflicting packages. Packages should only export bin scripts with their name
Pull request report summary
Issue | Status |
---|---|
Install scripts | ⚠️ 1 issue |
Native code | ✅ 0 issues |
Bin script confusion | ⚠️ 1 issue |
Bin script shell injection | ✅ 0 issues |
Unresolved require | ✅ 0 issues |
Invalid package.json | ✅ 0 issues |
HTTP dependency | ✅ 0 issues |
Git dependency | ✅ 0 issues |
Non-existent author | ✅ 0 issues |
Potential typo squat | ✅ 0 issues |
Known Malware | ✅ 0 issues |
Telemetry | ✅ 0 issues |
Protestware/Troll package | ✅ 0 issues |
Bot Commands
To ignore an alert, reply with a comment starting with @SocketSecurity ignore
followed by a space separated list of package-name@version
specifiers. e.g. @SocketSecurity ignore [email protected] [email protected]
@SocketSecurity ignore [email protected]
@SocketSecurity ignore [email protected]
Ignoring: @parcel/[email protected]
, @swc/[email protected]
, @zkochan/[email protected]
, [email protected]
⚠️ Please accept the latest app permissions to ensure bot commands work properly. Accept the new permissions here.
Powered by socket.dev
@SocketSecurity ignore @parcel/[email protected] @SocketSecurity ignore @swc/[email protected] @SocketSecurity ignore [email protected] @SocketSecurity ignore @zkochan/[email protected] @SocketSecurity ignore [email protected]
GPT summary of 118a633ade38b98a0aece2cbe2ed91884c3bcd46:
Error: couldn't generate summary
GPT summary of 83836e3a1542b42684b77545c313e7cbc41a8232:
Error: couldn't generate summary
GPT summary of 702b865521156aaf189760477f74db89f3f807b8:
- Changed the command for the Node.js job in the github action node.js.yml
- Added a check to the pre-commit hook to ensure that
yarn.lock
does not containregistry.npm.alibaba-inc.com
pre-commit
GPT summary of 76b6febcb6debd1b61b951254502f7ef4efb6c93:
- Added support for Node.js 16 on Windows and macOS node.js.yml
GPT summary of aacd3e75656ff53c9fbddc6caca458699565e967:
Error: couldn't generate summary
GPT summary of acefadaddab202f36385fb825a2fcd782d6f9f51:
- Added a
useRandomPort
util to the tests middleware.test.ts, server.test.ts - Added a
OpenAI
API for completions [packages/utils/apis/openai.ts] - Added a
express_only
route to the middleware tests middleware.test.ts - Added an image route to the server tests server.test.ts
- Added an environment variable port to the util util.ts
GPT summary of 1477ac0422004cf6560f0fa77c630cd6e46b41b5:
- Added
MIDWAY_HTTP_PORT
environment variable utils.ts
GPT summary of 9b7c840d928c5077ff4ac0a9035940651b1e656f:
- Changed
describe
todescribe.skip
in the test file cli.test.ts
GPT summary of 734d9494019910d12d41e8da709b0491b1795755:
Error: couldn't generate summary
GPT summary of 561ba77b6d72ccb731ac1a4dd25edffadb902605:
Error: couldn't generate summary
GPT summary of f1fc7dcfdd206f85837259c80f8c19d4cba397b5:
- Added
exit
to the list of signals to handle server.ts - Changed the argument of
server.close()
toreason
server.ts - Added
close
andexit
events to the IPC share.ts - Changed the argument of
server.close()
tomiddleware test
middleware.test.ts - Changed the argument of
server.close()
toserver test
server.test.ts - Changed the argument of
server.close()
torestart
server.ts
GPT summary of ccf1cf38a07b49fbd44db09734e5e750a4fb68f6:
- Replaced
require()
withrequireWithoutCache()
inpackages/bundler/src/index.ts
andpackages/hooks-bundler/src/adapter.ts
to ensure latest module content when file changes in dev mode - Updated
transform()
function inpackages/bundler/src/index.ts
to acceptrequireWithoutCache()
as an argument
GPT summary of 2ce9c97add27bd057f7faa86407512d7b83707a9:
- Added
consola
package topackage.json
package.json - Changed
isMatch
from an async to a sync function server.test.ts - Added
IMidwayFaaSApplication
import toapp.ts
app.ts - Added
ServerState
import tomiddleware.ts
middleware.ts - Added
logger
import toshare.ts
share.ts - Added
handleStarted
andhandleError
functions toserver.ts
server.ts - Added
uncaughtException
handler toserver.ts
server.ts
GPT summary of 6a332303052b39abb534f7ae94dec8de0a2e9781:
- Changed the
proc.send
check from?.
toif
share.ts
GPT summary of 18f6b0bb4cd6383687a2de4a8aedd00359919b98:
- Changed the way the MidwayFrameworkAdapter is initialized component.ts
- Fixed an issue with the ApiRouter not correctly handling about paths ApiRouter.test.ts
- Removed
IPCMessage
fromshare.ts
[packages/dev-pack/src/share.ts] - Changed the way the function container is created container.ts
- Updated typescript version from 4.7.4 to 4.6.4 yarn.lock
GPT summary of f3b2b2b9f3656a3df952c1879bc7a52c480e890a:
- Changed
on
function to useasync
keyword share.ts - Removed
MidwayApplication
import component.ts - Changed
createDebug
message forcreate
adapter.ts - Changed
createDebug
message forsend
share.ts - Removed
relative
import adapter.ts
GPT summary of 1c2a1edf0c0cc727efcdf7cbaf4d3c41b65bd4e5:
- Added a
DEBUG
environment variable with the valuehooks*
to theTest Node.js
andBuild
jobs in thenode.js.yml
Github Action node.js.yml
GPT summary of 38ec781c87c38da31ac1bfba2bf3ff707b178093:
Error: couldn't generate summary
GPT summary of b8ef50620431f4b8e7bb1701f212b1b38afb5304:
Error: couldn't generate summary
GPT summary of ed15b2b6d80fee113a03211723824644d85bf5f5:
- Added an extra parameter to the
MidwayFrameworkAdapter
constructor component.ts - Added a new
ApiRouter
class component.ts - Added a new environment variable
HOOKS_DEV_MODULE_PATH
const.ts - Added a new API for dev modules index.ts, index.ts
- Added a warning message when no API files are found index.ts
- Added a warning message when no API routes are found component.ts
- Added a test for loading dev modules api-router.test.ts
- Lowered numeric tolerance in tests component.test.ts
GPT summary of 6847ca34a22d8984d803313b2433825054c35292:
- Removed the
dev
configuration from the config file index.ts, type.ts - Updated the config file to use
lodash/get
index.ts - Removed the
ignorePattern.test.ts
file ignorePattern.test.ts - Removed the
ignorePattern
function from the config file ignorePattern.ts - Updated the config snapshot to remove the
dev
configuration config.test.ts.snap
GPT summary of bd23dd618d53d4de975432712c94d3f7c11f195d:
GPT summary of 3ab53ba0f2d9d8dd4bd239a285c7338645d59ea1:
- Added an
const
export for internal hooks index.ts
GPT summary of 0b78ed61e6ba5dce44df7075ccd43a9188da8853:
- Updated
lodash.groupby
tolodash
in package.json package.json - Changed import of
lodash.groupby
tolodash/groupby
in src/index.ts index.ts - Updated
@types/lodash.groupby
to@types/lodash
in package.json package.json - Updated
@types/lodash
in yarn.lock yarn.lock
GPT summary of 5a6b666ac723958a046aa306924d8b62cb92b6a1:
- Changed the
groupBy
import fromlodash/groupby
tolodash
index.ts
GPT summary of 31964e1cb585d449a6dd03d888bad27ae694dc8c:
- Changed the initialization of the
devApis
to use the existingrouter
instance if available component.ts - Renamed the
index-handler
toindexHandler
ingetFunctionId
file.ts