@ohos-ports/rspack-core 2.2.9-beta.0 → 2.3.4-beta.0

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 (68) hide show
  1. package/README.md +7 -7
  2. package/compiled/http-proxy-middleware/index.d.ts +12 -10
  3. package/compiled/http-proxy-middleware/package.json +1 -1
  4. package/compiled/tinypool/dist/index.js +5 -3
  5. package/compiled/watchpack/index.js +459 -60
  6. package/compiled/watchpack/package.json +1 -1
  7. package/compiled/watchpack/types/DirectoryWatcher.d.ts +24 -0
  8. package/compiled/watchpack/types/index.d.ts +1 -1
  9. package/compiled/watchpack/types/watchEventSource.d.ts +9 -0
  10. package/compiled/webpack-sources/index.d.ts +2 -0
  11. package/compiled/webpack-sources/index.js +207 -94
  12. package/compiled/webpack-sources/package.json +1 -1
  13. package/compiled/webpack-sources/types/RawSource.d.ts +0 -10
  14. package/compiled/webpack-sources/types/helpers/sourceMap.d.ts +47 -0
  15. package/compiled/webpack-sources/types/index.d.ts +1 -0
  16. package/dist/BuildInfo.d.ts +7 -0
  17. package/dist/Compilation.d.ts +3 -1
  18. package/dist/Compiler.d.ts +5 -6
  19. package/dist/ConcatenatedModule.d.ts +5 -1
  20. package/dist/ContextModule.d.ts +3 -1
  21. package/dist/ExternalModule.d.ts +7 -6
  22. package/dist/FileSystemInfo.d.ts +1 -0
  23. package/dist/Module.d.ts +12 -8
  24. package/dist/ModuleGraphConnection.d.ts +9 -3
  25. package/dist/NativeWatchFileSystem.d.ts +19 -7
  26. package/dist/NormalModule.d.ts +14 -6
  27. package/dist/RuntimeGlobals.d.ts +2 -1
  28. package/dist/RuntimeTemplate.d.ts +2 -0
  29. package/dist/Stats.d.ts +1 -1
  30. package/dist/builtin-loader/lightningcss/index.d.ts +5 -1
  31. package/dist/builtin-plugin/CompactHashedChunkIdsPlugin.d.ts +1 -0
  32. package/dist/builtin-plugin/CompactHashedModuleIdsPlugin.d.ts +1 -0
  33. package/dist/builtin-plugin/DeterministicChunkIdsPlugin.d.ts +5 -0
  34. package/dist/builtin-plugin/EvalSourceMapDevToolPlugin.d.ts +3 -2
  35. package/dist/builtin-plugin/ImportedByDeferModulesPlugin.d.ts +9 -0
  36. package/dist/builtin-plugin/SubresourceIntegrityPlugin.d.ts +1 -0
  37. package/dist/builtin-plugin/index.d.ts +1 -0
  38. package/dist/builtin-plugin/lazy-compilation/lazyCompilation.d.ts +2 -2
  39. package/dist/config/adapterRuleUse.d.ts +1 -0
  40. package/dist/config/normalization.d.ts +2 -2
  41. package/dist/config/target.d.ts +6 -0
  42. package/dist/config/types.d.ts +69 -36
  43. package/dist/cssExtractHmr.js +1 -1
  44. package/dist/cssExtractLoader.js +1 -1
  45. package/dist/exports.d.ts +5 -4
  46. package/dist/index.js +1577 -1151
  47. package/dist/loader-runner/codeFilter.d.ts +9 -0
  48. package/dist/loader-runner/dependencies.d.ts +1 -1
  49. package/dist/loader-runner/index.d.ts +2 -1
  50. package/dist/loader-runner/service.d.ts +0 -4
  51. package/dist/loader-runner/worker.d.ts +4 -1
  52. package/dist/node/NodeWatchFileSystem.d.ts +7 -4
  53. package/dist/sharing/IndependentSharedPlugin.d.ts +1 -2
  54. package/dist/sharing/utils.d.ts +1 -1
  55. package/dist/sources.d.ts +3 -0
  56. package/dist/stats/statsFactoryUtils.d.ts +7 -0
  57. package/dist/util/bindingHelpers.d.ts +2 -0
  58. package/dist/util/createModule.d.ts +3 -0
  59. package/dist/util/fs.d.ts +13 -7
  60. package/dist/util/resolveLayerExternals.d.ts +1 -0
  61. package/dist/util/source.d.ts +12 -3
  62. package/dist/util/symbols.d.ts +10 -0
  63. package/dist/util/watchTimeInfo.d.ts +5 -1
  64. package/dist/worker.js +327 -326
  65. package/hot/lazy-compilation-node.js +1 -1
  66. package/hot/lazy-compilation-web.js +1 -1
  67. package/package.json +4 -4
  68. package/dist/loader-runner/cache.d.ts +0 -27
