Merge pull request #3823 from thelounge/renovate/prettier-2.x
Update dependency prettier to v2
This commit is contained in:
commit
eb171c01f5
@ -29,9 +29,7 @@
|
||||
<p>Unable to retrieve changelog for current release from GitHub.</p>
|
||||
<p>
|
||||
<a
|
||||
:href="
|
||||
`https://github.com/thelounge/thelounge/releases/tag/v${$store.state.serverConfiguration.version}`
|
||||
"
|
||||
:href="`https://github.com/thelounge/thelounge/releases/tag/v${$store.state.serverConfiguration.version}`"
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
>View release notes for this version on GitHub</a
|
||||
|
@ -23,9 +23,7 @@
|
||||
<template v-if="$store.state.serverConfiguration.gitCommit">
|
||||
<p>
|
||||
The Lounge is running from source (<a
|
||||
:href="
|
||||
`https://github.com/thelounge/thelounge/tree/${$store.state.serverConfiguration.gitCommit}`
|
||||
"
|
||||
:href="`https://github.com/thelounge/thelounge/tree/${$store.state.serverConfiguration.gitCommit}`"
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
>commit <code>{{ $store.state.serverConfiguration.gitCommit }}</code></a
|
||||
@ -36,9 +34,7 @@
|
||||
<li>
|
||||
Compare
|
||||
<a
|
||||
:href="
|
||||
`https://github.com/thelounge/thelounge/compare/${$store.state.serverConfiguration.gitCommit}...master`
|
||||
"
|
||||
:href="`https://github.com/thelounge/thelounge/compare/${$store.state.serverConfiguration.gitCommit}...master`"
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
>between
|
||||
@ -50,9 +46,7 @@
|
||||
<li>
|
||||
Compare
|
||||
<a
|
||||
:href="
|
||||
`https://github.com/thelounge/thelounge/compare/${$store.state.serverConfiguration.version}...${$store.state.serverConfiguration.gitCommit}`
|
||||
"
|
||||
:href="`https://github.com/thelounge/thelounge/compare/${$store.state.serverConfiguration.version}...${$store.state.serverConfiguration.gitCommit}`"
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
>between
|
||||
|
@ -177,10 +177,7 @@ function enableAutocomplete(input) {
|
||||
const text = input.value;
|
||||
|
||||
if (tabCount === 0) {
|
||||
lastMatch = text
|
||||
.substring(0, input.selectionStart)
|
||||
.split(/\s/)
|
||||
.pop();
|
||||
lastMatch = text.substring(0, input.selectionStart).split(/\s/).pop();
|
||||
|
||||
if (lastMatch.length === 0) {
|
||||
return;
|
||||
|
@ -18,9 +18,7 @@ LinkifyIt.prototype.normalize = function normalize(match) {
|
||||
}
|
||||
};
|
||||
|
||||
const linkify = LinkifyIt()
|
||||
.tlds(require("tlds"))
|
||||
.tlds("onion", true);
|
||||
const linkify = LinkifyIt().tlds(require("tlds")).tlds("onion", true);
|
||||
|
||||
// Known schemes to detect in text
|
||||
const commonSchemes = [
|
||||
|
@ -85,10 +85,7 @@ function parse(createElement, text, message = undefined, network = undefined) {
|
||||
const emojiParts = findEmoji(cleanText);
|
||||
const nameParts = findNames(cleanText, message ? message.users || [] : []);
|
||||
|
||||
const parts = channelParts
|
||||
.concat(linkParts)
|
||||
.concat(emojiParts)
|
||||
.concat(nameParts);
|
||||
const parts = channelParts.concat(linkParts).concat(emojiParts).concat(nameParts);
|
||||
|
||||
// Merge the styling information with the channels / URLs / nicks / text objects and
|
||||
// generate HTML strings with the resulting fragments
|
||||
|
@ -102,7 +102,7 @@
|
||||
"postcss-import": "12.0.1",
|
||||
"postcss-loader": "3.0.0",
|
||||
"postcss-preset-env": "6.7.0",
|
||||
"prettier": "1.19.1",
|
||||
"prettier": "2.0.0",
|
||||
"pretty-quick": "2.0.1",
|
||||
"primer-tooltips": "2.0.0",
|
||||
"sinon": "9.0.1",
|
||||
|
@ -66,10 +66,7 @@ const changelogPath = path.resolve(__dirname, "..", "CHANGELOG.md");
|
||||
|
||||
if (token === undefined) {
|
||||
try {
|
||||
token = fs
|
||||
.readFileSync(path.resolve(__dirname, "./github_token.txt"))
|
||||
.toString()
|
||||
.trim();
|
||||
token = fs.readFileSync(path.resolve(__dirname, "./github_token.txt")).toString().trim();
|
||||
} catch (e) {
|
||||
log.error(`Environment variable ${colors.bold("CHANGELOG_TOKEN")} must be set.`);
|
||||
log.error(`Alternative create ${colors.bold("scripts/github_token.txt")} file.`);
|
||||
|
@ -63,8 +63,5 @@ log.info(
|
||||
);
|
||||
|
||||
function getPrettyDate() {
|
||||
return new Date()
|
||||
.toISOString()
|
||||
.split(".")[0]
|
||||
.replace("T", " ");
|
||||
return new Date().toISOString().split(".")[0].replace("T", " ");
|
||||
}
|
||||
|
@ -290,10 +290,7 @@ Client.prototype.generateToken = function(callback) {
|
||||
};
|
||||
|
||||
Client.prototype.calculateTokenHash = function (token) {
|
||||
return crypto
|
||||
.createHash("sha512")
|
||||
.update(token)
|
||||
.digest("hex");
|
||||
return crypto.createHash("sha512").update(token).digest("hex");
|
||||
};
|
||||
|
||||
Client.prototype.updateSession = function (token, ip, request) {
|
||||
|
@ -181,10 +181,7 @@ ClientManager.prototype.getDataToSave = function(client) {
|
||||
networks: client.networks.map((n) => n.export()),
|
||||
});
|
||||
const newUser = JSON.stringify(json, null, "\t");
|
||||
const newHash = crypto
|
||||
.createHash("sha256")
|
||||
.update(newUser)
|
||||
.digest("hex");
|
||||
const newHash = crypto.createHash("sha256").update(newUser).digest("hex");
|
||||
|
||||
return {newUser, newHash};
|
||||
};
|
||||
|
@ -87,10 +87,7 @@ function getGitCommit() {
|
||||
}
|
||||
|
||||
function getVersionCacheBust() {
|
||||
const hash = crypto
|
||||
.createHash("sha256")
|
||||
.update(Helper.getVersion())
|
||||
.digest("hex");
|
||||
const hash = crypto.createHash("sha256").update(Helper.getVersion()).digest("hex");
|
||||
|
||||
return hash.substring(0, 10);
|
||||
}
|
||||
|
@ -4,10 +4,7 @@ const colors = require("chalk");
|
||||
const read = require("read");
|
||||
|
||||
function timestamp() {
|
||||
const datetime = new Date()
|
||||
.toISOString()
|
||||
.split(".")[0]
|
||||
.replace("T", " ");
|
||||
const datetime = new Date().toISOString().split(".")[0].replace("T", " ");
|
||||
|
||||
return colors.dim(datetime);
|
||||
}
|
||||
|
@ -78,9 +78,7 @@ function parseHtml(preview, res, client) {
|
||||
preview.type = "link";
|
||||
preview.head =
|
||||
$('meta[property="og:title"]').attr("content") ||
|
||||
$("head > title, title")
|
||||
.first()
|
||||
.text() ||
|
||||
$("head > title, title").first().text() ||
|
||||
"";
|
||||
preview.body =
|
||||
$('meta[property="og:description"]').attr("content") ||
|
||||
|
@ -43,10 +43,7 @@ class Storage {
|
||||
}
|
||||
|
||||
store(data, extension, callback) {
|
||||
const hash = crypto
|
||||
.createHash("sha256")
|
||||
.update(data)
|
||||
.digest("hex");
|
||||
const hash = crypto.createHash("sha256").update(data).digest("hex");
|
||||
const a = hash.substring(0, 2);
|
||||
const b = hash.substring(2, 4);
|
||||
const folder = path.join(helper.getStoragePath(), a, b);
|
||||
|
@ -6,9 +6,7 @@ const constants = require("../../../client/js/constants");
|
||||
describe("client-side constants", function () {
|
||||
describe(".colorCodeMap", function () {
|
||||
it("should be a non-empty array", function () {
|
||||
expect(constants.colorCodeMap)
|
||||
.to.be.an("array")
|
||||
.of.length(16);
|
||||
expect(constants.colorCodeMap).to.be.an("array").of.length(16);
|
||||
});
|
||||
|
||||
it("should be made of pairs of strings", function () {
|
||||
@ -28,9 +26,7 @@ describe("client-side constants", function() {
|
||||
|
||||
it("should only contain ASCII strings", function () {
|
||||
constants.condensedTypes.forEach((type) => {
|
||||
expect(type)
|
||||
.to.be.a("string")
|
||||
.that.does.match(/^\w+$/);
|
||||
expect(type).to.be.a("string").that.does.match(/^\w+$/);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -229,9 +229,7 @@ describe("Network", function() {
|
||||
.to.be.an("object")
|
||||
.that.has.all.keys("channels", "status", "nick", "name", "serverOptions", "uuid");
|
||||
|
||||
expect(clone.status)
|
||||
.to.be.an("object")
|
||||
.that.has.all.keys("connected", "secure");
|
||||
expect(clone.status).to.be.an("object").that.has.all.keys("connected", "secure");
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -11,9 +11,7 @@ describe("inputs", function() {
|
||||
|
||||
it("should only return strings with no whitespaces and starting with /", function () {
|
||||
inputs.getCommands().forEach((command) => {
|
||||
expect(command)
|
||||
.to.be.a("string")
|
||||
.that.does.not.match(/\s/);
|
||||
expect(command).to.be.a("string").that.does.not.match(/\s/);
|
||||
expect(command[0]).to.equal("/");
|
||||
});
|
||||
});
|
||||
|
@ -7262,7 +7262,12 @@ prepend-http@^2.0.0:
|
||||
resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897"
|
||||
integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=
|
||||
|
||||
prettier@1.19.1, prettier@^1.18.2:
|
||||
prettier@2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.0.0.tgz#9c8fdba0aeae3faf0d9d9391623ac4f9321a4455"
|
||||
integrity sha512-vI55PC+GFLOVtpwr2di1mYhJF36v+kztJov8sx3AmqbfdA+2Dhozxb+3e1hTgoV9lyhnVJFF3Z8GCVeMBOS1bA==
|
||||
|
||||
prettier@^1.18.2:
|
||||
version "1.19.1"
|
||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb"
|
||||
integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==
|
||||
|
Loading…
Reference in New Issue
Block a user