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

Run prettier and require it #1271

Merged
merged 4 commits into from Jun 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 6 additions & 4 deletions .gitattributes
Expand Up @@ -8,18 +8,20 @@
# for example, after the build script is run)
.* text eol=lf
*.css text eol=lf
*.scss text eol=lf
*.html text eol=lf
*.js text eol=lf
*.cjs text eol=lf
*.mjs text eol=lf
*.cjs text eol=lf
*.mjs text eol=lf
*.ts text eol=lf
*.cts text eol=lf
*.mts text eol=lf
*.cts text eol=lf
*.mts text eol=lf
*.json text eol=lf
*.md text eol=lf
*.sh text eol=lf
*.txt text eol=lf
*.xml text eol=lf
*.yml text eol=lf

# Exclude the `.htaccess` file from GitHub's language statistics
# https://github.com/github/linguist#using-gitattributes
Expand Down
3 changes: 3 additions & 0 deletions .prettierignore
@@ -0,0 +1,3 @@
coverage
.github
.nyc_output
6 changes: 3 additions & 3 deletions CHANGELOG.md
Expand Up @@ -76,7 +76,7 @@

## 6.4.4

- [fix: set logger.level on runtime will no longer wrongly reset useCallStack](https://github.com/log4js-node/log4js-node/pull/1217) - thanks [@peteriman](https://github.com/peteriman)
- [fix: set logger.level on runtime will no longer wrongly reset useCallStack](https://github.com/log4js-node/log4js-node/pull/1217) - thanks [@peteriman](https://github.com/peteriman)
- [docs: updated docs for broken links and inaccessible pages](https://github.com/log4js-node/log4js-node/pull/1219) - thanks [@peteriman](https://github.com/peteriman)
- [docs: broken link to gelf appender](https://github.com/log4js-node/log4js-node/pull/1218) - thanks [@mattalexx](https://github.com/mattalexx)
- [docs: updated docs for appenders module loading](https://github.com/log4js-node/log4js-node/pull/985) - thanks [@leonimurilo](https://github.com/leonimurilo)
Expand All @@ -89,7 +89,6 @@

## 6.4.3


- [fix: added filename validation](https://github.com/log4js-node/log4js-node/pull/1201) - thanks [@peteriman](https://github.com/peteriman)
- [refactor: do not initialise default appenders as it will be done again by configure()](https://github.com/log4js-node/log4js-node/pull/1210) - thanks [@peteriman](https://github.com/peteriman)
- [refactor: defensive coding for cluster=null if require('cluster') fails in try-catch ](https://github.com/log4js-node/log4js-node/pull/1199) - thanks [@peteriman](https://github.com/peteriman)
Expand Down Expand Up @@ -153,6 +152,7 @@
- [chore(deps-dev): bump typescript from 4.5.4 to 4.5.5](https://github.com/log4js-node/log4js-node/pull/1166) - thanks [@peteriman](https://github.com/peteriman)

## 6.4.0 - BREAKING CHANGE 💥

New default file permissions may cause external applications unable to read logs.
A [manual code/configuration change](https://github.com/log4js-node/log4js-node/pull/1141#issuecomment-1076224470) is required.

Expand Down Expand Up @@ -199,7 +199,7 @@ A [manual code/configuration change](https://github.com/log4js-node/log4js-node/
- chore(deps-dev): bump eslint-plugin-prettier from 3.4.1 to 4.0.0
- chore(deps-dev): bump husky from 3.1.0 to 7.0.4
- chore(deps-dev): bump prettier from 1.19.0 to 2.5.1
- chore(deps-dev): bump typescript from 3.9.10 to 4.5.4
- chore(deps-dev): bump typescript from 3.9.10 to 4.5.4
- [chore(deps-dev): bump eslint-config-prettier from 6.15.0 to 8.3.0](https://github.com/log4js-node/log4js-node/pull/1129) - thanks [@peteriman](https://github.com/peteriman)
- [chore(deps): updated dependencies](https://github.com/log4js-node/log4js-node/pull/1121) - thanks [@peteriman](https://github.com/peteriman)
- chore(deps-dev): bump codecov from 3.6.1 to 3.8.3
Expand Down
7 changes: 3 additions & 4 deletions README.md
@@ -1,5 +1,4 @@
log4js-node [![CodeQL](https://github.com/log4js-node/log4js-node/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/log4js-node/log4js-node/actions/workflows/codeql-analysis.yml) [![Node.js CI](https://github.com/log4js-node/log4js-node/actions/workflows/node.js.yml/badge.svg)](https://github.com/log4js-node/log4js-node/actions/workflows/node.js.yml)
===========
# log4js-node [![CodeQL](https://github.com/log4js-node/log4js-node/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/log4js-node/log4js-node/actions/workflows/codeql-analysis.yml) [![Node.js CI](https://github.com/log4js-node/log4js-node/actions/workflows/node.js.yml/badge.svg)](https://github.com/log4js-node/log4js-node/actions/workflows/node.js.yml)

[![NPM](https://nodei.co/npm/log4js.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/log4js/)

Expand Down Expand Up @@ -67,7 +66,7 @@ See example.js for a full example, but here's a snippet (also in `examples/fromr
const log4js = require("log4js");
log4js.configure({
appenders: { cheese: { type: "file", filename: "cheese.log" } },
categories: { default: { appenders: ["cheese"], level: "error" } }
categories: { default: { appenders: ["cheese"], level: "error" } },
});

const logger = log4js.getLogger("cheese");
Expand Down Expand Up @@ -102,7 +101,7 @@ There's also [an example application](https://github.com/log4js-node/log4js-exam
import log4js from "log4js";
log4js.configure({
appenders: { cheese: { type: "file", filename: "cheese.log" } },
categories: { default: { appenders: ["cheese"], level: "error" } }
categories: { default: { appenders: ["cheese"], level: "error" } },
});

const logger = log4js.getLogger();
Expand Down
6 changes: 3 additions & 3 deletions SECURITY.md
Expand Up @@ -2,7 +2,7 @@

## Supported Versions

We're aiming to only support the latest major version of log4js. Older than that is usually *very* old.
We're aiming to only support the latest major version of log4js. Older than that is usually _very_ old.

| Version | Supported |
| ------- | ------------------ |
Expand All @@ -13,7 +13,7 @@ We're aiming to only support the latest major version of log4js. Older than that

Report vulnerabilities via email to:

* Gareth Jones <gareth.nomiddlename@gmail.com>
* Lam Wei Li <lam_wei_li@hotmail.com>
- Gareth Jones <gareth.nomiddlename@gmail.com>
- Lam Wei Li <lam_wei_li@hotmail.com>

Please put "[log4js:security]" in the subject line. We will aim to respond within a day or two.
106 changes: 73 additions & 33 deletions docs/_layouts/default.html
@@ -1,14 +1,20 @@
<!doctype html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<title>{{ site.title | default: site.github.repository_name }} by {{ site.github.owner_name }}</title>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="chrome=1" />
<title>
{{ site.title | default: site.github.repository_name }} by {{
site.github.owner_name }}
</title>

<link rel="stylesheet" href="{{ '/assets/css/style.css?v=' | append: site.github.build_revision | relative_url }}">
<meta name="viewport" content="width=device-width">
<link
rel="stylesheet"
href="{{ '/assets/css/style.css?v=' | append: site.github.build_revision | relative_url }}"
/>
<meta name="viewport" content="width=device-width" />
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body>
Expand All @@ -18,7 +24,11 @@ <h1>{{ site.title | default: site.github.repository_name }}</h1>
<p>{{ site.description | default: site.github.project_tagline }}</p>

{% if site.github.is_project_page %}
<p class="view"><a href="{{ site.github.repository_url }}">View the Project on GitHub <small>{{ github_name }}</small></a></p>
<p class="view">
<a href="{{ site.github.repository_url }}"
>View the Project on GitHub <small>{{ github_name }}</small></a
>
</p>
{% endif %}

<ul>
Expand All @@ -34,42 +44,72 @@ <h1>{{ site.title | default: site.github.repository_name }}</h1>
</ul>

{% if site.github.is_user_page %}
<p class="view"><a href="{{ site.github.owner_url }}">View My GitHub Profile</a></p>
{% endif %}

{% if site.show_downloads %}
<ul>
<li><a href="{{ site.github.zip_url }}">Download <strong>ZIP File</strong></a></li>
<li><a href="{{ site.github.tar_url }}">Download <strong>TAR Ball</strong></a></li>
<li><a href="{{ site.github.repository_url }}">View On <strong>GitHub</strong></a></li>
</ul>
<p class="view">
<a href="{{ site.github.owner_url }}">View My GitHub Profile</a>
</p>
{% endif %} {% if site.show_downloads %}
<ul>
<li>
<a href="{{ site.github.zip_url }}"
>Download <strong>ZIP File</strong></a
>
</li>
<li>
<a href="{{ site.github.tar_url }}"
>Download <strong>TAR Ball</strong></a
>
</li>
<li>
<a href="{{ site.github.repository_url }}"
>View On <strong>GitHub</strong></a
>
</li>
</ul>
{% endif %}
</header>
<section>

{{ content }}

</section>
<section>{{ content }}</section>
<footer>
{% if site.github.is_project_page %}
<p>This project is maintained by <a href="{{ site.github.owner_url }}">{{ site.github.owner_name }}</a></p>
<p>
This project is maintained by
<a href="{{ site.github.owner_url }}">{{ site.github.owner_name }}</a>
</p>
{% endif %}
<p><small>Hosted on GitHub Pages &mdash; Theme by <a href="https://github.com/orderedlist">orderedlist</a></small></p>
<p>
<small
>Hosted on GitHub Pages &mdash; Theme by
<a href="https://github.com/orderedlist">orderedlist</a></small
>
</p>
</footer>
</div>
<script src="{{ '/assets/js/scale.fix.js' | relative_url }}"></script>


{% if site.google_analytics %}
{% if site.google_analytics %}
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
(function (i, s, o, g, r, a, m) {
i["GoogleAnalyticsObject"] = r;
(i[r] =
i[r] ||
function () {
(i[r].q = i[r].q || []).push(arguments);
}),
(i[r].l = 1 * new Date());
(a = s.createElement(o)), (m = s.getElementsByTagName(o)[0]);
a.async = 1;
a.src = g;
m.parentNode.insertBefore(a, m);
})(
window,
document,
"script",
"https://www.google-analytics.com/analytics.js",
"ga"
);

ga('create', '{{ site.google_analytics }}', 'auto');
ga('send', 'pageview');
ga("create", "{{ site.google_analytics }}", "auto");
ga("send", "pageview");
</script>
{% endif %}
{% endif %}
</body>
</html>