@@ -2,7 +2,7 @@
2
2
  /******/ "use strict";
3
3
  /******/ var __webpack_modules__ = ({
4
4
 
5
- /***/ 384:
5
+ /***/ 228:
6
6
  /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
7
7
 
8
8
  /*
@@ -12,13 +12,13 @@
12
12
 
13
13
 
14
14
 
15
- const Source = __nccwpck_require__(290);
16
- const streamAndGetSourceAndMap = __nccwpck_require__(658);
17
- const streamChunksOfRawSource = __nccwpck_require__(543);
18
- const streamChunksOfSourceMap = __nccwpck_require__(637);
15
+ const Source = __nccwpck_require__(478);
16
+ const streamAndGetSourceAndMap = __nccwpck_require__(574);
17
+ const streamChunksOfRawSource = __nccwpck_require__(139);
18
+ const streamChunksOfSourceMap = __nccwpck_require__(953);
19
19
  const {
20
20
  isDualStringBufferCachingEnabled,
21
- } = __nccwpck_require__(345);
21
+ } = __nccwpck_require__(477);
22
22
 
23
23
  /** @typedef {import("./Source").ClearCacheOptions} ClearCacheOptions */
24
24
  /** @typedef {import("./Source").HashLike} HashLike */
@@ -622,7 +622,7 @@ module.exports = CachedSource;
622
622
 
623
623
  /***/ }),
624
624
 
625
- /***/ 912:
625
+ /***/ 92:
626
626
  /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
627
627
 
628
628
  /*
@@ -632,7 +632,7 @@ module.exports = CachedSource;
632
632
 
633
633
 
634
634
 
635
- const Source = __nccwpck_require__(290);
635
+ const Source = __nccwpck_require__(478);
636
636
 
637
637
  /** @typedef {import("./Source").ClearCacheOptions} ClearCacheOptions */
638
638
  /** @typedef {import("./Source").HashLike} HashLike */
@@ -779,7 +779,7 @@ module.exports = CompatSource;
779
779
 
780
780
  /***/ }),
781
781
 
782
- /***/ 698:
782
+ /***/ 862:
783
783
  /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
784
784
 
785
785
  /*
@@ -789,10 +789,10 @@ module.exports = CompatSource;
789
789
 
790
790
 
791
791
 
792
- const RawSource = __nccwpck_require__(132);
793
- const Source = __nccwpck_require__(290);
794
- const { getMap, getSourceAndMap } = __nccwpck_require__(847);
795
- const streamChunks = __nccwpck_require__(487);
792
+ const RawSource = __nccwpck_require__(792);
793
+ const Source = __nccwpck_require__(478);
794
+ const { getMap, getSourceAndMap } = __nccwpck_require__(75);
795
+ const streamChunks = __nccwpck_require__(275);
796
796
 
797
797
  /** @typedef {import("./CompatSource").SourceLike} SourceLike */
798
798
  /** @typedef {import("./Source").ClearCacheOptions} ClearCacheOptions */
@@ -1256,7 +1256,7 @@ module.exports = ConcatSource;
1256
1256
 
1257
1257
  /***/ }),
1258
1258
 
1259
- /***/ 169:
1259
+ /***/ 605:
1260
1260
  /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
1261
1261
 
1262
1262
  /*
@@ -1266,13 +1266,13 @@ module.exports = ConcatSource;
1266
1266
 
1267
1267
 
1268
1268
 
1269
- const Source = __nccwpck_require__(290);
1270
- const { getMap, getSourceAndMap } = __nccwpck_require__(847);
1271
- const getGeneratedSourceInfo = __nccwpck_require__(769);
1272
- const { eachPotentialToken } = __nccwpck_require__(919);
1269
+ const Source = __nccwpck_require__(478);
1270
+ const { getMap, getSourceAndMap } = __nccwpck_require__(75);
1271
+ const getGeneratedSourceInfo = __nccwpck_require__(845);
1272
+ const { eachPotentialToken } = __nccwpck_require__(259);
1273
1273
  const {
1274
1274
  isDualStringBufferCachingEnabled,
1275
- } = __nccwpck_require__(345);
1275
+ } = __nccwpck_require__(477);
1276
1276
 
1277
1277
  /** @typedef {import("./Source").ClearCacheOptions} ClearCacheOptions */
1278
1278
  /** @typedef {import("./Source").HashLike} HashLike */
@@ -1531,7 +1531,7 @@ module.exports = OriginalSource;
1531
1531
 
1532
1532
  /***/ }),
1533
1533
 
1534
- /***/ 814:
1534
+ /***/ 370:
1535
1535
  /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
1536
1536
 
1537
1537
  /*
@@ -1541,10 +1541,10 @@ module.exports = OriginalSource;
1541
1541
 
1542
1542
 
1543
1543
 
1544
- const RawSource = __nccwpck_require__(132);
1545
- const Source = __nccwpck_require__(290);
1546
- const { getMap, getSourceAndMap } = __nccwpck_require__(847);
1547
- const streamChunks = __nccwpck_require__(487);
1544
+ const RawSource = __nccwpck_require__(792);
1545
+ const Source = __nccwpck_require__(478);
1546
+ const { getMap, getSourceAndMap } = __nccwpck_require__(75);
1547
+ const streamChunks = __nccwpck_require__(275);
1548
1548
 
1549
1549
  /** @typedef {import("./Source").ClearCacheOptions} ClearCacheOptions */
1550
1550
  /** @typedef {import("./Source").HashLike} HashLike */
@@ -1749,7 +1749,7 @@ module.exports = PrefixSource;
1749
1749
 
1750
1750
  /***/ }),
1751
1751
 
1752
- /***/ 132:
1752
+ /***/ 792:
1753
1753
  /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
1754
1754
 
1755
1755
  /*
@@ -1759,12 +1759,12 @@ module.exports = PrefixSource;
1759
1759
 
1760
1760
 
1761
1761
 
1762
- const Source = __nccwpck_require__(290);
1763
- const streamChunksOfRawSource = __nccwpck_require__(543);
1762
+ const Source = __nccwpck_require__(478);
1763
+ const streamChunksOfRawSource = __nccwpck_require__(139);
1764
1764
  const {
1765
1765
  internString,
1766
1766
  isDualStringBufferCachingEnabled,
1767
- } = __nccwpck_require__(345);
1767
+ } = __nccwpck_require__(477);
1768
1768
 
1769
1769
  /** @typedef {import("./Source").ClearCacheOptions} ClearCacheOptions */
1770
1770
  /** @typedef {import("./Source").HashLike} HashLike */
@@ -1777,6 +1777,17 @@ const {
1777
1777
  /** @typedef {import("./helpers/streamChunks").OnSource} OnSource */
1778
1778
  /** @typedef {import("./helpers/streamChunks").Options} Options */
1779
1779
 
1780
+ /**
1781
+ * Whether `buffer` can be rebuilt from `string` (its utf8 decoding) byte for
1782
+ * byte. Decoding replaces each malformed sequence with U+FFFD, so a string
1783
+ * without U+FFFD always round-trips; only one containing it is compared.
1784
+ * @param {string} string the cached string form
1785
+ * @param {Buffer} buffer the cached buffer form
1786
+ * @returns {boolean} true when `Buffer.from(string)` equals `buffer`
1787
+ */
1788
+ const isLosslessUtf8 = (string, buffer) =>
1789
+ !string.includes("\uFFFD") || Buffer.from(string, "utf8").equals(buffer);
1790
+
1780
1791
  class RawSource extends Source {
1781
1792
  /**
1782
1793
  * @param {string | Buffer} value value
@@ -1826,7 +1837,10 @@ class RawSource extends Source {
1826
1837
  /** @type {Buffer} */
1827
1838
  (this._valueAsBuffer).toString("utf8");
1828
1839
  if (isDualStringBufferCachingEnabled()) {
1829
- this._value = internString(value);
1840
+ const interned = internString(value);
1841
+ this._value = interned;
1842
+ this._valueAsString = interned;
1843
+ return interned;
1830
1844
  }
1831
1845
  return value;
1832
1846
  }
@@ -1920,11 +1934,18 @@ class RawSource extends Source {
1920
1934
  // only the string form, populated lazily by streamChunks, is
1921
1935
  // safe to drop.
1922
1936
  this._valueAsString = undefined;
1923
- } else if (this._valueAsBuffer !== undefined && this._value !== undefined) {
1924
- // The source was constructed from a string (so `_value` and
1925
- // `_valueAsString` reference the same interned string) and the
1926
- // buffer form was materialized later by `buffer()` /
1927
- // `updateHash()`. The buffer is therefore safe to drop.
1937
+ } else if (
1938
+ this._valueAsBuffer !== undefined &&
1939
+ this._valueAsString !== undefined &&
1940
+ isLosslessUtf8(this._valueAsString, this._valueAsBuffer)
1941
+ ) {
1942
+ // The value is string-backed (constructed from a string, or from a
1943
+ // buffer with `convertToString`) and a string copy exists that
1944
+ // encodes back to the same bytes, so the buffer can be rebuilt from
1945
+ // it and is safe to drop. The buffer stays when it is the only copy
1946
+ // (`convertToString` and no string cached yet) or when it is not
1947
+ // valid UTF-8, since decoding replaced bytes with U+FFFD.
1948
+ if (this._value === undefined) this._value = this._valueAsString;
1928
1949
  this._valueAsBuffer = undefined;
1929
1950
  }
1930
1951
  }
