From cf11a65c92a8d0f5fde4e88dde88f3ec991746a5 Mon Sep 17 00:00:00 2001 From: Bhsd <55071315+bhsd-harry@users.noreply.github.com> Date: Wed, 17 Jan 2024 14:36:24 +0800 Subject: [PATCH 1/3] Update Gadget:wikieditor-highlight with CodeMirror 6 (#392) * Update MediaWiki:Gadget-wikieditor-highlight.js using CodeMirror 6 * fix(MediaWiki:Gadget-wikieditor-highlight.js): dynamic import * feat(Gadget-wikieditor-highlight): Update definition.yaml * Delete MediaWiki:Gadget-wikieditor-highlight.css * feat(wikieditor-highlight): default addons * fix(libCachedCode): ES module * refactor(Gadget-wikieditor-highlight.js): localStorage fallback * Update MediaWiki:Gadget-wikieditor-highlight.js * fix(wikieditor-highlight): avoid reusing global CodeMirror * delete temporary gadget --- ...diaWiki:Gadget-wikieditor-highlight-cm6.js | 71 -------- .../wikieditor-highlight-cm6/definition.yaml | 36 ---- .../MediaWiki:Gadget-wikieditor-highlight.css | 21 --- .../MediaWiki:Gadget-wikieditor-highlight.js | 158 ++++-------------- .../wikieditor-highlight/definition.yaml | 1 - 5 files changed, 35 insertions(+), 252 deletions(-) delete mode 100644 src/gadgets/wikieditor-highlight-cm6/MediaWiki:Gadget-wikieditor-highlight-cm6.js delete mode 100644 src/gadgets/wikieditor-highlight-cm6/definition.yaml delete mode 100644 src/gadgets/wikieditor-highlight/MediaWiki:Gadget-wikieditor-highlight.css diff --git a/src/gadgets/wikieditor-highlight-cm6/MediaWiki:Gadget-wikieditor-highlight-cm6.js b/src/gadgets/wikieditor-highlight-cm6/MediaWiki:Gadget-wikieditor-highlight-cm6.js deleted file mode 100644 index 6f11c893..00000000 --- a/src/gadgets/wikieditor-highlight-cm6/MediaWiki:Gadget-wikieditor-highlight-cm6.js +++ /dev/null @@ -1,71 +0,0 @@ -"use strict"; -// 本页面大部分内容均直接或间接修改自[[MW:Extension:CodeMirror]] -(async () => { - if (!["edit", "submit"].includes(mw.config.get("wgAction")) || mw.config.get("wgPageContentModel") !== "wikitext") { - return; - } - await $.ready; - - const localObjectStorage = new LocalObjectStorage("wikieditor-highlight"); - let cm, state = localObjectStorage.getItem("wikieditor-codemirror", true); - const $textarea = $("#wpTextbox1"); - const isAdvanced = ["loading", "loaded", "executing", "ready"].includes(mw.loader.getState("ext.wikiEditor")); - const ns = mw.config.get("wgNamespaceNumber"); - const lang = ns === 274 ? "html" : "mediawiki"; - const init = async () => { - if (!window.CodeMirror6) { - await new Promise((resolve) => { - const script = document.createElement("script"); - script.addEventListener("load", resolve); - script.type = "module"; - script.src = "https://testingcf.jsdelivr.net/npm/@bhsd/codemirror-mediawiki@2.1.7/mw/dist/base.min.js"; - document.head.append(script); - }); - } - cm = await window.CodeMirror6.fromTextArea($textarea[0], lang); - cm.prefer([ - "highlightSpecialChars", - "highlightActiveLine", - "highlightWhitespace", - "bracketMatching", - "closeBrackets", - ]); - const [config] = await Promise.all([ - libCachedCode.getCachedCode("https://testingcf.jsdelivr.net/npm/wikiparser-node/config/moegirl.json"), - cm.defaultLint(true, {include: ns === 10}), - ]); - try { - window.wikiparse?.setConfig(JSON.parse(config)); - } catch (e) { - console.error(e); - } - }; - if (!isAdvanced) { - init(); - return; - } - const btn = new OO.ui.ButtonWidget({ - classes: ["tool"], icon: "highlight", framed: false, title: "代码高亮开关", - }).on("click", async () => { - if (cm) { - cm.toggle(); - } else { - await init(); - } - btn.$element.toggleClass("tool-active"); - state = !state; - localObjectStorage.setItem("wikieditor-codemirror", state); - }); - $textarea.on("wikiEditor-toolbar-doneInitialSections", () => { - btn.$element.appendTo("#wikiEditor-section-main > .group-insert"); - }); - const group = $("#wikiEditor-section-main > .group-insert")[0]; - if (group && !group.contains(btn.$element[0])) { - btn.$element.appendTo(group); - } - if (state) { - await mw.loader.using("ext.wikiEditor"); - await init(); - btn.$element.addClass("tool-active"); - } -})(); diff --git a/src/gadgets/wikieditor-highlight-cm6/definition.yaml b/src/gadgets/wikieditor-highlight-cm6/definition.yaml deleted file mode 100644 index afba20cd..00000000 --- a/src/gadgets/wikieditor-highlight-cm6/definition.yaml +++ /dev/null @@ -1,36 +0,0 @@ -ResourceLoader: true - -hidden: false - -default: false - -supportsUrlLoad: false - -targets: [] - -skins: [] - -actions: [] - -type: general - -package: false - -rights: - - techedit - -peers: [] - -dependencies: - - oojs-ui-core - - ext.gadget.libPolyfill - - ext.gadget.libCachedCode - - ext.gadget.LocalObjectStorage - -_sites: - - zh - -_section: editing - -_files: - - MediaWiki:Gadget-wikieditor-highlight-cm6.js diff --git a/src/gadgets/wikieditor-highlight/MediaWiki:Gadget-wikieditor-highlight.css b/src/gadgets/wikieditor-highlight/MediaWiki:Gadget-wikieditor-highlight.css deleted file mode 100644 index f82ac709..00000000 --- a/src/gadgets/wikieditor-highlight/MediaWiki:Gadget-wikieditor-highlight.css +++ /dev/null @@ -1,21 +0,0 @@ -#wikiEditor-ui-toolbar .menu { - position: relative; - z-index: 5; -} - -.CodeMirror pre { - font-family: Monaco, Menlo, "Ubuntu Mono", Consolas, source-code-pro, monospace; -} - -#wpTextbox1+.CodeMirror { - font-size: 13px; - line-height: 1.5; -} - -.CodeMirror-matchingbracket { - box-shadow: 0 0 0 2px #9aef98; -} - -.CodeMirror-nonmatchingbracket { - box-shadow: 0 0 0 2px #eace64; -} diff --git a/src/gadgets/wikieditor-highlight/MediaWiki:Gadget-wikieditor-highlight.js b/src/gadgets/wikieditor-highlight/MediaWiki:Gadget-wikieditor-highlight.js index e5a4ba37..12b945e0 100644 --- a/src/gadgets/wikieditor-highlight/MediaWiki:Gadget-wikieditor-highlight.js +++ b/src/gadgets/wikieditor-highlight/MediaWiki:Gadget-wikieditor-highlight.js @@ -1,159 +1,71 @@ "use strict"; // 本页面大部分内容均直接或间接修改自[[MW:Extension:CodeMirror]] (async () => { - await $.ready; if (!["edit", "submit"].includes(mw.config.get("wgAction")) || mw.config.get("wgPageContentModel") !== "wikitext") { return; } + await $.ready; const localObjectStorage = new LocalObjectStorage("wikieditor-highlight"); - let cm, $doc, state = localObjectStorage.getItem("wikieditor-codemirror", false); + let cm, state = localObjectStorage.getItem("wikieditor-codemirror", true); const $textarea = $("#wpTextbox1"); const isAdvanced = ["loading", "loaded", "executing", "ready"].includes(mw.loader.getState("ext.wikiEditor")); const ns = mw.config.get("wgNamespaceNumber"); + const lang = ns === 274 ? "html" : "mediawiki"; const init = async () => { - const $search = $(".group-search a"); - await libCachedCode.batchInjectCachedCode([ - "https://npm.elemecdn.com/codemirror@5.65.1/lib/codemirror.css", - "https://npm.elemecdn.com/@bhsd/codemirror-mediawiki@1.1.12/mediawiki.css", - ], "style"); - await libCachedCode.batchInjectCachedCode([ - "https://npm.elemecdn.com/codemirror@5.65.1/lib/codemirror.js", - // "https://npm.elemecdn.com/codemirror@5.65.1/addon/edit/matchbrackets.js", - // "https://npm.elemecdn.com/wikiplus-highlight@2.60.3/matchtags.js", - ], "script"); - await libCachedCode.batchInjectCachedCode([ - "https://npm.elemecdn.com/@bhsd/codemirror-mediawiki@1.1.12/mediawiki.js", - ...ns === 274 ? [ - "https://npm.elemecdn.com/codemirror@5.65.1/mode/javascript/javascript.js", - "https://npm.elemecdn.com/codemirror@5.65.1/mode/css/css.js", - ] : [], - ], "script"); - const mwConfig = JSON.parse(await libCachedCode.getCachedCode("https://npm.elemecdn.com/@bhsd/codemirror-mediawiki@1.1.12/config.json")); - if (ns === 274) { - $.extend(mwConfig.tags, { - script: true, style: true, - }); - $.extend(mwConfig.tagModes, { - script: "javascript", style: "css", + if (!window.CodeMirror6) { + await new Promise((resolve) => { + const script = document.createElement("script"); + script.addEventListener("load", resolve); + script.type = "module"; + script.src = "https://testingcf.jsdelivr.net/npm/@bhsd/codemirror-mediawiki/mw/dist/base.min.js"; + document.head.append(script); }); } - if (isAdvanced) { - cm = new CodeMirror($textarea.parent()[0], { - mode: "text/mediawiki", mwConfig, - lineWrapping: true, lineNumbers: true, readOnly: $textarea.prop("readonly"), - matchBrackets: { - bracketRegex: /[{}[\]]/, - }, matchTags: true, - }); - } else { - cm = CodeMirror.fromTextArea($textarea[0], { - mode: "text/mediawiki", mwConfig, - lineWrapping: true, lineNumbers: true, readOnly: $textarea.prop("readonly"), - matchBrackets: { - bracketRegex: /[{}[\]]/, - }, matchTags: true, - }); - cm.setSize(null, $textarea.height()); + cm = await window.CodeMirror6.fromTextArea($textarea[0], lang); + cm.prefer([ + "highlightSpecialChars", + "highlightActiveLine", + "highlightWhitespace", + "bracketMatching", + "closeBrackets", + ]); + const [config] = await Promise.all([ + libCachedCode.getCachedCode("https://testingcf.jsdelivr.net/npm/wikiparser-node/config/moegirl.json"), + cm.defaultLint(true, {include: ns === 10}), + ]); + try { + window.wikiparse?.setConfig(JSON.parse(config)); + } catch (e) { + console.error(e); } - mw.hook("wiki-codemirror").fire(cm); - $doc = $(cm.getWrapperElement()); - $.valHooks.textarea = { - get: (ele_1) => ele_1 === $textarea[0] && state ? cm.getValue() : ele_1.value, - set: (ele_3, val) => { - ele_3 === $textarea[0] && state ? cm.setValue(val) : ele_3.value = val; - }, - }; - if (mw.loader.getState("jquery.ui.resizable") === "ready") { - $doc.resizable({ - handles: "s", - }); - } - if ($search.length === 0) { - return; - } - cm.addKeyMap({ - "Ctrl-F": () => { - $search.trigger("click"); - }, - "Cmd-F": () => { - $search.trigger("click"); - }, - }); }; - if (state === null || !isAdvanced) { - state = true; - } if (!isAdvanced) { init(); return; } - const $form = $(document.editform); const btn = new OO.ui.ButtonWidget({ classes: ["tool"], icon: "highlight", framed: false, title: "代码高亮开关", - }).on("click", () => { + }).on("click", async () => { if (cm) { - $doc.toggle(); - // eslint-disable-next-line no-use-before-define - update(); + cm.toggle(); } else { - // eslint-disable-next-line no-use-before-define - initAndUpdate(); + await init(); } - }); - const fn = { - getSelection: () => cm.getSelection(), - setSelection: function (options) { - cm.setSelection(cm.posFromIndex(options.start), cm.posFromIndex(options.end)); - cm.focus(); - return this; - }, - getCaretPosition: (options) => { - const caretPos = cm.indexFromPos(cm.getCursor("from")), - endPos = cm.indexFromPos(cm.getCursor("to")); - if (options.startAndEnd) { - return [caretPos, endPos]; - } - return caretPos; - }, - scrollToCaretPosition: function () { - cm.scrollIntoView(); - return this; - }, - }; - const submit = () => { - $textarea[0].value = cm.getValue(); - }; - const shared = () => { btn.$element.toggleClass("tool-active"); - if (state) { - cm.setValue($textarea[0].value); - cm.setSize(null, $textarea.height()); - } else { - $textarea[0].value = cm.getValue(); - } - $textarea.toggle(); - $form[state ? "on" : "off"]("submit", submit); - if ($textarea.textSelection) { - $textarea.textSelection(state ? "register" : "unregister", fn); - } - }; - const update = () => { state = !state; localObjectStorage.setItem("wikieditor-codemirror", state); - shared(); - }; - const initAndUpdate = () => { - init().then(update); - }; - const group = $("#wikiEditor-section-main > .group-insert")[0]; + }); $textarea.on("wikiEditor-toolbar-doneInitialSections", () => { btn.$element.appendTo("#wikiEditor-section-main > .group-insert"); }); + const group = $("#wikiEditor-section-main > .group-insert")[0]; if (group && !group.contains(btn.$element[0])) { - $textarea.trigger("wikiEditor-toolbar-doneInitialSections"); + btn.$element.appendTo(group); } if (state) { - mw.loader.using("ext.wikiEditor").then(init).then(shared); + await mw.loader.using("ext.wikiEditor"); + await init(); + btn.$element.addClass("tool-active"); } })(); diff --git a/src/gadgets/wikieditor-highlight/definition.yaml b/src/gadgets/wikieditor-highlight/definition.yaml index 39bcdba1..5201e154 100644 --- a/src/gadgets/wikieditor-highlight/definition.yaml +++ b/src/gadgets/wikieditor-highlight/definition.yaml @@ -33,5 +33,4 @@ _sites: _section: editing _files: - - MediaWiki:Gadget-wikieditor-highlight.css - MediaWiki:Gadget-wikieditor-highlight.js From 764f4726e9891044f727e1d3e31f0b228a0f9b74 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 18 Jan 2024 10:52:15 +0800 Subject: [PATCH 2/3] npm(deps): bump the npm group with 1 update (#398) Bumps the npm group with 1 update: [autoprefixer](https://github.com/postcss/autoprefixer). Updates `autoprefixer` from 10.4.16 to 10.4.17 - [Release notes](https://github.com/postcss/autoprefixer/releases) - [Changelog](https://github.com/postcss/autoprefixer/blob/main/CHANGELOG.md) - [Commits](https://github.com/postcss/autoprefixer/compare/10.4.16...10.4.17) --- updated-dependencies: - dependency-name: autoprefixer dependency-type: direct:production update-type: version-update:semver-patch dependency-group: npm ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 58 +++++++++++++++++++++++------------------------ package.json | 2 +- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/package-lock.json b/package-lock.json index 96857d74..8baf5b8a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,7 +23,7 @@ "@types/moment": "^2.13.0", "@types/oojs-ui": "^0.47.6", "@wikimedia/types-wikimedia": "^0.4.2", - "autoprefixer": "^10.4.16", + "autoprefixer": "^10.4.17", "browser-pack-flat": "^3.5.0", "browserify": "^17.0.0", "common-shakeify": "^1.1.2", @@ -2150,9 +2150,9 @@ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "node_modules/autoprefixer": { - "version": "10.4.16", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.16.tgz", - "integrity": "sha512-7vd3UC6xKp0HLfua5IjZlcXvGAGy7cBAXTg2lyQ/8WpNhd6SiZ8Be+xm3FyBSYJx5GKcpRCzBh7RH4/0dnY+uQ==", + "version": "10.4.17", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.17.tgz", + "integrity": "sha512-/cpVNRLSfhOtcGflT13P2794gVSgmPgTR+erw5ifnMLZb0UnSlkK4tquLmkd3BhA+nLo5tX8Cu0upUsGKvKbmg==", "funding": [ { "type": "opencollective", @@ -2168,9 +2168,9 @@ } ], "dependencies": { - "browserslist": "^4.21.10", - "caniuse-lite": "^1.0.30001538", - "fraction.js": "^4.3.6", + "browserslist": "^4.22.2", + "caniuse-lite": "^1.0.30001578", + "fraction.js": "^4.3.7", "normalize-range": "^0.1.2", "picocolors": "^1.0.0", "postcss-value-parser": "^4.2.0" @@ -2723,9 +2723,9 @@ } }, "node_modules/browserslist": { - "version": "4.21.10", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.10.tgz", - "integrity": "sha512-bipEBdZfVH5/pwrvqc+Ub0kUPVfGUhlKxbvfD+z1BDnPEO/X98ruXGA1WP5ASpAFKan7Qr6j736IacbZQuAlKQ==", + "version": "4.22.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.2.tgz", + "integrity": "sha512-0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A==", "funding": [ { "type": "opencollective", @@ -2741,10 +2741,10 @@ } ], "dependencies": { - "caniuse-lite": "^1.0.30001517", - "electron-to-chromium": "^1.4.477", - "node-releases": "^2.0.13", - "update-browserslist-db": "^1.0.11" + "caniuse-lite": "^1.0.30001565", + "electron-to-chromium": "^1.4.601", + "node-releases": "^2.0.14", + "update-browserslist-db": "^1.0.13" }, "bin": { "browserslist": "cli.js" @@ -2871,9 +2871,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001538", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001538.tgz", - "integrity": "sha512-HWJnhnID+0YMtGlzcp3T9drmBJUVDchPJ08tpUGFLs9CYlwWPH2uLgpHn8fND5pCgXVtnGS3H4QR9XLMHVNkHw==", + "version": "1.0.30001578", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001578.tgz", + "integrity": "sha512-J/jkFgsQ3NEl4w2lCoM9ZPxrD+FoBNJ7uJUpGVjIg/j0OwJosWM36EPDv+Yyi0V4twBk9pPmlFS+PLykgEvUmg==", "funding": [ { "type": "opencollective", @@ -3611,9 +3611,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.490", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.490.tgz", - "integrity": "sha512-6s7NVJz+sATdYnIwhdshx/N/9O6rvMxmhVoDSDFdj6iA45gHR8EQje70+RYsF4GeB+k0IeNSBnP7yG9ZXJFr7A==" + "version": "1.4.637", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.637.tgz", + "integrity": "sha512-G7j3UCOukFtxVO1vWrPQUoDk3kL70mtvjc/DC/k2o7lE0wAdq+Vwp1ipagOow+BH0uVztFysLWbkM/RTIrbK3w==" }, "node_modules/elliptic": { "version": "6.5.4", @@ -4410,9 +4410,9 @@ } }, "node_modules/fraction.js": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.6.tgz", - "integrity": "sha512-n2aZ9tNfYDwaHhvFTkhFErqOMIb8uyzSQ+vGJBjZyanAKZVbGUQ1sngfk9FdkBw7G26O7AgNjLcecLffD1c7eg==", + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.7.tgz", + "integrity": "sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==", "engines": { "node": "*" }, @@ -5865,9 +5865,9 @@ } }, "node_modules/node-releases": { - "version": "2.0.13", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", - "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==" + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", + "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==" }, "node_modules/normalize-path": { "version": "3.0.0", @@ -7956,9 +7956,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", - "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==", + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", + "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==", "funding": [ { "type": "opencollective", diff --git a/package.json b/package.json index 88fbc5fa..16e7954d 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "@types/moment": "^2.13.0", "@types/oojs-ui": "^0.47.6", "@wikimedia/types-wikimedia": "^0.4.2", - "autoprefixer": "^10.4.16", + "autoprefixer": "^10.4.17", "browser-pack-flat": "^3.5.0", "browserify": "^17.0.0", "common-shakeify": "^1.1.2", From e17a477f7bf6732bdd82fc7370050f5a14b65523 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 18 Jan 2024 10:52:28 +0800 Subject: [PATCH 3/3] gha(deps): bump the gha group with 2 updates (#399) Bumps the gha group with 2 updates: [AnnAngela/cached_node-modules](https://github.com/annangela/cached_node-modules) and [actions/cache](https://github.com/actions/cache). Updates `AnnAngela/cached_node-modules` from 1 to 2 - [Release notes](https://github.com/annangela/cached_node-modules/releases) - [Commits](https://github.com/annangela/cached_node-modules/compare/v1...v2) Updates `actions/cache` from 3 to 4 - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/v3...v4) --- updated-dependencies: - dependency-name: AnnAngela/cached_node-modules dependency-type: direct:production update-type: version-update:semver-major dependency-group: gha - dependency-name: actions/cache dependency-type: direct:production update-type: version-update:semver-major dependency-group: gha ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/auto_assign.yaml | 2 +- .../workflows/detectHardcodedOutdatedNPMPackages.yaml | 2 +- .github/workflows/generateConfiguration.yaml | 2 +- .github/workflows/postCommit.yaml | 10 +++++----- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/auto_assign.yaml b/.github/workflows/auto_assign.yaml index 765e8ab3..058ff7cb 100644 --- a/.github/workflows/auto_assign.yaml +++ b/.github/workflows/auto_assign.yaml @@ -26,7 +26,7 @@ jobs: check-latest: true cache: npm - name: Installing the dependencies - uses: AnnAngela/cached_node-modules@v1 + uses: AnnAngela/cached_node-modules@v2 with: command: npm run ci - name: add assignees and reviewers diff --git a/.github/workflows/detectHardcodedOutdatedNPMPackages.yaml b/.github/workflows/detectHardcodedOutdatedNPMPackages.yaml index 023d6243..13d6dcbb 100644 --- a/.github/workflows/detectHardcodedOutdatedNPMPackages.yaml +++ b/.github/workflows/detectHardcodedOutdatedNPMPackages.yaml @@ -24,7 +24,7 @@ jobs: check-latest: true cache: npm - name: Installing the dependencies - uses: AnnAngela/cached_node-modules@v1 + uses: AnnAngela/cached_node-modules@v2 with: command: npm run ci - name: Detect hardcoded-outdated NPM packages diff --git a/.github/workflows/generateConfiguration.yaml b/.github/workflows/generateConfiguration.yaml index 30927685..13941086 100644 --- a/.github/workflows/generateConfiguration.yaml +++ b/.github/workflows/generateConfiguration.yaml @@ -24,7 +24,7 @@ jobs: check-latest: true cache: npm - name: Installing the dependencies - uses: AnnAngela/cached_node-modules@v1 + uses: AnnAngela/cached_node-modules@v2 with: command: npm run ci - name: Prepare git diff --git a/.github/workflows/postCommit.yaml b/.github/workflows/postCommit.yaml index 9a9f98b4..05e03ac1 100644 --- a/.github/workflows/postCommit.yaml +++ b/.github/workflows/postCommit.yaml @@ -77,7 +77,7 @@ jobs: check-latest: true cache: npm - name: Installing the dependencies - uses: AnnAngela/cached_node-modules@v1 + uses: AnnAngela/cached_node-modules@v2 with: command: npm run ci - name: If needs to skip, skip now @@ -102,7 +102,7 @@ jobs: check-latest: true cache: npm - name: Installing the dependencies - uses: AnnAngela/cached_node-modules@v1 + uses: AnnAngela/cached_node-modules@v2 with: command: npm run ci - name: Git config @@ -148,11 +148,11 @@ jobs: check-latest: true cache: npm - name: Installing the dependencies - uses: AnnAngela/cached_node-modules@v1 + uses: AnnAngela/cached_node-modules@v2 with: command: npm run ci - name: Reload the linter cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: .cache key: cache@${{ github.ref }} @@ -185,7 +185,7 @@ jobs: check-latest: true cache: npm - name: Installing the dependencies - uses: AnnAngela/cached_node-modules@v1 + uses: AnnAngela/cached_node-modules@v2 with: command: npm run ci - name: Fire the webhook of AnnAngela's server