bump: Update all dependencies

This commit is contained in:
Rodrigo Fernandes 2021-10-15 21:15:39 +01:00
parent dbb27ed3b0
commit 72b0610d2c
No known key found for this signature in database
GPG key ID: 8F7402FE36207E5C
5 changed files with 1159 additions and 1124 deletions

View file

@ -85,60 +85,60 @@
"hogan.js": "3.0.2"
},
"optionalDependencies": {
"highlight.js": "11.1.0"
"highlight.js": "11.2.0"
},
"devDependencies": {
"@types/copy-webpack-plugin": "8.0.1",
"@types/diff": "5.0.1",
"@types/hogan.js": "3.0.1",
"@types/jest": "26.0.24",
"@types/mini-css-extract-plugin": "^2.0.1",
"@types/jest": "27.0.2",
"@types/mini-css-extract-plugin": "^2.3.0",
"@types/mkdirp": "1.0.2",
"@types/node": "16.4.1",
"@types/node": "16.11.0",
"@types/nopt": "3.0.29",
"@typescript-eslint/eslint-plugin": "4.28.4",
"@typescript-eslint/parser": "4.28.4",
"autoprefixer": "10.3.1",
"@typescript-eslint/eslint-plugin": "5.0.0",
"@typescript-eslint/parser": "5.0.0",
"autoprefixer": "10.3.7",
"bulma": "^0.9.2",
"clipboard": "2.0.8",
"copy-webpack-plugin": "9.0.1",
"css-loader": "6.2.0",
"cssnano": "5.0.7",
"eslint": "7.31.0",
"css-loader": "6.4.0",
"cssnano": "5.0.8",
"eslint": "8.0.1",
"eslint-config-prettier": "8.3.0",
"eslint-plugin-import": "2.23.4",
"eslint-plugin-jest": "24.4.0",
"eslint-plugin-json": "3.0.0",
"eslint-plugin-import": "2.25.2",
"eslint-plugin-jest": "25.2.1",
"eslint-plugin-json": "3.1.0",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-optimize-regex": "1.2.0",
"eslint-plugin-optimize-regex": "1.2.1",
"eslint-plugin-promise": "5.1.0",
"eslint-plugin-sonarjs": "0.9.1",
"eslint-plugin-sonarjs": "0.10.0",
"file-loader": "6.2.0",
"handlebars": "4.7.7",
"handlebars-loader": "1.7.1",
"html-webpack-plugin": "5.3.2",
"husky": "^7.0.1",
"image-webpack-loader": "7.0.1",
"html-webpack-plugin": "5.4.0",
"husky": "^7.0.2",
"image-webpack-loader": "8.0.1",
"is-ci-cli": "2.2.0",
"jest": "27.0.6",
"lint-staged": "11.1.0",
"jest": "27.2.5",
"lint-staged": "11.2.3",
"markdown-toc": "^1.2.0",
"mini-css-extract-plugin": "2.1.0",
"mini-css-extract-plugin": "2.4.2",
"mkdirp": "1.0.4",
"nopt": "5.0.0",
"postcss": "8.3.6",
"postcss-cli": "8.3.1",
"postcss": "8.3.9",
"postcss-cli": "9.0.1",
"postcss-import": "14.0.2",
"postcss-loader": "6.1.1",
"postcss-loader": "6.2.0",
"postcss-preset-env": "6.7.0",
"prettier": "2.3.2",
"ts-jest": "27.0.4",
"ts-loader": "9.2.3",
"ts-node": "10.1.0",
"typescript": "4.3.5",
"prettier": "2.4.1",
"ts-jest": "27.0.6",
"ts-loader": "9.2.6",
"ts-node": "10.3.0",
"typescript": "4.4.4",
"url-loader": "4.1.1",
"webpack": "5.46.0",
"webpack-cli": "4.7.2",
"webpack": "5.58.2",
"webpack-cli": "4.9.0",
"whatwg-fetch": "3.6.2"
},
"resolutions": {

View file

@ -5,31 +5,31 @@ describe('Utils', () => {
describe('escapeForHtml', () => {
it('should escape & with &', () => {
const result = escapeForHtml('&');
expect(result).toEqual('&');
expect(result).toBe('&');
});
it('should escape < with &lt;', () => {
const result = escapeForHtml('<');
expect(result).toEqual('&lt;');
expect(result).toBe('&lt;');
});
it('should escape > with &gt;', () => {
const result = escapeForHtml('>');
expect(result).toEqual('&gt;');
expect(result).toBe('&gt;');
});
it('should escape " with &quot;', () => {
const result = escapeForHtml('"');
expect(result).toEqual('&quot;');
expect(result).toBe('&quot;');
});
it("should escape ' with &#x27;", () => {
const result = escapeForHtml("'");
expect(result).toEqual('&#x27;');
expect(result).toBe('&#x27;');
});
it('should escape / with &#x2F;', () => {
const result = escapeForHtml('/');
expect(result).toEqual('&#x2F;');
expect(result).toBe('&#x2F;');
});
it('should escape a string containing HTML code', () => {
const result = escapeForHtml(`<a href="/search?q=diff2html">Search 'Diff2Html'</a>`);
expect(result).toEqual(
expect(result).toBe(
'&lt;a href=&quot;&#x2F;search?q=diff2html&quot;&gt;Search &#x27;Diff2Html&#x27;&lt;&#x2F;a&gt;',
);
});
@ -41,7 +41,7 @@ describe('Utils', () => {
oldName: 'sample.js',
newName: 'sample.js',
});
expect(result).toEqual('d2h-960013');
expect(result).toBe('d2h-960013');
});
});
@ -51,49 +51,49 @@ describe('Utils', () => {
oldName: 'sample.js',
newName: 'sample.js',
});
expect(result).toEqual('sample.js');
expect(result).toBe('sample.js');
});
it('should generate the file name for a changed file and full rename', () => {
const result = filenameDiff({
oldName: 'sample1.js',
newName: 'sample2.js',
});
expect(result).toEqual('sample1.js → sample2.js');
expect(result).toBe('sample1.js → sample2.js');
});
it('should generate the file name for a changed file and prefix rename', () => {
const result = filenameDiff({
oldName: 'src/path/sample.js',
newName: 'source/path/sample.js',
});
expect(result).toEqual('{src → source}/path/sample.js');
expect(result).toBe('{src → source}/path/sample.js');
});
it('should generate the file name for a changed file and suffix rename', () => {
const result = filenameDiff({
oldName: 'src/path/sample1.js',
newName: 'src/path/sample2.js',
});
expect(result).toEqual('src/path/{sample1.js → sample2.js}');
expect(result).toBe('src/path/{sample1.js → sample2.js}');
});
it('should generate the file name for a changed file and middle rename', () => {
const result = filenameDiff({
oldName: 'src/really/big/path/sample.js',
newName: 'src/small/path/sample.js',
});
expect(result).toEqual('src/{really/big → small}/path/sample.js');
expect(result).toBe('src/{really/big → small}/path/sample.js');
});
it('should generate the file name for a deleted file', () => {
const result = filenameDiff({
oldName: 'src/my/file.js',
newName: '/dev/null',
});
expect(result).toEqual('src/my/file.js');
expect(result).toBe('src/my/file.js');
});
it('should generate the file name for a new file', () => {
const result = filenameDiff({
oldName: '/dev/null',
newName: 'src/my/file.js',
});
expect(result).toEqual('src/my/file.js');
expect(result).toBe('src/my/file.js');
});
});

