shilangyu / cra-preact

Comfort of CRA + preact without ejecting 🔥
MIT License
27 stars 3 forks source link

Bump require-in-the-middle from 5.0.3 to 7.0.1 #11

Closed dependabot[bot] closed 1 year ago

dependabot[bot] commented 1 year ago

Bumps require-in-the-middle from 5.0.3 to 7.0.1.

Changelog

Sourced from require-in-the-middle's changelog.

v7.0.1

  • Fix hooking of 'http2' with Node.js versions [8.0, 8.8) where the 'http2' built-in module was behind the --expose-http2 flag. Release v7.0.0 introduced a bug with this case. The process would crash with:

    AssertionError [ERR_ASSERTION]: unexpected that there is no Module entry for "http2" in require.cache
      at ExportsCache.set (.../require-in-the-middle4/index.js:72:7)
    

v7.0.0

  • Change the suggested require usage to be a Hook field on the exports,

    const { Hook } = require('require-in-the-middle');  // the new suggested way
    

    rather than the default export:

    const Hook = require('require-in-the-middle');  // deprecated, still supported for backward compat
    

    This is to avoid the need for users to use a default export which can get confusing or problematic with TypeScript. See open-telemetry/opentelemetry-js#3701 for some details.

  • Change the suggested usage to new Hook(...) instead of Hook(...), but both are supported.

  • Use the Node.js require.cache for caching the exports returned from a Hook's onrequire. This allows users to delete entries from require.cache to trigger a re-load (and re-run of the hook's onrequire) of a module the next time it is required -- as mentioned at https://nodejs.org/docs/latest/api/all.html#all_modules_requirecache (elastic/require-in-the-middle#61)

  • (SEMVER-MAJOR) Remove the hook.cache field. In earlier versions this was available and some tests used it. However it was never a documented field.

  • If resolving the filename for a require(...) fails, defer to the wrapped require implementation rather than failing right away. This allows a possibly-monkey-patched require to do its own special thing. (elastic/require-in-the-middle#59)

v6.0.0

... (truncated)

Commits
  • f902e00 v7.0.1 (#69)
  • ce8a716 fix: hooking "http2" with node 8.6 and "--expose-http2" would hit an assert (...
  • b031a30 v7.0.0 (#66)
  • 4c251cd ci: test with 8.6, the actual min supported version, rather than 8.0 (#65)
  • 730dea9 feat: add named 'Hook' export (#64)
  • ffb1808 feat!: use require.cache for caching patched exports for non-core modules (...
  • e2b18fa feat: support deferring to the underlying 'require' implementation if Module....
  • adc8a5b v6.0.0 (#58)
  • 83f3fc2 5.2.0 (#54)
  • 8386b45 feat: support 'node:'-prefixed core modules (#53)
  • Additional commits viewable in compare view
Maintainer changes

This version was pushed to npm by trentm, a new releaser for require-in-the-middle since your current version.


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
dependabot[bot] commented 1 year ago

OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting @dependabot ignore this major version or @dependabot ignore this minor version. You can also ignore all major, minor, or patch releases for a dependency by adding an ignore condition with the desired update_types to your config file.

If you change your mind, just re-open this PR and I'll resolve any conflicts on it.