Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: rename #594

Open
wants to merge 41 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
9ea3380
feat: rename
AnnAngela Jan 13, 2025
2ef7940
auto(Gadget-libHashwasm): bump hash-wasm to 4.12.0 by browserify
github-actions[bot] Jan 13, 2025
ec31e62
auto(Gadget-libip): bump ip to 2.0.1 by browserify
github-actions[bot] Jan 13, 2025
f2ce687
auto(Gadget-libJSON5): bump json5 to 2.2.3 by prefetch
github-actions[bot] Jan 13, 2025
1d88a01
auto(Gadget-localforage): bump localforage to 1.10.0 by prefetch
github-actions[bot] Jan 13, 2025
61fd0be
auto(Gadget-prism-core): bump prismjs to 1.29.0 by prefetch
github-actions[bot] Jan 13, 2025
183a28b
auto(Gadget-prism-core): bump prismjs to 1.29.0 by prefetch
github-actions[bot] Jan 13, 2025
8df4bab
auto(Gadget-prism-core): bump prismjs to 1.29.0 by prefetch
github-actions[bot] Jan 13, 2025
d68a8f4
auto(Gadget-prism-language-bash): bump prismjs to 1.29.0 by prefetch
github-actions[bot] Jan 13, 2025
2a60fc5
auto(Gadget-prism-language-c): bump prismjs to 1.29.0 by prefetch
github-actions[bot] Jan 13, 2025
3e0f43c
auto(Gadget-prism-language-clike): bump prismjs to 1.29.0 by prefetch
github-actions[bot] Jan 13, 2025
597e7cf
auto(Gadget-prism-language-coffeescript): bump prismjs to 1.29.0 by p…
github-actions[bot] Jan 13, 2025
9fddedd
auto(Gadget-prism-language-cpp): bump prismjs to 1.29.0 by prefetch
github-actions[bot] Jan 13, 2025
b05fdc1
auto(Gadget-prism-language-csharp): bump prismjs to 1.29.0 by prefetch
github-actions[bot] Jan 13, 2025
e9629d7
auto(Gadget-prism-language-css): bump prismjs to 1.29.0 by prefetch
github-actions[bot] Jan 13, 2025
567cce0
auto(Gadget-prism-language-css): bump prismjs to 1.29.0 by prefetch
github-actions[bot] Jan 13, 2025
4cd204e
auto(Gadget-prism-language-java): bump prismjs to 1.29.0 by prefetch
github-actions[bot] Jan 13, 2025
af09b9a
auto(Gadget-prism-language-javascript): bump prismjs to 1.29.0 by pre…
github-actions[bot] Jan 13, 2025
5fd6e28
auto(Gadget-prism-language-javascript): bump prismjs to 1.29.0 by pre…
github-actions[bot] Jan 13, 2025
5296a17
auto(Gadget-prism-language-json): bump prismjs to 1.29.0 by prefetch
github-actions[bot] Jan 13, 2025
861a596
auto(Gadget-prism-language-json): bump prismjs to 1.29.0 by prefetch
github-actions[bot] Jan 13, 2025
3a6c00b
auto(Gadget-prism-language-latex): bump prismjs to 1.29.0 by prefetch
github-actions[bot] Jan 13, 2025
b7b39cf
auto(Gadget-prism-language-lua): bump prismjs to 1.29.0 by prefetch
github-actions[bot] Jan 13, 2025
02f70eb
auto(Gadget-prism-language-markup): bump prismjs to 1.29.0 by prefetch
github-actions[bot] Jan 13, 2025
67b979f
auto(Gadget-prism-language-perl): bump prismjs to 1.29.0 by prefetch
github-actions[bot] Jan 13, 2025
279e4fd
auto(Gadget-prism-language-php): bump prismjs to 1.29.0 by prefetch
github-actions[bot] Jan 13, 2025
0053ac3
auto(Gadget-prism-language-php): bump prismjs to 1.29.0 by prefetch
github-actions[bot] Jan 13, 2025
5ef3c4f
auto(Gadget-prism-language-php): bump prismjs to 1.29.0 by prefetch
github-actions[bot] Jan 13, 2025
80b14bf
auto(Gadget-prism-language-python): bump prismjs to 1.29.0 by prefetch
github-actions[bot] Jan 13, 2025
f395348
auto(Gadget-prism-language-regex): bump prismjs to 1.29.0 by prefetch
github-actions[bot] Jan 13, 2025
907b041
auto(Gadget-prism-language-ruby): bump prismjs to 1.29.0 by prefetch
github-actions[bot] Jan 13, 2025
20aa582
auto(Gadget-prism-language-typescript): bump prismjs to 1.29.0 by pre…
github-actions[bot] Jan 13, 2025
6b0f1ba
auto(Gadget-prism-language-yaml): bump prismjs to 1.29.0 by prefetch
github-actions[bot] Jan 13, 2025
61b3bff
auto(Gadget-prism-plugin-javadoclike): bump prismjs to 1.29.0 by pref…
github-actions[bot] Jan 13, 2025
27de41b
auto(Gadget-prism-plugin-jsdoc): bump prismjs to 1.29.0 by prefetch
github-actions[bot] Jan 13, 2025
654e480
auto(Gadget-prism-plugin-match-braces): bump prismjs to 1.29.0 by pre…
github-actions[bot] Jan 13, 2025
1c13321
auto(Gadget-prism-plugin-match-braces): bump prismjs to 1.29.0 by pre…
github-actions[bot] Jan 13, 2025
fd2af86
auto(Gadget-prism-plugin-phpdoc): bump prismjs to 1.29.0 by prefetch
github-actions[bot] Jan 13, 2025
6ecf839
auto(Gadget-prism-plugin-previewers): bump prismjs to 1.29.0 by prefetch
github-actions[bot] Jan 13, 2025
b0858b1
auto(Gadget-prism-plugin-previewers): bump prismjs to 1.29.0 by prefetch
github-actions[bot] Jan 13, 2025
6ae4d31
fix(Moeskin.js): improve URL validation for moegirl.org links
AnnAngela Jan 13, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
82 changes: 41 additions & 41 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -4,50 +4,50 @@ src/**/*.json linguist-generated=false
src/*.json linguist-generated=false
src/**/*.yaml linguist-generated=false
src/*.yaml linguist-generated=false
src/gadgets/libPolyfill/MediaWiki:Gadget-libPolyfill.*.js linguist-generated=true
src/gadgets/libPolyfill/Gadget-libPolyfill.*.js linguist-generated=true

# From browserify
src/gadgets/libHashwasm/MediaWiki:Gadget-libHashwasm.js linguist-generated=true
src/gadgets/libip/MediaWiki:Gadget-libip.js linguist-generated=true
src/gadgets/libHashwasm/Gadget-libHashwasm.js linguist-generated=true
src/gadgets/libip/Gadget-libip.js linguist-generated=true

# From generateCommitsHistory
src/global/zh/MediaWiki:GHIAHistory.json linguist-generated=true
src/global/zh/GHIAHistory.json linguist-generated=true

# From prefetch
src/gadgets/libJSON5/MediaWiki:Gadget-libJSON5.js linguist-generated=true
src/gadgets/localforage/MediaWiki:Gadget-localforage.js linguist-generated=true
src/gadgets/prism-core/MediaWiki:Gadget-prism-core.js linguist-generated=true
src/gadgets/prism-core/MediaWiki:Gadget-prism-line-numbers.js linguist-generated=true
src/gadgets/prism-core/MediaWiki:Gadget-prism-line-numbers.css linguist-generated=true
src/gadgets/prism-language-bash/MediaWiki:Gadget-prism-language-bash.js linguist-generated=true
src/gadgets/prism-language-c/MediaWiki:Gadget-prism-language-c.js linguist-generated=true
src/gadgets/prism-language-clike/MediaWiki:Gadget-prism-language-clike.js linguist-generated=true
src/gadgets/prism-language-coffeescript/MediaWiki:Gadget-prism-language-coffeescript.js linguist-generated=true
src/gadgets/prism-language-cpp/MediaWiki:Gadget-prism-language-cpp.js linguist-generated=true
src/gadgets/prism-language-csharp/MediaWiki:Gadget-prism-language-csharp.js linguist-generated=true
src/gadgets/prism-language-css/MediaWiki:Gadget-prism-language-css.js linguist-generated=true
src/gadgets/prism-language-css/MediaWiki:Gadget-prism-language-css-extras.js linguist-generated=true
src/gadgets/prism-language-java/MediaWiki:Gadget-prism-language-java.js linguist-generated=true
src/gadgets/prism-language-javascript/MediaWiki:Gadget-prism-language-javascript.js linguist-generated=true
src/gadgets/prism-language-javascript/MediaWiki:Gadget-prism-language-javascript-extras.js linguist-generated=true
src/gadgets/prism-language-json/MediaWiki:Gadget-prism-language-json.js linguist-generated=true
src/gadgets/prism-language-json/MediaWiki:Gadget-prism-language-json5.js linguist-generated=true
src/gadgets/prism-language-latex/MediaWiki:Gadget-prism-language-latex.js linguist-generated=true
src/gadgets/prism-language-lua/MediaWiki:Gadget-prism-language-lua.js linguist-generated=true
src/gadgets/prism-language-markup/MediaWiki:Gadget-prism-language-markup.js linguist-generated=true
src/gadgets/prism-language-perl/MediaWiki:Gadget-prism-language-perl.js linguist-generated=true
src/gadgets/prism-language-php/MediaWiki:Gadget-prism-language-markup-templating.js linguist-generated=true
src/gadgets/prism-language-php/MediaWiki:Gadget-prism-language-php.js linguist-generated=true
src/gadgets/prism-language-php/MediaWiki:Gadget-prism-language-php-extras.js linguist-generated=true
src/gadgets/prism-language-python/MediaWiki:Gadget-prism-language-python.js linguist-generated=true
src/gadgets/prism-language-regex/MediaWiki:Gadget-prism-language-regex.js linguist-generated=true
src/gadgets/prism-language-ruby/MediaWiki:Gadget-prism-language-ruby.js linguist-generated=true
src/gadgets/prism-language-typescript/MediaWiki:Gadget-prism-language-typescript.js linguist-generated=true
src/gadgets/prism-language-yaml/MediaWiki:Gadget-prism-language-yaml.js linguist-generated=true
src/gadgets/prism-plugin-javadoclike/MediaWiki:Gadget-prism-plugin-javadoclike.js linguist-generated=true
src/gadgets/prism-plugin-jsdoc/MediaWiki:Gadget-prism-plugin-jsdoc.js linguist-generated=true
src/gadgets/prism-plugin-match-braces/MediaWiki:Gadget-prism-plugin-match-braces.js linguist-generated=true
src/gadgets/prism-plugin-match-braces/MediaWiki:Gadget-prism-plugin-match-braces.css linguist-generated=true
src/gadgets/prism-plugin-phpdoc/MediaWiki:Gadget-prism-plugin-phpdoc.js linguist-generated=true
src/gadgets/prism-plugin-previewers/MediaWiki:Gadget-prism-plugin-previewers.js linguist-generated=true
src/gadgets/prism-plugin-previewers/MediaWiki:Gadget-prism-plugin-previewers.css linguist-generated=true
src/gadgets/libJSON5/Gadget-libJSON5.js linguist-generated=true
src/gadgets/localforage/Gadget-localforage.js linguist-generated=true
src/gadgets/prism-core/Gadget-prism-core.js linguist-generated=true
src/gadgets/prism-core/Gadget-prism-line-numbers.js linguist-generated=true
src/gadgets/prism-core/Gadget-prism-line-numbers.css linguist-generated=true
src/gadgets/prism-language-bash/Gadget-prism-language-bash.js linguist-generated=true
src/gadgets/prism-language-c/Gadget-prism-language-c.js linguist-generated=true
src/gadgets/prism-language-clike/Gadget-prism-language-clike.js linguist-generated=true
src/gadgets/prism-language-coffeescript/Gadget-prism-language-coffeescript.js linguist-generated=true
src/gadgets/prism-language-cpp/Gadget-prism-language-cpp.js linguist-generated=true
src/gadgets/prism-language-csharp/Gadget-prism-language-csharp.js linguist-generated=true
src/gadgets/prism-language-css/Gadget-prism-language-css.js linguist-generated=true
src/gadgets/prism-language-css/Gadget-prism-language-css-extras.js linguist-generated=true
src/gadgets/prism-language-java/Gadget-prism-language-java.js linguist-generated=true
src/gadgets/prism-language-javascript/Gadget-prism-language-javascript.js linguist-generated=true
src/gadgets/prism-language-javascript/Gadget-prism-language-javascript-extras.js linguist-generated=true
src/gadgets/prism-language-json/Gadget-prism-language-json.js linguist-generated=true
src/gadgets/prism-language-json/Gadget-prism-language-json5.js linguist-generated=true
src/gadgets/prism-language-latex/Gadget-prism-language-latex.js linguist-generated=true
src/gadgets/prism-language-lua/Gadget-prism-language-lua.js linguist-generated=true
src/gadgets/prism-language-markup/Gadget-prism-language-markup.js linguist-generated=true
src/gadgets/prism-language-perl/Gadget-prism-language-perl.js linguist-generated=true
src/gadgets/prism-language-php/Gadget-prism-language-markup-templating.js linguist-generated=true
src/gadgets/prism-language-php/Gadget-prism-language-php.js linguist-generated=true
src/gadgets/prism-language-php/Gadget-prism-language-php-extras.js linguist-generated=true
src/gadgets/prism-language-python/Gadget-prism-language-python.js linguist-generated=true
src/gadgets/prism-language-regex/Gadget-prism-language-regex.js linguist-generated=true
src/gadgets/prism-language-ruby/Gadget-prism-language-ruby.js linguist-generated=true
src/gadgets/prism-language-typescript/Gadget-prism-language-typescript.js linguist-generated=true
src/gadgets/prism-language-yaml/Gadget-prism-language-yaml.js linguist-generated=true
src/gadgets/prism-plugin-javadoclike/Gadget-prism-plugin-javadoclike.js linguist-generated=true
src/gadgets/prism-plugin-jsdoc/Gadget-prism-plugin-jsdoc.js linguist-generated=true
src/gadgets/prism-plugin-match-braces/Gadget-prism-plugin-match-braces.js linguist-generated=true
src/gadgets/prism-plugin-match-braces/Gadget-prism-plugin-match-braces.css linguist-generated=true
src/gadgets/prism-plugin-phpdoc/Gadget-prism-plugin-phpdoc.js linguist-generated=true
src/gadgets/prism-plugin-previewers/Gadget-prism-plugin-previewers.js linguist-generated=true
src/gadgets/prism-plugin-previewers/Gadget-prism-plugin-previewers.css linguist-generated=true
6 changes: 3 additions & 3 deletions .stylelintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ reportNeedlessDisables: true

ignoreFiles:
- dist/**/*.css
- src/gadgets/prism-core/MediaWiki:Gadget-prism-line-numbers.css
- src/gadgets/prism-plugin-match-braces/MediaWiki:Gadget-prism-plugin-match-braces.css
- src/gadgets/prism-plugin-previewers/MediaWiki:Gadget-prism-plugin-previewers.css
- src/gadgets/prism-core/Gadget-prism-line-numbers.css
- src/gadgets/prism-plugin-match-braces/Gadget-prism-plugin-match-braces.css
- src/gadgets/prism-plugin-previewers/Gadget-prism-plugin-previewers.css