View file

@ -4,18 +4,18 @@ describe('Utils', () => {
describe('escapeForRegExp', () => {
it('should escape markdown link text', () => {
const result = escapeForRegExp('[Link](https://diff2html.xyz)');
expect(result).toEqual('\\[Link\\]\\(https:\\/\\/diff2html\\.xyz\\)');
expect(result).toBe('\\[Link\\]\\(https:\\/\\/diff2html\\.xyz\\)');
});
it('should escape all dangerous characters', () => {
const result = escapeForRegExp('-[]/{}()*+?.\\^$|');
expect(result).toEqual('\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|');
expect(result).toBe('\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|');
});
});
describe('unifyPath', () => {
it('should unify windows style path', () => {
const result = unifyPath('\\Users\\Downloads\\diff.html');
expect(result).toEqual('/Users/Downloads/diff.html');
expect(result).toBe('/Users/Downloads/diff.html');
});
});

View file

@ -11,6 +11,8 @@ type Plugin = ((this: webpack.Compiler, compiler: webpack.Compiler) => void) | w
function plugins(page: string): Plugin[] {
return [
//eslint-disable-next-line @typescript-eslint/ban-ts-comment
//@ts-ignore
new MiniCssExtractPlugin({
filename: '[name].css',
chunkFilename: '[id].css',
@ -37,6 +39,8 @@ function plugins(page: string): Plugin[] {
minifyURLs: true,
},
}),
//eslint-disable-next-line @typescript-eslint/ban-ts-comment
//@ts-ignore
new CopyWebpackPlugin({
patterns: [
{ from: 'website/favicon.ico', to: 'favicon.ico' },

2181
yarn.lock

File diff suppressed because it is too large Load diff