@@ -1952,7 +1973,7 @@ module.exports = RawSource;
1952
1973
 
1953
1974
  /***/ }),
1954
1975
 
1955
- /***/ 522:
1976
+ /***/ 894:
1956
1977
  /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
1957
1978
 
1958
1979
  /*
@@ -1962,10 +1983,10 @@ module.exports = RawSource;
1962
1983
 
1963
1984
 
1964
1985
 
1965
- const Source = __nccwpck_require__(290);
1966
- const { getMap, getSourceAndMap } = __nccwpck_require__(847);
1967
- const splitIntoLines = __nccwpck_require__(416);
1968
- const streamChunks = __nccwpck_require__(487);
1986
+ const Source = __nccwpck_require__(478);
1987
+ const { getMap, getSourceAndMap } = __nccwpck_require__(75);
1988
+ const splitIntoLines = __nccwpck_require__(36);
1989
+ const streamChunks = __nccwpck_require__(275);
1969
1990
 
1970
1991
  /** @typedef {import("./Source").ClearCacheOptions} ClearCacheOptions */
1971
1992
  /** @typedef {import("./Source").HashLike} HashLike */
@@ -2712,7 +2733,7 @@ module.exports.Replacement = Replacement;
2712
2733
 
2713
2734
  /***/ }),
2714
2735
 
2715
- /***/ 317:
2736
+ /***/ 57:
2716
2737
  /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
2717
2738
 
2718
2739
  /*
@@ -2722,7 +2743,7 @@ module.exports.Replacement = Replacement;
2722
2743
 
2723
2744
 
2724
2745
 
2725
- const Source = __nccwpck_require__(290);
2746
+ const Source = __nccwpck_require__(478);
2726
2747
 
2727
2748
  /** @typedef {import("./Source").HashLike} HashLike */
2728
2749
  /** @typedef {import("./Source").MapOptions} MapOptions */
@@ -2799,7 +2820,7 @@ module.exports = SizeOnlySource;
2799
2820
 
2800
2821
  /***/ }),
2801
2822
 
2802
- /***/ 290:
2823
+ /***/ 478:
2803
2824
  /***/ ((module) => {
2804
2825
 
2805
2826
  /*
@@ -2934,7 +2955,7 @@ module.exports = Source;
2934
2955
 
2935
2956
  /***/ }),
2936
2957
 
2937
- /***/ 471:
2958
+ /***/ 915:
2938
2959
  /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
2939
2960
 
2940
2961
  /*
@@ -2944,13 +2965,13 @@ module.exports = Source;
2944
2965
 
2945
2966
 
2946
2967
 
2947
- const Source = __nccwpck_require__(290);
2948
- const { getMap, getSourceAndMap } = __nccwpck_require__(847);
2949
- const streamChunksOfCombinedSourceMap = __nccwpck_require__(808);
2950
- const streamChunksOfSourceMap = __nccwpck_require__(637);
2968
+ const Source = __nccwpck_require__(478);
2969
+ const { getMap, getSourceAndMap } = __nccwpck_require__(75);
2970
+ const streamChunksOfCombinedSourceMap = __nccwpck_require__(12);
2971
+ const streamChunksOfSourceMap = __nccwpck_require__(953);
2951
2972
  const {
2952
2973
  isDualStringBufferCachingEnabled,
2953
- } = __nccwpck_require__(345);
2974
+ } = __nccwpck_require__(477);
2954
2975
 
2955
2976
  /** @typedef {import("./Source").ClearCacheOptions} ClearCacheOptions */
2956
2977
  /** @typedef {import("./Source").HashLike} HashLike */
@@ -3390,7 +3411,7 @@ module.exports = SourceMapSource;
3390
3411
 
3391
3412
  /***/ }),
3392
3413
 
3393
- /***/ 818:
3414
+ /***/ 566:
3394
3415
  /***/ ((module) => {
3395
3416
 
3396
3417
  /*
@@ -3875,7 +3896,7 @@ module.exports.createMappingsWriter = createMappingsWriter;
3875
3896
 
3876
3897
  /***/ }),
3877
3898
 
3878
- /***/ 847:
3899
+ /***/ 75:
3879
3900
  /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
3880
3901
 
