vxrn 2.11.3 → 2.11.5

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.
@@ -316,48 +316,61 @@ function getNativePlugins(root, platform, viteImportGlobPlugin, dev, assetsDest,
316
316
  return mark;
317
317
  } catch {}
318
318
  };
319
- return [{
320
- name: "test-native-hmr-trace-first-pre",
321
- load: {
322
- order: "pre",
323
- handler(id) {
324
- start(id, "load:first")?.("end");
325
- return null;
319
+ return [
320
+ {
321
+ name: "test-native-hmr-trace-first-pre",
322
+ load: {
323
+ order: "pre",
324
+ handler(id) {
325
+ start(id, "load:first")?.("end");
326
+ return null;
327
+ }
328
+ },
329
+ transform: {
330
+ order: "pre",
331
+ handler(_code, id) {
332
+ start(id, "pre:first")?.("end");
333
+ return null;
334
+ }
326
335
  }
327
336
  },
328
- transform: {
329
- order: "pre",
330
- handler(_code, id) {
331
- start(id, "pre:first")?.("end");
332
- return null;
333
- }
334
- }
335
- }, ...plugins.map((plugin, index) => {
336
- if (plugin.name !== "one:use-dom-native" && plugin.name !== "vxrn:rn-codegen" && plugin.name !== "one:background-computation:native" && plugin.name !== "one-client-tree-shake") return plugin;
337
- const hook = plugin.transform;
338
- if (!hook || typeof hook === "function" || hook.order !== "pre") return plugin;
339
- return {
340
- ...plugin,
341
- transform: {
342
- ...hook,
343
- handler(...args) {
344
- const mark = start(args[1], `pre:${index}:${plugin.name}`);
345
- if (!mark) return hook.handler.apply(this, args);
346
- try {
347
- const result = hook.handler.apply(this, args);
348
- if (result instanceof Promise) try {
349
- Promise.prototype.then.call(result, () => mark("end"), () => mark("error"));
350
- } catch {}
351
- else mark("end");
352
- return result;
353
- } catch (error) {
354
- mark("error");
355
- throw error;
337
+ ...plugins.map((plugin, index) => {
338
+ if (plugin.name !== "one:use-dom-native" && plugin.name !== "vxrn:rn-codegen" && plugin.name !== "one:background-computation:native" && plugin.name !== "one-client-tree-shake") return plugin;
339
+ const hook = plugin.transform;
340
+ if (!hook || typeof hook === "function" || hook.order !== "pre") return plugin;
341
+ return {
342
+ ...plugin,
343
+ transform: {
344
+ ...hook,
345
+ handler(...args) {
346
+ const mark = start(args[1], `pre:${index}:${plugin.name}`);
347
+ if (!mark) return hook.handler.apply(this, args);
348
+ try {
349
+ const result = hook.handler.apply(this, args);
350
+ if (result instanceof Promise) try {
351
+ Promise.prototype.then.call(result, () => mark("end"), () => mark("error"));
352
+ } catch {}
353
+ else mark("end");
354
+ return result;
355
+ } catch (error) {
356
+ mark("error");
357
+ throw error;
358
+ }
356
359
  }
357
360
  }
361
+ };
362
+ }),
363
+ {
364
+ name: "test-native-hmr-trace-load-fallthrough",
365
+ load: {
366
+ order: "post",
367
+ handler(id) {
368
+ start(id, "load:fallthrough")?.("end");
369
+ return null;
370
+ }
358
371
  }
359
- };
360
- })];
372
+ }
373
+ ];
361
374
  }
362
375
  function getNativeOutputOptions(prelude, sourcemap, minify) {
363
376
  return {