Skip to content

Commit 8e89eb8

Browse files
silverwindGiteaBot
andauthored
Update JS dependencies, remove space after emoji completion (#25266) (#25352)
Manual backport of #25266 because of lockfile conflicts. - Update all JS dependencies - Enable stylint [`media-feature-name-value-no-unknown`](https://stylelint.io/user-guide/rules/media-feature-name-value-no-unknown) - Make use of new features in webpack and text-expander-element - Tested Swagger and Mermaid To explain the `text-expander-element` change: Before this version, the element added a unavoidable space after emoji completion. Now that github/text-expander-element#36 is in, we gain control over this space and I opted to remove it for emoji completion and retain it for `@` mentions. Co-authored-by: Giteabot <[email protected]>
1 parent dfefe86 commit 8e89eb8

12 files changed

+220
-196
lines changed

.stylelintrc.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ rules:
8080
media-feature-name-no-vendor-prefix: true
8181
media-feature-name-unit-allowed-list: null
8282
media-feature-name-value-allowed-list: null
83+
media-feature-name-value-no-unknown: true
8384
media-feature-range-notation: null
8485
named-grid-areas-no-invalid: true
8586
no-descending-specificity: null

package-lock.json

Lines changed: 196 additions & 181 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
"@claviska/jquery-minicolors": "2.3.6",
1515
"@github/markdown-toolbar-element": "2.1.1",
1616
"@github/relative-time-element": "4.3.0",
17-
"@github/text-expander-element": "2.3.0",
17+
"@github/text-expander-element": "2.5.0",
1818
"@mcaptcha/vanilla-glue": "0.1.0-alpha-3",
19-
"@primer/octicons": "19.1.0",
19+
"@primer/octicons": "19.3.0",
2020
"@webcomponents/custom-elements": "1.6.0",
2121
"add-asset-webpack-plugin": "2.0.1",
2222
"ansi-to-html": "0.7.2",
@@ -32,15 +32,15 @@
3232
"jquery.are-you-sure": "1.9.0",
3333
"katex": "0.16.7",
3434
"license-checker-webpack-plugin": "0.2.1",
35-
"mermaid": "10.2.2",
35+
"mermaid": "10.2.3",
3636
"mini-css-extract-plugin": "2.7.6",
3737
"minimatch": "9.0.1",
3838
"monaco-editor": "0.39.0",
3939
"monaco-editor-webpack-plugin": "7.0.1",
4040
"pdfobject": "2.2.12",
4141
"pretty-ms": "8.0.0",
4242
"sortablejs": "1.15.0",
43-
"swagger-ui-dist": "4.19.0",
43+
"swagger-ui-dist": "5.0.0",
4444
"throttle-debounce": "5.0.0",
4545
"tippy.js": "6.3.7",
4646
"tributejs": "5.1.3",
@@ -49,17 +49,17 @@
4949
"vue-bar-graph": "2.0.0",
5050
"vue-loader": "17.2.2",
5151
"vue3-calendar-heatmap": "2.0.5",
52-
"webpack": "5.86.0",
52+
"webpack": "5.87.0",
5353
"webpack-cli": "5.1.4",
5454
"wrap-ansi": "8.1.0"
5555
},
5656
"devDependencies": {
5757
"@eslint-community/eslint-plugin-eslint-comments": "3.2.1",
58-
"@playwright/test": "1.34.3",
58+
"@playwright/test": "1.35.1",
5959
"@rollup/pluginutils": "5.0.2",
6060
"@stoplight/spectral-cli": "6.8.0",
6161
"@vitejs/plugin-vue": "4.2.3",
62-
"eslint": "8.42.0",
62+
"eslint": "8.43.0",
6363
"eslint-plugin-array-func": "3.1.8",
6464
"eslint-plugin-custom-elements": "0.0.8",
6565
"eslint-plugin-import": "2.27.5",
@@ -72,13 +72,14 @@
7272
"eslint-plugin-vue": "9.14.1",
7373
"eslint-plugin-wc": "1.5.0",
7474
"jsdom": "22.1.0",
75-
"markdownlint-cli": "0.34.0",
75+
"markdownlint-cli": "0.35.0",
7676
"postcss-html": "1.5.0",
77-
"stylelint": "15.7.0",
77+
"stylelint": "15.8.0",
78+
"stylelint-declaration-block-no-ignored-properties": "2.7.0",
7879
"stylelint-declaration-strict-value": "1.9.2",
7980
"svgo": "3.0.2",
80-
"updates": "14.1.1",
81-
"vitest": "0.32.0"
81+
"updates": "14.2.4",
82+
"vitest": "0.32.2"
8283
},
8384
"browserslist": [
8485
"defaults",

public/img/svg/octicon-copilot.svg

Lines changed: 1 addition & 1 deletion
Loading

public/img/svg/octicon-pivot-column.svg

Lines changed: 1 addition & 0 deletions
Loading

public/img/svg/octicon-redo.svg

Lines changed: 1 addition & 0 deletions
Loading

public/img/svg/octicon-tracked-by-closed-completed.svg

Lines changed: 1 addition & 0 deletions
Loading

public/img/svg/octicon-tracked-by-closed-not-planned.svg

Lines changed: 1 addition & 0 deletions
Loading

public/img/svg/octicon-undo.svg

Lines changed: 1 addition & 0 deletions
Loading

templates/shared/combomarkdowneditor.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Template Attributes:
4444
<button class="markdown-toolbar-button markdown-switch-easymde" data-tooltip-content="{{.locale.Tr "editor.buttons.switch_to_legacy.tooltip"}}">{{svg "octicon-arrow-switch"}}</button>
4545
</div>
4646
</markdown-toolbar>
47-
<text-expander keys=": @">
47+
<text-expander keys=": @" suffix="">
4848
<textarea class="markdown-text-editor js-quick-submit"{{if .TextareaName}} name="{{.TextareaName}}"{{end}}{{if .TextareaPlaceholder}} placeholder="{{.TextareaPlaceholder}}"{{end}}{{if .TextareaAriaLabel}} aria-label="{{.TextareaAriaLabel}}"{{end}}>{{.TextareaContent}}</textarea>
4949
</text-expander>
5050
<script>

web_src/js/features/comp/TextExpander.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ export function initTextExpander(expander) {
5353
});
5454
expander?.addEventListener('text-expander-value', ({detail}) => {
5555
if (detail?.item) {
56-
detail.value = detail.item.getAttribute('data-value');
56+
// add a space after @mentions as it's likely the user wants one
57+
const suffix = detail.key === '@' ? ' ' : '';
58+
detail.value = `${detail.item.getAttribute('data-value')}${suffix}`;
5759
}
5860
});
5961
}

webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ export default {
199199
emitError: true,
200200
allow: '(Apache-2.0 OR BSD-2-Clause OR BSD-3-Clause OR MIT OR ISC OR CPAL-1.0 OR Unlicense OR EPL-1.0 OR EPL-2.0)',
201201
}) : new AddAssetPlugin('js/licenses.txt', `Licenses are disabled during development`),
202-
].filter(Boolean),
202+
],
203203
performance: {
204204
hints: false,
205205
maxEntrypointSize: Infinity,

0 commit comments

Comments
 (0)