The codebase has been translated to Typescript. As a result, type definitions are included with this module to support Typescript workflows.
Breaking Changes
- The exports of the modules have changed. The default export of the module was previously a reference to the
LoggingWinston
constructor. For better compatibility with ES6 modules, this has been modified, and there is no default export, but exports a property namedLoggingWinston
.
// OLD CODE
const LoggingWinston = require('@google-cloud/logging-winston');
// NEW CODE (Node 6+)
const {LoggingWinston} = require('@google-cloud/logging-winston');
// NEW Code (Node 4)
const LoggingWinston = require('@google-cloud/logging-winston').LoggingWinston;
// If you are using ES6 style imports via TypeScript or Babel, you can use es6 style:
import {LogginWinston} from '@google-cloud/logging-winston'
- As a result of translating the codebase to use proper ES6 classes, the
new
keyword is now required when creating a newLoggingWinston
object.
// OLD CODE
const loggingWinston = LoggingWinston(); // no longer works.
// NEW CODE
const loggingWinston = new LoggingWinston();
New Features
- Add label support for log entries (#20)
Commits
- chore: add
npm install
beforenpm publish
(#35)bf69d32
- chore: compile before system and samples tests (#33)
717567c
- chore: add installation tests (#31)
ab73374
- chore(package): update mocha to version 5.0.0 (#30)
e004a9e
- fix: run tests with source map support (#28)
2dd52eb
- feat: add support of labels via metadata in log entry (#23)
b97bee9
- chore: migrate codebase to typescript (#27)
e82b8d2
- make CI run as non-root (#25)
c65024c
- chore(package): update dependencies
72accfc
- fix: Fix logging-winston.js lint (#17)
06adc2a
- Test on Node 9. (#9)
b6955d8