Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logging Bunyan Typescript Migration #15

Merged
merged 8 commits into from Nov 28, 2017

Conversation

gaofanmichael
Copy link

  • Tests and linter pass
  • Tests/sample tests/system tests all migrated.

@ghost ghost assigned gaofanmichael Nov 27, 2017
@ghost ghost added cla: yes This human has signed the Contributor License Agreement. in progress labels Nov 27, 2017
@@ -8,7 +8,7 @@
"node": ">=4.0.0"
},
"repository": "googleapis/nodejs-logging-bunyan",
"main": "./src/index.js",
"main": "./build/src/index.js",

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@@ -8,7 +8,7 @@
"node": ">=4.0.0"
},
"repository": "googleapis/nodejs-logging-bunyan",
"main": "./src/index.js",
"main": "./build/src/index.js",

This comment was marked as spam.

This comment was marked as spam.

package.json Outdated
"extend": "^3.0.1"
"@types/bunyan": "^1.8.3",
"extend": "^3.0.1",
"stream": "0.0.2",

This comment was marked as spam.

This comment was marked as spam.

package.json Outdated
"@types/bunyan": "^1.8.3",
"extend": "^3.0.1",
"stream": "0.0.2",
"typescript": "^2.6.1"

This comment was marked as spam.

This comment was marked as spam.

src/index.ts Outdated
import * as util from 'util';
import {Writable} from 'stream';
const logging = require('@google-cloud/logging');
// var Writable = require('stream').Writable;

This comment was marked as spam.

This comment was marked as spam.

src/index.ts Outdated
*
* @private
*/
_write(record: BunyanLogRecord, encoding?: string, callback?: Function) {

This comment was marked as spam.

This comment was marked as spam.

src/index.ts Outdated
}>,
callback?: Function) {
// tslint:disable-next-line:no-any
const entries = chunks.map((request: any) => {

This comment was marked as spam.

This comment was marked as spam.

* limitations under the License.
*/

'use strict';

This comment was marked as spam.

This comment was marked as spam.

test/index.ts Outdated
* limitations under the License.
*/
import * as assert from 'assert';
import * as extend from 'extend';

This comment was marked as spam.

This comment was marked as spam.

tsconfig.json Outdated
"outDir": "build",
"skipLibCheck": true,
"noStrictGenericChecks": true,
"strictFunctionTypes": false

This comment was marked as spam.

This comment was marked as spam.

src/index.ts Outdated
import * as extend from 'extend';
import * as util from 'util';
import {Writable} from 'stream';
const logging = require('@google-cloud/logging');

This comment was marked as spam.

This comment was marked as spam.

src/index.ts Outdated
// var Writable = require('stream').Writable;

// Map of Stackdriver logging levels.
const BUNYAN_TO_STACKDRIVER: {[key: number]: string} = {

This comment was marked as spam.

This comment was marked as spam.

@@ -0,0 +1,257 @@
/*!

This comment was marked as spam.

This comment was marked as spam.

src/index.ts Outdated
private stackdriverLog:
StackdriverLog; // TODO: add type for @google-cloud/logging
constructor(options: Options) {
if (new.target !== LoggingBunyan) {

This comment was marked as spam.

This comment was marked as spam.

src/index.ts Outdated
}

/**
* @param {string|number} level A bunyan logging level. Log entries at or

This comment was marked as spam.

src/index.ts Outdated
*
* @param {object} record - Bunyan log record.
*
* @private

This comment was marked as spam.

This comment was marked as spam.

src/index.ts Outdated
*/
// Writable.write used 'any' in function signature.
// tslint:disable-next-line:no-any
write(record: any, callback?: Function): boolean;

This comment was marked as spam.

This comment was marked as spam.

@gaofanmichael gaofanmichael force-pushed the typescript branch 2 times, most recently from 340573a to 17b51d2 Compare November 28, 2017 01:27
package.json Outdated
@@ -8,9 +8,11 @@
"node": ">=4.0.0"
},
"repository": "googleapis/nodejs-logging-bunyan",
"main": "./src/index.js",
"main": "./build/src/index.js",
"types": "./build/src/index.d.ts",
"files": [
"src",

This comment was marked as spam.

@gaofanmichael gaofanmichael merged commit cb3de89 into googleapis:typescript Nov 28, 2017
@gaofanmichael gaofanmichael deleted the typescript branch November 28, 2017 20:32
@lukesneeringer lukesneeringer added in progress and removed cla: yes This human has signed the Contributor License Agreement. labels Nov 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants