rolldown 1.2.8 → 1.2.9

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.
Files changed (35) hide show
  1. package/dist/cli.mjs +6 -6
  2. package/dist/config.d.mts +1 -1
  3. package/dist/config.mjs +2 -2
  4. package/dist/experimental-index.d.mts +4 -4
  5. package/dist/experimental-index.mjs +8 -8
  6. package/dist/experimental-runtime-types.d.ts +19 -0
  7. package/dist/experimental-runtime.d.ts +19 -0
  8. package/dist/experimental-runtime.mjs +42 -0
  9. package/dist/filter-index.d.mts +1 -1
  10. package/dist/index.d.mts +2 -2
  11. package/dist/index.mjs +4 -4
  12. package/dist/parallel-plugin-worker.mjs +2 -2
  13. package/dist/parallel-plugin.d.mts +1 -1
  14. package/dist/parse-ast-index.d.mts +1 -1
  15. package/dist/parse-ast-index.mjs +1 -1
  16. package/dist/plugins-index.d.mts +3 -3
  17. package/dist/plugins-index.mjs +2 -2
  18. package/dist/shared/{binding-DZuNHVw4.d.mts → binding-BTa6BPQe.d.mts} +23 -36
  19. package/dist/shared/{binding-DH95uVkp.mjs → binding-BbrDfv1x.mjs} +53 -28
  20. package/dist/shared/{bindingify-input-options-XQ0947n1.mjs → bindingify-input-options-D4l624og.mjs} +9 -8
  21. package/dist/shared/{constructors-BnIg8feC.d.mts → constructors-CmDKpWIU.d.mts} +2 -2
  22. package/dist/shared/{constructors-CrhQ-yy_.mjs → constructors-D9jwEbE4.mjs} +1 -1
  23. package/dist/shared/{create-bundler-option-kXHnIt4b.mjs → create-bundler-option-DJpvtSqr.mjs} +90 -154
  24. package/dist/shared/{define-config-DjHYbH6S.d.mts → define-config-BFdLpVut.d.mts} +6 -1
  25. package/dist/shared/{error-CRNyaqoL.mjs → error-CGhV1ebk.mjs} +1 -1
  26. package/dist/shared/{load-config-BH5SJ8XZ.mjs → load-config-qRezutA0.mjs} +1 -1
  27. package/dist/shared/{normalize-string-or-regex-BgP6W4eD.mjs → normalize-string-or-regex-zc1bUto6.mjs} +1 -1
  28. package/dist/shared/{parse-BtiCBYra.mjs → parse-DltPb1DL.mjs} +2 -2
  29. package/dist/shared/{resolve-tsconfig-jh43hFM_.mjs → resolve-tsconfig-Bf6oL9fm.mjs} +2 -2
  30. package/dist/shared/{rolldown-B-jRyK4b.mjs → rolldown-Ld3ZGGCt.mjs} +4 -4
  31. package/dist/shared/{transform-CVse9_mH.d.mts → transform-DK_nCt9j.d.mts} +1 -1
  32. package/dist/shared/{watch-dKH5b9eq.mjs → watch-BDSxrMiV.mjs} +4 -4
  33. package/dist/utils-index.d.mts +3 -3
  34. package/dist/utils-index.mjs +5 -5
  35. package/package.json +28 -25
@@ -1,7 +1,7 @@
1
- import { n as __toESM, t as require_binding } from "./binding-DH95uVkp.mjs";
1
+ import { n as __toESM, t as require_binding } from "./binding-BbrDfv1x.mjs";
2
2
  import { a as logInputHookInOutputPlugin, n as error } from "./logs-DmYCAKcW.mjs";
