Skip to content

Commit a70d8ca

Browse files
authored
Merge pull request #66 from KyleRoss/v3.1.0
2 parents a051e03 + 18ed8a2 commit a70d8ca

File tree

130 files changed

+19527
-64494
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

130 files changed

+19527
-64494
lines changed

.codeclimate.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ checks:
3636
enabled: true
3737
identical-code:
3838
enabled: true
39-
plugins:
39+
plugins:
4040
eslint:
4141
enabled: true
4242
channel: "eslint-7"

.eslintrc.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,22 @@ env:
1212
plugins:
1313
- 'jsdoc'
1414
- 'node'
15-
15+
1616
extends:
17-
- 'xo-space/esnext'
17+
- 'xo-space'
1818
- 'plugin:jsdoc/recommended'
1919
- 'plugin:node/recommended'
2020

2121
rules:
2222
array-element-newline: off
2323
capitalized-comments: off
2424
curly: ['error', 'multi-line']
25+
comma-dangle: ['error', 'never']
2526
object-curly-spacing: ['error', 'always']
27+
operator-linebreak: ['error', 'after']
2628
no-multiple-empty-lines: ['error', { max: 2, maxEOF: 1, maxBOF: 0 }]
2729
no-negated-condition: off
2830
keyword-spacing: ['error', { overrides: { if: { after: false }, for: { after: false }, while: { after: false }, catch: { after: false } } }]
2931
jsdoc/newline-after-description: off
32+
node/no-unsupported-features/es-syntax: ['error', { version: '>=10.0.0' }]
33+
node/no-missing-require: off

.github/workflows/module.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
test:
1212
strategy:
1313
matrix:
14-
node: [ '10', '12', '14' ]
14+
node: [ '10', '12', '14', '16' ]
1515
name: test/node v${{ matrix.node }}
1616
runs-on: ubuntu-latest
1717
steps:
@@ -22,7 +22,7 @@ jobs:
2222
with:
2323
node-version: ${{ matrix.node }}
2424
- name: Install Dependencies
25-
run: npm ci
25+
run: npm i
2626
- name: Run Tests
2727
run: npm test
2828

@@ -38,7 +38,7 @@ jobs:
3838
with:
3939
node-version: 14
4040
- name: Install Dependencies
41-
run: npm ci
41+
run: npm i
4242
- name: Run Tests
4343
if: ${{ github.event_name == 'pull_request' }}
4444
run: npm test
@@ -70,7 +70,13 @@ jobs:
7070
with:
7171
node-version: 14
7272
- name: Install Dependencies
73-
run: npm ci
73+
run: npm i
74+
- name: Delete expired artifacts
75+
uses: LKP-RnD/purge-expired-artifacts-action@v4
76+
with:
77+
token: ${{ secrets.GITHUB_TOKEN }}
78+
repo_to_purge: "KyleRoss/node-lambda-log"
79+
dry_run: "false"
7480
- uses: bradennapier/eslint-plus-action@v3.4.2
7581
with:
7682
includeGlob: 'index.js,index.test.js,lib/*.js'
@@ -88,7 +94,7 @@ jobs:
8894
with:
8995
node-version: 14
9096
- name: Install Dependencies
91-
run: npm ci
97+
run: npm i
9298
- name: Publish to NPM
9399
env:
94100
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/site.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ jobs:
1212
steps:
1313
- name: Checkout
1414
uses: actions/checkout@master
15-
- name: Build and Deploy Site
16-
uses: srepollock/gatsby-gh-pages-action@v2.2.0
15+
- name: Deploy Site
16+
uses: peaceiris/actions-gh-pages@v3
1717
with:
18-
access-token: ${{ secrets.ACCESS_TOKEN }}
19-
deploy-branch: gh-pages
20-
gatsby-args: --prefix-paths
21-
working-dir: ${{ github.workspace }}/site
18+
github_token: ${{ secrets.GITHUB_TOKEN }}
19+
publish_branch: gh-pages
20+
publish_dir: ./gh-pages
21+
cname: lambdalog.js.org

.gitignore

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,6 @@ npm-debug.log*
55
yarn-debug.log*
66
yarn-error.log*
77

8-
# Runtime data
9-
pids
10-
*.pid
11-
*.seed
12-
*.pid.lock
13-
14-
# Directory for instrumented libs generated by jscoverage/JSCover
15-
lib-cov
16-
178
# Coverage directory used by tools like istanbul
189
coverage
1910

@@ -26,12 +17,6 @@ node_modules/
2617
# Optional npm cache directory
2718
.npm
2819

29-
# Optional eslint cache
30-
.eslintcache
31-
32-
# Optional REPL history
33-
.node_repl_history
34-
3520
# Output of 'npm pack'
3621
*.tgz
3722

.npmignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
.github
22
.husky
33
.vscode
4+
gh-pages
45
site
56
.eslintrc.yml
67
.releaserc
78
commitlint.config.js
89
*.test.js
910
jest.config.js
11+
.all-contributorsrc
1012
.codeclimate.yml
13+
babel.config.js
14+
CHANGELOG.md
15+
README.md

.vscode/settings.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,8 @@
1414
"directory": "site",
1515
"changeProcessCWD": true
1616
}
17-
]
17+
],
18+
"[mdx]": {
19+
"editor.wordWrap": "on"
20+
}
1821
}

README.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
# lambda-log
22

3-
[![npm](https://img.shields.io/npm/v/lambda-log.svg?style=for-the-badge)](https://www.npmjs.com/package/lambda-log) [![npm](https://img.shields.io/npm/dt/lambda-log.svg?style=for-the-badge)](https://www.npmjs.com/package/lambda-log) [![David](https://img.shields.io/david/KyleRoss/node-lambda-log.svg?style=for-the-badge)](https://david-dm.org/KyleRoss/node-lambda-log) ![GitHub Workflow Status](https://img.shields.io/github/workflow/status/KyleRoss/node-lambda-log/module?style=for-the-badge) [![Code Climate coverage](https://img.shields.io/codeclimate/coverage/KyleRoss/node-lambda-log?style=for-the-badge)](https://codeclimate.com/github/KyleRoss/node-lambda-log) [![license](https://img.shields.io/github/license/KyleRoss/node-lambda-log.svg?style=for-the-badge)](https://github.com/KyleRoss/node-lambda-log/blob/master/LICENSE) [![Code Climate maintainability](https://img.shields.io/codeclimate/maintainability/KyleRoss/node-lambda-log?style=for-the-badge)](https://codeclimate.com/github/KyleRoss/node-lambda-log) [![CodeFactor Grade](https://img.shields.io/codefactor/grade/github/KyleRoss/node-lambda-log?style=for-the-badge)](https://www.codefactor.io/repository/github/kyleross/node-lambda-log) [![Snyk Vulnerabilities for npm package](https://img.shields.io/snyk/vulnerabilities/npm/lambda-log?style=for-the-badge)](https://snyk.io/advisor/npm-package/lambda-log)
3+
[![npm](https://img.shields.io/npm/v/lambda-log.svg?style=for-the-badge)](https://www.npmjs.com/package/lambda-log) [![npm](https://img.shields.io/npm/dt/lambda-log.svg?style=for-the-badge)](https://www.npmjs.com/package/lambda-log) ![GitHub Workflow Status](https://img.shields.io/github/workflow/status/KyleRoss/node-lambda-log/module?style=for-the-badge) [![Code Climate coverage](https://img.shields.io/codeclimate/coverage/KyleRoss/node-lambda-log?style=for-the-badge)](https://codeclimate.com/github/KyleRoss/node-lambda-log) [![license](https://img.shields.io/github/license/KyleRoss/node-lambda-log.svg?style=for-the-badge)](https://github.com/KyleRoss/node-lambda-log/blob/master/LICENSE) [![Code Climate maintainability](https://img.shields.io/codeclimate/maintainability/KyleRoss/node-lambda-log?style=for-the-badge)](https://codeclimate.com/github/KyleRoss/node-lambda-log) [![CodeFactor Grade](https://img.shields.io/codefactor/grade/github/KyleRoss/node-lambda-log?style=for-the-badge)](https://www.codefactor.io/repository/github/kyleross/node-lambda-log) [![Snyk Vulnerabilities for npm package](https://img.shields.io/snyk/vulnerabilities/npm/lambda-log?style=for-the-badge)](https://snyk.io/advisor/npm-package/lambda-log)
44
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
55
[![All Contributors](https://img.shields.io/badge/all_contributors-10-orange.svg?style=flat-square)](#contributors-)
66
<!-- ALL-CONTRIBUTORS-BADGE:END -->
77

8-
A [Node.js package](https://www.npmjs.com/package/lambda-log) to facilitate and enforce logging standards from processes and applications running within Lambda Functions, various AWS Services, and wherever JSON logs are desired. Lambda Log formats your log messages as JSON for simple parsing and filtering within tools such as CloudWatch Logs. Supports **Node 10+**.
8+
LambdaLog is a [Node.js package](https://www.npmjs.com/package/lambda-log) facilitates and enforces logging standards in Node.js processes or applications **anywhere** by formatting your log messages as JSON for simple parsing and filtering within log management tools, such as CloudWatch Logs. _Works with all of the supported versions of Node.js on Lambda._
9+
10+
Originally created for AWS Lambda Functions, LambdaLog is a lightweight and feature-rich library that has **no** dependency on AWS or Lambda, meaning you can use it in any type of Node.js project you wish. **It's really a universal JSON logger.**
911

10-
> This module is not just for Lambda! You can use this is many different environments that support reading JSON from logs. While the name remains `lambda-log`, it's really a universal JSON logger.
1112

1213
**Why another lambda logger?**
13-
There are others out there, but seemed to be convoluted, included more functionality than needed, not maintained, or not configurable enough. I created lambda-log to include the important functionality from other loggers, but still keeping it simple with minimal dependencies.
14+
There are plenty of other logging libraries in the NPM ecosystem but most are convoluted, included more functionality than needed, not maintained, or are not configurable enough. I created LambdaLog to include the important functionality from other loggers, but still maintaining simplicity with minimal dependencies.
1415

1516
### Features
1617

@@ -22,12 +23,12 @@ Anyone can log JSON to the `console`, but with Lambda Log you also get:
2223
- Pluggable and customizable by extending the LambdaLog class.
2324
- Pretty-printing of the JSON log message in dev mode.
2425
- Well documented, commented, and maintained source code.
25-
- Over 1 million downloads and more than 20k weekly downloads.
26+
- Over 1.5 million downloads and more than 35k weekly downloads.
2627
- Small footprint.
2728

2829
#### New in Version 3.0.0
2930

30-
Version 3.0.0 of Lambda Log brings a bunch of changes, new features, and a [new website](https://lambdalog.js.org).
31+
Version 3.0.0 of Lambda Log brings a bunch of changes, new features, and a [new website](https://lambdalog.dev).
3132

3233
**Broad Changes:**
3334

@@ -58,19 +59,19 @@ Version 3.0.0 of Lambda Log brings a bunch of changes, new features, and a [new
5859

5960
## Documentation
6061

61-
Documentation for Lambda Log has moved to our [new website](https://lambdalog.js.org).
62+
Documentation for Lambda Log has moved to our [new website](https://lambdalog.dev).
6263

6364

6465

6566
## Tests
6667

67-
See [Development Documentation](https://lambdalog.js.org/docs/development).
68+
See [Development Documentation](https://lambdalog.dev/docs/latest/development).
6869

6970

7071

7172
## Contributing
7273

73-
See [Contributing Documentation](https://lambdalog.js.org/docs/contributing).
74+
See [Contributing Documentation](https://lambdalog.dev/docs/latest/contributing).
7475

7576

7677

babel.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
babelrcRoots: [
3+
'.',
4+
'site/*'
5+
]
6+
};

commitlint.config.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
1-
module.exports = { extends: ['@commitlint/config-conventional'] };
1+
module.exports = {
2+
extends: ['@commitlint/config-conventional'],
3+
rules: {
4+
'body-max-line-length': [0]
5+
}
6+
};

0 commit comments

Comments
 (0)