[ ] remove the 'cpx2' devDependency from package.json
It looks like cpx2 is only used as a test package for RequireInTheMiddleSingleton, so picking some other module, or manually creating a local module in a fixtures/ subdir and using that directly would work as well. However, using cpx2 seems fine.
In
@opentelemetry/instrumentation
we testRequireInTheMiddleSingleton
by using thecpx2
package. https://github.com/open-telemetry/opentelemetry-js/blob/63d74cdc366fc337be66c1a766a2cc8e5275a85a/experimental/packages/opentelemetry-instrumentation/test/node/RequireInTheMiddleSingleton.test.ts#L42-L43As we don't use the
cpx2
package anywhere else anymore, having a local test package would help us get rid of that dependencyTo complete this issue we need to:
cpx2
is structured for testing in./tests/fixtures/
package.json
Originally posted by @trentm in https://github.com/open-telemetry/opentelemetry-js/pull/4510#pullrequestreview-1920997060