Skip to content

Commit 2d3fc58

Browse files
committed
Mark this feature as experimental
1 parent 7299d2d commit 2d3fc58

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,12 @@ node --import=./my-loader.mjs ./my-code.mjs
5454
```
5555
5656
When registering the loader hook programmatically, it's possible to pass a list
57-
of modules, file URLs or regular expressions to either exclude or specifically
58-
include which modules are intercepted. This is useful if a module is not
57+
of modules, file URLs or regular expressions to either `exclude` or specifically
58+
`include` which modules are intercepted. This is useful if a module is not
5959
compatible with the loader hook.
60+
61+
> **Note:** This feature is incompatible with the `{internals: true}` Hook option
62+
6063
```js
6164
import * as module from 'module'
6265

@@ -71,7 +74,8 @@ module.register('import-in-the-middle/hook.mjs', import.meta.url, {
7174
})
7275
```
7376
74-
### Only Intercepting Hooked modules
77+
### Only Intercepting Hooked modules
78+
> **Note:** This feature is experimental and is incompatible with the `{internals: true}` Hook option
7579
7680
If you are `Hook`'ing all modules before they are imported, for example in a
7781
module loaded via the Node.js `--import` CLI argument, you can configure the

index.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@ type CreateAddHookMessageChannelReturn<Data> = {
9292
}
9393

9494
/**
95+
* EXPERIMENTAL
96+
* This feature is experimental and may change in minor versions.
97+
* **NOTE** This feature is incompatible with the {internals: true} Hook option.
98+
*
9599
* Creates a message channel with a port that can be used to add hooks to the
96100
* list of exclusively included modules.
97101
*

index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ function callHookFn (hookFn, namespace, name, baseDir) {
3535
let sendModulesToLoader
3636

3737
/**
38+
* EXPERIMENTAL
39+
* This feature is experimental and may change in minor versions.
40+
* **NOTE** This feature is incompatible with the {internals: true} Hook option.
41+
*
3842
* Creates a message channel with a port that can be used to add hooks to the
3943
* list of exclusively included modules.
4044
*

0 commit comments

Comments
 (0)