@parcel/utils 2.0.0-nightly.978 → 2.0.0-nightly.992

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 (45) 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/lib/DefaultMap.js +0 -56
  8. package/lib/Deferred.js +0 -34
  9. package/lib/PromiseQueue.js +0 -124
  10. package/lib/TapStream.js +0 -41
  11. package/lib/alternatives.js +0 -134
  12. package/lib/ansi-html.js +0 -24
  13. package/lib/blob.js +0 -49
  14. package/lib/bundle-url.js +0 -43
  15. package/lib/collection.js +0 -65
  16. package/lib/config.js +0 -198
  17. package/lib/countLines.js +0 -18
  18. package/lib/debounce.js +0 -20
  19. package/lib/dependency-location.js +0 -21
  20. package/lib/escape-html.js +0 -24
  21. package/lib/generateBuildMetrics.js +0 -148
  22. package/lib/generateCertificate.js +0 -149
  23. package/lib/getCertificate.js +0 -19
  24. package/lib/getExisting.js +0 -31
  25. package/lib/getRootDir.js +0 -66
  26. package/lib/glob.js +0 -110
  27. package/lib/hash.js +0 -44
  28. package/lib/http-server.js +0 -102
  29. package/lib/is-url.js +0 -27
  30. package/lib/isDirectoryInside.js +0 -24
  31. package/lib/objectHash.js +0 -34
  32. package/lib/openInBrowser.js +0 -94
  33. package/lib/parseCSSImport.js +0 -16
  34. package/lib/path.js +0 -49
  35. package/lib/prettifyTime.js +0 -10
  36. package/lib/prettyDiagnostic.js +0 -139
  37. package/lib/relativeBundlePath.js +0 -30
  38. package/lib/relativeUrl.js +0 -32
  39. package/lib/replaceBundleReferences.js +0 -211
  40. package/lib/schema.js +0 -391
  41. package/lib/shared-buffer.js +0 -31
  42. package/lib/sourcemap.js +0 -147
  43. package/lib/stream.js +0 -86
  44. package/lib/throttle.js +0 -16
  45. 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
- }