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

chore: update GitHub URLs to point to Node.js org #99

Merged
merged 2 commits into from
Jan 30, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,36 @@

- Use Node.js core `require.resolve()`, rather than `require('resolve').sync()`, when available.
This can be a performance improvement.
(https://github.com/elastic/require-in-the-middle/pull/96)
(https://github.com/nodejs/require-in-the-middle/pull/96)

## v7.4.0

- Support hooking built-in Node.js loaded via
[`process.getBuiltinModule`](https://nodejs.org/api/all.html#all_process_processgetbuiltinmoduleid),
added in v22.3.0.
(https://github.com/elastic/require-in-the-middle/pull/92)
(https://github.com/nodejs/require-in-the-middle/pull/92)

## v7.3.0

- Module name args passed to a `Hook` will now match against package
entry points defined by "exports" in package.json.
https://nodejs.org/api/packages.html#package-entry-points
(https://github.com/elastic/require-in-the-middle/pull/82)
(https://github.com/nodejs/require-in-the-middle/pull/82)


## v7.2.1

- Fix a limitation so that a single `Hook` can hook a module and a sub-module,
e.g. `new Hook(['example', 'example/some-sub-module'], ...)`.
(https://github.com/elastic/require-in-the-middle/pull/84)
(https://github.com/nodejs/require-in-the-middle/pull/84)


## v7.2.0

- Improve performance (possibly significantly) when using the Hook without
a modules argument, e.g. `new Hook(null, onrequire)`, by caching exports
in more cases. Contributed by @nwalters512.
(https://github.com/elastic/require-in-the-middle/issues/75)
(https://github.com/nodejs/require-in-the-middle/issues/75)


## v7.1.1
Expand All @@ -42,20 +42,20 @@
module does not appear in `require.cache`. This can only happen if there
is some other `require` hook in play -- e.g. `@babel/register` which is
used by `@babel/cli`, aka the `babel-node` command.
(https://github.com/elastic/require-in-the-middle/issues/72)
(https://github.com/nodejs/require-in-the-middle/issues/72)


## v7.1.0

- Add [TypeScript types](./types/index.d.ts).
(https://github.com/elastic/require-in-the-middle/pull/67)
(https://github.com/nodejs/require-in-the-middle/pull/67)


## 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.
(https://github.com/elastic/require-in-the-middle/pull/68)
(https://github.com/nodejs/require-in-the-middle/pull/68)
Release v7.0.0 introduced a bug with this case where the process would crash with:

```
Expand Down Expand Up @@ -90,37 +90,37 @@
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
(https://github.com/elastic/require-in-the-middle/issues/61)
(https://github.com/nodejs/require-in-the-middle/issues/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.
(https://github.com/elastic/require-in-the-middle/pull/59)
(https://github.com/nodejs/require-in-the-middle/pull/59)

## v6.0.0

- Drop Node.js 6 support. New minimum supported Node.js version is 8.6.0.
(This is the minimum supported Node.js version for elastic-apm-node@3 that uses
(This is the minimum supported Node.js version for nodejs-apm-node@3 that uses
this module.)
- Add testing of Node.js 19.
- Rename default branch from `master` to `main`.
- Should there be a need to do 5.x maintenance releases there is a
[5.x branch](https://github.com/elastic/require-in-the-middle/tree/5.x).
[5.x branch](https://github.com/nodejs/require-in-the-middle/tree/5.x).

## v5.2.0

- Add support for hooking into the require of Node core modules prefixed with
'node:', e.g. `require('node:http')`. See https://nodejs.org/api/modules.html#core-modules
(https://github.com/elastic/require-in-the-middle/pull/53)
(https://github.com/nodejs/require-in-the-middle/pull/53)

## v5.1.0

- Add support for hooking into require of absolute paths.
(https://github.com/elastic/require-in-the-middle/issues/43)
(https://github.com/nodejs/require-in-the-middle/issues/43)

## earlier versions

Use the [source](https://github.com/elastic/require-in-the-middle/commits/), Luke.
Use the [source](https://github.com/nodejs/require-in-the-middle/commits/), Luke.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Hook into the Node.js `require` function. This allows you to modify
modules on-the-fly as they are being required.

[![npm](https://img.shields.io/npm/v/require-in-the-middle.svg)](https://www.npmjs.com/package/require-in-the-middle)
[![Test status](https://github.com/elastic/require-in-the-middle/workflows/Test/badge.svg)](https://github.com/elastic/require-in-the-middle/actions)
[![Test status](https://github.com/nodejs/require-in-the-middle/workflows/Test/badge.svg)](https://github.com/nodejs/require-in-the-middle/actions)

Also supports hooking into calls to `process.getBuiltinModule()`, which was introduced in Node.js v22.3.0.

Expand Down Expand Up @@ -77,4 +77,4 @@ subsequent calls to `require()` or `process.getBuiltinModule()`.

## License

[MIT](https://github.com/elastic/require-in-the-middle/blob/master/LICENSE)
[MIT](https://github.com/nodejs/require-in-the-middle/blob/master/LICENSE)
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/elastic/require-in-the-middle.git"
"url": "git+https://github.com/nodejs/require-in-the-middle.git"
},
"keywords": [
"require",
Expand All @@ -49,9 +49,9 @@
"author": "Thomas Watson Steen <[email protected]> (https://twitter.com/wa7son)",
"license": "MIT",
"bugs": {
"url": "https://github.com/elastic/require-in-the-middle/issues"
"url": "https://github.com/nodejs/require-in-the-middle/issues"
},
"homepage": "https://github.com/elastic/require-in-the-middle#readme",
"homepage": "https://github.com/nodejs/require-in-the-middle#readme",
"engines": {
"node": ">=8.6.0"
}
Expand Down
2 changes: 1 addition & 1 deletion test/require-cache-inval.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// Test support for triggering a reload/re-patch of a module by deleting it
// from `require.cache`.
// (https://github.com/elastic/require-in-the-middle/pull/63)
// (https://github.com/nodejs/require-in-the-middle/pull/63)

const test = require('tape')

Expand Down