wikiparser-node 1.37.0 → 1.38.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
- const blockAttrs = /* @__PURE__ */ new Set(["align"]), citeAttrs = /* @__PURE__ */ new Set(["cite"]), citeAndAttrs = /* @__PURE__ */ new Set(["cite", "datetime"]), widthAttrs = /* @__PURE__ */ new Set(["width"]), obsoleteTdAttrs = /* @__PURE__ */ new Set(["axis", "align", "bgcolor", "height", "width", "valign"]), tdAttrs = /* @__PURE__ */ new Set([...obsoleteTdAttrs, "abbr", "headers", "scope", "rowspan", "colspan"]), typeAttrs = /* @__PURE__ */ new Set(["type"]), obsoleteTableAttrs = /* @__PURE__ */ new Set(
1
+ const blockAttrs = /* @__PURE__ */ new Set(["align"]), citeAttrs = /* @__PURE__ */ new Set(["cite"]), citeAndAttrs = /* @__PURE__ */ new Set(["cite", "datetime"]), widthAttrs = /* @__PURE__ */ new Set(["width"]), trAttrs = /* @__PURE__ */ new Set(["bgcolor", "align", "valign"]), obsoleteTdAttrs = /* @__PURE__ */ new Set([...trAttrs, "axis", "height", "nowrap", "width"]), tdAttrs = /* @__PURE__ */ new Set([...obsoleteTdAttrs, "abbr", "headers", "scope", "rowspan", "colspan"]), typeAttrs = /* @__PURE__ */ new Set(["type"]), obsoleteTableAttrs = /* @__PURE__ */ new Set(
2
2
  ["summary", "align", "bgcolor", "cellpadding", "cellspacing", "frame", "rules", "width"]
3
- ), brAttrs = /* @__PURE__ */ new Set(["clear"]), trAttrs = /* @__PURE__ */ new Set(["bgcolor", "align", "valign"]), chemAttrs = /* @__PURE__ */ new Set(["id", "qid", "forcemathmode", "type", "display"]), syntaxHighlightAttrs = /* @__PURE__ */ new Set([
3
+ ), brAttrs = /* @__PURE__ */ new Set(["clear"]), chemAttrs = /* @__PURE__ */ new Set(["id", "qid", "forcemathmode", "type", "display"]), syntaxHighlightAttrs = /* @__PURE__ */ new Set([
4
4
  "enclose",
5
5
  "inline",
6
6
  "lang",
@@ -106,7 +106,8 @@ exports.print = print;
106
106
  /* PRINT ONLY END */
107
107
  /* NOT FOR BROWSER */
108
108
  /** escape special chars for RegExp constructor */
109
- exports.escapeRegExp = factory(/[\\{}()|.?*+^$[\]]/gu, String.raw `\$&`);
109
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
110
+ exports.escapeRegExp = RegExp.escape || factory(/[\\{}()|.?*+^$[\]]/gu, String.raw `\$&`);
110
111
  /** escape newlines */
111
112
  exports.noWrap = factory(/\n/gu, String.raw `\n`);
112
113
  /** encode URI */
@@ -1,6 +1,6 @@
1
1
  (() => {
2
2
  var _a;
3
- const version = '1.37.0', src = (_a = document.currentScript) === null || _a === void 0 ? void 0 : _a.src, file = /\/extensions\/dist\/base\.(?:min\.)?js$/u, CDN = src && file.test(src)
3
+ const version = '1.38.1', src = (_a = document.currentScript) === null || _a === void 0 ? void 0 : _a.src, file = /\/extensions\/dist\/base\.(?:min\.)?js$/u, CDN = src && file.test(src)
4
4
  ? src.replace(file, '')
5
5
  : `https://fastly.jsdelivr.net/npm/wikiparser-node@${version}`;
6
6
  const workerJS = () => {
@@ -24,7 +24,7 @@ class LanguageService {
24
24
  __classPrivateFieldSet(this, _LanguageService_id, wikiparse.id++, "f");
25
25
  __classPrivateFieldSet(this, _LanguageService_include, include, "f");
26
26
  }
27
- destroy() {
27
+ async destroy() {
28
28
  wikiparse.provide('destroy', __classPrivateFieldGet(this, _LanguageService_id, "f"));
29
29
  }
30
30
  provideColorPresentations(color) {
package/i18n/en.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "argument-in-ext": "template argument inside an extension tag",
3
3
  "attributes-of-closing-tag": "attributes of a closing tag",
4
+ "blank-alt": "blank alt attribute",
4
5
  "bold-apostrophes": "bold apostrophes",
5
6
  "bold-in-header": "bold text in a section header",
6
7
  "chem-required": "chem attribute required",
package/i18n/zh-hans.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "argument-in-ext": "扩展标签内的模板参数",
3
3
  "attributes-of-closing-tag": "结束标签的属性",
4
+ "blank-alt": "空的alt属性",
4
5
  "bold-apostrophes": "粗体撇号",
5
6
  "bold-in-header": "章节标题中的加粗文本",
6
7
  "chem-required": "需要chem属性",
package/i18n/zh-hant.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "argument-in-ext": "擴充標籤內的模板參數",
3
3
  "attributes-of-closing-tag": "結束標籤的屬性",
4
+ "blank-alt": "空的alt屬性",
4
5
  "bold-apostrophes": "粗體撇號",
5
6
  "bold-in-header": "章節標題中的粗體文字",
6
7
  "chem-required": "需要chem屬性",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wikiparser-node",
3
- "version": "1.37.0",
3
+ "version": "1.38.1",
4
4
  "description": "A Node.js parser for MediaWiki markup with AST",
5
5
  "keywords": [
6
6
  "mediawiki",
@@ -60,6 +60,7 @@
60
60
  "prof": "node dist/test/prof.js",
61
61
  "coverage": "tsc --declaration false --target es2024 && npm run build:define && c8 npm run test:ci && node dist/script/coverage.js && open coverage/index.html",
62
62
  "test:unit": "mocha dist/test/test.js",
63
+ "test:math": "mocha dist/test/math.js",
63
64
  "test:clonenode": "CLONENODE=1 npm run test:unit",
64
65
  "test:parser": "LC_ALL=en.UTF-8 mocha dist/test/parserTests.js",
65
66
  "test:perf": "mocha --reporter spec dist/test/perf.js",
@@ -84,6 +85,7 @@
84
85
  "dependencies": {
85
86
  "@bhsd/cm-util": "^1.0.0",
86
87
  "@bhsd/common": "^2.0.0",
88
+ "@bhsd/nodejs": "^1.0.0",
87
89
  "@bhsd/stylelint-util": "^1.0.1",
88
90
  "binary-search": "^1.3.6",
89
91
  "vscode-languageserver-types": "^3.17.5"
@@ -94,42 +96,41 @@
94
96
  "mathoid-texvcjs": "^0.6.0",
95
97
  "prism-wiki": "^2.0.0",
96
98
  "prismjs": "^1.30.0",
97
- "stylelint": "^17.5.0",
99
+ "stylelint": "^17.6.0",
98
100
  "vscode-css-languageservice": "^6.3.10",
99
101
  "vscode-html-languageservice": "^5.6.2",
100
102
  "vscode-json-languageservice": "^5.7.2"
101
103
  },
102
104
  "devDependencies": {
103
- "@bhsd/code-standard": "^2.1.1",
104
- "@bhsd/nodejs": "^1.0.0",
105
- "@bhsd/test-util": "^0.4.0",
105
+ "@bhsd/code-standard": "^2.2.0",
106
+ "@bhsd/test-util": "^1.0.0",
106
107
  "@codemirror/lint": "^6.9.5",
107
- "@eslint/markdown": "^7.5.1",
108
+ "@eslint/markdown": "^8.0.1",
109
+ "@eslint-community/eslint-plugin-eslint-comments": "^4.7.1",
108
110
  "@stylistic/eslint-plugin": "^5.10.0",
109
111
  "@types/color-name": "^2.0.0",
110
112
  "@types/color-rgba": "^2.1.3",
111
113
  "@types/mocha": "^10.0.10",
112
114
  "@types/node": "^24.11.0",
113
115
  "@types/prismjs": "^1.26.6",
114
- "@typescript-eslint/eslint-plugin": "^8.57.0",
115
- "@typescript-eslint/parser": "^8.57.0",
116
+ "@typescript-eslint/eslint-plugin": "^8.58.0",
117
+ "@typescript-eslint/parser": "^8.58.0",
116
118
  "c8": "^11.0.0",
117
119
  "codejar-async": "^4.3.0",
118
120
  "color-rgba": "^3.0.0",
119
121
  "diff2html-cli": "^5.2.15",
120
- "esbuild": "^0.27.4",
121
- "eslint": "^9.39.4",
122
- "eslint-plugin-eslint-comments": "^3.2.0",
122
+ "esbuild": "^0.27.7",
123
+ "eslint": "^10.2.0",
123
124
  "eslint-plugin-jsdoc": "^62.7.1",
124
- "eslint-plugin-jsonc": "^3.1.1",
125
+ "eslint-plugin-jsonc": "^3.1.2",
125
126
  "eslint-plugin-n": "^17.24.0",
126
127
  "eslint-plugin-promise": "^7.2.1",
127
128
  "eslint-plugin-regexp": "^3.1.0",
128
- "eslint-plugin-unicorn": "^63.0.0",
129
+ "eslint-plugin-unicorn": "^64.0.0",
129
130
  "markdownlint-cli2": "^0.21.0",
130
131
  "mocha": "^11.7.5",
131
132
  "monaco-editor": "~0.53.0",
132
- "typescript": "^5.9.3",
133
+ "typescript": "^6.0.2",
133
134
  "v8r": "^6.0.0",
134
135
  "vscode-languageserver-textdocument": "^1.0.12"
135
136
  },