-
Notifications
You must be signed in to change notification settings - Fork 40
feat: add morgan types to work with typescript #119
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
Conversation
❌ Author of the following commits did not sign a Contributor Agreement: Please, read and sign the above mentioned agreement if you want to contribute to this project |
❕ Build Aborted
Expand to view the summary
Build stats
Steps errors
Expand to view the steps failures
|
Hi @floross. Thanks very much for your PR! I'm sorry that I didn't get back to you way back when you submitted this. Are you able to sign our CLA (at https://www.elastic.co/contributor-agreement)? Then I'll be able to get this in this week. |
This updates the three @elastic/ecs-*-format packages to support the following import styles from JS and TS code: 1. `const { ecsFormat } = require('@elastic/ecs-pino-format);` in JS and TS. The preferred import style for JS code using CommonJS. 2. `import { ecsFormat } from '@elastic/ecs-pino-format';` in JS and TS. ES module (ESM) import style. This is the preferred style for TypeScript code and for JS developers using ESM. 3. `const ecsFormat = require('@elastic/ecs-pino-format');` in JS. The old, deprecated import method. Still supported for backward compat. 4. `import ecsFormat from '@elastic/ecs-pino-format';` in JS and TS. This works, but is deprecated. Prefer #2 style. 5. `import * as EcsPinoFormat from '@elastic/ecs-pino-format';` in TS. One must then use `EcsPinoFormat.ecsFormat()`. Note that this *excludes* support for this TS-only style: `import escFormat = require('@elastic/ecs-pino-format');` This also adds types for ecs-morgan-format, based on #119 and #90. I'd had an earlier start on this in #96. Replaces: #96 Closes: #90 Closes: #119
…#165) This updates the three @elastic/ecs-*-format packages to support the following import styles from JS and TS code: 1. `const { ecsFormat } = require('@elastic/ecs-pino-format);` in JS and TS. The preferred import style for JS code using CommonJS. 2. `import { ecsFormat } from '@elastic/ecs-pino-format';` in JS and TS. ES module (ESM) import style. This is the preferred style for TypeScript code and for JS developers using ESM. 3. `const ecsFormat = require('@elastic/ecs-pino-format');` in JS. The old, deprecated import method. Still supported for backward compat. 4. `import ecsFormat from '@elastic/ecs-pino-format';` in JS and TS. This works, but is deprecated. Prefer #2 style. 5. `import * as EcsPinoFormat from '@elastic/ecs-pino-format';` in TS. One must then use `EcsPinoFormat.ecsFormat()`. Note that this *excludes* support for this TS-only style: `import escFormat = require('@elastic/ecs-pino-format');` This also adds types for ecs-morgan-format, based on #119 and #90. I'd had an earlier start on this in #96. Replaces: #96 Closes: #90 Closes: #119
This pull request add types information to the morgan elastic package (
@elastic/ecs-morgan-format
)