Skip to content

Commit 1e0921c

Browse files
authored
Merge pull request #408 from rtfpessoa/bump-dependencies
bump: Update all dependencies
2 parents dbb27ed + 72b0610 commit 1e0921c

File tree

5 files changed

+1156
-1121
lines changed

5 files changed

+1156
-1121
lines changed

package.json

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -85,60 +85,60 @@
8585
"hogan.js": "3.0.2"
8686
},
8787
"optionalDependencies": {
88-
"highlight.js": "11.1.0"
88+
"highlight.js": "11.2.0"
8989
},
9090
"devDependencies": {
9191
"@types/copy-webpack-plugin": "8.0.1",
9292
"@types/diff": "5.0.1",
9393
"@types/hogan.js": "3.0.1",
94-
"@types/jest": "26.0.24",
95-
"@types/mini-css-extract-plugin": "^2.0.1",
94+
"@types/jest": "27.0.2",
95+
"@types/mini-css-extract-plugin": "^2.3.0",
9696
"@types/mkdirp": "1.0.2",
97-
"@types/node": "16.4.1",
97+
"@types/node": "16.11.0",
9898
"@types/nopt": "3.0.29",
99-
"@typescript-eslint/eslint-plugin": "4.28.4",
100-
"@typescript-eslint/parser": "4.28.4",
101-
"autoprefixer": "10.3.1",
99+
"@typescript-eslint/eslint-plugin": "5.0.0",
100+
"@typescript-eslint/parser": "5.0.0",
101+
"autoprefixer": "10.3.7",
102102
"bulma": "^0.9.2",
103103
"clipboard": "2.0.8",
104104
"copy-webpack-plugin": "9.0.1",
105-
"css-loader": "6.2.0",
106-
"cssnano": "5.0.7",
107-
"eslint": "7.31.0",
105+
"css-loader": "6.4.0",
106+
"cssnano": "5.0.8",
107+
"eslint": "8.0.1",
108108
"eslint-config-prettier": "8.3.0",
109-
"eslint-plugin-import": "2.23.4",
110-
"eslint-plugin-jest": "24.4.0",
111-
"eslint-plugin-json": "3.0.0",
109+
"eslint-plugin-import": "2.25.2",
110+
"eslint-plugin-jest": "25.2.1",
111+
"eslint-plugin-json": "3.1.0",
112112
"eslint-plugin-node": "11.1.0",
113-
"eslint-plugin-optimize-regex": "1.2.0",
113+
"eslint-plugin-optimize-regex": "1.2.1",
114114
"eslint-plugin-promise": "5.1.0",
115-
"eslint-plugin-sonarjs": "0.9.1",
115+
"eslint-plugin-sonarjs": "0.10.0",
116116
"file-loader": "6.2.0",
117117
"handlebars": "4.7.7",
118118
"handlebars-loader": "1.7.1",
119-
"html-webpack-plugin": "5.3.2",
120-
"husky": "^7.0.1",
121-
"image-webpack-loader": "7.0.1",
119+
"html-webpack-plugin": "5.4.0",
120+
"husky": "^7.0.2",
121+
"image-webpack-loader": "8.0.1",
122122
"is-ci-cli": "2.2.0",
123-
"jest": "27.0.6",
124-
"lint-staged": "11.1.0",
123+
"jest": "27.2.5",
124+
"lint-staged": "11.2.3",
125125
"markdown-toc": "^1.2.0",
126-
"mini-css-extract-plugin": "2.1.0",
126+
"mini-css-extract-plugin": "2.4.2",
127127
"mkdirp": "1.0.4",
128128
"nopt": "5.0.0",
129-
"postcss": "8.3.6",
130-
"postcss-cli": "8.3.1",
129+
"postcss": "8.3.9",
130+
"postcss-cli": "9.0.1",
131131
"postcss-import": "14.0.2",
132-
"postcss-loader": "6.1.1",
132+
"postcss-loader": "6.2.0",
133133
"postcss-preset-env": "6.7.0",
134-
"prettier": "2.3.2",
135-
"ts-jest": "27.0.4",
136-
"ts-loader": "9.2.3",
137-
"ts-node": "10.1.0",
138-
"typescript": "4.3.5",
134+
"prettier": "2.4.1",
135+
"ts-jest": "27.0.6",
136+
"ts-loader": "9.2.6",
137+
"ts-node": "10.3.0",
138+
"typescript": "4.4.4",
139139
"url-loader": "4.1.1",
140-
"webpack": "5.46.0",
141-
"webpack-cli": "4.7.2",
140+
"webpack": "5.58.2",
141+
"webpack-cli": "4.9.0",
142142
"whatwg-fetch": "3.6.2"
143143
},
144144
"resolutions": {

src/__tests__/printer-utils-tests.ts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,31 @@ describe('Utils', () => {
55
describe('escapeForHtml', () => {
66
it('should escape & with &', () => {
77
const result = escapeForHtml('&');
8-
expect(result).toEqual('&');
8+
expect(result).toBe('&');
99
});
1010
it('should escape < with &lt;', () => {
1111
const result = escapeForHtml('<');
12-
expect(result).toEqual('&lt;');
12+
expect(result).toBe('&lt;');
1313
});
1414
it('should escape > with &gt;', () => {
1515
const result = escapeForHtml('>');
16-
expect(result).toEqual('&gt;');
16+
expect(result).toBe('&gt;');
1717
});
1818
it('should escape " with &quot;', () => {
1919
const result = escapeForHtml('"');
20-
expect(result).toEqual('&quot;');
20+
expect(result).toBe('&quot;');
2121
});
2222
it("should escape ' with &#x27;", () => {
2323
const result = escapeForHtml("'");
24-
expect(result).toEqual('&#x27;');
24+
expect(result).toBe('&#x27;');
2525
});
2626
it('should escape / with &#x2F;', () => {
2727
const result = escapeForHtml('/');
28-
expect(result).toEqual('&#x2F;');
28+
expect(result).toBe('&#x2F;');
2929
});
3030
it('should escape a string containing HTML code', () => {
3131
const result = escapeForHtml(`<a href="/search?q=diff2html">Search 'Diff2Html'</a>`);
32-
expect(result).toEqual(
32+
expect(result).toBe(
3333
'&lt;a href=&quot;&#x2F;search?q=diff2html&quot;&gt;Search &#x27;Diff2Html&#x27;&lt;&#x2F;a&gt;',
3434
);
3535
});
@@ -41,7 +41,7 @@ describe('Utils', () => {
4141
oldName: 'sample.js',
4242
newName: 'sample.js',
4343
});
44-
expect(result).toEqual('d2h-960013');
44+
expect(result).toBe('d2h-960013');
4545
});
4646
});
4747

@@ -51,49 +51,49 @@ describe('Utils', () => {
5151
oldName: 'sample.js',
5252
newName: 'sample.js',
5353
});
54-
expect(result).toEqual('sample.js');
54+
expect(result).toBe('sample.js');
5555
});
5656
it('should generate the file name for a changed file and full rename', () => {
5757
const result = filenameDiff({
5858
oldName: 'sample1.js',
5959
newName: 'sample2.js',
6060
});
61-
expect(result).toEqual('sample1.js → sample2.js');
61+
expect(result).toBe('sample1.js → sample2.js');
6262
});
6363
it('should generate the file name for a changed file and prefix rename', () => {
6464
const result = filenameDiff({
6565
oldName: 'src/path/sample.js',
6666
newName: 'source/path/sample.js',
6767
});
68-
expect(result).toEqual('{src → source}/path/sample.js');
68+
expect(result).toBe('{src → source}/path/sample.js');
6969
});
7070
it('should generate the file name for a changed file and suffix rename', () => {
7171
const result = filenameDiff({
7272
oldName: 'src/path/sample1.js',
7373
newName: 'src/path/sample2.js',
7474
});
75-
expect(result).toEqual('src/path/{sample1.js → sample2.js}');
75+
expect(result).toBe('src/path/{sample1.js → sample2.js}');
7676
});
7777
it('should generate the file name for a changed file and middle rename', () => {
7878
const result = filenameDiff({
7979
oldName: 'src/really/big/path/sample.js',
8080
newName: 'src/small/path/sample.js',
8181
});
82-
expect(result).toEqual('src/{really/big → small}/path/sample.js');
82+
expect(result).toBe('src/{really/big → small}/path/sample.js');
8383
});
8484
it('should generate the file name for a deleted file', () => {
8585
const result = filenameDiff({
8686
oldName: 'src/my/file.js',
8787
newName: '/dev/null',
8888
});
89-
expect(result).toEqual('src/my/file.js');
89+
expect(result).toBe('src/my/file.js');
9090
});
9191
it('should generate the file name for a new file', () => {
9292
const result = filenameDiff({
9393
oldName: '/dev/null',
9494
newName: 'src/my/file.js',
9595
});
96-
expect(result).toEqual('src/my/file.js');
96+
expect(result).toBe('src/my/file.js');
9797
});
9898
});
9999

