Commit 16594de
authored
fix(node-experimental): Make node-fetch support optional (#9321)
Installing this on Node <18 produces install time errors, as the package
is not compatible, e.g.:
```
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'opentelemetry-instrumentation-fetch-node@1.1.0',
npm WARN EBADENGINE required: { node: '>18.0.0' },
npm WARN EBADENGINE current: { node: 'v16.18.0', npm: '8.19.2' }
npm WARN EBADENGINE }
```
We already try-catch the `setupInstrumentation` hook anyhow, so no need
to check again here - if this fails we'll just skip running this
integration.1 parent d7de20e commit 16594de
File tree
2 files changed
+17
-10
lines changed- packages/node-experimental
- src/integrations
2 files changed
+17
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
49 | 51 | | |
50 | 52 | | |
51 | 53 | | |
| |||
Lines changed: 14 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
| |||
66 | 65 | | |
67 | 66 | | |
68 | 67 | | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
77 | 82 | | |
78 | 83 | | |
79 | 84 | | |
| |||
0 commit comments