3881
3902
  /*
@@ -3885,7 +3906,7 @@ module.exports.createMappingsWriter = createMappingsWriter;
3885
3906
 
3886
3907
 
3887
3908
 
3888
- const { createMappingsWriter } = __nccwpck_require__(818);
3909
+ const { createMappingsWriter } = __nccwpck_require__(566);
3889
3910
 
3890
3911
  /** @typedef {import("../Source").RawSourceMap} RawSourceMap */
3891
3912
  /** @typedef {import("../Source").SourceAndMap} SourceAndMap */
@@ -3904,7 +3925,7 @@ let scopesHelpers;
3904
3925
  * @returns {ReturnType<typeof import("./scopes").createScopesWriter>} writer
3905
3926
  */
3906
3927
  const createScopesWriter = () => {
3907
- if (scopesHelpers === undefined) scopesHelpers = __nccwpck_require__(928);
3928
+ if (scopesHelpers === undefined) scopesHelpers = __nccwpck_require__(708);
3908
3929
  return scopesHelpers.createScopesWriter();
3909
3930
  };
3910
3931
 
@@ -4133,7 +4154,7 @@ module.exports.getSourceAndMap = (inputSource, options) => {
4133
4154
 
4134
4155
  /***/ }),
4135
4156
 
4136
- /***/ 769:
4157
+ /***/ 845:
4137
4158
  /***/ ((module) => {
4138
4159
 
4139
4160
  /*
@@ -4187,7 +4208,7 @@ module.exports = getGeneratedSourceInfo;
4187
4208
 
4188
4209
  /***/ }),
4189
4210
 
4190
- /***/ 292:
4211
+ /***/ 432:
4191
4212
  /***/ ((module) => {
4192
4213
 
4193
4214
  /*
@@ -4218,7 +4239,7 @@ module.exports = getSource;
4218
4239
 
4219
4240
  /***/ }),
4220
4241
 
4221
- /***/ 674:
4242
+ /***/ 878:
4222
4243
  /***/ ((module) => {
4223
4244
 
4224
4245
  /*
@@ -4348,7 +4369,7 @@ module.exports = readMappings;
4348
4369
 
4349
4370
  /***/ }),
4350
4371
 
4351
- /***/ 928:
4372
+ /***/ 708:
4352
4373
  /***/ ((module) => {
4353
4374
 
4354
4375
  /*
@@ -4793,7 +4814,88 @@ module.exports.encodeScopes = encodeScopes;
4793
4814
 
4794
4815
  /***/ }),
4795
4816
 
4796
- /***/ 416:
4817
+ /***/ 847:
4818
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
4819
+
4820
+ /*
4821
+ MIT License http://www.opensource.org/licenses/mit-license.php
4822
+ Author Alexander Akait @alexander-akait
4823
+ */
4824
+
4825
+
4826
+
4827
+ const getSource = __nccwpck_require__(432);
4828
+ const readMappings = __nccwpck_require__(878);
4829
+
4830
+ /** @typedef {import("../Source").RawSourceMap} RawSourceMap */
4831
+
4832
+ /**
4833
+ * Where a generated position came from: `line` counts from one, `column`
4834
+ * from zero, as in a stack trace.
4835
+ * @typedef {object} OriginalPosition
4836
+ * @property {string} source source, joined with the map's `sourceRoot`
4837
+ * @property {number} line line
4838
+ * @property {number} column column
4839
+ * @property {string | null} name name, if the mapping carries one
4840
+ */
4841
+
4842
+ /**
4843
+ * Finds the original position of a generated one: the closest mapping at or
4844
+ * before `column` on `line`. Decodes the whole map, so it suits a one-off
4845
+ * lookup (an error location), not a loop over many positions.
4846
+ * @param {RawSourceMap | string | Buffer} sourceMap source map, or its JSON
4847
+ * @param {number} line generated line, counting from one
4848
+ * @param {number} column generated column, counting from zero
4849
+ * @returns {OriginalPosition | null} original position, or `null` when nothing maps there
4850
+ */
4851
+ const originalPositionFor = (sourceMap, line, column) => {
4852
+ /** @type {RawSourceMap} */
4853
+ const map =
4854
+ typeof sourceMap === "string" || Buffer.isBuffer(sourceMap)
4855
+ ? JSON.parse(sourceMap.toString("utf8"))
4856
+ : sourceMap;
4857
+ let sourceIndex = -1;
4858
+ let originalLine = -1;
4859
+ let originalColumn = -1;
4860
+ let nameIndex = -1;
4861
+ // Mappings arrive in generated order, so the last one at or before
4862
+ // `column` on `line` is the closest.
4863
+ readMappings(
4864
+ map.mappings,
4865
+ (
4866
+ generatedLine,
4867
+ generatedColumn,
4868
+ mappingSourceIndex,
4869
+ mappingOriginalLine,
4870
+ mappingOriginalColumn,
4871
+ mappingNameIndex,
4872
+ ) => {
4873
+ if (generatedLine !== line || generatedColumn > column) return;
4874
+ sourceIndex = mappingSourceIndex;
4875
+ originalLine = mappingOriginalLine;
4876
+ originalColumn = mappingOriginalColumn;
4877
+ nameIndex = mappingNameIndex;
4878
+ },
4879
+ );
4880
+ // An index past the end of `sources` or `names` is a malformed map.
4881
+ if (sourceIndex < 0 || sourceIndex >= map.sources.length) return null;
4882
+ return {
4883
+ source: /** @type {string} */ (getSource(map, sourceIndex)),
4884
+ line: originalLine,
4885
+ column: originalColumn,
4886
+ name:
4887
+ nameIndex >= 0 && map.names && nameIndex < map.names.length
4888
+ ? map.names[nameIndex]
4889
+ : null,
4890
+ };
4891
+ };
4892
+
4893
+ module.exports.originalPositionFor = originalPositionFor;
4894
+
4895
+
4896
+ /***/ }),
4897
+
4898
+ /***/ 36:
4797
4899
  /***/ ((module) => {
4798
4900
 
4799
4901
  /*
@@ -4834,7 +4936,7 @@ module.exports = splitIntoLines;
4834
4936
 
4835
4937
  /***/ }),
