Skip to content

Commit

Permalink
ci: install minimal lint & doc deps (#508)
Browse files Browse the repository at this point in the history
* ci: install minimal lint & doc deps

* fix: lint
  • Loading branch information
dyladan authored and mayurkale22 committed Nov 11, 2019
1 parent 16674a7 commit f180a77
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 12 deletions.
7 changes: 5 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,11 @@ jobs:
steps:
- checkout
- run:
name: Install modules and dependencies.
command: yarn install
name: Install minimal doc and lint modules globally
command: yarn global add lerna typedoc linkinator typescript gts tslint-consistent-codestyle tslint-microsoft-contrib
- run:
name: Symlink global modules into all lerna packages
command: lerna exec 'ln -s $(yarn global dir)/node_modules node_modules'
- run:
name: Check code style and linting
command: yarn run check
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ export class DocumentLoad extends BasePlugin<unknown> {
});
} else {
// // fallback to previous version
const perf: (typeof otperformance) & PerformanceLegacy = otperformance;
const perf: typeof otperformance & PerformanceLegacy = otperformance;
const performanceTiming = perf.timing;
if (performanceTiming) {
const keys = Object.values(PTN);
Expand Down
9 changes: 6 additions & 3 deletions packages/opentelemetry-plugin-grpc/src/grpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -354,9 +354,12 @@ export class GrpcPlugin extends BasePlugin<grpc> {
parent: currentSpan || undefined,
})
.setAttribute(AttributeNames.COMPONENT, GrpcPlugin.component);
return plugin._makeGrpcClientRemoteCall(original, args, this, plugin)(
span
);
return plugin._makeGrpcClientRemoteCall(
original,
args,
this,
plugin
)(span);
};
};
}
Expand Down
2 changes: 1 addition & 1 deletion packages/opentelemetry-plugin-http/src/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ export class HttpPlugin extends BasePlugin<Http> {
span: Span,
execute: T,
rethrow: K
): K extends true ? ReturnType<T> : (ReturnType<T> | void);
): K extends true ? ReturnType<T> : ReturnType<T> | void;
private _safeExecute<T extends (...args: unknown[]) => ReturnType<T>>(
span: Span,
execute: T,
Expand Down
2 changes: 1 addition & 1 deletion packages/opentelemetry-plugin-http/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export type RequestSignature = [http.RequestOptions, HttpCallbackOptional] &
export type HttpRequestArgs = Array<HttpCallbackOptional | RequestSignature>;

export type ParsedRequestOptions =
| http.RequestOptions & Partial<url.UrlWithParsedQuery>
| (http.RequestOptions & Partial<url.UrlWithParsedQuery>)
| http.RequestOptions;
export type Http = typeof http;
/* tslint:disable-next-line:no-any */
Expand Down
4 changes: 3 additions & 1 deletion packages/opentelemetry-plugin-http/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ export const getAbsoluteUrl = (
// it should be displayed if it's not 80 and 443 (default ports)
if (
(host as string).indexOf(':') === -1 &&
(port && port !== '80' && port !== '443')
port &&
port !== '80' &&
port !== '443'
) {
host += `:${port}`;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,10 @@ export class PostgresPlugin extends BasePlugin<typeof pgTypes> {
const parentSpan = plugin._tracer.getCurrentSpan();
if (typeof args[args.length - 1] === 'function') {
// Patch ParameterQuery callback
args[args.length - 1] = utils.patchCallback(span, args[
args.length - 1
] as PostgresCallback);
args[args.length - 1] = utils.patchCallback(
span,
args[args.length - 1] as PostgresCallback
);
// If a parent span exists, bind the callback
if (parentSpan) {
args[args.length - 1] = plugin._tracer.bind(
Expand Down

0 comments on commit f180a77

Please sign in to comment.