@icebreakers/eslint-config 1.0.4 → 1.1.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.
package/dist/index.cjs CHANGED
@@ -9,8 +9,8 @@ var __esm = (fn, res) => function __init() {
9
9
  return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
10
10
  };
11
11
  var __export = (target, all) => {
12
- for (var name3 in all)
13
- __defProp(target, name3, { get: all[name3], enumerable: true });
12
+ for (var name in all)
13
+ __defProp(target, name, { get: all[name], enumerable: true });
14
14
  };
15
15
  var __copyProps = (to, from, except, desc) => {
16
16
  if (from && typeof from === "object" || typeof from === "function") {
@@ -31,16 +31,157 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
31
31
  ));
32
32
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
33
33
 
34
- // ../../node_modules/.pnpm/tsup@8.4.0_jiti@2.4.2_postcss@8.5.3_tsx@4.19.3_typescript@5.8.2_yaml@2.7.0/node_modules/tsup/assets/cjs_shims.js
34
+ // ../../node_modules/.pnpm/tsup@8.4.0_jiti@2.4.2_postcss@8.5.3_tsx@4.19.3_typescript@5.8.3_yaml@2.7.1/node_modules/tsup/assets/cjs_shims.js
35
35
  var getImportMetaUrl, importMetaUrl;
36
36
  var init_cjs_shims = __esm({
37
- "../../node_modules/.pnpm/tsup@8.4.0_jiti@2.4.2_postcss@8.5.3_tsx@4.19.3_typescript@5.8.2_yaml@2.7.0/node_modules/tsup/assets/cjs_shims.js"() {
37
+ "../../node_modules/.pnpm/tsup@8.4.0_jiti@2.4.2_postcss@8.5.3_tsx@4.19.3_typescript@5.8.3_yaml@2.7.1/node_modules/tsup/assets/cjs_shims.js"() {
38
38
  "use strict";
39
39
  getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
40
40
  importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
41
41
  }
42
42
  });
43
43
 
44
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.4.0_eslint@9.24.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/configs/base.js
45
+ var base;
46
+ var init_base = __esm({
47
+ "../../node_modules/.pnpm/eslint-plugin-mdx@3.4.0_eslint@9.24.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/configs/base.js"() {
48
+ "use strict";
49
+ init_cjs_shims();
50
+ base = {
51
+ parser: "eslint-mdx",
52
+ parserOptions: {
53
+ sourceType: "module",
54
+ ecmaVersion: "latest"
55
+ },
56
+ plugins: ["mdx"],
57
+ processor: "mdx/remark",
58
+ rules: {
59
+ "mdx/remark": "warn",
60
+ "no-unused-expressions": "error"
61
+ }
62
+ };
63
+ }
64
+ });
65
+
66
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.4.0_eslint@9.24.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/configs/code-blocks.js
67
+ var codeBlocks;
68
+ var init_code_blocks = __esm({
69
+ "../../node_modules/.pnpm/eslint-plugin-mdx@3.4.0_eslint@9.24.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/configs/code-blocks.js"() {
70
+ "use strict";
71
+ init_cjs_shims();
72
+ codeBlocks = {
73
+ parserOptions: {
74
+ ecmaFeatures: {
75
+ impliedStrict: true
76
+ }
77
+ },
78
+ rules: {
79
+ "eol-last": "off",
80
+ "no-undef": "off",
81
+ "no-unused-expressions": "off",
82
+ "no-unused-vars": "off",
83
+ "@typescript-eslint/no-unused-vars": "off",
84
+ "padded-blocks": "off",
85
+ strict: "off",
86
+ "unicode-bom": "off"
87
+ }
88
+ };
89
+ }
90
+ });
91
+
92
+ // ../../node_modules/.pnpm/eslint-mdx@3.4.0_eslint@9.24.0_jiti@2.4.2_/node_modules/eslint-mdx/lib/helpers.js
93
+ var import_node_fs, import_node_module, import_node_path, arrayify, getPhysicalFilename, getPositionAtFactory, normalizePosition, prevCharOffsetFactory, nextCharOffsetFactory, cjsRequire;
94
+ var init_helpers = __esm({
95
+ "../../node_modules/.pnpm/eslint-mdx@3.4.0_eslint@9.24.0_jiti@2.4.2_/node_modules/eslint-mdx/lib/helpers.js"() {
96
+ "use strict";
97
+ init_cjs_shims();
98
+ import_node_fs = __toESM(require("fs"), 1);
99
+ import_node_module = require("module");
100
+ import_node_path = __toESM(require("path"), 1);
101
+ arrayify = (...args) => args.reduce((arr, curr) => {
102
+ arr.push(...Array.isArray(curr) ? curr : curr == null ? [] : [curr]);
103
+ return arr;
104
+ }, []);
105
+ getPhysicalFilename = (filename, child) => {
106
+ try {
107
+ if (import_node_fs.default.statSync(filename).isDirectory()) {
108
+ return child || filename;
109
+ }
110
+ } catch (err) {
111
+ const { code } = err;
112
+ if (code === "ENOTDIR" || code === "ENOENT") {
113
+ return getPhysicalFilename(import_node_path.default.dirname(filename), filename);
114
+ }
115
+ }
116
+ return filename;
117
+ };
118
+ getPositionAtFactory = (code) => {
119
+ const lines = code.split("\n");
120
+ return (offset) => {
121
+ let currOffset = 0;
122
+ for (const [index, line_] of lines.entries()) {
123
+ const line = index + 1;
124
+ const nextOffset = currOffset + line_.length;
125
+ if (nextOffset >= offset) {
126
+ return {
127
+ line,
128
+ column: offset - currOffset
129
+ };
130
+ }
131
+ currOffset = nextOffset + 1;
132
+ }
133
+ };
134
+ };
135
+ normalizePosition = ({ start, end, code }) => {
136
+ const startOffset = start.offset;
137
+ const endOffset = end.offset;
138
+ const range = [startOffset, endOffset];
139
+ const getPositionAt = code == null ? null : getPositionAtFactory(code);
140
+ return {
141
+ start: startOffset,
142
+ end: endOffset,
143
+ loc: {
144
+ start: "line" in start ? start : getPositionAt(startOffset),
145
+ end: "line" in end ? end : getPositionAt(endOffset)
146
+ },
147
+ range
148
+ };
149
+ };
150
+ prevCharOffsetFactory = (code) => (offset) => {
151
+ for (let i = offset; i >= 0; i--) {
152
+ const char = code[i];
153
+ if (/^\S$/.test(char)) {
154
+ return i;
155
+ }
156
+ }
157
+ };
158
+ nextCharOffsetFactory = (text) => {
159
+ const total = text.length;
160
+ return (offset) => {
161
+ for (let i = offset; i <= total; i++) {
162
+ const char = text[i];
163
+ if (/^\S$/.test(char)) {
164
+ return i;
165
+ }
166
+ }
167
+ };
168
+ };
169
+ cjsRequire = typeof require === "undefined" ? (0, import_node_module.createRequire)(importMetaUrl) : require;
170
+ }
171
+ });
172
+
173
+ // ../../node_modules/.pnpm/eslint-mdx@3.4.0_eslint@9.24.0_jiti@2.4.2_/node_modules/eslint-mdx/lib/meta.js
174
+ var pkg, meta;
175
+ var init_meta = __esm({
176
+ "../../node_modules/.pnpm/eslint-mdx@3.4.0_eslint@9.24.0_jiti@2.4.2_/node_modules/eslint-mdx/lib/meta.js"() {
177
+ "use strict";
178
+ init_cjs_shims();
179
+ init_helpers();
180
+ pkg = cjsRequire("../package.json");
181
+ meta = { name: pkg.name, version: pkg.version };
182
+ }
183
+ });
184
+
44
185
  // ../../node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs
45
186
  function __rest(s, e) {
46
187
  var t = {};
@@ -60,42 +201,131 @@ var init_tslib_es6 = __esm({
60
201
  }
61
202
  });
62
203
 
63
- // ../../node_modules/.pnpm/@pkgr+core@0.1.1/node_modules/@pkgr/core/lib/constants.js
64
- var import_node_module, CWD, cjsRequire, EXTENSIONS;
204
+ // ../../node_modules/.pnpm/synckit@0.11.3/node_modules/synckit/lib/common.js
205
+ var _a, NODE_OPTIONS, hasFlag, parseVersion, compareVersion, NODE_VERSION, compareNodeVersion;
206
+ var init_common = __esm({
207
+ "../../node_modules/.pnpm/synckit@0.11.3/node_modules/synckit/lib/common.js"() {
208
+ "use strict";
209
+ init_cjs_shims();
210
+ NODE_OPTIONS = (_a = process.env.NODE_OPTIONS) === null || _a === void 0 ? void 0 : _a.split(/\s+/);
211
+ hasFlag = (flag) => (NODE_OPTIONS === null || NODE_OPTIONS === void 0 ? void 0 : NODE_OPTIONS.includes(flag)) || process.argv.includes(flag);
212
+ parseVersion = (version) => version.split(".").map(Number.parseFloat);
213
+ compareVersion = (version1, version2) => {
214
+ const versions1 = parseVersion(version1);
215
+ const versions2 = parseVersion(version2);
216
+ const length = Math.max(versions1.length, versions2.length);
217
+ for (let i = 0; i < length; i++) {
218
+ const v1 = versions1[i] || 0;
219
+ const v2 = versions2[i] || 0;
220
+ if (v1 > v2) {
221
+ return 1;
222
+ }
223
+ if (v1 < v2) {
224
+ return -1;
225
+ }
226
+ }
227
+ return 0;
228
+ };
229
+ NODE_VERSION = process.versions.node;
230
+ compareNodeVersion = (version) => compareVersion(NODE_VERSION, version);
231
+ }
232
+ });
233
+
234
+ // ../../node_modules/.pnpm/synckit@0.11.3/node_modules/synckit/lib/constants.js
235
+ var TsRunner, NODE_OPTIONS_, SYNCKIT_EXEC_ARGV, SYNCKIT_GLOBAL_SHIMS, SYNCKIT_TIMEOUT, SYNCKIT_TS_RUNNER, TS_ESM_PARTIAL_SUPPORTED, MTS_SUPPORTED, MODULE_REGISTER_SUPPORTED, STRIP_TYPES_NODE_VERSION, TRANSFORM_TYPES_NODE_VERSION, FEATURE_TYPESCRIPT_NODE_VERSION, DEFAULT_TYPES_NODE_VERSION, STRIP_TYPES_FLAG, TRANSFORM_TYPES_FLAG, NO_STRIP_TYPES_FLAG, NODE_OPTIONS2, NO_STRIP_TYPES, DEFAULT_TIMEOUT, DEFAULT_EXEC_ARGV, DEFAULT_TS_RUNNER, DEFAULT_GLOBAL_SHIMS, DEFAULT_GLOBAL_SHIMS_PRESET, IMPORT_FLAG, REQUIRE_FLAG, REQUIRE_ABBR_FLAG, REQUIRE_FLAGS, LOADER_FLAG, EXPERIMENTAL_LOADER_FLAG, LOADER_FLAGS, IMPORT_FLAG_SUPPORTED, INT32_BYTES;
65
236
  var init_constants = __esm({
66
- "../../node_modules/.pnpm/@pkgr+core@0.1.1/node_modules/@pkgr/core/lib/constants.js"() {
237
+ "../../node_modules/.pnpm/synckit@0.11.3/node_modules/synckit/lib/constants.js"() {
67
238
  "use strict";
68
239
  init_cjs_shims();
69
- import_node_module = require("module");
240
+ init_common();
241
+ TsRunner = {
242
+ Node: "node",
243
+ Bun: "bun",
244
+ TsNode: "ts-node",
245
+ EsbuildRegister: "esbuild-register",
246
+ EsbuildRunner: "esbuild-runner",
247
+ OXC: "oxc",
248
+ SWC: "swc",
249
+ TSX: "tsx"
250
+ };
251
+ ({ NODE_OPTIONS: NODE_OPTIONS_ = "", SYNCKIT_EXEC_ARGV = "", SYNCKIT_GLOBAL_SHIMS, SYNCKIT_TIMEOUT, SYNCKIT_TS_RUNNER } = process.env);
252
+ TS_ESM_PARTIAL_SUPPORTED = compareNodeVersion("16") >= 0 && compareNodeVersion("18.19") < 0;
253
+ MTS_SUPPORTED = compareNodeVersion("20.8") >= 0;
254
+ MODULE_REGISTER_SUPPORTED = MTS_SUPPORTED || compareNodeVersion("18.19") >= 0;
255
+ STRIP_TYPES_NODE_VERSION = "22.6";
256
+ TRANSFORM_TYPES_NODE_VERSION = "22.7";
257
+ FEATURE_TYPESCRIPT_NODE_VERSION = "22.10";
258
+ DEFAULT_TYPES_NODE_VERSION = "23.6";
259
+ STRIP_TYPES_FLAG = "--experimental-strip-types";
260
+ TRANSFORM_TYPES_FLAG = "--experimental-transform-types";
261
+ NO_STRIP_TYPES_FLAG = "--no-experimental-strip-types";
262
+ NODE_OPTIONS2 = NODE_OPTIONS_.split(/\s+/);
263
+ NO_STRIP_TYPES = hasFlag(NO_STRIP_TYPES_FLAG) && (compareNodeVersion(FEATURE_TYPESCRIPT_NODE_VERSION) >= 0 ? process.features.typescript === false : !hasFlag(STRIP_TYPES_FLAG) && !hasFlag(TRANSFORM_TYPES_FLAG));
264
+ DEFAULT_TIMEOUT = SYNCKIT_TIMEOUT ? +SYNCKIT_TIMEOUT : void 0;
265
+ DEFAULT_EXEC_ARGV = SYNCKIT_EXEC_ARGV.split(",");
266
+ DEFAULT_TS_RUNNER = SYNCKIT_TS_RUNNER;
267
+ DEFAULT_GLOBAL_SHIMS = ["1", "true"].includes(SYNCKIT_GLOBAL_SHIMS);
268
+ DEFAULT_GLOBAL_SHIMS_PRESET = [
269
+ {
270
+ moduleName: "node-fetch",
271
+ globalName: "fetch"
272
+ },
273
+ {
274
+ moduleName: "node:perf_hooks",
275
+ globalName: "performance",
276
+ named: "performance"
277
+ }
278
+ ];
279
+ IMPORT_FLAG = "--import";
280
+ REQUIRE_FLAG = "--require";
281
+ REQUIRE_ABBR_FLAG = "-r";
282
+ REQUIRE_FLAGS = /* @__PURE__ */ new Set([REQUIRE_FLAG, REQUIRE_ABBR_FLAG]);
283
+ LOADER_FLAG = "--loader";
284
+ EXPERIMENTAL_LOADER_FLAG = "--experimental-loader";
285
+ LOADER_FLAGS = /* @__PURE__ */ new Set([LOADER_FLAG, EXPERIMENTAL_LOADER_FLAG]);
286
+ IMPORT_FLAG_SUPPORTED = compareNodeVersion("20.6") >= 0;
287
+ INT32_BYTES = 4;
288
+ }
289
+ });
290
+
291
+ // ../../node_modules/.pnpm/@pkgr+core@0.2.2/node_modules/@pkgr/core/lib/constants.js
292
+ var import_node_module2, CWD, cjsRequire2, EXTENSIONS;
293
+ var init_constants2 = __esm({
294
+ "../../node_modules/.pnpm/@pkgr+core@0.2.2/node_modules/@pkgr/core/lib/constants.js"() {
295
+ "use strict";
296
+ init_cjs_shims();
297
+ import_node_module2 = require("module");
70
298
  CWD = process.cwd();
71
- cjsRequire = typeof require === "undefined" ? (0, import_node_module.createRequire)(importMetaUrl) : require;
72
- EXTENSIONS = [".ts", ".tsx", ...Object.keys(cjsRequire.extensions)];
299
+ cjsRequire2 = typeof require === "undefined" ? (0, import_node_module2.createRequire)(importMetaUrl) : require;
300
+ EXTENSIONS = [".ts", ".tsx", ...Object.keys(cjsRequire2.extensions)];
73
301
  }
74
302
  });
75
303
 
76
- // ../../node_modules/.pnpm/@pkgr+core@0.1.1/node_modules/@pkgr/core/lib/helpers.js
77
- var import_node_fs, import_node_path, tryPkg, isPkgAvailable, tryFile, tryExtensions, findUp;
78
- var init_helpers = __esm({
79
- "../../node_modules/.pnpm/@pkgr+core@0.1.1/node_modules/@pkgr/core/lib/helpers.js"() {
304
+ // ../../node_modules/.pnpm/@pkgr+core@0.2.2/node_modules/@pkgr/core/lib/helpers.js
305
+ var import_node_fs2, import_node_path2, tryPkg, isPkgAvailable, tryFile, tryExtensions, findUp;
306
+ var init_helpers2 = __esm({
307
+ "../../node_modules/.pnpm/@pkgr+core@0.2.2/node_modules/@pkgr/core/lib/helpers.js"() {
80
308
  "use strict";
81
309
  init_cjs_shims();
82
- import_node_fs = __toESM(require("fs"), 1);
83
- import_node_path = __toESM(require("path"), 1);
84
- init_constants();
85
- tryPkg = (pkg) => {
310
+ import_node_fs2 = __toESM(require("fs"), 1);
311
+ import_node_path2 = __toESM(require("path"), 1);
312
+ init_constants2();
313
+ tryPkg = (pkg3) => {
86
314
  try {
87
- return cjsRequire.resolve(pkg);
88
- } catch (_a2) {
315
+ return cjsRequire2.resolve(pkg3);
316
+ } catch {
89
317
  }
90
318
  };
91
- isPkgAvailable = (pkg) => !!tryPkg(pkg);
92
- tryFile = (filePath, includeDir = false) => {
93
- if (typeof filePath === "string") {
94
- return import_node_fs.default.existsSync(filePath) && (includeDir || import_node_fs.default.statSync(filePath).isFile()) ? filePath : "";
319
+ isPkgAvailable = (pkg3) => !!tryPkg(pkg3);
320
+ tryFile = (filename, includeDir = false, base2 = CWD) => {
321
+ if (typeof filename === "string") {
322
+ const filepath = import_node_path2.default.resolve(base2, filename);
323
+ return import_node_fs2.default.existsSync(filepath) && (includeDir || import_node_fs2.default.statSync(filepath).isFile()) ? filepath : "";
95
324
  }
96
- for (const file of filePath !== null && filePath !== void 0 ? filePath : []) {
97
- if (tryFile(file, includeDir)) {
98
- return file;
325
+ for (const file of filename ?? []) {
326
+ const filepath = tryFile(file, includeDir, base2);
327
+ if (filepath) {
328
+ return filepath;
99
329
  }
100
330
  }
101
331
  return "";
@@ -105,72 +335,54 @@ var init_helpers = __esm({
105
335
  return ext == null ? "" : filepath + ext;
106
336
  };
107
337
  findUp = (searchEntry, searchFileOrIncludeDir, includeDir) => {
108
- console.assert(import_node_path.default.isAbsolute(searchEntry));
109
- if (!tryFile(searchEntry, true) || searchEntry !== CWD && !searchEntry.startsWith(CWD + import_node_path.default.sep)) {
338
+ console.assert(import_node_path2.default.isAbsolute(searchEntry));
339
+ if (!tryFile(searchEntry, true) || searchEntry !== CWD && !searchEntry.startsWith(CWD + import_node_path2.default.sep)) {
110
340
  return "";
111
341
  }
112
- searchEntry = import_node_path.default.resolve(import_node_fs.default.statSync(searchEntry).isDirectory() ? searchEntry : import_node_path.default.resolve(searchEntry, ".."));
342
+ searchEntry = import_node_path2.default.resolve(import_node_fs2.default.statSync(searchEntry).isDirectory() ? searchEntry : import_node_path2.default.resolve(searchEntry, ".."));
113
343
  const isSearchFile = typeof searchFileOrIncludeDir === "string";
114
344
  const searchFile = isSearchFile ? searchFileOrIncludeDir : "package.json";
115
345
  do {
116
- const searched = tryFile(import_node_path.default.resolve(searchEntry, searchFile), isSearchFile && includeDir);
346
+ const searched = tryFile(import_node_path2.default.resolve(searchEntry, searchFile), isSearchFile && includeDir);
117
347
  if (searched) {
118
348
  return searched;
119
349
  }
120
- searchEntry = import_node_path.default.resolve(searchEntry, "..");
121
- } while (searchEntry === CWD || searchEntry.startsWith(CWD + import_node_path.default.sep));
350
+ searchEntry = import_node_path2.default.resolve(searchEntry, "..");
351
+ } while (searchEntry === CWD || searchEntry.startsWith(CWD + import_node_path2.default.sep));
122
352
  return "";
123
353
  };
124
354
  }
125
355
  });
126
356
 
127
- // ../../node_modules/.pnpm/@pkgr+core@0.1.1/node_modules/@pkgr/core/lib/index.js
357
+ // ../../node_modules/.pnpm/@pkgr+core@0.2.2/node_modules/@pkgr/core/lib/index.js
128
358
  var init_lib = __esm({
129
- "../../node_modules/.pnpm/@pkgr+core@0.1.1/node_modules/@pkgr/core/lib/index.js"() {
359
+ "../../node_modules/.pnpm/@pkgr+core@0.2.2/node_modules/@pkgr/core/lib/index.js"() {
130
360
  "use strict";
131
361
  init_cjs_shims();
132
- init_constants();
133
- init_helpers();
362
+ init_constants2();
363
+ init_helpers2();
134
364
  }
135
365
  });
136
366
 
137
- // ../../node_modules/.pnpm/synckit@0.9.2/node_modules/synckit/lib/types.js
138
- var init_types = __esm({
139
- "../../node_modules/.pnpm/synckit@0.9.2/node_modules/synckit/lib/types.js"() {
140
- "use strict";
141
- init_cjs_shims();
142
- }
143
- });
144
-
145
- // ../../node_modules/.pnpm/synckit@0.9.2/node_modules/synckit/lib/index.js
146
- function createSyncFn(workerPath2, timeoutOrOptions) {
147
- syncFnCache !== null && syncFnCache !== void 0 ? syncFnCache : syncFnCache = /* @__PURE__ */ new Map();
148
- const cachedSyncFn = syncFnCache.get(workerPath2);
149
- if (cachedSyncFn) {
150
- return cachedSyncFn;
151
- }
152
- if (!import_node_path2.default.isAbsolute(workerPath2)) {
153
- throw new Error("`workerPath` must be absolute");
154
- }
155
- const syncFn = startWorkerThread(workerPath2, typeof timeoutOrOptions === "number" ? { timeout: timeoutOrOptions } : timeoutOrOptions);
156
- syncFnCache.set(workerPath2, syncFn);
157
- return syncFn;
158
- }
159
- function startWorkerThread(workerPath2, { timeout = DEFAULT_TIMEOUT, execArgv = DEFAULT_EXEC_ARGV, tsRunner = DEFAULT_TS_RUNNER, transferList = [], globalShims = DEFAULT_GLOBAL_SHIMS } = {}) {
367
+ // ../../node_modules/.pnpm/synckit@0.11.3/node_modules/synckit/lib/helpers.js
368
+ function startWorkerThread(workerPath, { timeout = DEFAULT_TIMEOUT, execArgv = DEFAULT_EXEC_ARGV, tsRunner = DEFAULT_TS_RUNNER, transferList = [], globalShims = DEFAULT_GLOBAL_SHIMS } = {}) {
160
369
  const { port1: mainPort, port2: workerPort } = new import_node_worker_threads.MessageChannel();
161
- const { isTs, ext, jsUseEsm, tsUseEsm, tsRunner: finalTsRunner, workerPath: finalWorkerPath, pnpLoaderPath, execArgv: finalExecArgv } = setupTsRunner(workerPath2, { execArgv, tsRunner });
370
+ const { isTs, ext, jsUseEsm, tsUseEsm, tsRunner: finalTsRunner, workerPath: finalWorkerPath, pnpLoaderPath, execArgv: finalExecArgv } = setupTsRunner(workerPath, { execArgv, tsRunner });
162
371
  const workerPathUrl = (0, import_node_url.pathToFileURL)(finalWorkerPath);
163
372
  if (/\.[cm]ts$/.test(finalWorkerPath)) {
164
- const isTsxSupported = !tsUseEsm || Number.parseFloat(process.versions.node) >= MTS_SUPPORTED_NODE_VERSION;
373
+ const isTsxSupported = !tsUseEsm || TS_ESM_PARTIAL_SUPPORTED;
165
374
  if (!finalTsRunner) {
166
375
  throw new Error("No ts runner specified, ts worker path is not supported");
167
376
  } else if ([
168
377
  TsRunner.EsbuildRegister,
169
378
  TsRunner.EsbuildRunner,
170
- TsRunner.SWC,
379
+ ...TS_ESM_PARTIAL_SUPPORTED ? [
380
+ TsRunner.OXC,
381
+ TsRunner.SWC
382
+ ] : [],
171
383
  ...isTsxSupported ? [] : [TsRunner.TSX]
172
384
  ].includes(finalTsRunner)) {
173
- throw new Error(`${finalTsRunner} is not supported for ${ext} files yet` + (isTsxSupported ? ", you can try [tsx](https://github.com/esbuild-kit/tsx) instead" : ""));
385
+ throw new Error(`${finalTsRunner} is not supported for ${ext} files yet` + (isTsxSupported ? ", you can try [tsx](https://github.com/esbuild-kit/tsx) instead" : MTS_SUPPORTED ? ", you can try [oxc](https://github.com/oxc-project/oxc-node) or [swc](https://github.com/swc-project/swc-node/tree/master/packages/register) instead" : ""));
174
386
  }
175
387
  }
176
388
  const finalGlobalShims = (globalShims === true ? DEFAULT_GLOBAL_SHIMS_PRESET : Array.isArray(globalShims) ? globalShims : []).filter(({ moduleName }) => isPkgAvailable(moduleName));
@@ -179,7 +391,7 @@ function startWorkerThread(workerPath2, { timeout = DEFAULT_TIMEOUT, execArgv =
179
391
  const useEval = isTs ? !tsUseEsm : !jsUseEsm && useGlobals;
180
392
  const worker = new import_node_worker_threads.Worker(jsUseEsm && useGlobals || tsUseEsm && finalTsRunner === TsRunner.TsNode ? dataUrl(`${generateGlobals(finalWorkerPath, finalGlobalShims)};import '${String(workerPathUrl)}'`) : useEval ? `${generateGlobals(finalWorkerPath, finalGlobalShims, "require")};${encodeImportModule(finalWorkerPath, "require")}` : workerPathUrl, {
181
393
  eval: useEval,
182
- workerData: { sharedBuffer, workerPort, pnpLoaderPath },
394
+ workerData: { sharedBufferView, workerPort, pnpLoaderPath },
183
395
  transferList: [workerPort, ...transferList],
184
396
  execArgv: finalExecArgv
185
397
  });
@@ -210,7 +422,10 @@ function startWorkerThread(workerPath2, { timeout = DEFAULT_TIMEOUT, execArgv =
210
422
  const id = nextID++;
211
423
  const msg = { id, args };
212
424
  worker.postMessage(msg);
213
- const { result, error, properties } = receiveMessageWithId(mainPort, id, timeout);
425
+ const { result, error, properties, stdio } = receiveMessageWithId(mainPort, id, timeout);
426
+ for (const { type, chunk, encoding } of stdio) {
427
+ process[type].write(chunk, encoding);
428
+ }
214
429
  if (error) {
215
430
  throw Object.assign(error, properties);
216
431
  }
@@ -219,60 +434,36 @@ function startWorkerThread(workerPath2, { timeout = DEFAULT_TIMEOUT, execArgv =
219
434
  worker.unref();
220
435
  return syncFn;
221
436
  }
222
- var import_node_crypto, import_node_fs2, import_node_module2, import_node_path2, import_node_url, import_node_worker_threads, INT32_BYTES, TsRunner, NODE_OPTIONS, SYNCKIT_EXEC_ARGV, SYNCKIT_GLOBAL_SHIMS, SYNCKIT_TIMEOUT, SYNCKIT_TS_RUNNER, IS_NODE_20, DEFAULT_TIMEOUT, DEFAULT_EXEC_ARGV, DEFAULT_TS_RUNNER, DEFAULT_GLOBAL_SHIMS, DEFAULT_GLOBAL_SHIMS_PRESET, MTS_SUPPORTED_NODE_VERSION, syncFnCache, cjsRequire2, dataUrl, isFile, setupTsRunner, md5Hash, encodeImportModule, _generateGlobals, globalsCache, tmpdir, _dirname, sharedBuffer, sharedBufferView, generateGlobals;
223
- var init_lib2 = __esm({
224
- "../../node_modules/.pnpm/synckit@0.9.2/node_modules/synckit/lib/index.js"() {
437
+ var import_node_crypto, import_node_fs3, import_node_path3, import_node_url, import_node_worker_threads, isFile, dataUrl, hasRequireFlag, hasImportFlag, hasLoaderFlag, setupTsRunner, md5Hash, encodeImportModule, _generateGlobals, globalsCache, tmpdir, _dirname, generateGlobals, sharedBuffer, sharedBufferView;
438
+ var init_helpers3 = __esm({
439
+ "../../node_modules/.pnpm/synckit@0.11.3/node_modules/synckit/lib/helpers.js"() {
225
440
  "use strict";
226
441
  init_cjs_shims();
227
442
  init_tslib_es6();
228
443
  import_node_crypto = require("crypto");
229
- import_node_fs2 = __toESM(require("fs"), 1);
230
- import_node_module2 = __toESM(require("module"), 1);
231
- import_node_path2 = __toESM(require("path"), 1);
444
+ import_node_fs3 = __toESM(require("fs"), 1);
445
+ import_node_path3 = __toESM(require("path"), 1);
232
446
  import_node_url = require("url");
233
447
  import_node_worker_threads = require("worker_threads");
234
448
  init_lib();
235
- init_types();
236
- INT32_BYTES = 4;
237
- TsRunner = {
238
- TsNode: "ts-node",
239
- EsbuildRegister: "esbuild-register",
240
- EsbuildRunner: "esbuild-runner",
241
- SWC: "swc",
242
- TSX: "tsx"
243
- };
244
- ({ NODE_OPTIONS, SYNCKIT_EXEC_ARGV, SYNCKIT_GLOBAL_SHIMS, SYNCKIT_TIMEOUT, SYNCKIT_TS_RUNNER } = process.env);
245
- IS_NODE_20 = Number(process.versions.node.split(".")[0]) >= 20;
246
- DEFAULT_TIMEOUT = SYNCKIT_TIMEOUT ? +SYNCKIT_TIMEOUT : void 0;
247
- DEFAULT_EXEC_ARGV = (SYNCKIT_EXEC_ARGV === null || SYNCKIT_EXEC_ARGV === void 0 ? void 0 : SYNCKIT_EXEC_ARGV.split(",")) || [];
248
- DEFAULT_TS_RUNNER = SYNCKIT_TS_RUNNER;
249
- DEFAULT_GLOBAL_SHIMS = ["1", "true"].includes(SYNCKIT_GLOBAL_SHIMS);
250
- DEFAULT_GLOBAL_SHIMS_PRESET = [
251
- {
252
- moduleName: "node-fetch",
253
- globalName: "fetch"
254
- },
255
- {
256
- moduleName: "node:perf_hooks",
257
- globalName: "performance",
258
- named: "performance"
259
- }
260
- ];
261
- MTS_SUPPORTED_NODE_VERSION = 16;
262
- cjsRequire2 = typeof require === "undefined" ? import_node_module2.default.createRequire(importMetaUrl) : require;
263
- dataUrl = (code) => new URL(`data:text/javascript,${encodeURIComponent(code)}`);
264
- isFile = (path5) => {
449
+ init_common();
450
+ init_constants();
451
+ isFile = (path7) => {
265
452
  var _a2;
266
453
  try {
267
- return !!((_a2 = import_node_fs2.default.statSync(path5, { throwIfNoEntry: false })) === null || _a2 === void 0 ? void 0 : _a2.isFile());
454
+ return !!((_a2 = import_node_fs3.default.statSync(path7, { throwIfNoEntry: false })) === null || _a2 === void 0 ? void 0 : _a2.isFile());
268
455
  } catch (_b) {
269
456
  return false;
270
457
  }
271
458
  };
272
- setupTsRunner = (workerPath2, { execArgv, tsRunner }) => {
273
- let ext = import_node_path2.default.extname(workerPath2);
274
- if (!/[/\\]node_modules[/\\]/.test(workerPath2) && (!ext || /^\.[cm]?js$/.test(ext))) {
275
- const workPathWithoutExt = ext ? workerPath2.slice(0, -ext.length) : workerPath2;
459
+ dataUrl = (code) => new URL(`data:text/javascript,${encodeURIComponent(code)}`);
460
+ hasRequireFlag = (execArgv) => execArgv.some((execArg) => REQUIRE_FLAGS.has(execArg));
461
+ hasImportFlag = (execArgv) => execArgv.includes(IMPORT_FLAG);
462
+ hasLoaderFlag = (execArgv) => execArgv.some((execArg) => LOADER_FLAGS.has(execArg));
463
+ setupTsRunner = (workerPath, { execArgv = DEFAULT_EXEC_ARGV, tsRunner } = {}) => {
464
+ let ext = import_node_path3.default.extname(workerPath);
465
+ if (!/([/\\])node_modules\1/.test(workerPath) && (!ext || /^\.[cm]?js$/.test(ext))) {
466
+ const workPathWithoutExt = ext ? workerPath.slice(0, -ext.length) : workerPath;
276
467
  let extensions;
277
468
  switch (ext) {
278
469
  case ".cjs": {
@@ -291,57 +482,138 @@ var init_lib2 = __esm({
291
482
  const found = tryExtensions(workPathWithoutExt, extensions);
292
483
  let differentExt;
293
484
  if (found && (!ext || (differentExt = found !== workPathWithoutExt))) {
294
- workerPath2 = found;
485
+ workerPath = found;
295
486
  if (differentExt) {
296
- ext = import_node_path2.default.extname(workerPath2);
487
+ ext = import_node_path3.default.extname(workerPath);
297
488
  }
298
489
  }
299
490
  }
300
- const isTs = /\.[cm]?ts$/.test(workerPath2);
301
- let jsUseEsm = workerPath2.endsWith(".mjs");
302
- let tsUseEsm = workerPath2.endsWith(".mts");
491
+ const isTs = /\.[cm]?ts$/.test(workerPath);
492
+ let jsUseEsm = ext === ".mjs";
493
+ let tsUseEsm = ext === ".mts";
303
494
  if (isTs) {
304
- if (!tsUseEsm) {
305
- const pkg = findUp(workerPath2);
306
- if (pkg) {
307
- tsUseEsm = cjsRequire2(pkg).type === "module";
495
+ if (!tsUseEsm && ext !== ".cts") {
496
+ const pkg3 = findUp(workerPath);
497
+ if (pkg3) {
498
+ tsUseEsm = cjsRequire2(pkg3).type === "module";
308
499
  }
309
500
  }
310
- if (tsRunner == null && isPkgAvailable(TsRunner.TsNode)) {
311
- tsRunner = TsRunner.TsNode;
501
+ const stripTypesIndex = execArgv.indexOf(STRIP_TYPES_FLAG);
502
+ const transformTypesIndex = execArgv.indexOf(TRANSFORM_TYPES_FLAG);
503
+ const noStripTypesIndex = execArgv.indexOf(NO_STRIP_TYPES_FLAG);
504
+ const execArgvNoStripTypes = noStripTypesIndex > stripTypesIndex || noStripTypesIndex > transformTypesIndex;
505
+ const noStripTypes = execArgvNoStripTypes || stripTypesIndex === -1 && transformTypesIndex === -1 && NO_STRIP_TYPES;
506
+ if (tsRunner == null) {
507
+ if (process.versions.bun) {
508
+ tsRunner = TsRunner.Bun;
509
+ } else if (!noStripTypes && compareNodeVersion(STRIP_TYPES_NODE_VERSION) >= 0) {
510
+ tsRunner = TsRunner.Node;
511
+ } else if (isPkgAvailable(TsRunner.TsNode)) {
512
+ tsRunner = TsRunner.TsNode;
513
+ }
312
514
  }
313
515
  switch (tsRunner) {
516
+ case TsRunner.Bun: {
517
+ break;
518
+ }
519
+ case TsRunner.Node: {
520
+ if (compareNodeVersion(STRIP_TYPES_NODE_VERSION) < 0) {
521
+ throw new Error("type stripping is not supported in this node version");
522
+ }
523
+ if (noStripTypes) {
524
+ throw new Error("type stripping is disabled explicitly");
525
+ }
526
+ if (compareNodeVersion(DEFAULT_TYPES_NODE_VERSION) >= 0) {
527
+ break;
528
+ }
529
+ if (compareNodeVersion(TRANSFORM_TYPES_NODE_VERSION) >= 0 && !execArgv.includes(TRANSFORM_TYPES_FLAG)) {
530
+ execArgv = [TRANSFORM_TYPES_FLAG, ...execArgv];
531
+ } else if (compareNodeVersion(STRIP_TYPES_NODE_VERSION) >= 0 && !execArgv.includes(STRIP_TYPES_FLAG)) {
532
+ execArgv = [STRIP_TYPES_FLAG, ...execArgv];
533
+ }
534
+ break;
535
+ }
314
536
  case TsRunner.TsNode: {
315
537
  if (tsUseEsm) {
316
- if (!execArgv.includes("--loader")) {
317
- execArgv = ["--loader", `${TsRunner.TsNode}/esm`, ...execArgv];
538
+ if (!execArgv.includes(LOADER_FLAG)) {
539
+ execArgv = [LOADER_FLAG, `${TsRunner.TsNode}/esm`, ...execArgv];
318
540
  }
319
- } else if (!execArgv.includes("-r")) {
320
- execArgv = ["-r", `${TsRunner.TsNode}/register`, ...execArgv];
541
+ } else if (!hasRequireFlag(execArgv)) {
542
+ execArgv = [
543
+ REQUIRE_ABBR_FLAG,
544
+ `${TsRunner.TsNode}/register`,
545
+ ...execArgv
546
+ ];
321
547
  }
322
548
  break;
323
549
  }
324
550
  case TsRunner.EsbuildRegister: {
325
- if (!execArgv.includes("-r")) {
326
- execArgv = ["-r", TsRunner.EsbuildRegister, ...execArgv];
551
+ if (tsUseEsm) {
552
+ if (!hasLoaderFlag(execArgv)) {
553
+ execArgv = [
554
+ LOADER_FLAG,
555
+ `${TsRunner.EsbuildRegister}/loader`,
556
+ ...execArgv
557
+ ];
558
+ }
559
+ } else if (!hasRequireFlag(execArgv)) {
560
+ execArgv = [REQUIRE_ABBR_FLAG, TsRunner.EsbuildRegister, ...execArgv];
327
561
  }
328
562
  break;
329
563
  }
330
564
  case TsRunner.EsbuildRunner: {
331
- if (!execArgv.includes("-r")) {
332
- execArgv = ["-r", `${TsRunner.EsbuildRunner}/register`, ...execArgv];
565
+ if (!hasRequireFlag(execArgv)) {
566
+ execArgv = [
567
+ REQUIRE_ABBR_FLAG,
568
+ `${TsRunner.EsbuildRunner}/register`,
569
+ ...execArgv
570
+ ];
571
+ }
572
+ break;
573
+ }
574
+ case TsRunner.OXC: {
575
+ if (!execArgv.includes(IMPORT_FLAG)) {
576
+ execArgv = [
577
+ IMPORT_FLAG,
578
+ `@${TsRunner.OXC}-node/core/register`,
579
+ ...execArgv
580
+ ];
333
581
  }
334
582
  break;
335
583
  }
336
584
  case TsRunner.SWC: {
337
- if (!execArgv.includes("-r")) {
338
- execArgv = ["-r", `@${TsRunner.SWC}-node/register`, ...execArgv];
585
+ if (tsUseEsm) {
586
+ if (IMPORT_FLAG_SUPPORTED) {
587
+ if (!hasImportFlag(execArgv)) {
588
+ execArgv = [
589
+ IMPORT_FLAG,
590
+ `@${TsRunner.SWC}-node/register/esm-register`,
591
+ ...execArgv
592
+ ];
593
+ }
594
+ } else if (!hasLoaderFlag(execArgv)) {
595
+ execArgv = [
596
+ LOADER_FLAG,
597
+ `@${TsRunner.SWC}-node/register/esm`,
598
+ ...execArgv
599
+ ];
600
+ }
601
+ } else if (!hasRequireFlag(execArgv)) {
602
+ execArgv = [
603
+ REQUIRE_ABBR_FLAG,
604
+ `@${TsRunner.SWC}-node/register`,
605
+ ...execArgv
606
+ ];
339
607
  }
340
608
  break;
341
609
  }
342
610
  case TsRunner.TSX: {
343
- if (!execArgv.includes("--loader")) {
344
- execArgv = ["--loader", TsRunner.TSX, ...execArgv];
611
+ if (IMPORT_FLAG_SUPPORTED) {
612
+ if (!execArgv.includes(IMPORT_FLAG)) {
613
+ execArgv = [IMPORT_FLAG, TsRunner.TSX, ...execArgv];
614
+ }
615
+ } else if (!execArgv.includes(LOADER_FLAG)) {
616
+ execArgv = [LOADER_FLAG, TsRunner.TSX, ...execArgv];
345
617
  }
346
618
  break;
347
619
  }
@@ -349,31 +621,26 @@ var init_lib2 = __esm({
349
621
  throw new Error(`Unknown ts runner: ${String(tsRunner)}`);
350
622
  }
351
623
  }
352
- } else if (!jsUseEsm) {
353
- const pkg = findUp(workerPath2);
354
- if (pkg) {
355
- jsUseEsm = cjsRequire2(pkg).type === "module";
624
+ } else if (!jsUseEsm && ext !== ".cjs") {
625
+ const pkg3 = findUp(workerPath);
626
+ if (pkg3) {
627
+ jsUseEsm = cjsRequire2(pkg3).type === "module";
356
628
  }
357
629
  }
358
630
  let resolvedPnpLoaderPath;
359
631
  if (process.versions.pnp) {
360
- const nodeOptions = NODE_OPTIONS === null || NODE_OPTIONS === void 0 ? void 0 : NODE_OPTIONS.split(/\s+/);
361
632
  let pnpApiPath;
362
633
  try {
363
634
  pnpApiPath = cjsRequire2.resolve("pnpapi");
364
635
  } catch (_a2) {
365
636
  }
366
- if (pnpApiPath && !(nodeOptions === null || nodeOptions === void 0 ? void 0 : nodeOptions.some((option, index) => ["-r", "--require"].includes(option) && pnpApiPath === cjsRequire2.resolve(nodeOptions[index + 1]))) && !execArgv.includes(pnpApiPath)) {
367
- execArgv = ["-r", pnpApiPath, ...execArgv];
368
- const pnpLoaderPath = import_node_path2.default.resolve(pnpApiPath, "../.pnp.loader.mjs");
637
+ if (pnpApiPath && !NODE_OPTIONS2.some((option, index) => REQUIRE_FLAGS.has(option) && pnpApiPath === cjsRequire2.resolve(NODE_OPTIONS2[index + 1])) && !execArgv.includes(pnpApiPath)) {
638
+ execArgv = [REQUIRE_ABBR_FLAG, pnpApiPath, ...execArgv];
639
+ const pnpLoaderPath = import_node_path3.default.resolve(pnpApiPath, "../.pnp.loader.mjs");
369
640
  if (isFile(pnpLoaderPath)) {
370
- resolvedPnpLoaderPath = (0, import_node_url.pathToFileURL)(pnpLoaderPath).toString();
371
- if (!IS_NODE_20) {
372
- execArgv = [
373
- "--experimental-loader",
374
- resolvedPnpLoaderPath,
375
- ...execArgv
376
- ];
641
+ resolvedPnpLoaderPath = (0, import_node_url.pathToFileURL)(pnpLoaderPath).href;
642
+ if (!MODULE_REGISTER_SUPPORTED) {
643
+ execArgv = [LOADER_FLAG, resolvedPnpLoaderPath, ...execArgv];
377
644
  }
378
645
  }
379
646
  }
@@ -384,7 +651,7 @@ var init_lib2 = __esm({
384
651
  jsUseEsm,
385
652
  tsRunner,
386
653
  tsUseEsm,
387
- workerPath: workerPath2,
654
+ workerPath,
388
655
  pnpLoaderPath: resolvedPnpLoaderPath,
389
656
  execArgv
390
657
  };
@@ -392,7 +659,7 @@ var init_lib2 = __esm({
392
659
  md5Hash = (text) => (0, import_node_crypto.createHash)("md5").update(text).digest("hex");
393
660
  encodeImportModule = (moduleNameOrGlobalShim, type = "import") => {
394
661
  const { moduleName, globalName, named, conditional } = typeof moduleNameOrGlobalShim === "string" ? { moduleName: moduleNameOrGlobalShim } : moduleNameOrGlobalShim;
395
- const importStatement = type === "import" ? `import${globalName ? " " + (named === null ? "* as " + globalName : (named === null || named === void 0 ? void 0 : named.trim()) ? `{${named}}` : globalName) + " from" : ""} '${import_node_path2.default.isAbsolute(moduleName) ? String((0, import_node_url.pathToFileURL)(moduleName)) : moduleName}'` : `${globalName ? "const " + ((named === null || named === void 0 ? void 0 : named.trim()) ? `{${named}}` : globalName) + "=" : ""}require('${moduleName.replace(/\\/g, "\\\\")}')`;
662
+ const importStatement = type === "import" ? `import${globalName ? " " + (named === null ? "* as " + globalName : (named === null || named === void 0 ? void 0 : named.trim()) ? `{${named}}` : globalName) + " from" : ""} '${import_node_path3.default.isAbsolute(moduleName) ? String((0, import_node_url.pathToFileURL)(moduleName)) : moduleName}'` : `${globalName ? "const " + ((named === null || named === void 0 ? void 0 : named.trim()) ? `{${named}}` : globalName) + "=" : ""}require('${moduleName.replace(/\\/g, "\\\\")}')`;
396
663
  if (!globalName) {
397
664
  return importStatement;
398
665
  }
@@ -400,10 +667,13 @@ var init_lib2 = __esm({
400
667
  return importStatement + (conditional === false ? `;${overrideStatement}` : `;if(!globalThis.${globalName})${overrideStatement}`);
401
668
  };
402
669
  _generateGlobals = (globalShims, type) => globalShims.reduce((acc, shim) => `${acc}${acc ? ";" : ""}${encodeImportModule(shim, type)}`, "");
403
- _dirname = typeof __dirname === "undefined" ? import_node_path2.default.dirname((0, import_node_url.fileURLToPath)(importMetaUrl)) : __dirname;
404
- generateGlobals = (workerPath2, globalShims, type = "import") => {
670
+ _dirname = typeof __dirname === "undefined" ? import_node_path3.default.dirname((0, import_node_url.fileURLToPath)(importMetaUrl)) : __dirname;
671
+ generateGlobals = (workerPath, globalShims, type = "import") => {
672
+ if (globalShims.length === 0) {
673
+ return "";
674
+ }
405
675
  globalsCache !== null && globalsCache !== void 0 ? globalsCache : globalsCache = /* @__PURE__ */ new Map();
406
- const cached = globalsCache.get(workerPath2);
676
+ const cached = globalsCache.get(workerPath);
407
677
  if (cached) {
408
678
  const [content2, filepath2] = cached;
409
679
  if (type === "require" && !filepath2 || type === "import" && filepath2 && isFile(filepath2)) {
@@ -415,162 +685,83 @@ var init_lib2 = __esm({
415
685
  let filepath;
416
686
  if (type === "import") {
417
687
  if (!tmpdir) {
418
- tmpdir = import_node_path2.default.resolve(findUp(_dirname), "../node_modules/.synckit");
688
+ tmpdir = import_node_path3.default.resolve(findUp(_dirname), "../node_modules/.synckit");
419
689
  }
420
- import_node_fs2.default.mkdirSync(tmpdir, { recursive: true });
421
- filepath = import_node_path2.default.resolve(tmpdir, md5Hash(workerPath2) + ".mjs");
690
+ import_node_fs3.default.mkdirSync(tmpdir, { recursive: true });
691
+ filepath = import_node_path3.default.resolve(tmpdir, md5Hash(workerPath) + ".mjs");
422
692
  content = encodeImportModule(filepath);
423
- import_node_fs2.default.writeFileSync(filepath, globals);
693
+ import_node_fs3.default.writeFileSync(filepath, globals);
424
694
  }
425
- globalsCache.set(workerPath2, [content, filepath]);
695
+ globalsCache.set(workerPath, [content, filepath]);
426
696
  return content;
427
697
  };
428
698
  }
429
699
  });
430
700
 
431
- // ../../node_modules/.pnpm/eslint-mdx@3.2.0_eslint@9.22.0_jiti@2.4.2_/node_modules/eslint-mdx/lib/index.es2015.mjs
432
- var index_es2015_exports = {};
433
- __export(index_es2015_exports, {
434
- DEFAULT_EXTENSIONS: () => DEFAULT_EXTENSIONS,
435
- MARKDOWN_EXTENSIONS: () => MARKDOWN_EXTENSIONS,
436
- Parser: () => Parser,
437
- arrayify: () => arrayify,
438
- getPhysicalFilename: () => getPhysicalFilename,
439
- getPositionAtFactory: () => getPositionAtFactory,
440
- last: () => last,
441
- loadEsmModule: () => loadEsmModule,
442
- meta: () => meta,
443
- nextCharOffsetFactory: () => nextCharOffsetFactory,
444
- normalizePosition: () => normalizePosition,
445
- parse: () => parse,
446
- parseForESLint: () => parseForESLint,
447
- parser: () => parser,
448
- performSyncWork: () => performSyncWork,
449
- prevCharOffsetFactory: () => prevCharOffsetFactory
701
+ // ../../node_modules/.pnpm/synckit@0.11.3/node_modules/synckit/lib/types.js
702
+ var init_types = __esm({
703
+ "../../node_modules/.pnpm/synckit@0.11.3/node_modules/synckit/lib/types.js"() {
704
+ "use strict";
705
+ init_cjs_shims();
706
+ }
707
+ });
708
+
709
+ // ../../node_modules/.pnpm/synckit@0.11.3/node_modules/synckit/lib/index.js
710
+ function createSyncFn(workerPath, timeoutOrOptions) {
711
+ syncFnCache !== null && syncFnCache !== void 0 ? syncFnCache : syncFnCache = /* @__PURE__ */ new Map();
712
+ if (typeof workerPath !== "string" || workerPath.startsWith("file://")) {
713
+ workerPath = (0, import_node_url2.fileURLToPath)(workerPath);
714
+ }
715
+ const cachedSyncFn = syncFnCache.get(workerPath);
716
+ if (cachedSyncFn) {
717
+ return cachedSyncFn;
718
+ }
719
+ if (!import_node_path4.default.isAbsolute(workerPath)) {
720
+ throw new Error("`workerPath` must be absolute");
721
+ }
722
+ const syncFn = startWorkerThread(workerPath, typeof timeoutOrOptions === "number" ? { timeout: timeoutOrOptions } : timeoutOrOptions);
723
+ syncFnCache.set(workerPath, syncFn);
724
+ return syncFn;
725
+ }
726
+ var import_node_module3, import_node_path4, import_node_url2, import_node_worker_threads2, syncFnCache;
727
+ var init_lib2 = __esm({
728
+ "../../node_modules/.pnpm/synckit@0.11.3/node_modules/synckit/lib/index.js"() {
729
+ "use strict";
730
+ init_cjs_shims();
731
+ import_node_module3 = __toESM(require("module"), 1);
732
+ import_node_path4 = __toESM(require("path"), 1);
733
+ import_node_url2 = require("url");
734
+ import_node_worker_threads2 = require("worker_threads");
735
+ init_constants();
736
+ init_helpers3();
737
+ init_common();
738
+ init_constants();
739
+ init_helpers3();
740
+ init_types();
741
+ }
450
742
  });
451
- var import_node_fs3, import_node_path3, last, arrayify, getPhysicalFilename, loadEsmModule, getPositionAtFactory, normalizePosition, prevCharOffsetFactory, nextCharOffsetFactory, name, version, meta, workerPath, performSyncWork, __defProp2, __defProps, __getOwnPropDescs, __getOwnPropSymbols, __hasOwnProp2, __propIsEnum, __defNormalProp, __spreadValues, __spreadProps, DEFAULT_EXTENSIONS, MARKDOWN_EXTENSIONS, Parser, parser, parse, parseForESLint;
452
- var init_index_es2015 = __esm({
453
- "../../node_modules/.pnpm/eslint-mdx@3.2.0_eslint@9.22.0_jiti@2.4.2_/node_modules/eslint-mdx/lib/index.es2015.mjs"() {
743
+
744
+ // ../../node_modules/.pnpm/eslint-mdx@3.4.0_eslint@9.24.0_jiti@2.4.2_/node_modules/eslint-mdx/lib/sync.js
745
+ var performSyncWork;
746
+ var init_sync = __esm({
747
+ "../../node_modules/.pnpm/eslint-mdx@3.4.0_eslint@9.24.0_jiti@2.4.2_/node_modules/eslint-mdx/lib/sync.js"() {
454
748
  "use strict";
455
749
  init_cjs_shims();
456
- import_node_fs3 = __toESM(require("fs"), 1);
457
- import_node_path3 = __toESM(require("path"), 1);
458
750
  init_lib2();
459
- last = (items) => (
460
- // eslint-disable-next-line unicorn/prefer-at -- FIXME: Node 16.6+ required
461
- items && items[items.length - 1]
462
- );
463
- arrayify = (...args) => args.reduce((arr, curr) => {
464
- arr.push(...Array.isArray(curr) ? curr : curr == null ? [] : [curr]);
465
- return arr;
466
- }, []);
467
- getPhysicalFilename = (filename, child) => {
468
- try {
469
- if (import_node_fs3.default.statSync(filename).isDirectory()) {
470
- return child || filename;
471
- }
472
- } catch (err) {
473
- const { code } = err;
474
- if (code === "ENOTDIR" || code === "ENOENT") {
475
- return getPhysicalFilename(import_node_path3.default.dirname(filename), filename);
476
- }
477
- }
478
- return filename;
479
- };
480
- loadEsmModule = (modulePath) => (
481
- // eslint-disable-next-line @typescript-eslint/no-implied-eval, no-new-func
482
- new Function("modulePath", `return import(modulePath);`)(
483
- modulePath
484
- )
485
- );
486
- getPositionAtFactory = (text) => {
487
- const lines = text.split("\n");
488
- return (offset) => {
489
- let currOffset = 0;
490
- for (const [index, line_] of lines.entries()) {
491
- const line = index + 1;
492
- const nextOffset = currOffset + line_.length;
493
- if (nextOffset >= offset) {
494
- return {
495
- line,
496
- column: offset - currOffset
497
- };
498
- }
499
- currOffset = nextOffset + 1;
500
- }
501
- };
502
- };
503
- normalizePosition = ({
504
- start,
505
- end,
506
- text
507
- }) => {
508
- const startOffset = start.offset;
509
- const endOffset = end.offset;
510
- const range = [startOffset, endOffset];
511
- const getPositionAt = text == null ? null : (
512
- /* istanbul ignore next -- used in worker */
513
- getPositionAtFactory(text)
514
- );
515
- return {
516
- start: startOffset,
517
- end: endOffset,
518
- loc: {
519
- start: (
520
- /* istanbul ignore next -- used in worker */
521
- "line" in start ? start : getPositionAt(startOffset)
522
- ),
523
- end: (
524
- /* istanbul ignore next -- used in worker */
525
- "line" in end ? end : getPositionAt(endOffset)
526
- )
527
- },
528
- range
529
- };
530
- };
531
- prevCharOffsetFactory = (text) => (offset) => {
532
- for (let i = offset; i >= 0; i--) {
533
- const char = text[i];
534
- if (/^\S$/.test(char)) {
535
- return i;
536
- }
537
- }
538
- };
539
- nextCharOffsetFactory = (text) => {
540
- const total = text.length;
541
- return (offset) => {
542
- for (let i = offset; i <= total; i++) {
543
- const char = text[i];
544
- if (/^\S$/.test(char)) {
545
- return i;
546
- }
547
- }
548
- };
549
- };
550
- name = "eslint-mdx";
551
- version = "3.2.0";
552
- meta = { name, version };
553
- workerPath = require.resolve("./worker");
554
- performSyncWork = createSyncFn(workerPath);
555
- __defProp2 = Object.defineProperty;
556
- __defProps = Object.defineProperties;
557
- __getOwnPropDescs = Object.getOwnPropertyDescriptors;
558
- __getOwnPropSymbols = Object.getOwnPropertySymbols;
559
- __hasOwnProp2 = Object.prototype.hasOwnProperty;
560
- __propIsEnum = Object.prototype.propertyIsEnumerable;
561
- __defNormalProp = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
562
- __spreadValues = (a, b) => {
563
- for (var prop in b || (b = {}))
564
- if (__hasOwnProp2.call(b, prop))
565
- __defNormalProp(a, prop, b[prop]);
566
- if (__getOwnPropSymbols)
567
- for (var prop of __getOwnPropSymbols(b)) {
568
- if (__propIsEnum.call(b, prop))
569
- __defNormalProp(a, prop, b[prop]);
570
- }
571
- return a;
572
- };
573
- __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
751
+ init_helpers();
752
+ performSyncWork = createSyncFn(cjsRequire.resolve("./worker.js"));
753
+ }
754
+ });
755
+
756
+ // ../../node_modules/.pnpm/eslint-mdx@3.4.0_eslint@9.24.0_jiti@2.4.2_/node_modules/eslint-mdx/lib/parser.js
757
+ var import_node_path5, DEFAULT_EXTENSIONS, MARKDOWN_EXTENSIONS, Parser, parser, parse, parseForESLint;
758
+ var init_parser = __esm({
759
+ "../../node_modules/.pnpm/eslint-mdx@3.4.0_eslint@9.24.0_jiti@2.4.2_/node_modules/eslint-mdx/lib/parser.js"() {
760
+ "use strict";
761
+ init_cjs_shims();
762
+ import_node_path5 = __toESM(require("path"), 1);
763
+ init_helpers();
764
+ init_sync();
574
765
  DEFAULT_EXTENSIONS = [".mdx"];
575
766
  MARKDOWN_EXTENSIONS = [".md"];
576
767
  Parser = class {
@@ -581,35 +772,21 @@ var init_index_es2015 = __esm({
581
772
  parse(code, options) {
582
773
  return this.parseForESLint(code, options).ast;
583
774
  }
584
- parseForESLint(code, {
585
- filePath,
586
- sourceType,
587
- ignoreRemarkConfig,
588
- extensions,
589
- markdownExtensions
590
- }) {
591
- const extname = import_node_path3.default.extname(filePath);
592
- const isMdx = [...DEFAULT_EXTENSIONS, ...arrayify(extensions)].includes(
593
- extname
594
- );
775
+ parseForESLint(code, { filePath, sourceType, ignoreRemarkConfig, extensions, markdownExtensions }) {
776
+ const extname = import_node_path5.default.extname(filePath);
777
+ const isMdx = [...DEFAULT_EXTENSIONS, ...arrayify(extensions)].includes(extname);
595
778
  const isMarkdown = [
596
779
  ...MARKDOWN_EXTENSIONS,
597
780
  ...arrayify(markdownExtensions)
598
781
  ].includes(extname);
599
782
  if (!isMdx && !isMarkdown) {
600
- throw new Error(
601
- "Unsupported file extension, make sure setting the `extensions` or `markdownExtensions` option correctly."
602
- );
783
+ throw new Error("Unsupported file extension, make sure setting the `extensions` or `markdownExtensions` option correctly.");
603
784
  }
604
- const physicalFilename = getPhysicalFilename(filePath);
605
785
  let result;
606
786
  try {
607
787
  result = performSyncWork({
608
- fileOptions: {
609
- path: physicalFilename,
610
- value: code
611
- },
612
- physicalFilename,
788
+ filePath: getPhysicalFilename(filePath),
789
+ code,
613
790
  isMdx,
614
791
  ignoreRemarkConfig
615
792
  });
@@ -619,66 +796,290 @@ var init_index_es2015 = __esm({
619
796
  }
620
797
  const { message, line, column, place } = err;
621
798
  const point = place && ("start" in place ? place.start : place);
622
- throw Object.assign(
623
- new SyntaxError(message, {
624
- cause: err
625
- }),
626
- {
627
- lineNumber: line,
628
- column,
629
- index: (
630
- /* istanbul ignore next */
631
- point == null ? void 0 : point.offset
632
- )
633
- }
634
- );
799
+ throw Object.assign(new SyntaxError(message, {
800
+ cause: err
801
+ }), {
802
+ lineNumber: line,
803
+ column,
804
+ index: point?.offset
805
+ });
635
806
  }
636
807
  const { root, body, comments, tokens } = result;
637
808
  return {
638
- ast: __spreadProps(__spreadValues({}, normalizePosition(root.position)), {
809
+ ast: {
810
+ ...normalizePosition(root.position),
639
811
  type: "Program",
640
812
  sourceType,
641
813
  body,
642
814
  comments,
643
815
  tokens
644
- })
816
+ }
645
817
  };
646
818
  }
647
819
  };
648
- parser = new Parser();
649
- ({ parse, parseForESLint } = parser);
820
+ parser = new Parser();
821
+ ({ parse, parseForESLint } = parser);
822
+ }
823
+ });
824
+
825
+ // ../../node_modules/.pnpm/eslint-mdx@3.4.0_eslint@9.24.0_jiti@2.4.2_/node_modules/eslint-mdx/lib/index.js
826
+ var lib_exports = {};
827
+ __export(lib_exports, {
828
+ DEFAULT_EXTENSIONS: () => DEFAULT_EXTENSIONS,
829
+ MARKDOWN_EXTENSIONS: () => MARKDOWN_EXTENSIONS,
830
+ Parser: () => Parser,
831
+ arrayify: () => arrayify,
832
+ cjsRequire: () => cjsRequire,
833
+ getPhysicalFilename: () => getPhysicalFilename,
834
+ getPositionAtFactory: () => getPositionAtFactory,
835
+ meta: () => meta,
836
+ nextCharOffsetFactory: () => nextCharOffsetFactory,
837
+ normalizePosition: () => normalizePosition,
838
+ parse: () => parse,
839
+ parseForESLint: () => parseForESLint,
840
+ parser: () => parser,
841
+ performSyncWork: () => performSyncWork,
842
+ prevCharOffsetFactory: () => prevCharOffsetFactory
843
+ });
844
+ var init_lib3 = __esm({
845
+ "../../node_modules/.pnpm/eslint-mdx@3.4.0_eslint@9.24.0_jiti@2.4.2_/node_modules/eslint-mdx/lib/index.js"() {
846
+ "use strict";
847
+ init_cjs_shims();
848
+ init_helpers();
849
+ init_meta();
850
+ init_parser();
851
+ init_sync();
852
+ }
853
+ });
854
+
855
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.4.0_eslint@9.24.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/configs/flat.js
856
+ var flat, parserOptions, restConfig, flatCodeBlocks;
857
+ var init_flat = __esm({
858
+ "../../node_modules/.pnpm/eslint-plugin-mdx@3.4.0_eslint@9.24.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/configs/flat.js"() {
859
+ "use strict";
860
+ init_cjs_shims();
861
+ init_lib3();
862
+ init_lib4();
863
+ init_code_blocks();
864
+ flat = {
865
+ files: ["**/*.{md,mdx}"],
866
+ languageOptions: {
867
+ sourceType: "module",
868
+ ecmaVersion: "latest",
869
+ parser: lib_exports,
870
+ globals: {
871
+ React: false
872
+ }
873
+ },
874
+ plugins: {
875
+ mdx: lib_exports2
876
+ },
877
+ rules: {
878
+ "mdx/remark": "warn",
879
+ "no-unused-expressions": "error",
880
+ "react/react-in-jsx-scope": "off"
881
+ }
882
+ };
883
+ ({ parserOptions, ...restConfig } = codeBlocks);
884
+ flatCodeBlocks = {
885
+ files: ["**/*.{md,mdx}/**"],
886
+ languageOptions: {
887
+ parserOptions
888
+ },
889
+ ...restConfig
890
+ };
891
+ }
892
+ });
893
+
894
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.4.0_eslint@9.24.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/helpers.js
895
+ var import_node_module4, getGlobals, cjsRequire3;
896
+ var init_helpers4 = __esm({
897
+ "../../node_modules/.pnpm/eslint-plugin-mdx@3.4.0_eslint@9.24.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/helpers.js"() {
898
+ "use strict";
899
+ init_cjs_shims();
900
+ import_node_module4 = require("module");
901
+ getGlobals = (sources, initialGlobals = {}) => (Array.isArray(sources) ? sources : Object.keys(sources)).reduce((globals, source) => Object.assign(globals, {
902
+ [source]: false
903
+ }), initialGlobals);
904
+ cjsRequire3 = typeof require === "undefined" ? (0, import_node_module4.createRequire)(importMetaUrl) : require;
905
+ }
906
+ });
907
+
908
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.4.0_eslint@9.24.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/configs/overrides.js
909
+ var isReactPluginAvailable, overrides;
910
+ var init_overrides = __esm({
911
+ "../../node_modules/.pnpm/eslint-plugin-mdx@3.4.0_eslint@9.24.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/configs/overrides.js"() {
912
+ "use strict";
913
+ init_cjs_shims();
914
+ init_lib3();
915
+ init_helpers4();
916
+ init_base();
917
+ isReactPluginAvailable = false;
918
+ try {
919
+ cjsRequire3.resolve("eslint-plugin-react");
920
+ isReactPluginAvailable = true;
921
+ } catch {
922
+ }
923
+ overrides = {
924
+ ...base,
925
+ globals: {
926
+ React: false
927
+ },
928
+ plugins: arrayify(base.plugins, isReactPluginAvailable ? "react" : null),
929
+ rules: {
930
+ "react/jsx-no-undef": isReactPluginAvailable ? [
931
+ 2,
932
+ {
933
+ allowGlobals: true
934
+ }
935
+ ] : 0,
936
+ "react/react-in-jsx-scope": 0
937
+ }
938
+ };
939
+ }
940
+ });
941
+
942
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.4.0_eslint@9.24.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/configs/recommended.js
943
+ var overrides2, recommended, addPrettierRules;
944
+ var init_recommended = __esm({
945
+ "../../node_modules/.pnpm/eslint-plugin-mdx@3.4.0_eslint@9.24.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/configs/recommended.js"() {
946
+ "use strict";
947
+ init_cjs_shims();
948
+ init_helpers4();
949
+ init_base();
950
+ overrides2 = [
951
+ {
952
+ files: ["*.md", "*.mdx"],
953
+ extends: "plugin:mdx/overrides",
954
+ ...base
955
+ },
956
+ {
957
+ files: "**/*.{md,mdx}/**",
958
+ extends: "plugin:mdx/code-blocks"
959
+ }
960
+ ];
961
+ recommended = {
962
+ overrides: overrides2
963
+ };
964
+ addPrettierRules = () => {
965
+ try {
966
+ cjsRequire3.resolve("prettier");
967
+ const { meta: meta3 } = cjsRequire3("eslint-plugin-prettier");
968
+ const version = meta3?.version || "";
969
+ const [major, minor, patch] = version.split(".");
970
+ if (+major > 5 || +major === 5 && (+minor > 1 || +minor === 1 && Number.parseInt(patch) >= 2)) {
971
+ return;
972
+ }
973
+ overrides2.push({
974
+ files: "*.md",
975
+ rules: {
976
+ "prettier/prettier": [
977
+ "error",
978
+ {
979
+ parser: "markdown"
980
+ }
981
+ ]
982
+ }
983
+ }, {
984
+ files: "*.mdx",
985
+ rules: {
986
+ "prettier/prettier": [
987
+ "error",
988
+ {
989
+ parser: "mdx"
990
+ }
991
+ ]
992
+ }
993
+ });
994
+ } catch {
995
+ }
996
+ };
997
+ addPrettierRules();
998
+ }
999
+ });
1000
+
1001
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.4.0_eslint@9.24.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/configs/index.js
1002
+ var configs;
1003
+ var init_configs = __esm({
1004
+ "../../node_modules/.pnpm/eslint-plugin-mdx@3.4.0_eslint@9.24.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/configs/index.js"() {
1005
+ "use strict";
1006
+ init_cjs_shims();
1007
+ init_base();
1008
+ init_code_blocks();
1009
+ init_flat();
1010
+ init_overrides();
1011
+ init_recommended();
1012
+ configs = {
1013
+ base,
1014
+ "code-blocks": codeBlocks,
1015
+ codeBlocks,
1016
+ flat,
1017
+ flatCodeBlocks,
1018
+ overrides,
1019
+ recommended
1020
+ };
650
1021
  }
651
1022
  });
652
1023
 
653
- // ../../node_modules/.pnpm/eslint-plugin-mdx@3.2.0_eslint@9.22.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/index.es2015.mjs
654
- var index_es2015_exports2 = {};
655
- __export(index_es2015_exports2, {
656
- DEFAULT_LANGUAGE_MAPPER: () => DEFAULT_LANGUAGE_MAPPER,
657
- base: () => base,
658
- codeBlocks: () => codeBlocks,
659
- configs: () => configs,
660
- createRemarkProcessor: () => createRemarkProcessor,
661
- flat: () => flat,
662
- flatCodeBlocks: () => flatCodeBlocks,
663
- getGlobals: () => getGlobals,
664
- getShortLang: () => getShortLang,
665
- meta: () => meta2,
666
- overrides: () => overrides$1,
667
- processorOptions: () => processorOptions,
668
- processors: () => processors,
669
- recommended: () => recommended,
670
- remark: () => remark,
671
- rules: () => rules
1024
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.4.0_eslint@9.24.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/meta.js
1025
+ var pkg2, meta2;
1026
+ var init_meta2 = __esm({
1027
+ "../../node_modules/.pnpm/eslint-plugin-mdx@3.4.0_eslint@9.24.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/meta.js"() {
1028
+ "use strict";
1029
+ init_cjs_shims();
1030
+ init_helpers4();
1031
+ pkg2 = cjsRequire3("../package.json");
1032
+ meta2 = { name: pkg2.name, version: pkg2.version };
1033
+ }
672
1034
  });
1035
+
1036
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.4.0_eslint@9.24.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/processors/helpers.js
673
1037
  function getShortLang(filename, languageMapper) {
674
- const language = last(filename.split("."));
1038
+ const language = filename.split(".").at(-1);
675
1039
  if (languageMapper === false) {
676
1040
  return language;
677
1041
  }
678
- languageMapper = __spreadValues$3(__spreadValues$3({}, DEFAULT_LANGUAGE_MAPPER), languageMapper);
1042
+ languageMapper = languageMapper ? { ...DEFAULT_LANGUAGE_MAPPER, ...languageMapper } : DEFAULT_LANGUAGE_MAPPER;
1043
+ const mapped = languageMapper[language];
1044
+ if (mapped) {
1045
+ return mapped;
1046
+ }
679
1047
  const lang = language.toLowerCase();
680
- return languageMapper[language] || languageMapper[lang] || lang;
1048
+ return languageMapper[lang] || lang;
681
1049
  }
1050
+ var DEFAULT_LANGUAGE_MAPPER;
1051
+ var init_helpers5 = __esm({
1052
+ "../../node_modules/.pnpm/eslint-plugin-mdx@3.4.0_eslint@9.24.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/processors/helpers.js"() {
1053
+ "use strict";
1054
+ init_cjs_shims();
1055
+ DEFAULT_LANGUAGE_MAPPER = {
1056
+ ecmascript: "js",
1057
+ javascript: "js",
1058
+ javascriptreact: "jsx",
1059
+ typescript: "ts",
1060
+ typescriptreact: "tsx",
1061
+ markdown: "md",
1062
+ markdownjsx: "mdx",
1063
+ markdownreact: "mdx",
1064
+ mdown: "md",
1065
+ mkdn: "md"
1066
+ };
1067
+ }
1068
+ });
1069
+
1070
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.4.0_eslint@9.24.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/from-markdown.js
1071
+ var fromMarkdown;
1072
+ var init_from_markdown = __esm({
1073
+ "../../node_modules/.pnpm/eslint-plugin-mdx@3.4.0_eslint@9.24.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/from-markdown.js"() {
1074
+ "use strict";
1075
+ init_cjs_shims();
1076
+ init_lib2();
1077
+ init_helpers4();
1078
+ fromMarkdown = createSyncFn(cjsRequire3.resolve("./worker.js"));
1079
+ }
1080
+ });
1081
+
1082
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.4.0_eslint@9.24.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/processors/markdown.js
682
1083
  function traverse(node, callbacks) {
683
1084
  if (callbacks[node.type]) {
684
1085
  callbacks[node.type](node);
@@ -692,15 +1093,15 @@ function traverse(node, callbacks) {
692
1093
  }
693
1094
  }
694
1095
  }
695
- function getComment(html) {
696
- const commentStart = "<!--";
697
- const commentEnd = "-->";
698
- const regex = /^(?:eslint\b|global\s)/u;
699
- if (!html.startsWith(commentStart) || !html.endsWith(commentEnd)) {
1096
+ function getComment(value, isMdx = false) {
1097
+ const [commentStart, commentEnd] = COMMENTS[+isMdx];
1098
+ const commentStartMatched = commentStart.exec(value);
1099
+ const commentEndMatched = commentEnd.exec(value);
1100
+ if (commentStartMatched == null || commentEndMatched == null) {
700
1101
  return "";
701
1102
  }
702
- const comment = html.slice(commentStart.length, -commentEnd.length);
703
- if (!regex.test(comment.trim())) {
1103
+ const comment = value.slice(commentStartMatched[0].length, -commentEndMatched[0].length).trim();
1104
+ if (!eslintCommentRegex.test(comment)) {
704
1105
  return "";
705
1106
  }
706
1107
  return comment;
@@ -709,19 +1110,14 @@ function getBeginningOfLineOffset(node) {
709
1110
  return node.position.start.offset - node.position.start.column + 1;
710
1111
  }
711
1112
  function getIndentText(text, node) {
712
- return leadingWhitespaceRegex.exec(
713
- text.slice(getBeginningOfLineOffset(node))
714
- )[0];
1113
+ return leadingWhitespaceRegex.exec(text.slice(getBeginningOfLineOffset(node)))[0];
715
1114
  }
716
1115
  function getBlockRangeMap(text, node, comments) {
717
1116
  const startOffset = getBeginningOfLineOffset(node);
718
1117
  const code = text.slice(startOffset, node.position.end.offset);
719
1118
  const lines = code.split("\n");
720
1119
  const baseIndent = getIndentText(text, node).length;
721
- const commentLength = comments.reduce(
722
- (len, comment) => len + comment.length + 1,
723
- 0
724
- );
1120
+ const commentLength = comments.reduce((len, comment) => len + comment.length + 1, 0);
725
1121
  const rangeMap = [
726
1122
  {
727
1123
  indent: baseIndent,
@@ -738,9 +1134,6 @@ function getBlockRangeMap(text, node, comments) {
738
1134
  rangeMap.push({
739
1135
  indent: trimLength,
740
1136
  js: jsOffset,
741
- // Advance `trimLength` character from the beginning of the Markdown
742
- // line to the beginning of the equivalent JS line, then compute the
743
- // delta.
744
1137
  md: mdOffset + trimLength - jsOffset
745
1138
  });
746
1139
  mdOffset += line.length + 1;
@@ -749,62 +1142,61 @@ function getBlockRangeMap(text, node, comments) {
749
1142
  return rangeMap;
750
1143
  }
751
1144
  function fileNameFromMeta(block) {
752
- var _a2, _b;
753
- return (_b = (_a2 = block.meta) == null ? void 0 : _a2.match(codeBlockFileNameRegex)) == null ? void 0 : _b.groups.filename.replaceAll(/\s+/gu, "_");
1145
+ return codeBlockFileNameRegex.exec(block.meta)?.groups.filename.replaceAll(/\s+/gu, "_");
754
1146
  }
755
1147
  function preprocess(sourceText, filename) {
756
1148
  const text = sourceText.startsWith(BOM) ? sourceText.slice(1) : sourceText;
757
- const ast = fromMarkdown(text);
1149
+ const ast = fromMarkdown(text, filename.endsWith(".mdx"));
758
1150
  const blocks = [];
759
1151
  blocksCache.set(filename, blocks);
760
- let htmlComments = [];
1152
+ let allComments = [];
1153
+ function mdxExpression(node) {
1154
+ const comment = getComment(node.value, true);
1155
+ if (comment) {
1156
+ allComments.push(comment);
1157
+ } else {
1158
+ allComments = [];
1159
+ }
1160
+ }
761
1161
  traverse(ast, {
762
1162
  "*"() {
763
- htmlComments = [];
1163
+ allComments = [];
764
1164
  },
765
- /**
766
- * Visit a code node.
767
- * @param {CodeNode} node The visited node.
768
- * @returns {void}
769
- */
770
1165
  code(node) {
771
- if (node.lang) {
772
- const comments = [];
773
- for (const comment of htmlComments) {
774
- if (comment.trim() === "eslint-skip") {
775
- htmlComments = [];
776
- return;
777
- }
778
- comments.push(`/*${comment}*/`);
1166
+ if (!node.lang) {
1167
+ return;
1168
+ }
1169
+ const comments = [];
1170
+ for (const comment of allComments) {
1171
+ if (comment === "eslint-skip") {
1172
+ allComments = [];
1173
+ return;
779
1174
  }
780
- htmlComments = [];
781
- blocks.push(__spreadProps$2(__spreadValues$2({}, node), {
782
- baseIndentText: getIndentText(text, node),
783
- comments,
784
- rangeMap: getBlockRangeMap(text, node, comments)
785
- }));
1175
+ comments.push(`/* ${comment} */`);
786
1176
  }
1177
+ allComments = [];
1178
+ blocks.push({
1179
+ ...node,
1180
+ baseIndentText: getIndentText(text, node),
1181
+ comments,
1182
+ rangeMap: getBlockRangeMap(text, node, comments)
1183
+ });
787
1184
  },
788
- /**
789
- * Visit an HTML node.
790
- * @param {HtmlNode} node The visited node.
791
- * @returns {void}
792
- */
793
1185
  html(node) {
794
1186
  const comment = getComment(node.value);
795
1187
  if (comment) {
796
- htmlComments.push(comment);
1188
+ allComments.push(comment);
797
1189
  } else {
798
- htmlComments = [];
1190
+ allComments = [];
799
1191
  }
800
- }
1192
+ },
1193
+ mdxFlowExpression: mdxExpression,
1194
+ mdxTextExpression: mdxExpression
801
1195
  });
802
1196
  return blocks.map((block, index) => {
803
- var _a2;
804
1197
  const [language] = block.lang.trim().split(" ");
805
- const fileExtension = Object.hasOwn(languageToFileExtension, language) ? languageToFileExtension[language] : language;
806
1198
  return {
807
- filename: (_a2 = fileNameFromMeta(block)) != null ? _a2 : `${index}.${fileExtension}`,
1199
+ filename: fileNameFromMeta(block) ?? `${index}.${language}`,
808
1200
  text: [...block.comments, block.value, ""].join("\n")
809
1201
  };
810
1202
  });
@@ -823,17 +1215,15 @@ ${block.baseIndentText}`)
823
1215
  };
824
1216
  }
825
1217
  function adjustBlock(block) {
826
- const leadingCommentLines = block.comments.reduce(
827
- (count, comment) => count + comment.split("\n").length,
828
- 0
829
- );
1218
+ const leadingCommentLines = block.comments.reduce((count, comment) => count + comment.split("\n").length, 0);
830
1219
  const blockStart = block.position.start.line;
831
1220
  return function adjustMessage(message) {
832
1221
  if (!Number.isInteger(message.line)) {
833
- return __spreadProps$2(__spreadValues$2({}, message), {
1222
+ return {
1223
+ ...message,
834
1224
  line: blockStart,
835
1225
  column: block.position.start.column
836
- });
1226
+ };
837
1227
  }
838
1228
  const lineInCode = message.line - leadingCommentLines;
839
1229
  if (lineInCode < 1 || lineInCode >= block.rangeMap.length) {
@@ -847,7 +1237,8 @@ function adjustBlock(block) {
847
1237
  out.endLine = message.endLine - leadingCommentLines + blockStart;
848
1238
  }
849
1239
  if (Array.isArray(message.suggestions)) {
850
- out.suggestions = message.suggestions.map((suggestion) => __spreadProps$2(__spreadValues$2({}, suggestion), {
1240
+ out.suggestions = message.suggestions.map((suggestion) => ({
1241
+ ...suggestion,
851
1242
  fix: adjustFix(block, suggestion.fix)
852
1243
  }));
853
1244
  }
@@ -855,7 +1246,7 @@ function adjustBlock(block) {
855
1246
  if (message.fix) {
856
1247
  adjustedFix.fix = adjustFix(block, message.fix);
857
1248
  }
858
- return __spreadValues$2(__spreadValues$2(__spreadValues$2({}, message), out), adjustedFix);
1249
+ return { ...message, ...out, ...adjustedFix };
859
1250
  };
860
1251
  }
861
1252
  function excludeUnsatisfiableRules(message) {
@@ -869,437 +1260,93 @@ function postprocess(messages, filename) {
869
1260
  return group.map(adjust).filter(excludeUnsatisfiableRules);
870
1261
  });
871
1262
  }
872
- var import_node_path4, import_node_module3, mdx, base, codeBlocks, __defProp$6, __getOwnPropSymbols$6, __hasOwnProp$6, __propIsEnum$6, __defNormalProp$6, __spreadValues$6, __objRest, flat, _a, parserOptions, restConfig, flatCodeBlocks, __defProp$5, __defProps$3, __getOwnPropDescs$3, __getOwnPropSymbols$5, __hasOwnProp$5, __propIsEnum$5, __defNormalProp$5, __spreadValues$5, __spreadProps$3, isReactPluginAvailable, overrides$1, __defProp$4, __getOwnPropSymbols$4, __hasOwnProp$4, __propIsEnum$4, __defNormalProp$4, __spreadValues$4, overrides, recommended, getImportMetaUrl2, cjsRequire3, addPrettierRules, configs, getGlobals, name2, version2, meta2, __defProp$3, __getOwnPropSymbols$3, __hasOwnProp$3, __propIsEnum$3, __defNormalProp$3, __spreadValues$3, DEFAULT_LANGUAGE_MAPPER, fromMarkdown, __defProp$2, __defProps$2, __getOwnPropDescs$2, __getOwnPropSymbols$2, __hasOwnProp$2, __propIsEnum$2, __defNormalProp$2, __spreadValues$2, __spreadProps$2, UNSATISFIABLE_RULES, SUPPORTS_AUTOFIX, BOM, blocksCache, leadingWhitespaceRegex, codeBlockFileNameRegex, languageToFileExtension, markdownProcessor, processorOptions, linterPath, ESLinter, verify, __defProp$1, __defProps$1, __getOwnPropDescs$1, __getOwnPropSymbols$1, __hasOwnProp$1, __propIsEnum$1, __defNormalProp$1, __spreadValues$1, __spreadProps$1, createRemarkProcessor, remark$1, processors, __defProp3, __defProps2, __getOwnPropDescs2, __getOwnPropSymbols2, __hasOwnProp3, __propIsEnum2, __defNormalProp2, __spreadValues2, __spreadProps2, remark, rules;
873
- var init_index_es20152 = __esm({
874
- "../../node_modules/.pnpm/eslint-plugin-mdx@3.2.0_eslint@9.22.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/index.es2015.mjs"() {
1263
+ var UNSATISFIABLE_RULES, SUPPORTS_AUTOFIX, BOM, blocksCache, COMMENTS, eslintCommentRegex, leadingWhitespaceRegex, codeBlockFileNameRegex, markdownProcessor;
1264
+ var init_markdown = __esm({
1265
+ "../../node_modules/.pnpm/eslint-plugin-mdx@3.4.0_eslint@9.24.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/processors/markdown.js"() {
875
1266
  "use strict";
876
1267
  init_cjs_shims();
877
- init_index_es2015();
878
- init_index_es2015();
879
- init_lib2();
880
- import_node_path4 = __toESM(require("path"), 1);
881
- import_node_module3 = require("module");
882
- mdx = /* @__PURE__ */ Object.freeze({
883
- __proto__: null,
884
- get DEFAULT_LANGUAGE_MAPPER() {
885
- return DEFAULT_LANGUAGE_MAPPER;
886
- },
887
- get base() {
888
- return base;
889
- },
890
- get codeBlocks() {
891
- return codeBlocks;
892
- },
893
- get configs() {
894
- return configs;
895
- },
896
- get createRemarkProcessor() {
897
- return createRemarkProcessor;
898
- },
899
- get flat() {
900
- return flat;
901
- },
902
- get flatCodeBlocks() {
903
- return flatCodeBlocks;
904
- },
905
- get getGlobals() {
906
- return getGlobals;
907
- },
908
- get getShortLang() {
909
- return getShortLang;
910
- },
911
- get meta() {
912
- return meta2;
913
- },
914
- get overrides() {
915
- return overrides$1;
916
- },
917
- get processorOptions() {
918
- return processorOptions;
919
- },
920
- get processors() {
921
- return processors;
922
- },
923
- get recommended() {
924
- return recommended;
925
- },
926
- get remark() {
927
- return remark;
928
- },
929
- get rules() {
930
- return rules;
931
- }
932
- });
933
- base = {
934
- parser: "eslint-mdx",
935
- parserOptions: {
936
- sourceType: "module",
937
- ecmaVersion: "latest"
938
- },
939
- plugins: ["mdx"],
940
- processor: "mdx/remark",
941
- rules: {
942
- "mdx/remark": "warn",
943
- "no-unused-expressions": "error"
944
- }
945
- };
946
- codeBlocks = {
947
- parserOptions: {
948
- ecmaFeatures: {
949
- // Adding a "use strict" directive at the top of
950
- // every code block is tedious and distracting, so
951
- // opt into strict mode parsing without the
952
- // directive.
953
- impliedStrict: true
954
- }
955
- },
956
- rules: {
957
- // The Markdown parser automatically trims trailing
958
- // newlines from code blocks.
959
- "eol-last": "off",
960
- // In code snippets and examples, these rules are often
961
- // counterproductive to clarity and brevity.
962
- "no-undef": "off",
963
- "no-unused-expressions": "off",
964
- "no-unused-vars": "off",
965
- "padded-blocks": "off",
966
- // Adding a "use strict" directive at the top of every
967
- // code block is tedious and distracting. The config
968
- // opts into strict mode parsing without the directive.
969
- strict: "off",
970
- // The processor will not receive a Unicode Byte Order
971
- // Mark from the Markdown parser.
972
- "unicode-bom": "off"
973
- }
974
- };
975
- __defProp$6 = Object.defineProperty;
976
- __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
977
- __hasOwnProp$6 = Object.prototype.hasOwnProperty;
978
- __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
979
- __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
980
- __spreadValues$6 = (a, b) => {
981
- for (var prop in b || (b = {}))
982
- if (__hasOwnProp$6.call(b, prop))
983
- __defNormalProp$6(a, prop, b[prop]);
984
- if (__getOwnPropSymbols$6)
985
- for (var prop of __getOwnPropSymbols$6(b)) {
986
- if (__propIsEnum$6.call(b, prop))
987
- __defNormalProp$6(a, prop, b[prop]);
988
- }
989
- return a;
990
- };
991
- __objRest = (source, exclude) => {
992
- var target = {};
993
- for (var prop in source)
994
- if (__hasOwnProp$6.call(source, prop) && exclude.indexOf(prop) < 0)
995
- target[prop] = source[prop];
996
- if (source != null && __getOwnPropSymbols$6)
997
- for (var prop of __getOwnPropSymbols$6(source)) {
998
- if (exclude.indexOf(prop) < 0 && __propIsEnum$6.call(source, prop))
999
- target[prop] = source[prop];
1000
- }
1001
- return target;
1002
- };
1003
- flat = {
1004
- files: ["**/*.{md,mdx}"],
1005
- languageOptions: {
1006
- sourceType: "module",
1007
- ecmaVersion: "latest",
1008
- parser: index_es2015_exports,
1009
- globals: {
1010
- React: false
1011
- }
1012
- },
1013
- plugins: {
1014
- mdx
1015
- },
1016
- rules: {
1017
- "mdx/remark": "warn",
1018
- "no-unused-expressions": "error",
1019
- "react/react-in-jsx-scope": 0
1020
- }
1021
- };
1022
- _a = codeBlocks;
1023
- ({ parserOptions } = _a);
1024
- restConfig = __objRest(_a, ["parserOptions"]);
1025
- flatCodeBlocks = __spreadValues$6({
1026
- files: ["**/*.{md,mdx}/*"],
1027
- languageOptions: {
1028
- parserOptions
1029
- }
1030
- }, restConfig);
1031
- __defProp$5 = Object.defineProperty;
1032
- __defProps$3 = Object.defineProperties;
1033
- __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
1034
- __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
1035
- __hasOwnProp$5 = Object.prototype.hasOwnProperty;
1036
- __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
1037
- __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1038
- __spreadValues$5 = (a, b) => {
1039
- for (var prop in b || (b = {}))
1040
- if (__hasOwnProp$5.call(b, prop))
1041
- __defNormalProp$5(a, prop, b[prop]);
1042
- if (__getOwnPropSymbols$5)
1043
- for (var prop of __getOwnPropSymbols$5(b)) {
1044
- if (__propIsEnum$5.call(b, prop))
1045
- __defNormalProp$5(a, prop, b[prop]);
1046
- }
1047
- return a;
1048
- };
1049
- __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
1050
- isReactPluginAvailable = false;
1051
- try {
1052
- require.resolve("eslint-plugin-react");
1053
- isReactPluginAvailable = true;
1054
- } catch (e) {
1055
- }
1056
- overrides$1 = __spreadProps$3(__spreadValues$5({}, base), {
1057
- globals: {
1058
- React: false
1059
- },
1060
- plugins: arrayify(
1061
- base.plugins,
1062
- /* istanbul ignore next */
1063
- isReactPluginAvailable ? "react" : null
1064
- ),
1065
- rules: {
1066
- "react/jsx-no-undef": (
1067
- /* istanbul ignore next */
1068
- isReactPluginAvailable ? [
1069
- 2,
1070
- {
1071
- allowGlobals: true
1072
- }
1073
- ] : 0
1074
- ),
1075
- "react/react-in-jsx-scope": 0
1076
- }
1077
- });
1078
- __defProp$4 = Object.defineProperty;
1079
- __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
1080
- __hasOwnProp$4 = Object.prototype.hasOwnProperty;
1081
- __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
1082
- __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1083
- __spreadValues$4 = (a, b) => {
1084
- for (var prop in b || (b = {}))
1085
- if (__hasOwnProp$4.call(b, prop))
1086
- __defNormalProp$4(a, prop, b[prop]);
1087
- if (__getOwnPropSymbols$4)
1088
- for (var prop of __getOwnPropSymbols$4(b)) {
1089
- if (__propIsEnum$4.call(b, prop))
1090
- __defNormalProp$4(a, prop, b[prop]);
1091
- }
1092
- return a;
1093
- };
1094
- overrides = [
1095
- __spreadValues$4({
1096
- files: ["*.md", "*.mdx"],
1097
- extends: "plugin:mdx/overrides"
1098
- }, base),
1099
- {
1100
- files: "**/*.{md,mdx}/**",
1101
- extends: "plugin:mdx/code-blocks"
1102
- }
1103
- ];
1104
- recommended = {
1105
- overrides
1106
- };
1107
- getImportMetaUrl2 = () => {
1108
- try {
1109
- return new Function("return import.meta.url")();
1110
- } catch (e) {
1111
- return import_node_path4.default.resolve(process.cwd(), "__test__.js");
1112
- }
1113
- };
1114
- cjsRequire3 = typeof require === "undefined" ? (0, import_node_module3.createRequire)(getImportMetaUrl2()) : require;
1115
- addPrettierRules = () => {
1116
- try {
1117
- cjsRequire3.resolve("prettier");
1118
- const { meta: meta3 } = cjsRequire3("eslint-plugin-prettier");
1119
- const version3 = (meta3 == null ? void 0 : meta3.version) || "";
1120
- const [major, minor, patch] = version3.split(".");
1121
- if (
1122
- /* istanbul ignore next */
1123
- +major > 5 || +major === 5 && (+minor > 1 || +minor === 1 && Number.parseInt(patch) >= 2)
1124
- ) {
1125
- return;
1126
- }
1127
- overrides.push(
1128
- {
1129
- files: "*.md",
1130
- rules: {
1131
- "prettier/prettier": [
1132
- "error",
1133
- {
1134
- parser: "markdown"
1135
- }
1136
- ]
1137
- }
1138
- },
1139
- {
1140
- files: "*.mdx",
1141
- rules: {
1142
- "prettier/prettier": [
1143
- "error",
1144
- {
1145
- parser: "mdx"
1146
- }
1147
- ]
1148
- }
1149
- }
1150
- );
1151
- } catch (e) {
1152
- }
1153
- };
1154
- addPrettierRules();
1155
- configs = {
1156
- base,
1157
- "code-blocks": codeBlocks,
1158
- codeBlocks,
1159
- flat,
1160
- flatCodeBlocks,
1161
- overrides: overrides$1,
1162
- recommended
1163
- };
1164
- getGlobals = (sources, initialGlobals = {}) => (Array.isArray(sources) ? (
1165
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
1166
- sources
1167
- ) : Object.keys(sources)).reduce(
1168
- (globals, source) => Object.assign(globals, {
1169
- [source]: false
1170
- }),
1171
- // eslint-disable-next-line @typescript-eslint/prefer-reduce-type-parameter
1172
- initialGlobals
1173
- );
1174
- name2 = "eslint-plugin-mdx";
1175
- version2 = "3.2.0";
1176
- meta2 = { name: name2, version: version2 };
1177
- __defProp$3 = Object.defineProperty;
1178
- __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
1179
- __hasOwnProp$3 = Object.prototype.hasOwnProperty;
1180
- __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
1181
- __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1182
- __spreadValues$3 = (a, b) => {
1183
- for (var prop in b || (b = {}))
1184
- if (__hasOwnProp$3.call(b, prop))
1185
- __defNormalProp$3(a, prop, b[prop]);
1186
- if (__getOwnPropSymbols$3)
1187
- for (var prop of __getOwnPropSymbols$3(b)) {
1188
- if (__propIsEnum$3.call(b, prop))
1189
- __defNormalProp$3(a, prop, b[prop]);
1190
- }
1191
- return a;
1192
- };
1193
- DEFAULT_LANGUAGE_MAPPER = {
1194
- javascript: "js",
1195
- javascriptreact: "jsx",
1196
- typescript: "ts",
1197
- typescriptreact: "tsx",
1198
- markdown: "md",
1199
- mdown: "md",
1200
- mkdn: "md"
1201
- };
1202
- fromMarkdown = createSyncFn(
1203
- require.resolve("./worker")
1204
- );
1205
- __defProp$2 = Object.defineProperty;
1206
- __defProps$2 = Object.defineProperties;
1207
- __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
1208
- __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;
1209
- __hasOwnProp$2 = Object.prototype.hasOwnProperty;
1210
- __propIsEnum$2 = Object.prototype.propertyIsEnumerable;
1211
- __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1212
- __spreadValues$2 = (a, b) => {
1213
- for (var prop in b || (b = {}))
1214
- if (__hasOwnProp$2.call(b, prop))
1215
- __defNormalProp$2(a, prop, b[prop]);
1216
- if (__getOwnPropSymbols$2)
1217
- for (var prop of __getOwnPropSymbols$2(b)) {
1218
- if (__propIsEnum$2.call(b, prop))
1219
- __defNormalProp$2(a, prop, b[prop]);
1220
- }
1221
- return a;
1222
- };
1223
- __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
1268
+ init_from_markdown();
1269
+ init_meta2();
1224
1270
  UNSATISFIABLE_RULES = /* @__PURE__ */ new Set([
1225
1271
  "eol-last",
1226
- // The Markdown parser strips trailing newlines in code fences
1227
1272
  "unicode-bom"
1228
- // Code blocks will begin in the middle of Markdown files
1229
1273
  ]);
1230
1274
  SUPPORTS_AUTOFIX = true;
1231
1275
  BOM = "\uFEFF";
1232
1276
  blocksCache = /* @__PURE__ */ new Map();
1277
+ COMMENTS = [
1278
+ [
1279
+ /^<!-{2,}/,
1280
+ /-{2,}>$/
1281
+ ],
1282
+ [
1283
+ /^\/\*+/,
1284
+ /\*+\/$/
1285
+ ]
1286
+ ];
1287
+ eslintCommentRegex = /^(?:eslint\b|global\s)/u;
1233
1288
  leadingWhitespaceRegex = /^[>\s]*/u;
1234
- codeBlockFileNameRegex = /filename=(["']).*?\1/u;
1235
- languageToFileExtension = {
1236
- javascript: "js",
1237
- ecmascript: "js",
1238
- typescript: "ts",
1239
- markdown: "md"
1240
- };
1289
+ codeBlockFileNameRegex = /filename=(?<quote>["'])(?<filename>.*?)\1/u;
1241
1290
  markdownProcessor = {
1242
1291
  meta: {
1243
- name: "@eslint/markdown/markdown",
1244
- version: "6.3.0"
1292
+ name: "mdx/markdown",
1293
+ version: meta2.version
1245
1294
  },
1246
1295
  preprocess,
1247
1296
  postprocess,
1248
1297
  supportsAutofix: SUPPORTS_AUTOFIX
1249
1298
  };
1299
+ }
1300
+ });
1301
+
1302
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.4.0_eslint@9.24.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/processors/options.js
1303
+ var processorOptions, linterPath, ESLinter, verify;
1304
+ var init_options = __esm({
1305
+ "../../node_modules/.pnpm/eslint-plugin-mdx@3.4.0_eslint@9.24.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/processors/options.js"() {
1306
+ "use strict";
1307
+ init_cjs_shims();
1308
+ init_helpers4();
1250
1309
  processorOptions = {};
1251
- linterPath = Object.keys(require.cache).find(
1252
- (path5) => /([/\\])eslint\1lib(?:\1linter){2}\.js$/.test(path5)
1253
- );
1310
+ linterPath = Object.keys(cjsRequire3.cache).find((path7) => /([/\\])eslint\1lib(?:\1linter){2}\.js$/.test(path7));
1254
1311
  if (!linterPath) {
1255
1312
  throw new Error("Could not find ESLint Linter in require cache");
1256
1313
  }
1257
- ESLinter = require(linterPath).Linter;
1314
+ ESLinter = cjsRequire3(linterPath).Linter;
1258
1315
  ({ verify } = ESLinter.prototype);
1259
1316
  ESLinter.prototype.verify = function(code, config, options) {
1260
- const settings = config && (typeof config.extractConfig === "function" ? config.extractConfig(
1261
- /* istanbul ignore next */
1262
- // eslint-disable-next-line unicorn/no-typeof-undefined
1263
- typeof options === "undefined" || typeof options === "string" ? options : options.filename
1264
- ) : config).settings || {};
1317
+ const settings = (config.extractConfig?.(typeof options === "undefined" || typeof options === "string" ? options : options.filename) ?? config).settings ?? {};
1265
1318
  processorOptions.lintCodeBlocks = settings["mdx/code-blocks"] === true;
1266
1319
  processorOptions.languageMapper = settings["mdx/language-mapper"];
1267
1320
  return verify.call(this, code, config, options);
1268
1321
  };
1269
- __defProp$1 = Object.defineProperty;
1270
- __defProps$1 = Object.defineProperties;
1271
- __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
1272
- __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
1273
- __hasOwnProp$1 = Object.prototype.hasOwnProperty;
1274
- __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
1275
- __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1276
- __spreadValues$1 = (a, b) => {
1277
- for (var prop in b || (b = {}))
1278
- if (__hasOwnProp$1.call(b, prop))
1279
- __defNormalProp$1(a, prop, b[prop]);
1280
- if (__getOwnPropSymbols$1)
1281
- for (var prop of __getOwnPropSymbols$1(b)) {
1282
- if (__propIsEnum$1.call(b, prop))
1283
- __defNormalProp$1(a, prop, b[prop]);
1284
- }
1285
- return a;
1286
- };
1287
- __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
1288
- createRemarkProcessor = (processorOptions$1 = processorOptions) => ({
1322
+ }
1323
+ });
1324
+
1325
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.4.0_eslint@9.24.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/processors/remark.js
1326
+ var createRemarkProcessor, remark;
1327
+ var init_remark = __esm({
1328
+ "../../node_modules/.pnpm/eslint-plugin-mdx@3.4.0_eslint@9.24.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/processors/remark.js"() {
1329
+ "use strict";
1330
+ init_cjs_shims();
1331
+ init_meta2();
1332
+ init_helpers5();
1333
+ init_markdown();
1334
+ init_options();
1335
+ createRemarkProcessor = (processorOptions2 = processorOptions) => ({
1289
1336
  meta: {
1290
1337
  name: "mdx/remark",
1291
1338
  version: meta2.version
1292
1339
  },
1293
1340
  supportsAutofix: true,
1294
1341
  preprocess(text, filename) {
1295
- if (!processorOptions$1.lintCodeBlocks) {
1342
+ if (!processorOptions2.lintCodeBlocks) {
1296
1343
  return [text];
1297
1344
  }
1298
1345
  return [
1299
1346
  text,
1300
1347
  ...markdownProcessor.preprocess(text, filename).map(({ text: text2, filename: filename2 }) => ({
1301
1348
  text: text2,
1302
- filename: filename2.slice(0, filename2.lastIndexOf(".")) + "." + getShortLang(filename2, processorOptions$1.languageMapper)
1349
+ filename: filename2.slice(0, filename2.lastIndexOf(".")) + "." + getShortLang(filename2, processorOptions2.languageMapper)
1303
1350
  }))
1304
1351
  ];
1305
1352
  },
@@ -1308,47 +1355,47 @@ var init_index_es20152 = __esm({
1308
1355
  ...mdxMessages,
1309
1356
  ...markdownProcessor.postprocess(markdownMessages, filename)
1310
1357
  ].sort((a, b) => a.line - b.line || a.column - b.column).map((lintMessage) => {
1311
- const {
1312
- message,
1313
- ruleId: eslintRuleId,
1314
- severity: eslintSeverity
1315
- } = lintMessage;
1358
+ const { message, ruleId: eslintRuleId, severity: eslintSeverity } = lintMessage;
1316
1359
  if (eslintRuleId !== "mdx/remark") {
1317
1360
  return lintMessage;
1318
1361
  }
1319
- const { source, ruleId, reason, severity } = JSON.parse(
1320
- message
1321
- );
1322
- return __spreadProps$1(__spreadValues$1({}, lintMessage), {
1362
+ const { source, ruleId, reason, severity } = JSON.parse(message);
1363
+ return {
1364
+ ...lintMessage,
1323
1365
  ruleId: `${source}-${ruleId}`,
1324
1366
  message: reason,
1325
1367
  severity: Math.max(eslintSeverity, severity)
1326
- });
1368
+ };
1327
1369
  });
1328
1370
  }
1329
1371
  });
1330
- remark$1 = createRemarkProcessor();
1331
- processors = { remark: remark$1 };
1332
- __defProp3 = Object.defineProperty;
1333
- __defProps2 = Object.defineProperties;
1334
- __getOwnPropDescs2 = Object.getOwnPropertyDescriptors;
1335
- __getOwnPropSymbols2 = Object.getOwnPropertySymbols;
1336
- __hasOwnProp3 = Object.prototype.hasOwnProperty;
1337
- __propIsEnum2 = Object.prototype.propertyIsEnumerable;
1338
- __defNormalProp2 = (obj, key, value) => key in obj ? __defProp3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1339
- __spreadValues2 = (a, b) => {
1340
- for (var prop in b || (b = {}))
1341
- if (__hasOwnProp3.call(b, prop))
1342
- __defNormalProp2(a, prop, b[prop]);
1343
- if (__getOwnPropSymbols2)
1344
- for (var prop of __getOwnPropSymbols2(b)) {
1345
- if (__propIsEnum2.call(b, prop))
1346
- __defNormalProp2(a, prop, b[prop]);
1347
- }
1348
- return a;
1349
- };
1350
- __spreadProps2 = (a, b) => __defProps2(a, __getOwnPropDescs2(b));
1351
- remark = {
1372
+ remark = createRemarkProcessor();
1373
+ }
1374
+ });
1375
+
1376
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.4.0_eslint@9.24.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/processors/index.js
1377
+ var processors;
1378
+ var init_processors = __esm({
1379
+ "../../node_modules/.pnpm/eslint-plugin-mdx@3.4.0_eslint@9.24.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/processors/index.js"() {
1380
+ "use strict";
1381
+ init_cjs_shims();
1382
+ init_remark();
1383
+ init_helpers5();
1384
+ init_options();
1385
+ init_remark();
1386
+ processors = { remark };
1387
+ }
1388
+ });
1389
+
1390
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.4.0_eslint@9.24.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/rules/remark.js
1391
+ var import_node_path6, remark2;
1392
+ var init_remark2 = __esm({
1393
+ "../../node_modules/.pnpm/eslint-plugin-mdx@3.4.0_eslint@9.24.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/rules/remark.js"() {
1394
+ "use strict";
1395
+ init_cjs_shims();
1396
+ import_node_path6 = __toESM(require("path"), 1);
1397
+ init_lib3();
1398
+ remark2 = {
1352
1399
  meta: {
1353
1400
  type: "layout",
1354
1401
  docs: {
@@ -1360,7 +1407,7 @@ var init_index_es20152 = __esm({
1360
1407
  },
1361
1408
  create(context) {
1362
1409
  const filename = context.getFilename();
1363
- const extname = import_node_path4.default.extname(filename);
1410
+ const extname = import_node_path6.default.extname(filename);
1364
1411
  const sourceCode = context.getSourceCode();
1365
1412
  const options = context.parserOptions;
1366
1413
  const isMdx = [
@@ -1372,36 +1419,22 @@ var init_index_es20152 = __esm({
1372
1419
  ...options.markdownExtensions || []
1373
1420
  ].includes(extname);
1374
1421
  return {
1375
- // eslint-disable-next-line sonarjs/cognitive-complexity
1376
1422
  Program(node) {
1377
1423
  if (!isMdx && !isMarkdown) {
1378
1424
  return;
1379
1425
  }
1380
1426
  const ignoreRemarkConfig = Boolean(options.ignoreRemarkConfig);
1381
- const physicalFilename = getPhysicalFilename(filename);
1382
1427
  const sourceText = sourceCode.getText(node);
1383
1428
  const { messages, content: fixedText } = performSyncWork({
1384
- fileOptions: {
1385
- path: physicalFilename,
1386
- value: sourceText,
1387
- // eslint-disable-next-line sonar/deprecation -- FIXME: ESLint 8.40+ required
1388
- cwd: context.getCwd()
1389
- },
1390
- physicalFilename,
1429
+ filePath: getPhysicalFilename(filename),
1430
+ code: sourceText,
1431
+ cwd: context.getCwd(),
1391
1432
  isMdx,
1392
1433
  process: true,
1393
1434
  ignoreRemarkConfig
1394
1435
  });
1395
1436
  let fixed = 0;
1396
- for (const {
1397
- source,
1398
- reason,
1399
- ruleId,
1400
- fatal,
1401
- line,
1402
- column,
1403
- place
1404
- } of messages) {
1437
+ for (const { source, reason, ruleId, fatal, line, column, place } of messages) {
1405
1438
  const severity = fatal ? 2 : fatal == null ? 0 : 1;
1406
1439
  if (!severity) {
1407
1440
  continue;
@@ -1414,21 +1447,17 @@ var init_index_es20152 = __esm({
1414
1447
  };
1415
1448
  const point = {
1416
1449
  line,
1417
- // ! eslint ast column is 0-indexed, but unified is 1-indexed
1418
1450
  column: column - 1
1419
1451
  };
1420
1452
  context.report({
1421
- // related to https://github.com/eslint/eslint/issues/14198
1422
1453
  message: JSON.stringify(message),
1423
- loc: (
1424
- /* istanbul ignore next */
1425
- place && "start" in place ? __spreadProps2(__spreadValues2({}, point), {
1426
- start: __spreadProps2(__spreadValues2({}, place.start), { column: place.start.column - 1 }),
1427
- end: __spreadProps2(__spreadValues2({}, place.end), { column: place.end.column - 1 })
1428
- }) : point
1429
- ),
1454
+ loc: place && "start" in place ? {
1455
+ ...point,
1456
+ start: { ...place.start, column: place.start.column - 1 },
1457
+ end: { ...place.end, column: place.end.column - 1 }
1458
+ } : point,
1430
1459
  node,
1431
- fix: fixedText === sourceText ? null : () => fixed++ ? null : {
1460
+ fix: fixedText == null || fixedText === sourceText ? null : () => fixed++ ? null : {
1432
1461
  range: [0, sourceText.length],
1433
1462
  text: fixedText
1434
1463
  }
@@ -1438,7 +1467,50 @@ var init_index_es20152 = __esm({
1438
1467
  };
1439
1468
  }
1440
1469
  };
1441
- rules = { remark };
1470
+ }
1471
+ });
1472
+
1473
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.4.0_eslint@9.24.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/rules/index.js
1474
+ var rules;
1475
+ var init_rules = __esm({
1476
+ "../../node_modules/.pnpm/eslint-plugin-mdx@3.4.0_eslint@9.24.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/rules/index.js"() {
1477
+ "use strict";
1478
+ init_cjs_shims();
1479
+ init_remark2();
1480
+ rules = { remark: remark2 };
1481
+ }
1482
+ });
1483
+
1484
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.4.0_eslint@9.24.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/index.js
1485
+ var lib_exports2 = {};
1486
+ __export(lib_exports2, {
1487
+ DEFAULT_LANGUAGE_MAPPER: () => DEFAULT_LANGUAGE_MAPPER,
1488
+ base: () => base,
1489
+ cjsRequire: () => cjsRequire3,
1490
+ codeBlocks: () => codeBlocks,
1491
+ configs: () => configs,
1492
+ createRemarkProcessor: () => createRemarkProcessor,
1493
+ flat: () => flat,
1494
+ flatCodeBlocks: () => flatCodeBlocks,
1495
+ getGlobals: () => getGlobals,
1496
+ getShortLang: () => getShortLang,
1497
+ meta: () => meta2,
1498
+ overrides: () => overrides,
1499
+ processorOptions: () => processorOptions,
1500
+ processors: () => processors,
1501
+ recommended: () => recommended,
1502
+ remark: () => remark2,
1503
+ rules: () => rules
1504
+ });
1505
+ var init_lib4 = __esm({
1506
+ "../../node_modules/.pnpm/eslint-plugin-mdx@3.4.0_eslint@9.24.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/index.js"() {
1507
+ "use strict";
1508
+ init_cjs_shims();
1509
+ init_configs();
1510
+ init_helpers4();
1511
+ init_meta2();
1512
+ init_processors();
1513
+ init_rules();
1442
1514
  }
1443
1515
  });
1444
1516
 
@@ -1535,7 +1607,7 @@ var defuArrayFn = createDefu((object, key, currentValue) => {
1535
1607
  // src/defaults.ts
1536
1608
  init_cjs_shims();
1537
1609
 
1538
- // ../../node_modules/.pnpm/eslint-plugin-vue@10.0.0_eslint@9.22.0_jiti@2.4.2__vue-eslint-parser@10.1.1_eslint@9.22.0_jiti@2.4.2__/node_modules/eslint-plugin-vue/lib/utils/inline-non-void-elements.json
1610
+ // ../../node_modules/.pnpm/eslint-plugin-vue@10.0.0_eslint@9.24.0_jiti@2.4.2__vue-eslint-parser@10.1.3_eslint@9.24.0_jiti@2.4.2__/node_modules/eslint-plugin-vue/lib/utils/inline-non-void-elements.json
1539
1611
  var inline_non_void_elements_default = [
1540
1612
  "a",
1541
1613
  "abbr",
@@ -1579,7 +1651,7 @@ var inline_non_void_elements_default = [
1579
1651
 
1580
1652
  // src/defaults.ts
1581
1653
  function getDefaultVueOptions(opts) {
1582
- const overrides2 = {
1654
+ const overrides3 = {
1583
1655
  "vue/attribute-hyphenation": "off",
1584
1656
  "vue/v-on-event-hyphenation": "off",
1585
1657
  "vue/custom-event-name-casing": "off",
@@ -1599,10 +1671,10 @@ function getDefaultVueOptions(opts) {
1599
1671
  "vue/no-unused-refs": "warn"
1600
1672
  };
1601
1673
  if (opts?.ionic) {
1602
- overrides2["vue/no-deprecated-slot-attribute"] = "off";
1674
+ overrides3["vue/no-deprecated-slot-attribute"] = "off";
1603
1675
  }
1604
1676
  if (opts?.weapp) {
1605
- overrides2["vue/singleline-html-element-content-newline"] = [
1677
+ overrides3["vue/singleline-html-element-content-newline"] = [
1606
1678
  "warn",
1607
1679
  {
1608
1680
  ignoreWhenNoAttributes: true,
@@ -1617,12 +1689,12 @@ function getDefaultVueOptions(opts) {
1617
1689
  ];
1618
1690
  }
1619
1691
  const vueOptions = {
1620
- overrides: overrides2
1692
+ overrides: overrides3
1621
1693
  };
1622
1694
  return vueOptions;
1623
1695
  }
1624
1696
  function getDefaultTypescriptOptions(opts) {
1625
- const overrides2 = {
1697
+ const overrides3 = {
1626
1698
  "ts/no-unused-vars": [
1627
1699
  "error",
1628
1700
  {
@@ -1647,7 +1719,7 @@ function getDefaultTypescriptOptions(opts) {
1647
1719
  ]
1648
1720
  };
1649
1721
  if (opts?.nest) {
1650
- Object.assign(overrides2, {
1722
+ Object.assign(overrides3, {
1651
1723
  "ts/interface-name-prefix": "off",
1652
1724
  "ts/explicit-function-return-type": "off",
1653
1725
  "ts/explicit-module-boundary-types": "off",
@@ -1656,7 +1728,7 @@ function getDefaultTypescriptOptions(opts) {
1656
1728
  });
1657
1729
  }
1658
1730
  const typescriptOptions = {
1659
- overrides: overrides2
1731
+ overrides: overrides3
1660
1732
  };
1661
1733
  return typescriptOptions;
1662
1734
  }
@@ -1711,16 +1783,16 @@ function getPresets(options, mode) {
1711
1783
  }
1712
1784
  if (enableVue) {
1713
1785
  if (typeof enableVue === "object") {
1714
- const overrides2 = enableVue.overrides;
1715
- if (overrides2) {
1786
+ const overrides3 = enableVue.overrides;
1787
+ if (overrides3) {
1716
1788
  if (enableVue.vueVersion === 2) {
1717
- Object.assign(overrides2, {
1789
+ Object.assign(overrides3, {
1718
1790
  "vue/no-v-for-template-key-on-child": "off",
1719
1791
  "vue/no-v-for-template-key": "error",
1720
1792
  "vue/no-deprecated-v-bind-sync": "off"
1721
1793
  });
1722
1794
  } else {
1723
- Object.assign(overrides2, {
1795
+ Object.assign(overrides3, {
1724
1796
  "vue/no-v-for-template-key-on-child": "error",
1725
1797
  "vue/no-v-for-template-key": "off"
1726
1798
  });
@@ -1749,19 +1821,19 @@ function getPresets(options, mode) {
1749
1821
  });
1750
1822
  }
1751
1823
  if (enableMDX) {
1752
- presets.push((0, antfu_exports.interopDefault)(Promise.resolve().then(() => (init_index_es20152(), index_es2015_exports2))).then((mdx2) => {
1824
+ presets.push((0, antfu_exports.interopDefault)(Promise.resolve().then(() => (init_lib4(), lib_exports2))).then((mdx) => {
1753
1825
  return [
1754
1826
  {
1755
- ...mdx2.flat,
1756
- processor: mdx2.createRemarkProcessor({
1827
+ ...mdx.flat,
1828
+ processor: mdx.createRemarkProcessor({
1757
1829
  lintCodeBlocks: true,
1758
1830
  languageMapper: {}
1759
1831
  })
1760
1832
  },
1761
1833
  {
1762
- ...mdx2.flatCodeBlocks,
1834
+ ...mdx.flatCodeBlocks,
1763
1835
  rules: {
1764
- ...mdx2.flatCodeBlocks.rules
1836
+ ...mdx.flatCodeBlocks.rules
1765
1837
  }
1766
1838
  }
1767
1839
  ];