rules:
selector-id-pattern: null
Expand Down
8 changes: 4 additions & 4 deletions .vscode/json-schemas/gadget-definition.json
Original file line number Diff line number Diff line change
Expand Up @@ -286,12 +286,12 @@
"type": "string",
"title": "File name",
"examples": [
"MediaWiki:Gadget-abusefilter33test.js"
"Gadget-abusefilter33test.js"
]
},
"examples": [
[
"MediaWiki:Gadget-abusefilter33test.js"
"Gadget-abusefilter33test.js"
]
]
}
Expand Down Expand Up @@ -342,8 +342,8 @@
],
"_section": "administration",
"_files": [
"MediaWiki:Gadget-backlog.css",
"MediaWiki:Gadget-backlog.js"
"Gadget-backlog.css",
"Gadget-backlog.js"
]
}
]
Expand Down
12 changes: 6 additions & 6 deletions scripts/browserify/index.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import console from "../modules/console.js";
console.info("Initialization done.");
import mkdtmp from "../modules/mkdtmp.js";
import { endGroup, exportVariable, startGroup } from "@actions/core";
import browserify from "browserify";
import minifyStream from "../modules/minify-stream.js";
import yamlModule from "../modules/yamlModule.js";
import fs from "node:fs";
import path from "node:path";
import { startGroup, endGroup, exportVariable } from "@actions/core";
import console from "../modules/console.js";
import createCommit from "../modules/createCommit.js";
import exec from "../modules/exec.js";
import minifyStream from "../modules/minify-stream.js";
import mkdtmp from "../modules/mkdtmp.js";
import modulePath from "../modules/modulePath.js";
import yamlModule from "../modules/yamlModule.js";
console.info("Initialization done.");