4836
4938
 
4837
- /***/ 919:
4939
+ /***/ 259:
4838
4940
  /***/ ((module) => {
4839
4941
 
4840
4942
  /*
@@ -4967,7 +5069,7 @@ module.exports.eachPotentialToken = eachPotentialToken;
4967
5069
 
4968
5070
  /***/ }),
4969
5071
 
4970
- /***/ 658:
5072
+ /***/ 574:
4971
5073
  /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
4972
5074
 
4973
5075
  /*
@@ -4977,8 +5079,8 @@ module.exports.eachPotentialToken = eachPotentialToken;
4977
5079
 
4978
5080
 
4979
5081
 
4980
- const { createMappingsWriter } = __nccwpck_require__(818);
4981
- const streamChunks = __nccwpck_require__(487);
5082
+ const { createMappingsWriter } = __nccwpck_require__(566);
5083
+ const streamChunks = __nccwpck_require__(275);
4982
5084
 
4983
5085
  /** @typedef {import("../Source").RawSourceMap} RawSourceMap */
4984
5086
  /** @typedef {import("./streamChunks").GeneratedSourceInfo} GeneratedSourceInfo */
@@ -4998,7 +5100,7 @@ let scopesHelpers;
4998
5100
  * @returns {ReturnType<typeof import("./scopes").createScopesWriter>} writer
4999
5101
  */
5000
5102
  const createScopesWriter = () => {
5001
- if (scopesHelpers === undefined) scopesHelpers = __nccwpck_require__(928);
5103
+ if (scopesHelpers === undefined) scopesHelpers = __nccwpck_require__(708);
5002
5104
  return scopesHelpers.createScopesWriter();
5003
5105
  };
5004
5106
 
@@ -5136,7 +5238,7 @@ module.exports = streamAndGetSourceAndMap;
5136
5238
 
5137
5239
  /***/ }),
5138
5240
 
5139
- /***/ 487:
5241
+ /***/ 275:
5140
5242
  /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
5141
5243
 
5142
5244
  /*
@@ -5146,8 +5248,8 @@ module.exports = streamAndGetSourceAndMap;
5146
5248
 
5147
5249
 
5148
5250
 
5149
- const streamChunksOfRawSource = __nccwpck_require__(543);
5150
- const streamChunksOfSourceMap = __nccwpck_require__(637);
5251
+ const streamChunksOfRawSource = __nccwpck_require__(139);
5252
+ const streamChunksOfSourceMap = __nccwpck_require__(953);
5151
5253
 
5152
5254
  /** @typedef {import("../Source")} Source */
5153
5255
  /** @typedef {import("./getGeneratedSourceInfo").GeneratedSourceInfo} GeneratedSourceInfo */
@@ -5206,7 +5308,7 @@ module.exports = (source, options, onChunk, onSource, onName) => {
5206
5308
 
5207
5309
  /***/ }),
5208
5310
 
5209
- /***/ 808:
5311
+ /***/ 12:
5210
5312
  /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
5211
5313
 
