Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 1794076

Browse files
bump dependencies
1 parent 534da5a commit 1794076

File tree

10 files changed

+2129
-3009
lines changed

10 files changed

+2129
-3009
lines changed

‎.eslintrc.js‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ module.exports = {
3030
'plugin:jest/recommended',
3131
'plugin:jest/style',
3232
'prettier',
33-
'prettier/@typescript-eslint',
34-
'prettier/babel',
3533
],
3634
plugins: ['@typescript-eslint', 'json', 'promise', 'import', 'node', 'sonarjs', 'jest', 'optimize-regex'],
3735
rules: {

‎.husky/.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_

‎.husky/pre-commit‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "0ドル")/_/husky.sh"
3+
4+
npx lint-staged

‎.prettierrc.json‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"bracketSpacing": true,
44
"htmlWhitespaceSensitivity": "css",
55
"insertPragma": false,
6-
"jsxBracketSameLine": false,
76
"jsxSingleQuote": false,
87
"printWidth": 120,
98
"proseWrap": "always",

‎package.json‎

Lines changed: 28 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -59,18 +59,14 @@
5959
"validate": "yarn run format:check && yarn run lint:check && yarn run build && yarn run test:coverage",
6060
"fix": "yarn run format:fix && yarn run lint:fix",
6161
"preversion": "yarn run validate",
62-
"version": "git add -A package.json"
62+
"version": "git add -A package.json",
63+
"prepare": "husky install"
6364
},
6465
"bin": {
6566
"diff2html": "./bin/diff2html"
6667
},
6768
"main": "./lib/diff2html.js",
6869
"types": "./lib/diff2html.d.ts",
69-
"husky": {
70-
"hooks": {
71-
"pre-commit": "lint-staged"
72-
}
73-
},
7470
"lint-staged": {
7571
"**/*.+(js|jsx|ts|tsx|json)": [
7672
"prettier --write",
@@ -85,36 +81,36 @@
8581
},
8682
"dependencies": {
8783
"clipboardy": "^2.3.0",
88-
"diff2html": "^3.4.14",
89-
"node-fetch": "^2.6.0",
90-
"open": "^7.0.3",
91-
"yargs": "^16.1.0"
84+
"diff2html": "^3.4.19",
85+
"node-fetch": "^2.6.7",
86+
"open": "^8.4.0",
87+
"yargs": "^17.6.0"
9288
},
9389
"devDependencies": {
94-
"@types/hogan.js": "^3.0.0",
95-
"@types/jest": "26.0.14",
96-
"@types/node": "14.11.10",
97-
"@types/node-fetch": "^2.5.6",
98-
"@types/request": "2.48.5",
99-
"@typescript-eslint/eslint-plugin": "4.4.1",
100-
"@typescript-eslint/parser": "4.4.1",
101-
"eslint": "7.11.0",
102-
"eslint-config-prettier": "6.13.0",
103-
"eslint-plugin-import": "2.22.1",
104-
"eslint-plugin-jest": "24.1.0",
105-
"eslint-plugin-json": "2.1.2",
90+
"@types/hogan.js": "^3.0.1",
91+
"@types/jest": "29.1.2",
92+
"@types/node": "18.11.0",
93+
"@types/node-fetch": "^2.6.2",
94+
"@types/request": "2.48.8",
95+
"@typescript-eslint/eslint-plugin": "5.40.0",
96+
"@typescript-eslint/parser": "5.40.0",
97+
"eslint": "8.25.0",
98+
"eslint-config-prettier": "8.5.0",
99+
"eslint-plugin-import": "2.26.0",
100+
"eslint-plugin-jest": "27.1.2",
101+
"eslint-plugin-json": "3.1.0",
106102
"eslint-plugin-node": "11.1.0",
107-
"eslint-plugin-optimize-regex": "1.2.0",
108-
"eslint-plugin-promise": "4.2.1",
109-
"eslint-plugin-sonarjs": "0.5.0",
110-
"husky": "4.3.0",
111-
"is-ci-cli": "2.1.2",
112-
"jest": "26.5.3",
113-
"lint-staged": "10.4.1",
103+
"eslint-plugin-optimize-regex": "1.2.1",
104+
"eslint-plugin-promise": "6.1.0",
105+
"eslint-plugin-sonarjs": "0.16.0",
106+
"husky": "8.0.1",
107+
"is-ci-cli": "2.2.0",
108+
"jest": "29.2.0",
109+
"lint-staged": "13.0.3",
114110
"markdown-toc": "^1.2.0",
115-
"prettier": "2.1.2",
116-
"ts-jest": "26.4.1",
117-
"typescript": "4.0.3"
111+
"prettier": "2.7.1",
112+
"ts-jest": "29.0.3",
113+
"typescript": "4.8.4"
118114
},
119115
"license": "MIT",
120116
"files": [

‎src/cli.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import fs from 'fs';
22
import os from 'os';
33
import path from 'path';
44

5-
import *asclipboardy from 'clipboardy';
5+
import clipboardy from 'clipboardy';
66
import open = require('open');
77
import { parse, html, Diff2HtmlConfig } from 'diff2html';
88

‎src/main.ts‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import * as yargs from './yargs';
66

77
export async function main(): Promise<void> {
88
try {
9-
const argv = yargs.setup();
9+
const argv = awaityargs.setup();
1010
const [diff2htmlOptions, configuration] = parseArgv(argv);
1111

1212
const input = await cli.getInput(configuration.inputSource, argv.extraArguments, configuration.ignore);
@@ -40,6 +40,8 @@ export async function main(): Promise<void> {
4040
if (process.exitCode === undefined || process.exitCode === 0) {
4141
process.exitCode = 1;
4242
}
43-
log.error(error);
43+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
44+
const anyError = error as any;
45+
log.error(anyError);
4446
}
4547
}

‎src/yargs.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,10 @@ const choices: ArgvChoices = {
8383
diffy: ['browser', 'pbcopy', 'print'],
8484
};
8585

86-
export function setup(): Argv {
86+
export asyncfunction setup(): Promise<Argv> {
8787
const currentYear = new Date().getFullYear();
8888

89-
const argv = yargs
89+
const argv = awaityargs
9090
.usage('Usage: diff2html [options] -- [diff args]')
9191
.option('style', {
9292
alias: 's',
@@ -254,7 +254,7 @@ export function setup(): Argv {
254254
return {
255255
...argv,
256256
ignore: argv.ignore || [],
257-
extraArguments: argv._,
257+
extraArguments: argv._.map(e=>e.toString()),
258258
};
259259
}
260260

‎tsconfig.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
"noImplicitReturns": true,
2222
"noFallthroughCasesInSwitch": true,
2323
"forceConsistentCasingInFileNames": true,
24-
"esModuleInterop": true
24+
"esModuleInterop": true,
25+
"skipLibCheck": true
2526
},
2627
"include": ["./src/*"],
2728
"exclude": ["node_modules", "./src/__tests__/*"]

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /