Skip to content

Commit

Permalink
chore: update module config in tsconfig.base.json (#5347)
Browse files Browse the repository at this point in the history
Co-authored-by: Marc Pichler <[email protected]>
  • Loading branch information
david-luna and pichlermarc authored Jan 23, 2025
1 parent c00f36e commit 3447582
Show file tree
Hide file tree
Showing 37 changed files with 222 additions and 197 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ For semantic convention package changes, see the [semconv CHANGELOG](packages/se
* refactor(sdk-trace-base): remove `BasicTracerProvider._registeredSpanProcessors` private property. [#5134](https://github.com/open-telemetry/opentelemetry-js/pull/5134) @david-luna
* refactor(sdk-trace-base): rename `BasicTracerProvider.activeSpanProcessor` private property. [#5211](https://github.com/open-telemetry/opentelemetry-js/pull/5211) @david-luna
* chore(selenium-tests): remove internal selenium-tests/ package, it wasn't being used @trentm
* chore: update typescript `module` compiler option to `node16`. [#5347](https://github.com/open-telemetry/opentelemetry-js/pull/5347) @david-luna

## 1.30.0

Expand Down
4 changes: 2 additions & 2 deletions api/test/common/context/NoopContextManager.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe('NoopContextManager', () => {
it('should work', () => {
assert.doesNotThrow(() => {
contextManager = new NoopContextManager();
assert(
assert.ok(
contextManager.enable() === contextManager,
'should return this'
);
Expand All @@ -36,7 +36,7 @@ describe('NoopContextManager', () => {
describe('.disable()', () => {
it('should work', () => {
assert.doesNotThrow(() => {
assert(
assert.ok(
contextManager.disable() === contextManager,
'should return this'
);
Expand Down
2 changes: 1 addition & 1 deletion api/test/common/noop-implementations/noop-meter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const options = {
describe('NoopMeter', () => {
it('constructor should not crash', () => {
const meter = new NoopMeterProvider().getMeter('test-noop');
assert(meter instanceof NoopMeter);
assert.ok(meter instanceof NoopMeter);
});

it('counter should not crash', () => {
Expand Down
12 changes: 6 additions & 6 deletions api/test/common/noop-implementations/noop-tracer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ describe('NoopTracer', () => {
{},
trace.setSpanContext(context.active(), parent)
);
assert(span.spanContext().traceId === parent.traceId);
assert(span.spanContext().spanId === parent.spanId);
assert(span.spanContext().traceFlags === parent.traceFlags);
assert.ok(span.spanContext().traceId === parent.traceId);
assert.ok(span.spanContext().spanId === parent.spanId);
assert.ok(span.spanContext().traceFlags === parent.traceFlags);
});

it('should propagate valid spanContext on the span (from current context)', () => {
Expand All @@ -76,9 +76,9 @@ describe('NoopTracer', () => {
const activeStub = sinon.stub(context, 'active');
activeStub.returns(ctx);
const span = tracer.startSpan('test-1');
assert(span.spanContext().traceId === parent.traceId);
assert(span.spanContext().spanId === parent.spanId);
assert(span.spanContext().traceFlags === parent.traceFlags);
assert.ok(span.spanContext().traceId === parent.traceId);
assert.ok(span.spanContext().spanId === parent.spanId);
assert.ok(span.spanContext().traceFlags === parent.traceFlags);
});

it('should accept 2 to 4 args and start an active span', () => {
Expand Down
4 changes: 2 additions & 2 deletions api/test/tree-shaking/tree-shaking.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

import * as assert from 'assert';
import * as webpack from 'webpack';
import { webpack, Stats } from 'webpack';
import * as path from 'path';
import { Union } from 'unionfs';
import { fs as mfs } from 'memfs';
Expand Down Expand Up @@ -97,7 +97,7 @@ describe('tree-shaking', function () {
join: path.join,
} as any;

const stats = await new Promise<webpack.Stats>((resolve, reject) => {
const stats = await new Promise<Stats>((resolve, reject) => {
compiler.run((err, stats) => {
if (err) {
return reject(err);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { NoopEventLoggerProvider } from '../../src/NoopEventLoggerProvider';
describe('NoopEventLogger', () => {
it('constructor should not crash', () => {
const logger = new NoopEventLoggerProvider().getEventLogger('test-noop');
assert(logger instanceof NoopEventLogger);
assert.ok(logger instanceof NoopEventLogger);
});

it('calling emit should not crash', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { NoopLoggerProvider } from '../../src/NoopLoggerProvider';
describe('NoopLogger', () => {
it('constructor should not crash', () => {
const logger = new NoopLoggerProvider().getLogger('test-noop');
assert(logger instanceof NoopLogger);
assert.ok(logger instanceof NoopLogger);
});

it('calling emit should not crash', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ describe('PrometheusSerializer', () => {
describe('constructor', () => {
it('should construct a serializer', () => {
const serializer = new PrometheusSerializer();
assert(serializer instanceof PrometheusSerializer);
assert.ok(serializer instanceof PrometheusSerializer);
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1369,10 +1369,10 @@ describe('HttpInstrumentation', () => {
const result = await httpRequest.get(
`${protocol}://${hostname}:${serverPort}${testPath}`
);
assert(
assert.ok(
result.reqHeaders[DummyPropagation.TRACE_CONTEXT_KEY] !== undefined
);
assert(
assert.ok(
result.reqHeaders[DummyPropagation.SPAN_CONTEXT_KEY] !== undefined
);
const spans = memoryExporter.getFinishedSpans();
Expand All @@ -1393,10 +1393,10 @@ describe('HttpInstrumentation', () => {
const result = await httpRequest.get(
`${protocol}://${hostname}:${serverPort}${testPath}`
);
assert(
assert.ok(
result.reqHeaders[DummyPropagation.TRACE_CONTEXT_KEY] !== undefined
);
assert(
assert.ok(
result.reqHeaders[DummyPropagation.SPAN_CONTEXT_KEY] !== undefined
);
const spans = memoryExporter.getFinishedSpans();
Expand Down Expand Up @@ -1424,11 +1424,11 @@ describe('HttpInstrumentation', () => {
.get(`${protocol}://${hostname}:${serverPort}${testPath}`)
.then(result => {
span.end();
assert(
assert.ok(
result.reqHeaders[DummyPropagation.TRACE_CONTEXT_KEY] !==
undefined
);
assert(
assert.ok(
result.reqHeaders[DummyPropagation.SPAN_CONTEXT_KEY] !==
undefined
);
Expand Down Expand Up @@ -1463,9 +1463,9 @@ describe('HttpInstrumentation', () => {
it('should set rpc metadata for incoming http request', async () => {
server = http.createServer((request, response) => {
const rpcMetadata = getRPCMetadata(context.active());
assert(typeof rpcMetadata !== 'undefined');
assert(rpcMetadata.type === RPCType.HTTP);
assert(rpcMetadata.span.setAttribute('key', 'value'));
assert.ok(typeof rpcMetadata !== 'undefined');
assert.ok(rpcMetadata.type === RPCType.HTTP);
assert.ok(rpcMetadata.span.setAttribute('key', 'value'));
response.end('Test Server Response');
});
await new Promise<void>(resolve => server.listen(serverPort, resolve));
Expand Down
Loading

0 comments on commit 3447582

Please sign in to comment.