5212
5314
  /*
@@ -5216,8 +5318,8 @@ module.exports = (source, options, onChunk, onSource, onName) => {
5216
5318
 
5217
5319
 
5218
5320
 
5219
- const splitIntoLines = __nccwpck_require__(416);
5220
- const streamChunksOfSourceMap = __nccwpck_require__(637);
5321
+ const splitIntoLines = __nccwpck_require__(36);
5322
+ const streamChunksOfSourceMap = __nccwpck_require__(953);
5221
5323
 
5222
5324
  /** @typedef {import("../Source").RawSourceMap} RawSourceMap */
5223
5325
  /** @typedef {import("./getGeneratedSourceInfo").GeneratedSourceInfo} GeneratedSourceInfo */
@@ -5583,7 +5685,7 @@ module.exports = streamChunksOfCombinedSourceMap;
5583
5685
 
5584
5686
  /***/ }),
5585
5687
 
5586
- /***/ 543:
5688
+ /***/ 139:
5587
5689
  /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
5588
5690
 
5589
5691
  /*
@@ -5593,7 +5695,7 @@ module.exports = streamChunksOfCombinedSourceMap;
5593
5695
 
5594
5696
 
5595
5697
 
5596
- const getGeneratedSourceInfo = __nccwpck_require__(769);
5698
+ const getGeneratedSourceInfo = __nccwpck_require__(845);
5597
5699
 
5598
5700
  /** @typedef {import("./getGeneratedSourceInfo").GeneratedSourceInfo} GeneratedSourceInfo */
5599
5701
  /** @typedef {import("./streamChunks").OnChunk} OnChunk */
@@ -5652,7 +5754,7 @@ module.exports = (source, onChunk, onSource, onName, finalSource) =>
5652
5754
 
5653
5755
  /***/ }),
5654
5756
 
5655
- /***/ 637:
5757
+ /***/ 953:
5656
5758
  /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
5657
5759
 
5658
5760
  /*
@@ -5662,10 +5764,10 @@ module.exports = (source, onChunk, onSource, onName, finalSource) =>
5662
5764
 
5663
5765
 
5664
5766
 
5665
- const getGeneratedSourceInfo = __nccwpck_require__(769);
5666
- const getSource = __nccwpck_require__(292);
5667
- const readMappings = __nccwpck_require__(674);
5668
- const splitIntoLines = __nccwpck_require__(416);
5767
+ const getGeneratedSourceInfo = __nccwpck_require__(845);
5768
+ const getSource = __nccwpck_require__(432);
5769
+ const readMappings = __nccwpck_require__(878);
5770
+ const splitIntoLines = __nccwpck_require__(36);
5669
5771
 
5670
5772
  /** @typedef {import("../Source").RawSourceMap} RawSourceMap */
5671
5773
  /** @typedef {import("./getGeneratedSourceInfo").GeneratedSourceInfo} GeneratedSourceInfo */
@@ -5701,7 +5803,9 @@ const streamChunksOfSourceMapFull = (
5701
5803
  onSource(
5702
5804
  i,
5703
5805
  getSource(sourceMap, i),
5704
- (sourcesContent && sourcesContent[i]) || undefined,
5806
+ sourcesContent && typeof sourcesContent[i] === "string"
5807
+ ? sourcesContent[i]
5808
+ : undefined,
5705
5809
  );
5706
5810
  }
