Skip to content

Commit 0c78f9c

Browse files
chore(deps): bump import-in-the-middle from 1.3.5 to 1.4.2 (#3569)
Also: - add license text acorn-import-assertions for our NOTICE generation (the package doesn't publish it itself) - Improve ESM docs for Node v20 and the possible error that can be hit there now that [email protected] is being used. - Do some surgery on the package-lock file to get acorn@8 at the *top-level* -- used by a non-dev dep import-in-the-middle -- rather than acorn@7 at the top (used by a couple dev deps). Unfortunately this meant updating some unrelated deps: pug, dependency-check. Co-authored-by: Trent Mick <[email protected]>
1 parent 0dbd6c3 commit 0c78f9c

File tree

4 files changed

+262
-257
lines changed

4 files changed

+262
-257
lines changed

dev-utils/gen-notice.sh

+1
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ npm ls --omit=dev --all --parseable \
9090
// We handle getting the license text for a few specific deps that
9191
// do not include one in their install.
9292
const licFileFromPkgName = {
93+
"acorn-import-assertions": "license.MIT.txt",
9394
"async-value": "license.MIT.txt",
9495
"async-value-promise": "license.MIT.txt",
9596
"breadth-filter": "license.MIT.txt",

docs/esm.asciidoc

+4-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,10 @@ As well, the APM agent must also be separately *started* -- for example via `--r
7070

7171
Automatic instrumentation of ES modules is based on the experimental Node.js Loaders API. ESM support in the Elastic APM Node.js agent will remain *experimental* while the Loaders API is experimental.
7272

73-
ESM auto-instrumentation is only supported for Node.js versions that match *`^12.20.0 || ^14.13.1 || ^16.0.0 || ^18.1.0 <20`*. Notably, in the current APM agent version, this _excludes Node.js v20_ because of changes in the Loaders API. The behavior when using `node --experimental-loader=elastic-apm-node/loader.mjs` with earlier Node.js versions is undefined and unsupported.
73+
ESM auto-instrumentation is only supported for Node.js versions that match *`^12.20.0 || ^14.13.1 || ^16.0.0 || ^18.1.0 <20`*.
74+
The behavior when using `node --experimental-loader=elastic-apm-node/loader.mjs` with earlier Node.js versions is undefined and unsupported.
75+
76+
Notably, ESM auto-instrumentation is *not* supported with Node.js v20 because of changes in the Loaders API. Using the loader with Node.js v20 can result in crashes in `import ...` statements that attempt named imports from some CommonJS modules. The error message will be of the form `SyntaxError: The requested module '<module name>' does not provide an export named '<export name>'`. (You can track https://github.com/DataDog/import-in-the-middle/issues/29[this issue] for progress.)
7477

7578

7679
[float]

0 commit comments

Comments
 (0)