@parcel/utils 2.0.0-nightly.977 → 2.0.0-nightly.991

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 (46) hide show
  1. package/lib/index.js +35876 -411
  2. package/lib/index.js.map +1 -0
  3. package/package.json +28 -15
  4. package/src/config.js +2 -2
  5. package/src/glob.js +14 -3
  6. package/src/index.js +1 -1
  7. package/src/replaceBundleReferences.js +3 -1
  8. package/lib/DefaultMap.js +0 -56
  9. package/lib/Deferred.js +0 -34
  10. package/lib/PromiseQueue.js +0 -124
  11. package/lib/TapStream.js +0 -41
  12. package/lib/alternatives.js +0 -134
  13. package/lib/ansi-html.js +0 -24
  14. package/lib/blob.js +0 -49
  15. package/lib/bundle-url.js +0 -43
  16. package/lib/collection.js +0 -65
  17. package/lib/config.js +0 -198
  18. package/lib/countLines.js +0 -18
  19. package/lib/debounce.js +0 -20
  20. package/lib/dependency-location.js +0 -21
  21. package/lib/escape-html.js +0 -24
  22. package/lib/generateBuildMetrics.js +0 -148
  23. package/lib/generateCertificate.js +0 -149
  24. package/lib/getCertificate.js +0 -19
  25. package/lib/getExisting.js +0 -31
  26. package/lib/getRootDir.js +0 -66
  27. package/lib/glob.js +0 -110
  28. package/lib/hash.js +0 -44
  29. package/lib/http-server.js +0 -102
  30. package/lib/is-url.js +0 -27
  31. package/lib/isDirectoryInside.js +0 -24
  32. package/lib/objectHash.js +0 -34
  33. package/lib/openInBrowser.js +0 -94
  34. package/lib/parseCSSImport.js +0 -16
  35. package/lib/path.js +0 -49
  36. package/lib/prettifyTime.js +0 -10
  37. package/lib/prettyDiagnostic.js +0 -139
  38. package/lib/relativeBundlePath.js +0 -30
  39. package/lib/relativeUrl.js +0 -32
  40. package/lib/replaceBundleReferences.js +0 -207
  41. package/lib/schema.js +0 -391
  42. package/lib/shared-buffer.js +0 -31
  43. package/lib/sourcemap.js +0 -147
  44. package/lib/stream.js +0 -86
  45. package/lib/throttle.js +0 -16
  46. package/lib/urlJoin.js +0 -46
package/lib/urlJoin.js DELETED
@@ -1,46 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = urlJoin;
7
-
8
- function _url() {
9
- const data = _interopRequireDefault(require("url"));
10
-
11
- _url = function () {
12
- return data;
13
- };
14
-
15
- return data;
16
- }
17
-
18
- function _path() {
19
- const data = _interopRequireDefault(require("path"));
20
-
21
- _path = function () {
22
- return data;
23
- };
24
-
25
- return data;
26
- }
27
-
28
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
29
-
30
- /**
31
- * Joins a path onto a URL, and normalizes Windows paths
32
- * e.g. from \path\to\res.js to /path/to/res.js.
33
- */
34
- function urlJoin(publicURL, assetPath) {
35
- const url = _url().default.parse(publicURL, false, true); // Leading / ensures that paths with colons are not parsed as a protocol.
36
-
37
-
38
- let p = assetPath.startsWith('/') ? assetPath : '/' + assetPath;
39
-
40
- const assetUrl = _url().default.parse(p);
41
-
42
- url.pathname = _path().default.posix.join(url.pathname, assetUrl.pathname);
43
- url.search = assetUrl.search;
44
- url.hash = assetUrl.hash;
45
- return _url().default.format(url);
46
- }