3
- import { n as BuiltinPlugin } from "./normalize-string-or-regex-BgP6W4eD.mjs";
4
- import { C as LOG_LEVEL_WARN, T as VERSION, _ as getParallelPluginInfo, a as measureIfFunction, b as LOG_LEVEL_DEBUG, c as PluginContextData, d as transformRenderedChunk, g as MinimalPluginContextImpl, i as measureHookCost, l as transformModuleInfo, o as pluginTimingsRecorderFor, p as transformAssetSource, r as OUTPUT_OPTIONS_OWNER, t as bindingifyInputOptions, v as normalizeHook, w as logLevelPriority, y as normalizeLog } from "./bindingify-input-options-XQ0947n1.mjs";
3
+ import { n as BuiltinPlugin } from "./normalize-string-or-regex-zc1bUto6.mjs";
4
+ import { C as LOG_LEVEL_WARN, T as VERSION, _ as getParallelPluginInfo, a as measureIfFunction, b as LOG_LEVEL_DEBUG, c as PluginContextData, d as transformRenderedChunk, g as MinimalPluginContextImpl, i as measureHookCost, l as transformModuleInfo, o as pluginTimingsRecorderFor, p as transformAssetSource, r as OUTPUT_OPTIONS_OWNER, t as bindingifyInputOptions, v as normalizeHook, w as logLevelPriority, y as normalizeLog } from "./bindingify-input-options-D4l624og.mjs";
5
5
  import { a as unimplemented } from "./misc-DOSKtd97.mjs";
6
6
  import { Worker } from "node:worker_threads";
7
7
  import path, { sep } from "node:path";
@@ -295,28 +295,20 @@ function _addIssue(context, label, dataset, config$1, other) {
295
295
  if (dataset.issues) dataset.issues.push(issue);
296
296
  else dataset.issues = [issue];
297
297
  }
298
- const _standardCache = /* @__PURE__ */ new WeakMap();
299
298
  /**
300
- * Returns the Standard Schema properties.
299
+ * Compares two values using the SameValueZero algorithm, which treats `NaN`
300
+ * as equal to itself unlike `===`.
301
301
  *
302
- * @param context The schema context.
302
+ * @param value1 The first value.
303
+ * @param value2 The second value.
303
304
  *
304
- * @returns The Standard Schema properties.
305
+ * @returns Whether the values are equal.
306
+ *
307
+ * @internal
305
308
  */
306
309
  /* @__NO_SIDE_EFFECTS__ */
