Commit 8b21280
feat(openfeature): vendor the flagging provider instead of an optional peer
`@datadog/openfeature-node-server` was an optional peer dependency resolved
through a bundler-opaque require, requiring dedicated esbuild/webpack plugin
code to keep the require invisible when the peer wasn't installed (#8635) and
to inline it so bundles survived relocation when it was (#8980). Vendoring the
provider into `vendor/dist/` removes the need for a peer at all, so all of
that machinery (`feature-registry.js`, `register.js`, `require-provider.js`,
the optional-peer esbuild/webpack loaders, and their integration tests) is
deleted in favor of a single lazy `tracer.openfeature` property.
The vendored provider's only remaining external dependency is
`@openfeature/server-sdk`, used solely for `OpenFeatureEventEmitter` and
`ProviderEvents`. Bundling our own copy would give those a different identity
than the customer's, so it's externalized to a small bridge module
(`server-sdk-bridge.js`) that a new `openfeature-server-sdk` instrumentation
fills in from the customer's own `require()`.
`FlaggingProvider#initialize` also unrefs the vendored provider's
initialization timer, which otherwise keeps an idle process (a short script, a
serverless handler) alive for up to `initializationTimeoutMs` while waiting
for configuration to arrive. TODO left to remove this once
`@datadog/openfeature-node-server` unrefs it upstream.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>1 parent 87df4d6 commit 8b21280
42 files changed
Lines changed: 442 additions & 1112 deletions
File tree
- integration-tests
- esbuild
- webpack
- packages
- datadog-esbuild
- test
- datadog-instrumentations
- src
- helpers
- test
- helpers
- datadog-webpack
- src
- test
- dd-trace
- src
- noop
- openfeature
- test
- openfeature
- scripts
- vendor
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | 96 | | |
115 | 97 | | |
116 | 98 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
166 | | - | |
167 | 166 | | |
168 | 167 | | |
169 | 168 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
166 | | - | |
167 | 166 | | |
168 | 167 | | |
169 | 168 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | 98 | | |
105 | 99 | | |
106 | 100 | | |
| |||
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | 61 | | |
66 | 62 | | |
67 | 63 | | |
| |||
This file was deleted.
0 commit comments