/**
* @type {{ module: string; entry: string; gadget: { name: string, fileName: string }; exportValues?: string[], removePlugins?: string[], prependCode?: string }[]}
Expand Down
4 changes: 2 additions & 2 deletions scripts/browserify/targets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
entry: hashwasm
gadget:
name: libHashwasm
fileName: MediaWiki:Gadget-libHashwasm.js
fileName: Gadget-libHashwasm.js
exportValues:
- createMD5
- createSHA1
Expand All @@ -27,4 +27,4 @@
entry: libip
gadget:
name: libip
fileName: MediaWiki:Gadget-libip.js
fileName: Gadget-libip.js
2 changes: 1 addition & 1 deletion scripts/detectHardcodedOutdatedNPMPackages/whitelist.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
whitelist:
src/gadgets/wikieditor-highlight/MediaWiki:Gadget-wikieditor-highlight.js:
src/gadgets/wikieditor-highlight/Gadget-wikieditor-highlight.js:
- codemirror@5.65.1
18 changes: 9 additions & 9 deletions scripts/generateCommitsHistory/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@ const pathValidator = (file) => file.startsWith("src/") && ![
"src/@types/",
].some((blacklist) => file.startsWith(blacklist));

import { endGroup, exportVariable, startGroup } from "@actions/core";
import path from "node:path";
import artifactClient from "../modules/artifact.js";
import console from "../modules/console.js";
import createCommit from "../modules/createCommit.js";
import git from "../modules/git.js";
import jsonModule from "../modules/jsonModule.js";
import mailmap from "../modules/mailmap.js";
import { startGroup, endGroup, exportVariable } from "@actions/core";
import { isInMasterBranch, debugLoggingEnabled, debugConsole, isInGithubActions } from "../modules/octokit.js";
import mkdtmp from "../modules/mkdtmp.js";
import jsonModule from "../modules/jsonModule.js";
import artifactClient from "../modules/artifact.js";
import git from "../modules/git.js";
import createCommit from "../modules/createCommit.js";
import path from "node:path";
import { debugConsole, debugLoggingEnabled, isInGithubActions, isInMasterBranch } from "../modules/octokit.js";

exportVariable("linguist-generated-generateCommitsHistory", JSON.stringify(["src/global/zh/MediaWiki:GHIAHistory.json"]));
exportVariable("linguist-generated-generateCommitsHistory", JSON.stringify(["src/global/zh/GHIAHistory.json"]));

if (!isInMasterBranch) {
console.info("Not running in master branch, exit.");
Expand Down Expand Up @@ -134,6 +134,6 @@ if (debugLoggingEnabled) {
endGroup();
}
console.info("Parsed done.");
await jsonModule.writeFile("src/global/zh/MediaWiki:GHIAHistory.json", sortedHistory);
await jsonModule.writeFile("src/global/zh/GHIAHistory.json", sortedHistory);
await createCommit("auto: commit history generated by generateCommitsHistory");
console.info("Done.");
12 changes: 6 additions & 6 deletions scripts/generatePolyfill/index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import console from "../modules/console.js";
console.info("Initialization done.");
import { endGroup, startGroup } from "@actions/core";
import fs from "node:fs";
import path from "node:path";
import { startGroup, endGroup } from "@actions/core";
import semver from "semver";
import console from "../modules/console.js";
import createCommit from "../modules/createCommit.js";
import jsonModule from "../modules/jsonModule.js";
import yamlModule from "../modules/yamlModule.js";
import createCommit from "../modules/createCommit.js";
console.info("Initialization done.");

const polyfillGadgetDefinitionPath = "src/gadgets/libPolyfill/definition.yaml";
const polyfillGadgetDefinition = await yamlModule.readFile(polyfillGadgetDefinitionPath);
Expand Down Expand Up @@ -39,7 +39,7 @@ const customPolyfillLibraryPath = "./scripts/generatePolyfill/customPolyfill/lib

console.info("Start to delete old polyfill files:");
for (const file of polyfillGadgetFiles) {
if (file.startsWith("MediaWiki:Gadget-libPolyfill-")) {
if (file.startsWith("Gadget-libPolyfill-")) {
continue;
}
console.info("\tDeleteting", file);
Expand Down Expand Up @@ -148,7 +148,7 @@ for (const polyfill of polyfillListAllowed) {
...await getPolyfillContent(polyfill),
"})();",
];
const gadgetFilePath = path.join("src/gadgets/libPolyfill/", `MediaWiki:Gadget-libPolyfill-${polyfill.id}.js`);
const gadgetFilePath = path.join("src/gadgets/libPolyfill/", `Gadget-libPolyfill-${polyfill.id}.js`);
console.info("Start to write polyfill file:", polyfill.id, "@", gadgetFilePath);
await fs.promises.writeFile(gadgetFilePath, content.join("\n"));
console.info("Done.");
Expand Down
Loading
Loading