upgrade prettier dev dep to 2.0.5
This commit is contained in:
parent
658d52d21e
commit
4686178cae
18 changed files with 74 additions and 74 deletions
2
LICENSE
2
LICENSE
|
|
@ -1,6 +1,6 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) szTheory (http://exifcleaner.app)
|
||||
Copyright (c) szTheory (https://exifcleaner.app)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
},
|
||||
"scripts": {
|
||||
"postinstall": "electron-builder install-app-deps",
|
||||
"format": "yarn prettier --write 'src/**/*.ts'",
|
||||
"lint": "prettier --check 'src/**/*.ts'",
|
||||
"test": "yarn run lint",
|
||||
"start": "electron .",
|
||||
|
|
@ -39,11 +40,10 @@
|
|||
"electron-webpack": "^2.7.4",
|
||||
"electron-webpack-ts": "^4.0.1",
|
||||
"node-sass": "^4.13.1",
|
||||
"prettier": "1.19.1",
|
||||
"prettier": "2.0.5",
|
||||
"sass-loader": "^8.0.0",
|
||||
"typescript": "^3.8.3",
|
||||
"webpack": "^4.41.2",
|
||||
"webpack-cli": "^3.3.10"
|
||||
"webpack": "^4.41.2"
|
||||
},
|
||||
"np": {
|
||||
"publish": false,
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ const { isPackaged, getAppPath } = remote.app;
|
|||
|
||||
enum PlatformSubpath {
|
||||
Win = "win",
|
||||
Nix = "nix"
|
||||
Nix = "nix",
|
||||
}
|
||||
|
||||
function devBinaryPlatformSubpath(): PlatformSubpath {
|
||||
|
|
@ -35,7 +35,7 @@ function getDevBinariesPath(): string {
|
|||
|
||||
enum ProdBinaryResourcesDirName {
|
||||
WinMac = "Resources",
|
||||
Linux = "resources"
|
||||
Linux = "resources",
|
||||
}
|
||||
|
||||
function getProdBinariesPath(): string {
|
||||
|
|
@ -67,7 +67,7 @@ function getBinariesPath(): string {
|
|||
|
||||
enum BinFilename {
|
||||
Win = "exiftool.exe",
|
||||
Nix = "exiftool"
|
||||
Nix = "exiftool",
|
||||
}
|
||||
|
||||
function getBinFilename(): string {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { platform } from "os";
|
|||
export enum Platform {
|
||||
NIX,
|
||||
WIN,
|
||||
MAC
|
||||
MAC,
|
||||
}
|
||||
|
||||
export function isMac() {
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ function preventMultipleAppInstances(): void {
|
|||
}
|
||||
|
||||
function openMinimizedIfAlreadyExists({
|
||||
win
|
||||
win,
|
||||
}: {
|
||||
win: BrowserWindow | null;
|
||||
}): void {
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ function menu(canCopy: boolean): Menu {
|
|||
label: "Copy",
|
||||
role: "copy",
|
||||
visible: canCopy,
|
||||
enabled: canCopy
|
||||
enabled: canCopy,
|
||||
})
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ export function showAboutWindow(author: string, websiteUrl: string): void {
|
|||
// credits: author, //optional
|
||||
// authors: [author], //optional
|
||||
website: websiteUrl,
|
||||
iconPath: iconPath()
|
||||
iconPath: iconPath(),
|
||||
};
|
||||
|
||||
app.setAboutPanelOptions(aboutPanelOptions);
|
||||
|
|
|
|||
|
|
@ -10,22 +10,22 @@ export function buildDefaultOsTemplate(): MenuItemConstructorOptions[] {
|
|||
submenu: [
|
||||
fileMenuOpenItem(),
|
||||
{
|
||||
type: "separator"
|
||||
type: "separator",
|
||||
},
|
||||
{
|
||||
role: "quit"
|
||||
}
|
||||
]
|
||||
role: "quit",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
role: "editMenu"
|
||||
role: "editMenu",
|
||||
},
|
||||
{
|
||||
role: "viewMenu"
|
||||
role: "viewMenu",
|
||||
},
|
||||
{
|
||||
role: "help",
|
||||
submenu: buildHelpSubmenu()
|
||||
}
|
||||
submenu: buildHelpSubmenu(),
|
||||
},
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import {
|
|||
BrowserWindow,
|
||||
MenuItemConstructorOptions,
|
||||
MenuItem,
|
||||
KeyboardEvent
|
||||
KeyboardEvent,
|
||||
} from "electron";
|
||||
|
||||
export const EVENT_FILE_OPEN_ADD_FILES = "file-open-add-files";
|
||||
|
|
@ -21,9 +21,9 @@ export function fileOpenClick(
|
|||
|
||||
dialog
|
||||
.showOpenDialog(browserWindow, {
|
||||
properties: ["openFile", "multiSelections"]
|
||||
properties: ["openFile", "multiSelections"],
|
||||
})
|
||||
.then(result => {
|
||||
.then((result) => {
|
||||
if (result.filePaths) {
|
||||
browserWindow.webContents.send(
|
||||
EVENT_FILE_OPEN_ADD_FILES,
|
||||
|
|
@ -37,6 +37,6 @@ export function fileMenuOpenItem(): MenuItemConstructorOptions {
|
|||
return {
|
||||
label: "Open…",
|
||||
accelerator: "CmdOrCtrl+O",
|
||||
click: fileOpenClick
|
||||
click: fileOpenClick,
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,20 +22,20 @@ export function buildHelpSubmenu(): MenuItemConstructorOptions[] {
|
|||
newGithubIssueBody()
|
||||
);
|
||||
shell.openExternal(url);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
if (!isMac()) {
|
||||
submenu.push(
|
||||
{
|
||||
type: "separator"
|
||||
type: "separator",
|
||||
},
|
||||
{
|
||||
label: `About ${app.getName()}`,
|
||||
click() {
|
||||
showAboutWindow(GITHUB_USERNAME, WEBSITE_URL);
|
||||
}
|
||||
},
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ export function openUrlMenuItem(
|
|||
): MenuItemConstructorOptions {
|
||||
return {
|
||||
label: label,
|
||||
click: function() {
|
||||
click: function () {
|
||||
shell.openExternal(url);
|
||||
}
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,33 +8,33 @@ export function buildMacOsTemplate(): MenuItemConstructorOptions[] {
|
|||
label: app.getName(),
|
||||
submenu: [
|
||||
{
|
||||
role: "about"
|
||||
role: "about",
|
||||
},
|
||||
{
|
||||
type: "separator"
|
||||
type: "separator",
|
||||
},
|
||||
{
|
||||
role: "services"
|
||||
role: "services",
|
||||
},
|
||||
{
|
||||
type: "separator"
|
||||
type: "separator",
|
||||
},
|
||||
{
|
||||
role: "hide"
|
||||
role: "hide",
|
||||
},
|
||||
{
|
||||
role: "hideOthers"
|
||||
role: "hideOthers",
|
||||
},
|
||||
{
|
||||
role: "unhide"
|
||||
role: "unhide",
|
||||
},
|
||||
{
|
||||
type: "separator"
|
||||
type: "separator",
|
||||
},
|
||||
{
|
||||
role: "quit"
|
||||
}
|
||||
]
|
||||
role: "quit",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
role: "fileMenu",
|
||||
|
|
@ -42,25 +42,25 @@ export function buildMacOsTemplate(): MenuItemConstructorOptions[] {
|
|||
submenu: [
|
||||
fileMenuOpenItem(),
|
||||
{
|
||||
type: "separator"
|
||||
type: "separator",
|
||||
},
|
||||
{
|
||||
role: "close"
|
||||
}
|
||||
]
|
||||
role: "close",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
role: "editMenu"
|
||||
role: "editMenu",
|
||||
},
|
||||
{
|
||||
role: "viewMenu"
|
||||
role: "viewMenu",
|
||||
},
|
||||
{
|
||||
role: "windowMenu"
|
||||
role: "windowMenu",
|
||||
},
|
||||
{
|
||||
role: "help",
|
||||
submenu: buildHelpSubmenu()
|
||||
}
|
||||
submenu: buildHelpSubmenu(),
|
||||
},
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ function urlForLoad() {
|
|||
return url.format({
|
||||
pathname: path.join(__dirname, "index.html"),
|
||||
protocol: "file",
|
||||
slashes: true
|
||||
slashes: true,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -62,12 +62,12 @@ export function createMainWindow(): BrowserWindow {
|
|||
minHeight: DEFAULT_WINDOW_HEIGHT + 25,
|
||||
webPreferences: { nodeIntegration: true },
|
||||
//set specific background color eliminate white flicker on content load
|
||||
backgroundColor: WINDOW_BACKGROUND_COLOR
|
||||
backgroundColor: WINDOW_BACKGROUND_COLOR,
|
||||
};
|
||||
|
||||
if (isLinux()) {
|
||||
options = Object.assign({}, options, {
|
||||
icon: path.join(__dirname, "..", "..", "exifcleaner.png")
|
||||
icon: path.join(__dirname, "..", "..", "exifcleaner.png"),
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import {
|
||||
addTableRow,
|
||||
updateRowWithExif,
|
||||
updateRowWithCleanerSpinner
|
||||
updateRowWithCleanerSpinner,
|
||||
} from "./table";
|
||||
import exiftool, { ExiftoolProcess } from "node-exiftool";
|
||||
import { exiftoolBinPath } from "../common/binaries";
|
||||
|
|
@ -20,7 +20,7 @@ function newExifToolProcess(): exiftool.ExiftoolProcess {
|
|||
|
||||
async function showExifBeforeClean({
|
||||
trNode,
|
||||
filePath
|
||||
filePath,
|
||||
}: {
|
||||
trNode: HTMLTableRowElement;
|
||||
filePath: string;
|
||||
|
|
@ -34,8 +34,8 @@ async function showExifBeforeClean({
|
|||
const ep = newExifToolProcess();
|
||||
const exifData = await getExif({
|
||||
exiftoolProcess: ep,
|
||||
filePath: filePath
|
||||
}).then(val => {
|
||||
filePath: filePath,
|
||||
}).then((val) => {
|
||||
ep.close();
|
||||
return val;
|
||||
});
|
||||
|
|
@ -45,7 +45,7 @@ async function showExifBeforeClean({
|
|||
|
||||
async function showExifAfterClean({
|
||||
trNode,
|
||||
filePath
|
||||
filePath,
|
||||
}: {
|
||||
trNode: HTMLTableRowElement;
|
||||
filePath: string;
|
||||
|
|
@ -59,8 +59,8 @@ async function showExifAfterClean({
|
|||
const ep = newExifToolProcess();
|
||||
const newExifData = await getExif({
|
||||
exiftoolProcess: ep,
|
||||
filePath: filePath
|
||||
}).then(val => {
|
||||
filePath: filePath,
|
||||
}).then((val) => {
|
||||
ep.close();
|
||||
return val;
|
||||
});
|
||||
|
|
@ -79,7 +79,7 @@ async function addFile({ filePath }: { filePath: string }): Promise<any> {
|
|||
})
|
||||
.then(() => {
|
||||
const ep = newExifToolProcess();
|
||||
return removeExif({ ep: ep, filePath: filePath }).then(val => {
|
||||
return removeExif({ ep: ep, filePath: filePath }).then((val) => {
|
||||
ep.close();
|
||||
return val;
|
||||
});
|
||||
|
|
@ -126,7 +126,7 @@ function cleanExifData(exifHash: any): any {
|
|||
// .catch(console.error)
|
||||
async function removeExif({
|
||||
ep,
|
||||
filePath
|
||||
filePath,
|
||||
}: {
|
||||
ep: any;
|
||||
filePath: string;
|
||||
|
|
@ -148,7 +148,7 @@ async function removeExif({
|
|||
// This should also have the perl processes cleaned up after.
|
||||
async function getExif({
|
||||
exiftoolProcess,
|
||||
filePath
|
||||
filePath,
|
||||
}: {
|
||||
exiftoolProcess: ExiftoolProcess;
|
||||
filePath: string;
|
||||
|
|
@ -160,7 +160,7 @@ async function getExif({
|
|||
const args = ["charset filename=UTF8", "-File:all", "-ExifToolVersion"];
|
||||
|
||||
return exiftoolProcess.readMetadata(filePath, args).then(
|
||||
exifData => {
|
||||
(exifData) => {
|
||||
if (exifData.data === null) {
|
||||
return {};
|
||||
}
|
||||
|
|
@ -168,7 +168,7 @@ async function getExif({
|
|||
const hash = exifData.data[0];
|
||||
return cleanExifData(hash);
|
||||
},
|
||||
err => {
|
||||
(err) => {
|
||||
console.error(err);
|
||||
}
|
||||
);
|
||||
|
|
|
|||
|
|
@ -28,11 +28,11 @@ function filePaths({ fileList }: { fileList: FileList }): string[] {
|
|||
}
|
||||
|
||||
export function setupDragAndDrop() {
|
||||
document.addEventListener("drop", event => {
|
||||
document.addEventListener("drop", (event) => {
|
||||
respondToDropEvent(event);
|
||||
});
|
||||
|
||||
document.addEventListener("dragover", event => {
|
||||
document.addEventListener("dragover", (event) => {
|
||||
respondToDragOverEvent(event);
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { addFiles } from "./add_files";
|
|||
import { hideEmptyPane } from "./empty_pane";
|
||||
import {
|
||||
showSelectedFilesPane,
|
||||
eraseSelectedFilesPane
|
||||
eraseSelectedFilesPane,
|
||||
} from "./selected_files";
|
||||
|
||||
export function selectFiles({ filePaths }: { filePaths: string[] }): void {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { selectedFilesList } from "./selected_files";
|
|||
|
||||
export function updateRowWithExif({
|
||||
tdNode,
|
||||
exifData
|
||||
exifData,
|
||||
}: {
|
||||
tdNode: HTMLTableDataCellElement;
|
||||
exifData: any;
|
||||
|
|
@ -47,7 +47,7 @@ function buildExifString({ exifData }: { exifData: any }): string {
|
|||
}
|
||||
|
||||
export function updateRowWithCleanerSpinner({
|
||||
trNode
|
||||
trNode,
|
||||
}: {
|
||||
trNode: HTMLTableRowElement;
|
||||
}): void {
|
||||
|
|
@ -64,7 +64,7 @@ export function updateRowWithCleanerSpinner({
|
|||
}
|
||||
|
||||
export function addTableRow({
|
||||
filePath
|
||||
filePath,
|
||||
}: {
|
||||
filePath: string;
|
||||
}): HTMLTableRowElement {
|
||||
|
|
|
|||
|
|
@ -5704,10 +5704,10 @@ 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:
|
||||
version "1.19.1"
|
||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb"
|
||||
integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==
|
||||
prettier@2.0.5:
|
||||
version "2.0.5"
|
||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.0.5.tgz#d6d56282455243f2f92cc1716692c08aa31522d4"
|
||||
integrity sha512-7PtVymN48hGcO4fGjybyBSIWDsLU4H4XlvOHfq91pz9kkGlonzwTfYkaIEwiRg/dAJF9YlbsduBAgtYLi+8cFg==
|
||||
|
||||
pretty-error@^2.1.1:
|
||||
version "2.1.1"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue