Update JS dependencies (#19281)

- Upgrade all JS dependencies minus vue and vue-loader
- Adapt to breaking change of octicons
- Update eslint rules
- Tested Swagger UI, sortablejs and prod build
This commit is contained in:
2022-04-01 02:15:46 +02:00
committed by GitHub
parent 08d199245a
commit 1eb0da58c3
16 changed files with 188 additions and 193 deletions

View File

@ -280,7 +280,7 @@ rules:
no-unused-expressions: [2]
no-unused-labels: [2]
no-unused-private-class-members: [2]
no-unused-vars: [2, {args: all, argsIgnorePattern: ^_, varsIgnorePattern: ^_, caughtErrorsIgnorePattern: ^_, ignoreRestSiblings: false}]
no-unused-vars: [2, {args: all, argsIgnorePattern: ^_, varsIgnorePattern: ^_, caughtErrorsIgnorePattern: ^_, destructuredArrayIgnorePattern: ^_, ignoreRestSiblings: false}]
no-use-before-define: [2, nofunc]
no-useless-backreference: [0]
no-useless-call: [2]

View File

@ -155,7 +155,7 @@ func TestViewRepoWithSymlinks(t *testing.T) {
return fmt.Sprintf("%s: %s", file, cls)
})
assert.Len(t, items, 5)
assert.Equal(t, "a: svg octicon-file-directory", items[0])
assert.Equal(t, "a: svg octicon-file-directory-fill", items[0])
assert.Equal(t, "link_b: svg octicon-file-submodule", items[1])
assert.Equal(t, "link_d: svg octicon-file-symlink-file", items[2])
assert.Equal(t, "link_hi: svg octicon-file-symlink-file", items[3])

View File

@ -279,7 +279,7 @@ func EntryIcon(entry *git.TreeEntry) string {
}
return "file-symlink-file"
case entry.IsDir():
return "file-directory"
return "file-directory-fill"
case entry.IsSubModule():
return "file-submodule"
}

333
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -8,9 +8,9 @@
},
"dependencies": {
"@claviska/jquery-minicolors": "2.3.6",
"@primer/octicons": "16.3.1",
"@primer/octicons": "17.0.0",
"add-asset-webpack-plugin": "2.0.1",
"css-loader": "6.6.0",
"css-loader": "6.7.1",
"dropzone": "6.0.0-beta.2",
"easymde": "2.16.1",
"esbuild-loader": "2.18.0",
@ -23,12 +23,12 @@
"less-loader": "10.2.0",
"license-checker-webpack-plugin": "0.2.1",
"mermaid": "8.14.0",
"mini-css-extract-plugin": "2.5.3",
"monaco-editor": "0.32.1",
"mini-css-extract-plugin": "2.6.0",
"monaco-editor": "0.33.0",
"monaco-editor-webpack-plugin": "7.0.1",
"pretty-ms": "7.0.1",
"sortablejs": "1.14.0",
"swagger-ui-dist": "4.5.2",
"sortablejs": "1.15.0",
"swagger-ui-dist": "4.10.0",
"tributejs": "5.1.3",
"uint8-to-base64": "0.2.0",
"vue": "2.6.14",
@ -36,27 +36,27 @@
"vue-calendar-heatmap": "0.8.4",
"vue-loader": "15.9.8",
"vue-template-compiler": "2.6.14",
"webpack": "5.69.1",
"webpack": "5.70.0",
"webpack-cli": "4.9.2",
"workbox-routing": "6.5.0",
"workbox-strategies": "6.5.0",
"workbox-routing": "6.5.2",
"workbox-strategies": "6.5.2",
"worker-loader": "3.0.8",
"wrap-ansi": "8.0.1"
},
"devDependencies": {
"eslint": "8.9.0",
"eslint": "8.12.0",
"eslint-plugin-html": "6.2.0",
"eslint-plugin-import": "2.25.4",
"eslint-plugin-unicorn": "41.0.0",
"eslint-plugin-unicorn": "41.0.1",
"eslint-plugin-vue": "8.5.0",
"jest": "27.5.1",
"jest-extended": "2.0.0",
"jest-raw-loader": "1.0.1",
"postcss-less": "6.0.0",
"stylelint": "14.5.3",
"stylelint": "14.6.1",
"stylelint-config-standard": "25.0.0",
"svgo": "2.8.0",
"updates": "13.0.2"
"updates": "13.0.4"
},
"browserslist": [
"defaults",

View File

@ -0,0 +1 @@
<svg viewBox="0 0 16 16" class="svg octicon-feed-forked" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16zM6 6.928a1.75 1.75 0 1 0-1 0V7.5A1.5 1.5 0 0 0 6.5 9h1v1.072a1.75 1.75 0 1 0 1 0V9h1A1.5 1.5 0 0 0 11 7.5v-.572a1.75 1.75 0 1 0-1 0V7.5a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-.572z"/></svg>

After

Width:  |  Height:  |  Size: 350 B

View File

@ -0,0 +1 @@
<svg viewBox="0 0 16 16" class="svg octicon-feed-merged" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16zm.25-11.25a1.75 1.75 0 0 1-1.207 1.664A2 2 0 0 0 9 8h.571a1.75 1.75 0 1 1 0 1H9a2.99 2.99 0 0 1-2-.764v1.336a1.75 1.75 0 1 1-1 0V6.428A1.75 1.75 0 1 1 8.25 4.75z"/></svg>

After

Width:  |  Height:  |  Size: 333 B

View File

@ -0,0 +1 @@
<svg viewBox="0 0 16 16" class="svg octicon-feed-trophy" width="16" height="16" aria-hidden="true"><path d="M11 5h1v1.146a1 1 0 0 1-.629.928L11 7.223V5zM5 7.223l-.371-.149A1 1 0 0 1 4 6.146V5h1v2.223z"/><path fill-rule="evenodd" d="M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16zM3 5a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v1.146a2 2 0 0 1-1.257 1.857l-.865.346a3.005 3.005 0 0 1-2.294 2.094C8.78 11.405 9.342 12 10.5 12a.5.5 0 0 1 0 1h-5a.5.5 0 0 1 0-1h.002c1.156 0 1.718-.596 1.914-1.557A3.005 3.005 0 0 1 5.122 8.35l-.865-.346A2 2 0 0 1 3 6.146V5z"/></svg>

After

Width:  |  Height:  |  Size: 537 B

View File

@ -0,0 +1 @@
<svg viewBox="0 0 16 16" class="svg octicon-file-directory-fill" width="16" height="16" aria-hidden="true"><path d="M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75z"/></svg>

After

Width:  |  Height:  |  Size: 301 B

View File

@ -1 +1 @@
<svg viewBox="0 0 16 16" class="svg octicon-file-directory" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3h-6.5a.25.25 0 0 1-.2-.1l-.9-1.2c-.33-.44-.85-.7-1.4-.7h-3.5z"/></svg>
<svg viewBox="0 0 16 16" class="svg octicon-file-directory" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M1.75 2.5a.25.25 0 0 0-.25.25v10.5c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25v-8.5a.25.25 0 0 0-.25-.25H7.5c-.55 0-1.07-.26-1.4-.7l-.9-1.2a.25.25 0 0 0-.2-.1H1.75zM0 2.75C0 1.784.784 1 1.75 1H5c.55 0 1.07.26 1.4.7l.9 1.2a.25.25 0 0 0 .2.1h6.75c.966 0 1.75.784 1.75 1.75v8.5A1.75 1.75 0 0 1 14.25 15H1.75A1.75 1.75 0 0 1 0 13.25V2.75z"/></svg>

Before

Width:  |  Height:  |  Size: 319 B

After

Width:  |  Height:  |  Size: 476 B

View File

@ -0,0 +1 @@
<svg viewBox="0 0 16 16" class="svg octicon-repo-locked" width="16" height="16" aria-hidden="true"><path d="M1 2.5A2.5 2.5 0 0 1 3.5 0h8.75a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0V1.5h-8a1 1 0 0 0-1 1v6.708A2.492 2.492 0 0 1 3.5 9h2.75a.75.75 0 0 1 0 1.5H3.5a1 1 0 1 0 0 2h2.75a.75.75 0 0 1 0 1.5H3.5A2.5 2.5 0 0 1 1 11.5v-9z"/><path fill-rule="evenodd" d="M9 10.168V9a3 3 0 1 1 6 0v1.168c.591.281 1 .884 1 1.582v2.5A1.75 1.75 0 0 1 14.25 16h-4.5A1.75 1.75 0 0 1 8 14.25v-2.5c0-.698.409-1.3 1-1.582zM13.5 10h-3V9a1.5 1.5 0 0 1 3 0v1z"/></svg>

After

Width:  |  Height:  |  Size: 545 B

View File

@ -0,0 +1 @@
<svg viewBox="0 0 16 16" class="svg octicon-trophy" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M3.217 6.962A3.75 3.75 0 0 1 0 3.25v-.5C0 1.784.784 1 1.75 1h1.356c.228-.585.796-1 1.462-1h6.864a1.57 1.57 0 0 1 1.462 1h1.356c.966 0 1.75.784 1.75 1.75v.5a3.75 3.75 0 0 1-3.217 3.712 5.014 5.014 0 0 1-2.771 3.117l.144 1.446c.005.05.03.12.114.204.086.087.217.17.373.227.283.103.618.274.89.568.285.31.467.723.467 1.226v.75h1.25a.75.75 0 1 1 0 1.5H2.75a.75.75 0 0 1 0-1.5H4v-.75c0-.503.182-.916.468-1.226.27-.294.606-.465.889-.568a1.03 1.03 0 0 0 .373-.227c.084-.085.109-.153.114-.204l.144-1.446a5.014 5.014 0 0 1-2.77-3.117zM3 2.5H1.75a.25.25 0 0 0-.25.25v.5c0 .98.626 1.813 1.5 2.122V2.5zm4.457 7.97-.12 1.204c-.093.925-.858 1.47-1.467 1.691a.764.764 0 0 0-.3.176c-.037.04-.07.093-.07.21v.75h5v-.75c0-.117-.033-.17-.07-.21a.763.763 0 0 0-.3-.176c-.609-.221-1.374-.766-1.466-1.69l-.12-1.204a5.052 5.052 0 0 1-1.087 0zM13 5.373V2.5h1.25a.25.25 0 0 1 .25.25v.5A2.25 2.25 0 0 1 13 5.372zM4.5 1.568c0-.037.03-.068.068-.068h6.864c.037 0 .068.03.068.068V5.5a3.5 3.5 0 1 1-7 0V1.568z"/></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -25,7 +25,7 @@
{{range $dirI, $dir := .Dirs}}
<div class="item">
<div class="content">
<span class="icon">{{svg "octicon-file-directory"}}</span>
<span class="icon">{{svg "octicon-file-directory-fill"}}</span>
<span class="name">{{$dir}}</span>
<div class="right floated content">
<button class="ui button submit tiny green adopt show-modal" data-modal="#adopt-unadopted-modal-{{$dirI}}"><span class="icon">{{svg "octicon-plus"}}</span><span class="label">{{$.i18n.Tr "repo.adopt_preexisting_label"}}</span></button>

View File

@ -62,7 +62,7 @@
{{if $entry.IsDir}}
{{$subJumpablePathName := $entry.GetSubJumpablePathName}}
{{$subJumpablePath := SubJumpablePath $subJumpablePathName}}
{{svg "octicon-file-directory"}}
{{svg "octicon-file-directory-fill"}}
<a href="{{$.TreeLink}}/{{PathEscapeSegments $subJumpablePathName}}" title="{{$subJumpablePathName}}">
{{if eq (len $subJumpablePath) 2}}
<span class="jumpable-path">{{index $subJumpablePath 0}}</span>{{index $subJumpablePath 1}}

View File

@ -33,7 +33,7 @@
<span><a href="{{$repo.BaseRepo.Link}}">{{$repo.BaseRepo.OwnerName}}/{{$repo.BaseRepo.Name}}</a></span>
{{end}}
{{else}}
<span class="icon">{{svg "octicon-file-directory"}}</span>
<span class="icon">{{svg "octicon-file-directory-fill"}}</span>
<span class="name">{{$.Owner.Name}}/{{$dir}}</span>
<div class="right floated content">
{{if $.allowAdopt}}

View File

@ -334,7 +334,7 @@
margin-right: 10px;
}
&.octicon-file-directory,
&.octicon-file-directory-fill,
&.octicon-file-submodule {
color: var(--color-primary);
}