Skip to content

Commit

Permalink
chore(dev): update dependencies and fix lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
orblazer committed Mar 22, 2024
1 parent ecb5a4e commit 1050428
Show file tree
Hide file tree
Showing 6 changed files with 844 additions and 874 deletions.
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@
"postversion": "git push && git push --tags && npm run pack"
},
"devDependencies": {
"@commitlint/cli": "^12.1.4",
"@commitlint/config-conventional": "^12.1.4",
"archiver": "^5.3.0",
"husky": "^6.0.0"
"@commitlint/cli": "^19.2.1",
"@commitlint/config-conventional": "^19.1.0",
"@types/archiver": "^6.0.2",
"archiver": "^7.0.1",
"husky": "^9.0.11"
}
}
11 changes: 6 additions & 5 deletions scripts/archive.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
const fs = require("fs");
const { resolve } = require("path");
const archive = require("archiver")("zip");
const { version } = require("../package.json");
import archiver from "archiver";
import { createWriteStream } from "fs";
import { resolve } from "path";
import { version } from "../package.json";

const source = resolve(__dirname, "../package");
const output = fs.createWriteStream(
const output = createWriteStream(
resolve(__dirname, `../resourcesMonitor-fork-${version}.plasmoid`)
);

// Create archive
const archive = archiver("zip");
archive
.directory(source, false)
.pipe(output)
Expand Down
10 changes: 5 additions & 5 deletions scripts/bump.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
const fs = require("fs/promises");
const { resolve } = require("path");
const { version } = require("../package.json");
import { readFile, writeFile } from "fs/promises";
import { resolve } from "path";
import { version } from "../package.json";

// Bump version in desktop file
const file = resolve(__dirname, "../package/metadata.json");
fs.readFile(file, "utf-8").then((data) => {
readFile(file, "utf-8").then((data) => {
const jsonData = JSON.parse(data);
jsonData.KPlugin.Version = version;
fs.writeFile(file, JSON.stringify(jsonData, undefined, 2), "utf-8");
writeFile(file, JSON.stringify(jsonData, undefined, 2), "utf-8");
});
2 changes: 1 addition & 1 deletion scripts/real-test.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
PLASMOID_DIR='~/.local/share/plasma/plasmoids/'
PLASMOID_DIR="$HOME/.local/share/plasma/plasmoids/"
PACKAGE_NAME=org.kde.resourcesMonitor-fork

if [ -d "${PLASMOID_DIR}${PACKAGE_NAME}" ]
Expand Down
4 changes: 2 additions & 2 deletions scripts/test.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/bin/bash
# Enable debug for Fedora
if ! [ -z "$(cat /etc/*release | grep ^NAME | grep Fedora)" ] || [ "${DEBUG^^}" == "TRUE" ]
if (cat /etc/*release | grep ^NAME | grep -q Fedora) || [ "${DEBUG^^}" == "TRUE" ]
then
export QT_LOGGING_RULES="*.debug=true; qt.*.debug=false"
fi

echo 'Run applet...'
plasmoidviewer -a $(pwd)/package
plasmoidviewer -a "$(pwd)/package"
Loading

0 comments on commit 1050428

Please sign in to comment.