Skip to content
This repository was archived by the owner on Oct 3, 2023. It is now read-only.

Commit c098984

Browse files
silva-fabiokjin
authored andcommitted
refactor: rename file plugingloader.ts to pluging-loader.ts
1 parent e154e00 commit c098984

File tree

7 files changed

+15
-30
lines changed

7 files changed

+15
-30
lines changed

packages/opencensus-nodejs/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ import {Tracing} from './trace/tracing';
1919

2020
const tracing: types.Tracing = Tracing.instance;
2121

22-
export {tracing};
22+
export = tracing;

packages/opencensus-nodejs/src/trace/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
/** General pupose constants. */
18-
const constants = {
18+
const constants = {
1919
DEFAULT_BUFFER_SIZE: 3,
2020
DEFAULT_BUFFER_TIMEOUT: 20000,
2121
DEFAULT_INSTRUMENTATION_MODULES: ['http', 'https', 'mongodb-core'],

packages/opencensus-nodejs/src/trace/instrumentation/plugingloader.ts renamed to packages/opencensus-nodejs/src/trace/instrumentation/pluging-loader.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
import {types} from '@opencensus/opencensus-core';
17+
import {types} from '@opencensus/opencensus-core';
1818
import {classes} from '@opencensus/opencensus-core';
1919
import {logger} from '@opencensus/opencensus-core';
2020

@@ -90,7 +90,8 @@ export class PluginLoader {
9090
try {
9191
version = JSON.parse(fs.readFileSync(pkgJson).toString()).version;
9292
} catch (e) {
93-
this.logger.error('could not get version of %s module: %s', name, e.message);
93+
this.logger.error(
94+
'could not get version of %s module: %s', name, e.message);
9495
}
9596
} else {
9697
version = process.versions.node;
@@ -112,7 +113,8 @@ export class PluginLoader {
112113
return exports;
113114
} else {
114115
self.logger.debug('applying patch to %s@%s module', name, version);
115-
self.logger.debug('using package %s to patch %s', pluginList[name], name);
116+
self.logger.debug(
117+
'using package %s to patch %s', pluginList[name], name);
116118
const pluginImportPath =
117119
self.getPlugingImportPath(pluginList[name], name);
118120
const plugin: types.Plugin = require(pluginImportPath);

packages/opencensus-nodejs/src/trace/tracing.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
import * as extend from 'extend';
17-
import {types} from '@opencensus/opencensus-core';
16+
import {types} from '@opencensus/opencensus-core';
1817
import {classes} from '@opencensus/opencensus-core';
1918
import {logger} from '@opencensus/opencensus-core';
19+
import * as extend from 'extend';
2020

2121
import {defaultConfig} from './config/config';
2222
import {Constants} from './constants';
23-
import {PluginLoader} from './instrumentation/plugingloader';
23+
import {PluginLoader} from './instrumentation/pluging-loader';
2424

2525

2626
/** Implements a Tracing. */
@@ -69,7 +69,7 @@ export class Tracing implements types.Tracing {
6969
if (!this.config.exporter) {
7070
const exporter = new classes.ConsoleExporter(this.config);
7171
this.registerExporter(exporter);
72-
}else{
72+
} else {
7373
this.registerExporter(this.config.exporter);
7474
}
7575
this.active = true;

packages/opencensus-nodejs/test/test-plugingloader.ts renamed to packages/opencensus-nodejs/test/test-pluging-loader.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ import * as assert from 'assert';
2323
import {isArray} from 'util';
2424

2525
import {Constants} from '../src/trace/constants';
26-
import {PluginLoader} from '../src/trace/instrumentation/plugingloader';
26+
import {PluginLoader} from '../src/trace/instrumentation/pluging-loader';
2727
import {Tracing} from '../src/trace/tracing';
2828

2929
describe('PluginLoader', () => {
3030
/** Should create a Tracing instance */
3131
describe('new PluginLoader()', () => {
32-
it('should create a PluginLoader instance', () => {
32+
it('should create a PluginLoader insctance', () => {
3333
const tracer = new classes.Tracer();
3434
const pluginLoader = new PluginLoader(log, tracer);
3535
assert.ok(pluginLoader instanceof PluginLoader);

packages/opencensus-nodejs/tsconfig.full.json

Lines changed: 0 additions & 17 deletions
This file was deleted.

packages/opencensus-nodejs/tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
"sourceMap": false
1616
},
1717
"include": [
18-
"src/*.ts",
19-
"test/*.ts",
18+
"src/**/*.ts",
19+
"test/**/*.ts"
2020
],
2121
"exclude": [
2222
"node_modules"

0 commit comments

Comments
 (0)