src/__tests__/utils-tests.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@ describe('Utils', () => {
44
describe('escapeForRegExp', () => {
55
it('should escape markdown link text', () => {
66
const result = escapeForRegExp('[Link](https://diff2html.xyz)');
7-
expect(result).toEqual('\\[Link\\]\\(https:\\/\\/diff2html\\.xyz\\)');
7+
expect(result).toBe('\\[Link\\]\\(https:\\/\\/diff2html\\.xyz\\)');
88
});
99
it('should escape all dangerous characters', () => {
1010
const result = escapeForRegExp('-[]/{}()*+?.\\^$|');
11-
expect(result).toEqual('\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|');
11+
expect(result).toBe('\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|');
1212
});
1313
});
1414

1515
describe('unifyPath', () => {
1616
it('should unify windows style path', () => {
1717
const result = unifyPath('\\Users\\Downloads\\diff.html');
18-
expect(result).toEqual('/Users/Downloads/diff.html');
18+
expect(result).toBe('/Users/Downloads/diff.html');
1919
});
2020
});
2121

webpack.website.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ type Plugin = ((this: webpack.Compiler, compiler: webpack.Compiler) => void) | w
1111

1212
function plugins(page: string): Plugin[] {
1313
return [
14+
//eslint-disable-next-line @typescript-eslint/ban-ts-comment
15+
//@ts-ignore
1416
new MiniCssExtractPlugin({
1517
filename: '[name].css',
1618
chunkFilename: '[id].css',
@@ -37,6 +39,8 @@ function plugins(page: string): Plugin[] {
3739
minifyURLs: true,
3840
},
3941
}),
42+
//eslint-disable-next-line @typescript-eslint/ban-ts-comment
43+
//@ts-ignore
4044
new CopyWebpackPlugin({
4145
patterns: [
4246
{ from: 'website/favicon.ico', to: 'favicon.ico' },

0 commit comments

Comments
 (0)