307
- function _getStandardProps(context) {
308
- let cached = _standardCache.get(context);
309
- if (!cached) {
310
- cached = {
311
- version: 1,
312
- vendor: "valibot",
313
- validate(value$1) {
314
- return context["~run"]({ value: value$1 }, /* @__PURE__ */ getGlobalConfig());
315
- }
316
- };
317
- _standardCache.set(context, cached);
318
- }
319
- return cached;
310
+ function _isSameValueZero(value1, value2) {
311
+ return value1 === value2 || Number.isNaN(value1) && Number.isNaN(value2);
320
312
  }
321
313
  /**
322
314
  * Disallows inherited object properties and prevents object prototype
@@ -350,6 +342,26 @@ function _joinExpects(values$1, separator) {
350
342
  return list[0] ?? "never";
351
343
  }
352
344
  /**
345
+ * Eagerly creates and attaches the Standard Schema properties of a schema.
346
+ *
347
+ * Hint: The contextual `this` type includes the standard properties that are
348
+ * attached before the schema is returned.
349
+ *
350
+ * @param schema The schema to attach standard properties to.
351
+ *
352
+ * @returns The schema with standard properties attached.
353
+ *
354
+ * @internal
355
+ */
356
+ function _standardSchema(schema) {
357
+ schema["~standard"] = {
358
+ version: 1,
359
+ vendor: "valibot",
360
+ validate: (value$1) => schema["~run"]({ value: value$1 }, /* @__PURE__ */ getGlobalConfig())
361
+ };
362
+ return schema;
363
+ }
364
+ /**
353
365
  * A Valibot error with useful information.
354
366
  */
355
367
  var ValiError = class extends Error {
@@ -506,24 +518,21 @@ function is(schema, input) {
506
518
  */
507
519
  /* @__NO_SIDE_EFFECTS__ */
508
520
  function any() {
509
- return {
521
+ return _standardSchema({
510
522
  kind: "schema",
511
523
  type: "any",
512
524
  reference: any,
513
525
  expects: "any",
514
526
  async: false,
515
- get "~standard"() {
516
- return /* @__PURE__ */ _getStandardProps(this);
517
- },
518
527
  "~run"(dataset) {
519
528
  dataset.typed = true;
520
529
  return dataset;
521
530
  }
522
- };
531
+ });
523
532
  }
524
533
  /* @__NO_SIDE_EFFECTS__ */
525
534
  function array(item, message$1) {
526
- return {
535
+ return _standardSchema({
527
536
  kind: "schema",
528
537
  type: "array",
529
538
  reference: array,
@@ -531,9 +540,6 @@ function array(item, message$1) {
531
540
  async: false,
532
541
  item,
533
542
  message: message$1,
534
- get "~standard"() {
535
- return /* @__PURE__ */ _getStandardProps(this);
536
- },
537
543
  "~run"(dataset, config$1) {
538
544
  const input = dataset.value;
539
545
  if (Array.isArray(input)) {
@@ -567,30 +573,27 @@ function array(item, message$1) {
567
573
  } else _addIssue(this, "type", dataset, config$1);
568
574
  return dataset;
569
575
  }
570
- };
576
+ });
571
577
  }
572
578
  /* @__NO_SIDE_EFFECTS__ */
573
579
  function boolean(message$1) {
574
- return {
580
+ return _standardSchema({
575
581
  kind: "schema",
576
582
  type: "boolean",
577
583
  reference: boolean,
578
584
  expects: "boolean",
579
585
  async: false,
580
586
  message: message$1,
581
- get "~standard"() {
582
- return /* @__PURE__ */ _getStandardProps(this);
583
- },
584
587
  "~run"(dataset, config$1) {
585
588
  if (typeof dataset.value === "boolean") dataset.typed = true;
586
589
  else _addIssue(this, "type", dataset, config$1);
587
590
  return dataset;
588
591
  }
589
- };
592
+ });
590
593
  }
591
594
  /* @__NO_SIDE_EFFECTS__ */
592
595
  function custom(check$1, message$1) {
593
- return {
596
+ return _standardSchema({
594
597
  kind: "schema",
595
598
  type: "custom",
596
599
  reference: custom,
@@ -598,38 +601,32 @@ function custom(check$1, message$1) {
598
601
  async: false,
599
602
  check: check$1,
600
603
  message: message$1,
601
- get "~standard"() {
602
- return /* @__PURE__ */ _getStandardProps(this);
603
- },
604
604
  "~run"(dataset, config$1) {
605
605
  if (this.check(dataset.value)) dataset.typed = true;
606
606
  else _addIssue(this, "type", dataset, config$1);
607
607
  return dataset;
608
608
  }
609
- };
609
+ });
610
610
  }
611
611
  /* @__NO_SIDE_EFFECTS__ */
612
612
  function function_(message$1) {
613
- return {
613
+ return _standardSchema({
614
614
  kind: "schema",
615
615
  type: "function",
616
616
  reference: function_,
617
617
  expects: "Function",
618
618
  async: false,
619
619
  message: message$1,
620
- get "~standard"() {
621
- return /* @__PURE__ */ _getStandardProps(this);
622
- },
623
620
  "~run"(dataset, config$1) {
624
621
  if (typeof dataset.value === "function") dataset.typed = true;
625
622
  else _addIssue(this, "type", dataset, config$1);
626
623
  return dataset;
627
624
  }
628
- };
625
+ });
629
626
  }
630
627
  /* @__NO_SIDE_EFFECTS__ */
631
628
  function instance(class_, message$1) {
632
- return {
629
+ return _standardSchema({
633
630
  kind: "schema",
634
631
  type: "instance",
635
632
  reference: instance,
@@ -637,19 +634,16 @@ function instance(class_, message$1) {
637
634
  async: false,
638
635
  class: class_,
639
636
  message: message$1,
640
- get "~standard"() {
641
- return /* @__PURE__ */ _getStandardProps(this);
642
- },
643
637
  "~run"(dataset, config$1) {
644
638
  if (dataset.value instanceof this.class) dataset.typed = true;
645
639
  else _addIssue(this, "type", dataset, config$1);
646
640
  return dataset;
647
641
  }
648
- };
642
+ });
649
643
  }
650
644
  /* @__NO_SIDE_EFFECTS__ */
651
645
  function literal(literal_, message$1) {
652
- return {
646
+ return _standardSchema({
653
647
  kind: "schema",
654
648
  type: "literal",
655
649
  reference: literal,
@@ -657,37 +651,31 @@ function literal(literal_, message$1) {
657
651
  async: false,
658
652
  literal: literal_,
659
653
  message: message$1,
660
- get "~standard"() {
661
- return /* @__PURE__ */ _getStandardProps(this);
662
- },
663
654
  "~run"(dataset, config$1) {
664
- if (dataset.value === this.literal) dataset.typed = true;
655
+ if (/* @__PURE__ */ _isSameValueZero(dataset.value, this.literal)) dataset.typed = true;
665
656
  else _addIssue(this, "type", dataset, config$1);
666
657
  return dataset;
667
658
  }
668
- };
659
+ });
669
660
  }
670
661
  /* @__NO_SIDE_EFFECTS__ */
671
662
  function never(message$1) {
672
- return {
663
+ return _standardSchema({
673
664
  kind: "schema",
674
665
  type: "never",
675
666
  reference: never,
676
667
  expects: "never",
677
668
  async: false,
678
669
  message: message$1,
679
- get "~standard"() {
680
- return /* @__PURE__ */ _getStandardProps(this);
681
- },
682
670
  "~run"(dataset, config$1) {
683
671
  _addIssue(this, "type", dataset, config$1);
684
672
  return dataset;
685
673
  }
686
- };
674
+ });
687
675
  }
688
676
  /* @__NO_SIDE_EFFECTS__ */
689
677
  function nullish(wrapped, default_) {
690
- return {
678
+ return _standardSchema({
691
679
  kind: "schema",
692
680
  type: "nullish",
693
681
  reference: nullish,
@@ -695,9 +683,6 @@ function nullish(wrapped, default_) {
695
683
  async: false,
696
684
  wrapped,
697
685
  default: default_,
698
- get "~standard"() {
699
- return /* @__PURE__ */ _getStandardProps(this);
700
- },
701
686
  "~run"(dataset, config$1) {
702
687
  if (dataset.value === null || dataset.value === void 0) {
703
688
  if (this.default !== void 0) dataset.value = /* @__PURE__ */ getDefault(this, dataset, config$1);
@@ -708,30 +693,27 @@ function nullish(wrapped, default_) {
708
693
  }
709
694
  return this.wrapped["~run"](dataset, config$1);
710
695
  }
711
- };
696
+ });
712
697
  }
713
698
  /* @__NO_SIDE_EFFECTS__ */
714
699
  function number(message$1) {
715
- return {
700
+ return _standardSchema({
716
701
  kind: "schema",
717
702
  type: "number",
718
703
  reference: number,
719
704
  expects: "number",
720
705
  async: false,
721
706
  message: message$1,
722
- get "~standard"() {
723
- return /* @__PURE__ */ _getStandardProps(this);
724
- },
725
707
  "~run"(dataset, config$1) {
726
708
  if (typeof dataset.value === "number" && !isNaN(dataset.value)) dataset.typed = true;
727
709
  else _addIssue(this, "type", dataset, config$1);
728
710
  return dataset;
729
711
  }
730
- };
712
+ });
731
713
  }
732
714
  /* @__NO_SIDE_EFFECTS__ */
733
715
  function object(entries$1, message$1) {
734
- return {
716
+ return _standardSchema({
735
717
  kind: "schema",
736
718
  type: "object",
737
719
  reference: object,
@@ -739,9 +721,6 @@ function object(entries$1, message$1) {
739
721
  async: false,
740
722
  entries: entries$1,
741
723
  message: message$1,
742
- get "~standard"() {
743
- return /* @__PURE__ */ _getStandardProps(this);
744
- },
745
724
  "~run"(dataset, config$1) {
746
725
  const input = dataset.value;
747
726
  if (input && typeof input === "object") {
@@ -792,11 +771,11 @@ function object(entries$1, message$1) {
792
771
  } else _addIssue(this, "type", dataset, config$1);
793
772
  return dataset;
794
773
  }
795
- };
774
+ });
796
775
  }
797
776
  /* @__NO_SIDE_EFFECTS__ */
798
777
  function optional(wrapped, default_) {
799
- return {
778
+ return _standardSchema({
800
779
  kind: "schema",
801
780
  type: "optional",
802
781
  reference: optional,
@@ -804,9 +783,6 @@ function optional(wrapped, default_) {
804
783
  async: false,
805
784
  wrapped,
806
785
  default: default_,
807
- get "~standard"() {
808
- return /* @__PURE__ */ _getStandardProps(this);
809
- },
810
786
  "~run"(dataset, config$1) {
811
787
  if (dataset.value === void 0) {
812
788
  if (this.default !== void 0) dataset.value = /* @__PURE__ */ getDefault(this, dataset, config$1);
@@ -817,11 +793,11 @@ function optional(wrapped, default_) {
817
793
  }
818
794
  return this.wrapped["~run"](dataset, config$1);
819
795
  }
820
- };
796
+ });
821
797
  }
822
798
  /* @__NO_SIDE_EFFECTS__ */
823
799
  function picklist(options, message$1) {
824
- return {
800
+ return _standardSchema({
825
801
  kind: "schema",
826
802
  type: "picklist",
827
803
  reference: picklist,
@@ -829,38 +805,32 @@ function picklist(options, message$1) {
829
805
  async: false,
830
806
  options,
831
807
  message: message$1,
832
- get "~standard"() {
833
- return /* @__PURE__ */ _getStandardProps(this);
834
- },
835
808
  "~run"(dataset, config$1) {
836
809
  if (this.options.includes(dataset.value)) dataset.typed = true;
837
810
  else _addIssue(this, "type", dataset, config$1);
838
811
  return dataset;
839
812
  }
840
- };
813
+ });
841
814
  }
842
815
  /* @__NO_SIDE_EFFECTS__ */
843
816
  function promise(message$1) {
844
- return {
817
+ return _standardSchema({
845
818
  kind: "schema",
846
819
  type: "promise",
847
820
  reference: promise,
848
821
  expects: "Promise",
849
822
  async: false,
850
823
  message: message$1,
851
- get "~standard"() {
852
- return /* @__PURE__ */ _getStandardProps(this);
853
- },
854
824
  "~run"(dataset, config$1) {
855
825
  if (dataset.value instanceof Promise) dataset.typed = true;
856
826
  else _addIssue(this, "type", dataset, config$1);
857
827
  return dataset;
858
828
  }
859
- };
829
+ });
860
830
  }
861
831
  /* @__NO_SIDE_EFFECTS__ */
862
832
  function record(key, value$1, message$1) {
863
- return {
833
+ return _standardSchema({
864
834
  kind: "schema",
865
835
  type: "record",
866
836
  reference: record,
@@ -869,9 +839,6 @@ function record(key, value$1, message$1) {
869
839
  key,
870
840
  value: value$1,
871
841
  message: message$1,
872
- get "~standard"() {
873
- return /* @__PURE__ */ _getStandardProps(this);
874
- },
875
842
  "~run"(dataset, config$1) {
876
843
  const input = dataset.value;
877
844
  if (input && typeof input === "object") {
@@ -924,11 +891,11 @@ function record(key, value$1, message$1) {
924
891
  } else _addIssue(this, "type", dataset, config$1);
925
892
  return dataset;
926
893
  }
927
- };
894
+ });
928
895
  }
929
896
  /* @__NO_SIDE_EFFECTS__ */
930
897
  function strictObject(entries$1, message$1) {
931
- return {
898
+ return _standardSchema({
932
899
  kind: "schema",
933
900
  type: "strict_object",
934
901
  reference: strictObject,
@@ -936,9 +903,6 @@ function strictObject(entries$1, message$1) {
936
903
  async: false,
937
904
  entries: entries$1,
938
905
  message: message$1,
939
- get "~standard"() {
940
- return /* @__PURE__ */ _getStandardProps(this);
941
- },
942
906
  "~run"(dataset, config$1) {
943
907
  const input = dataset.value;
944
908
  if (input && typeof input === "object") {
@@ -987,7 +951,7 @@ function strictObject(entries$1, message$1) {
987
951
  }
988
952
  }
989
953
  if (!dataset.issues || !config$1.abortEarly) {
990
- for (const key in input) if (!(key in this.entries)) {
954
+ for (const key in input) if (!Object.prototype.hasOwnProperty.call(this.entries, key)) {
991
955
  _addIssue(this, "key", dataset, config$1, {
992
956
  input: key,
993
957
  expected: "never",
@@ -1005,30 +969,27 @@ function strictObject(entries$1, message$1) {
1005
969
  } else _addIssue(this, "type", dataset, config$1);
1006
970
  return dataset;
1007
971
  }
1008
- };
972
+ });
1009
973
  }
1010
974
  /* @__NO_SIDE_EFFECTS__ */
1011
975
  function string(message$1) {
1012
- return {
976
+ return _standardSchema({
1013
977
  kind: "schema",
1014
978
  type: "string",
1015
979
  reference: string,
1016
980
  expects: "string",
1017
981
  async: false,
1018
982
  message: message$1,
1019
- get "~standard"() {
1020
- return /* @__PURE__ */ _getStandardProps(this);
1021
- },
1022
983
  "~run"(dataset, config$1) {
1023
984
  if (typeof dataset.value === "string") dataset.typed = true;
1024
985
  else _addIssue(this, "type", dataset, config$1);
1025
986
  return dataset;
1026
987
  }
1027
- };
988
+ });
1028
989
  }
1029
990
  /* @__NO_SIDE_EFFECTS__ */
1030
991
  function tuple(items, message$1) {
1031
- return {
992
+ return _standardSchema({
1032
993
  kind: "schema",
1033
994
  type: "tuple",
1034
995
  reference: tuple,
@@ -1036,9 +997,6 @@ function tuple(items, message$1) {
1036
997
  async: false,
1037
998
  items,
1038
999
  message: message$1,
1039
- get "~standard"() {
1040
- return /* @__PURE__ */ _getStandardProps(this);
1041
- },
1042
1000
  "~run"(dataset, config$1) {
1043
1001
  const input = dataset.value;
1044
1002
  if (Array.isArray(input)) {
@@ -1072,26 +1030,23 @@ function tuple(items, message$1) {
1072
1030
  } else _addIssue(this, "type", dataset, config$1);
1073
1031
  return dataset;
1074
1032
  }
1075
- };
1033
+ });
1076
1034
  }
1077
1035
  /* @__NO_SIDE_EFFECTS__ */
1078
1036
  function undefined_(message$1) {
1079
- return {
1037
+ return _standardSchema({
1080
1038
  kind: "schema",
1081
1039
  type: "undefined",
1082
1040
  reference: undefined_,
1083
1041
  expects: "undefined",
1084
1042
  async: false,
1085
1043
  message: message$1,
1086
- get "~standard"() {
1087
- return /* @__PURE__ */ _getStandardProps(this);
1088
- },
1089
1044
  "~run"(dataset, config$1) {
1090
1045
  if (dataset.value === void 0) dataset.typed = true;
1091
1046
  else _addIssue(this, "type", dataset, config$1);
1092
1047
  return dataset;
1093
1048
  }
1094
- };
1049
+ });
1095
1050
  }
1096
1051
  /**
1097
1052
  * Returns the sub issues of the provided datasets for the union issue.
@@ -1111,7 +1066,7 @@ function _subIssues(datasets) {
1111
1066
  }
1112
1067
  /* @__NO_SIDE_EFFECTS__ */
1113
1068
  function union(options, message$1) {
1114
- return {
1069
+ return _standardSchema({
1115
1070
  kind: "schema",
1116
1071
  type: "union",
1117
1072
  reference: union,
@@ -1119,9 +1074,6 @@ function union(options, message$1) {
1119
1074
  async: false,
1120
1075
  options,
1121
1076
  message: message$1,
1122
- get "~standard"() {
1123
- return /* @__PURE__ */ _getStandardProps(this);
1124
- },
1125
1077
  "~run"(dataset, config$1) {
1126
1078
  let validDataset;
1127
1079
  let typedDatasets;
@@ -1146,11 +1098,11 @@ function union(options, message$1) {
1146
1098
  else _addIssue(this, "type", dataset, config$1, { issues: /* @__PURE__ */ _subIssues(untypedDatasets) });
1147
1099
  return dataset;
1148
1100
  }
1149
- };
1101
+ });
1150
1102
  }
1151
1103
  /* @__NO_SIDE_EFFECTS__ */
1152
1104
  function unionAsync(options, message$1) {
1153
- return {
1105
+ return _standardSchema({
1154
1106
  kind: "schema",
1155
1107
  type: "union",
1156
1108
  reference: unionAsync,
@@ -1158,9 +1110,6 @@ function unionAsync(options, message$1) {
1158
1110
  async: true,
1159
1111
  options,
1160
1112
  message: message$1,
1161
- get "~standard"() {
1162
- return /* @__PURE__ */ _getStandardProps(this);
1163
- },
1164
1113
  async "~run"(dataset, config$1) {
1165
1114
  let validDataset;
1166
1115
  let typedDatasets;
@@ -1185,26 +1134,23 @@ function unionAsync(options, message$1) {
1185
1134
  else _addIssue(this, "type", dataset, config$1, { issues: /* @__PURE__ */ _subIssues(untypedDatasets) });
1186
1135
  return dataset;
1187
1136
  }
1188
- };
1137
+ });
1189
1138
  }
1190
1139
  /* @__NO_SIDE_EFFECTS__ */
1191
1140
  function void_(message$1) {
1192
- return {
1141
+ return _standardSchema({
1193
1142
  kind: "schema",
1194
1143
  type: "void",
1195
1144
  reference: void_,
1196
1145
  expects: "void",
1197
1146
  async: false,
1198
1147
  message: message$1,
1199
- get "~standard"() {
1200
- return /* @__PURE__ */ _getStandardProps(this);
1201
- },
1202
1148
  "~run"(dataset, config$1) {
1203
1149
  if (dataset.value === void 0) dataset.typed = true;
1204
1150
  else _addIssue(this, "type", dataset, config$1);
1205
1151
  return dataset;
1206
1152
  }
1207
- };
1153
+ });
1208
1154
  }
1209
1155
  /* @__NO_SIDE_EFFECTS__ */
1210
1156
  function keyof(schema, message$1) {
@@ -1223,34 +1169,25 @@ function keyof(schema, message$1) {
1223
1169
  function omit(schema, keys) {
1224
1170
  const entries$1 = { ...schema.entries };
1225
1171
  for (const key of keys) delete entries$1[key];
1226
- return {
1172
+ return _standardSchema({
1227
1173
  ...schema,
1228
- entries: entries$1,
1229
- get "~standard"() {
1230
- return /* @__PURE__ */ _getStandardProps(this);
1231
- }
1232
- };
1174
+ entries: entries$1
1175
+ });
1233
1176
  }
1234
1177
  /* @__NO_SIDE_EFFECTS__ */
1235
1178
  function partial(schema, keys) {
1236
1179
  const entries$1 = {};
1237
1180
  for (const key in schema.entries) entries$1[key] = !keys || keys.includes(key) ? /* @__PURE__ */ optional(schema.entries[key]) : schema.entries[key];
1238
- return {
1181
+ return _standardSchema({
1239
1182
  ...schema,
1240
- entries: entries$1,
1241
- get "~standard"() {
1242
- return /* @__PURE__ */ _getStandardProps(this);
1243
- }
1244
- };
1183
+ entries: entries$1
1184
+ });
1245
1185
  }
1246
1186
  /* @__NO_SIDE_EFFECTS__ */
1247
1187
  function pipe(...pipe$1) {
1248
- return {
1188
+ return _standardSchema({
1249
1189
  ...pipe$1[0],
1250
1190
  pipe: pipe$1,
1251
- get "~standard"() {
1252
- return /* @__PURE__ */ _getStandardProps(this);
1253
- },
1254
1191
  "~run"(dataset, config$1) {
1255
1192
  for (const item of pipe$1) if (item.kind !== "metadata") {
1256
1193
  if (dataset.issues && (item.kind === "schema" || item.kind === "transformation")) {
@@ -1261,17 +1198,14 @@ function pipe(...pipe$1) {
1261
1198
  }
1262
1199
  return dataset;
1263
1200
  }
1264
- };
1201
+ });
1265
1202
  }
1266
1203
  /* @__NO_SIDE_EFFECTS__ */
1267
1204
  function pipeAsync(...pipe$1) {
1268
- return {
1205
+ return _standardSchema({
1269
1206
  ...pipe$1[0],
1270
1207
  pipe: pipe$1,
1271
1208
  async: true,
1272
- get "~standard"() {
1273
- return /* @__PURE__ */ _getStandardProps(this);
1274
- },
1275
1209
  async "~run"(dataset, config$1) {
1276
1210
  for (const item of pipe$1) if (item.kind !== "metadata") {
1277
1211
  if (dataset.issues && (item.kind === "schema" || item.kind === "transformation")) {
@@ -1282,7 +1216,7 @@ function pipeAsync(...pipe$1) {
1282
1216
  }
1283
1217
  return dataset;
1284
1218
  }
1285
- };
1219
+ });
1286
1220
  }
1287
1221
  /**
1288
1222
  * Parses an unknown input based on a schema.
@@ -1509,6 +1443,7 @@ const ChecksOptionsSchema = /* @__PURE__ */ strictObject({
1509
1443
  unresolvedEntry: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when an entrypoint cannot be resolved")),
1510
1444
  unresolvedImport: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when an import cannot be resolved")),
1511
1445
  filenameConflict: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when files generated have the same name with different contents")),
1446
+ moduleLevelDirective: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings for module-level directives other than `use strict`")),
1512
1447
  commonJsVariableInEsm: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when a CommonJS variable is used in an ES module")),
1513
1448
  importIsUndefined: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when an imported variable is not exported")),
1514
1449
  emptyImportMeta: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when `import.meta` is not supported with the output format and is replaced with an empty object (`{}`)")),
@@ -1567,6 +1502,7 @@ const MinifyOptionsSchema = /* @__PURE__ */ strictObject({
1567
1502
  })),
1568
1503
  codegen: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ strictObject({
1569
1504
  removeWhitespace: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1505
+ asciiOnly: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1570
1506
  legalComments: /* @__PURE__ */ optional(/* @__PURE__ */ union([
1571
1507
  /* @__PURE__ */ literal("none"),
1572
1508
  /* @__PURE__ */ literal("inline"),
@@ -1,5 +1,5 @@
1
1
  import { a as RolldownLog, i as RolldownError, n as LogLevelOption, o as RolldownLogWithString, r as LogOrStringHandler, t as LogLevel } from "./logging-xuHO4mAy.mjs";
2
- import { H as ParserOptions, I as JsxOptions, L as ManglePropertiesOptions$1, M as BindingWatcherBundler, N as ExternalMemoryStatus, R as MinifyOptions$1, U as PreRenderedChunk, c as BindingHookResolveIdExtraArgs, d as BindingMagicString, g as BindingRenderedChunk, m as BindingPluginContextResolveOptions, q as TransformOptions$1, t as BindingBuiltinPluginName, v as BindingTransformHookExtraArgs } from "./binding-DZuNHVw4.mjs";
2
+ import { H as ParserOptions, I as JsxOptions, L as ManglePropertiesOptions$1, M as BindingWatcherBundler, N as ExternalMemoryStatus, R as MinifyOptions$1, U as PreRenderedChunk, c as BindingHookResolveIdExtraArgs, d as BindingMagicString, g as BindingRenderedChunk, m as BindingPluginContextResolveOptions, q as TransformOptions$1, t as BindingBuiltinPluginName, v as BindingTransformHookExtraArgs } from "./binding-BTa6BPQe.mjs";
3
3
  import { TopLevelFilterExpression } from "@rolldown/pluginutils";
4
4
  import { Program } from "@oxc-project/types";
5
5
  //#region src/types/misc.d.ts
@@ -1616,6 +1616,11 @@ interface ChecksOptions {
1616
1616
  * @default true
1617
1617
  * */
1618
1618
  filenameConflict?: boolean;
1619
+ /**
1620
+ * Whether to emit warnings for module-level directives other than `use strict`.
1621
+ * @default true
1622
+ * */
1623
+ moduleLevelDirective?: boolean;
1619
1624
  /**
1620
1625
  * Whether to emit warnings when a CommonJS variable is used in an ES module.
1621
1626
  *
@@ -1,4 +1,4 @@
1
- import { t as require_binding } from "./binding-DH95uVkp.mjs";
1
+ import { t as require_binding } from "./binding-BbrDfv1x.mjs";
2
2
  //#region src/types/sourcemap.ts
3
3
  function bindingifySourcemap(map) {
4
4
  if (map == null) return;
@@ -1,4 +1,4 @@
1
- import { t as rolldown } from "./rolldown-B-jRyK4b.mjs";
1
+ import { t as rolldown } from "./rolldown-Ld3ZGGCt.mjs";
2
2
  import fs from "node:fs";
3
3
  import path from "node:path";
4
4
  import { readdir } from "node:fs/promises";