Skip to content

Commit ef47a05

Browse files
Merge pull request #74 from glg/update-and-package
Publish as package.
2 parents ff19fe3 + 77f82ea commit ef47a05

File tree

7 files changed

+221
-252
lines changed

7 files changed

+221
-252
lines changed

.github/workflows/node-js.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
- uses: actions/checkout@master
1010
- uses: actions/setup-node@v2
1111
with:
12-
node-version: 10
12+
node-version: 16
1313
- name: npm install, lint, and test
1414
run: |
1515
npm ci
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
- main
6+
- update-and-package
7+
8+
name: release-please
9+
jobs:
10+
release-please:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: google-github-actions/release-please-action@v3
14+
id: release
15+
with:
16+
release-type: node
17+
package-name: release-please-action
18+
19+
# The logic below handles the npm publication:
20+
- uses: actions/checkout@v2
21+
# these if statements ensure that a publication only occurs when
22+
# a new release is created:
23+
if: ${{ steps.release.outputs.release_created }}
24+
25+
- uses: actions/setup-node@v1
26+
with:
27+
node-version: 16
28+
registry-url: 'https://npm.pkg.github.com/'
29+
if: ${{ steps.release.outputs.release_created }}
30+
31+
- run: npm ci
32+
if: ${{ steps.release.outputs.release_created }}
33+
34+
- run: npm test
35+
if: ${{ steps.release.outputs.release_created }}
36+
37+
- run: npm publish
38+
env:
39+
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
40+
if: ${{ steps.release.outputs.release_created }}

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v16.17.0

.tool-versions

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodejs 16.17.0

CONTRIBUTING.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
## Primary Maintainer(s)
2+
3+
- @drhayes - David Hayes
4+
- @mikemartin1090 - Mike Martin
5+
6+
## How to Contribute
7+
8+
We welcome any contributions that can help make this a more useful repository inner-source. Contributions can include, but are not limited to:
9+
10+
- Documentation improvements
11+
- Creating issues for bugs and participating when the solution/fix needs to be tested
12+
- Pull Requests for features, fixes, etc.
13+
14+
## Formatting Commit Messages
15+
16+
This repository uses conventional commits to format commit messages. This allows us to automatically generate changelogs and release notes. Please see [this link](https://www.conventionalcommits.org/en/v1.0.0/) for more information on how to format your commit messages.
17+
18+
Specifically, we use the following format:
19+
20+
- `feat: <description>` for new features
21+
- `fix: <description>` for bug fixes
22+
- `chore: <description>` for changes that don't affect the codebase
23+
24+
One of those should be the first line in your commit message. If you need to add more detail, you can add a blank line and then add more detail.

readme.md renamed to README.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This is a good default configuration of [winston](https://github.com/winstonjs/w
44

55
## Install
66

7-
`npm install github:glg/node-logger`
7+
To install in your project, do `npm install github:glg/node-logger`.
88

99
## Usage
1010

@@ -14,11 +14,11 @@ This is a good default configuration of [winston](https://github.com/winstonjs/w
1414

1515
Params
1616

17-
| Param | Type | Description | Default |
18-
|-|-|-|-|
19-
| logLevel | `String` | The minimum severity level to log. [See Log Levels](#log-levels) | `info`
20-
| metadata | `Object` | Any extra data you want included in your logging, like what service this is | `{}`
21-
| stderrLevels | `Array` | Which log levels should be logged to `stderr` instead of `stdout` | `[]`
17+
| Param | Type | Description | Default |
18+
|--------------|----------|-----------------------------------------------------------------------------|---------|
19+
| logLevel | `String` | The minimum severity level to log. [See Log Levels](#log-levels) | `info`
20+
| metadata | `Object` | Any extra data you want included in your logging, like what service this is | `{}`
21+
| stderrLevels | `Array` | Which log levels should be logged to `stderr` instead of `stdout` | `[]`
2222

2323
```javascript
2424
const { createLogger } = require('node-logger');
@@ -67,3 +67,9 @@ This supports the following log levels, in order of decreasing severity:
6767
If you create a logger with the log level `info` (default), it will log all outputs that are at least an `info` level severity, which would be everything except `debug`.
6868

6969
If you create a logger with the log level `error`, it will only log messages that are `error`, `crit`, `alert`, or `emerg`.
70+
71+
## Local development
72+
73+
To work on this locally, clone it and run `npm install`. You should be good to go.
74+
75+
Be sure to read CONTRIBUTING.md for guidelines on contributing to this repo.

0 commit comments

Comments
 (0)