5707
5811
  if (names) {
@@ -5872,7 +5976,9 @@ const streamChunksOfSourceMapLinesFull = (
5872
5976
  onSource(
5873
5977
  i,
5874
5978
  getSource(sourceMap, i),
5875
- (sourcesContent && sourcesContent[i]) || undefined,
5979
+ sourcesContent && typeof sourcesContent[i] === "string"
5980
+ ? sourcesContent[i]
5981
+ : undefined,
5876
5982
  );
5877
5983
  }
5878
5984
 
@@ -5977,7 +6083,9 @@ const streamChunksOfSourceMapFinal = (
5977
6083
  onSource(
5978
6084
  i,
5979
6085
  getSource(sourceMap, i),
5980
- (sourcesContent && sourcesContent[i]) || undefined,
6086
+ sourcesContent && typeof sourcesContent[i] === "string"
6087
+ ? sourcesContent[i]
6088
+ : undefined,
5981
6089
  );
5982
6090
  }
5983
6091
  if (names) {
@@ -6061,7 +6169,9 @@ const streamChunksOfSourceMapLinesFinal = (
6061
6169
  onSource(
6062
6170
  i,
6063
6171
  getSource(sourceMap, i),
6064
- (sourcesContent && sourcesContent[i]) || undefined,
6172
+ sourcesContent && typeof sourcesContent[i] === "string"
6173
+ ? sourcesContent[i]
6174
+ : undefined,
6065
6175
  );
6066
6176
  }
6067
6177
 
@@ -6166,7 +6276,7 @@ module.exports = (
6166
6276
 
6167
6277
  /***/ }),
6168
6278
 
6169
- /***/ 345:
6279
+ /***/ 477:
6170
6280
  /***/ ((module) => {
6171
6281
 
6172
6282
  /*
@@ -6290,7 +6400,7 @@ module.exports = {
6290
6400
 
6291
6401
  /***/ }),
6292
6402
 
6293
- /***/ 751:
6403
+ /***/ 571:
6294
6404
  /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
6295
6405
 
6296
6406
  /*
@@ -6377,41 +6487,44 @@ module.exports = mergeExports(
6377
6487
  {},
6378
6488
  {
6379
6489
  get Source() {
6380
- return __nccwpck_require__(290);
6490
+ return __nccwpck_require__(478);
6381
6491
  },
6382
6492
  get RawSource() {
6383
- return __nccwpck_require__(132);
6493
+ return __nccwpck_require__(792);
6384
6494
  },
6385
6495
  get OriginalSource() {
6386
- return __nccwpck_require__(169);
6496
+ return __nccwpck_require__(605);
6387
6497
  },
6388
6498
  get SourceMapSource() {
6389
- return __nccwpck_require__(471);
6499
+ return __nccwpck_require__(915);
6390
6500
  },
6391
6501
  get CachedSource() {
6392
- return __nccwpck_require__(384);
6502
+ return __nccwpck_require__(228);
6393
6503
  },
6394
6504
  get ConcatSource() {
6395
- return __nccwpck_require__(698);
6505
+ return __nccwpck_require__(862);
6396
6506
  },
6397
6507
  get ReplaceSource() {
6398
- return __nccwpck_require__(522);
6508
+ return __nccwpck_require__(894);
6399
6509
  },
6400
6510
  get PrefixSource() {
6401
- return __nccwpck_require__(814);
6511
+ return __nccwpck_require__(370);
6402
6512
  },
6403
6513
  get SizeOnlySource() {
6404
- return __nccwpck_require__(317);
6514
+ return __nccwpck_require__(57);
6405
6515
  },
6406
6516
  get CompatSource() {
6407
- return __nccwpck_require__(912);
6517
+ return __nccwpck_require__(92);
6408
6518
  },
6409
6519
  util: {
6410
6520
  get scopes() {
6411
- return __nccwpck_require__(928);
6521
+ return __nccwpck_require__(708);
6522
+ },
6523
+ get sourceMap() {
6524
+ return __nccwpck_require__(847);
6412
6525
  },
6413
6526
  get stringBufferUtils() {
6414
- return __nccwpck_require__(345);
6527
+ return __nccwpck_require__(477);
6415
6528
  },
6416
6529
  },
6417
6530
  },
@@ -6462,7 +6575,7 @@ module.exports = mergeExports(
6462
6575
  /******/ // startup
6463
6576
  /******/ // Load entry module and return exports
6464
6577
  /******/ // This entry module is referenced by other modules so it can't be inlined
6465
- /******/ var __webpack_exports__ = __nccwpck_require__(751);
6578
+ /******/ var __webpack_exports__ = __nccwpck_require__(571);
6466
6579
  /******/ module.exports = __webpack_exports__;
6467
6580
  /******/
6468
6581
  /******/ })()
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "webpack-sources",
3
3
  "author": "Tobias Koppers @sokra",
4
- "version": "3.6.0",
4
+ "version": "3.7.1",
5
5
  "license": "MIT",
6
6
  "types": "index.d.ts",
7
7
  "type": "commonjs"
@@ -1,14 +1,4 @@
1
1
  export = RawSource;
2
- /** @typedef {import("./Source").ClearCacheOptions} ClearCacheOptions */
3
- /** @typedef {import("./Source").HashLike} HashLike */
4
- /** @typedef {import("./Source").MapOptions} MapOptions */
5
- /** @typedef {import("./Source").RawSourceMap} RawSourceMap */
6
- /** @typedef {import("./Source").SourceValue} SourceValue */
7
- /** @typedef {import("./helpers/getGeneratedSourceInfo").GeneratedSourceInfo} GeneratedSourceInfo */
8
- /** @typedef {import("./helpers/streamChunks").OnChunk} OnChunk */
9
- /** @typedef {import("./helpers/streamChunks").OnName} OnName */
10
- /** @typedef {import("./helpers/streamChunks").OnSource} OnSource */
11
- /** @typedef {import("./helpers/streamChunks").Options} Options */
12
2
  declare class RawSource extends Source {
13
3
  /**
14
4
  * @param {string | Buffer} value value