Skip to content

Commit

Permalink
fix: change the way package.json is being imported
Browse files Browse the repository at this point in the history
  • Loading branch information
tapico-weyert committed Apr 6, 2021
1 parent 2cbaa28 commit 0c2c76f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions src/opentelemetry-tracing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ import {
SpanKind,
} from '@opentelemetry/api';

// eslint-disable-next-line @typescript-eslint/no-var-requires
const PKG = require('../../package.json');
import * as PKG from '../package.json';

/**
* @internal
Expand Down
4 changes: 2 additions & 2 deletions src/pubsub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import * as extend from 'extend';
import {GoogleAuth} from 'google-auth-library';
import * as gax from 'google-gax';

// eslint-disable-next-line @typescript-eslint/no-var-requires
const PKG = require('../../package.json');
import * as PKG from '../package.json';

// eslint-disable-next-line @typescript-eslint/no-var-requires
const v1 = require('./v1');

Expand Down
4 changes: 2 additions & 2 deletions test/pubsub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ import * as subby from '../src/subscription';
import {Topic} from '../src/topic';
import * as util from '../src/util';

// eslint-disable-next-line @typescript-eslint/no-var-requires
const PKG = require('../../package.json');
import * as PKG from '../package.json';

const sandbox = sinon.createSandbox();

const fakeCreds = {} as gax.grpc.ChannelCredentials;
Expand Down

0 comments on commit 0c2c76f

Please sign in to comment.