@xylabs/url 2.10.16 → 2.10.18

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.
@@ -0,0 +1,9 @@
1
+ declare const URL: {
2
+ new (url: string | URL, base?: string | URL | undefined): URL;
3
+ prototype: URL;
4
+ canParse(url: string | URL, base?: string | undefined): boolean;
5
+ createObjectURL(obj: Blob | MediaSource): string;
6
+ revokeObjectURL(url: string): void;
7
+ };
8
+
9
+ export { URL };
@@ -0,0 +1,9 @@
1
+ declare const URL: {
2
+ new (url: string | URL, base?: string | URL | undefined): URL;
3
+ prototype: URL;
4
+ canParse(url: string | URL, base?: string | undefined): boolean;
5
+ createObjectURL(obj: Blob | MediaSource): string;
6
+ revokeObjectURL(url: string): void;
7
+ };
8
+
9
+ export { URL };
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/browserIndex.ts
21
+ var browserIndex_exports = {};
22
+ __export(browserIndex_exports, {
23
+ URL: () => URL2
24
+ });
25
+ module.exports = __toCommonJS(browserIndex_exports);
26
+
27
+ // src/browser/Url.ts
28
+ var BrowserUrl = URL;
29
+
30
+ // src/browserIndex.ts
31
+ var URL2 = BrowserUrl;
32
+ // Annotate the CommonJS export names for ESM import in node:
33
+ 0 && (module.exports = {
34
+ URL
35
+ });
36
+ //# sourceMappingURL=browserIndex.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/browserIndex.ts","../src/browser/Url.ts"],"sourcesContent":["import { BrowserUrl } from './browser'\nexport const URL = BrowserUrl\n","const BrowserUrl = URL\nexport { BrowserUrl }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,aAAAA;AAAA;AAAA;;;ACAA,IAAM,aAAa;;;ADCZ,IAAMC,OAAM;","names":["URL","URL"]}
@@ -0,0 +1,9 @@
1
+ // src/browser/Url.ts
2
+ var BrowserUrl = URL;
3
+
4
+ // src/browserIndex.ts
5
+ var URL2 = BrowserUrl;
6
+ export {
7
+ URL2 as URL
8
+ };
9
+ //# sourceMappingURL=browserIndex.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/browser/Url.ts","../src/browserIndex.ts"],"sourcesContent":["const BrowserUrl = URL\nexport { BrowserUrl }\n","import { BrowserUrl } from './browser'\nexport const URL = BrowserUrl\n"],"mappings":";AAAA,IAAM,aAAa;;;ACCZ,IAAMA,OAAM;","names":["URL"]}
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- export { URL as NodeUrl, URL } from 'url';
1
+ export { URL as NodeUrl, URL } from 'node:url';
2
2
 
3
3
  declare const BrowserUrl: {
4
4
  new (url: string | URL, base?: string | URL | undefined): URL;
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { URL as NodeUrl, URL } from 'url';
1
+ export { URL as NodeUrl, URL } from 'node:url';
2
2
 
3
3
  declare const BrowserUrl: {
4
4
  new (url: string | URL, base?: string | URL | undefined): URL;
package/dist/index.js CHANGED
@@ -21,8 +21,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
21
21
  var src_exports = {};
22
22
  __export(src_exports, {
23
23
  BrowserUrl: () => BrowserUrl,
24
- NodeUrl: () => import_url.URL,
25
- URL: () => import_url.URL
24
+ NodeUrl: () => import_node_url.URL,
25
+ URL: () => import_node_url.URL
26
26
  });
27
27
  module.exports = __toCommonJS(src_exports);
28
28
 
@@ -30,7 +30,7 @@ module.exports = __toCommonJS(src_exports);
30
30
  var BrowserUrl = URL;
31
31
 
32
32
  // src/node/Url.ts
33
- var import_url = require("url");
33
+ var import_node_url = require("url");
34
34
  // Annotate the CommonJS export names for ESM import in node:
35
35
  0 && (module.exports = {
36
36
  BrowserUrl,
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/browser/Url.ts","../src/node/Url.ts"],"sourcesContent":["export * from './browser'\nexport { NodeUrl as URL } from './node'\nexport * from './node'\n","const BrowserUrl = URL\nexport { BrowserUrl }\n","import { URL } from 'url'\nexport { URL as NodeUrl }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAM,aAAa;;;ACAnB,iBAAoB;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts","../src/browser/Url.ts","../src/node/Url.ts"],"sourcesContent":["export * from './browser'\nexport { NodeUrl as URL } from './node'\nexport * from './node'\n","const BrowserUrl = URL\nexport { BrowserUrl }\n","import { URL } from 'node:url'\nexport { URL as NodeUrl }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAM,aAAa;;;ACAnB,sBAAoB;","names":[]}
package/dist/index.mjs CHANGED
@@ -2,7 +2,7 @@
2
2
  var BrowserUrl = URL;
3
3
 
4
4
  // src/node/Url.ts
5
- import { URL as URL2 } from "url";
5
+ import { URL as URL2 } from "node:url";
6
6
  export {
7
7
  BrowserUrl,
8
8
  URL2 as NodeUrl,
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/browser/Url.ts","../src/node/Url.ts"],"sourcesContent":["const BrowserUrl = URL\nexport { BrowserUrl }\n","import { URL } from 'url'\nexport { URL as NodeUrl }\n"],"mappings":";AAAA,IAAM,aAAa;;;ACAnB,SAAS,OAAAA,YAAW;","names":["URL"]}
1
+ {"version":3,"sources":["../src/browser/Url.ts","../src/node/Url.ts"],"sourcesContent":["const BrowserUrl = URL\nexport { BrowserUrl }\n","import { URL } from 'node:url'\nexport { URL as NodeUrl }\n"],"mappings":";AAAA,IAAM,aAAa;;;ACAnB,SAAS,OAAAA,YAAW;","names":["URL"]}
@@ -0,0 +1,5 @@
1
+ import { URL as URL$1 } from 'node:url';
2
+
3
+ declare const URL: typeof URL$1;
4
+
5
+ export { URL };
@@ -0,0 +1,5 @@
1
+ import { URL as URL$1 } from 'node:url';
2
+
3
+ declare const URL: typeof URL$1;
4
+
5
+ export { URL };
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/nodeIndex.ts
21
+ var nodeIndex_exports = {};
22
+ __export(nodeIndex_exports, {
23
+ URL: () => URL2
24
+ });
25
+ module.exports = __toCommonJS(nodeIndex_exports);
26
+
27
+ // src/node/Url.ts
28
+ var import_node_url = require("url");
29
+
30
+ // src/nodeIndex.ts
31
+ var URL2 = import_node_url.URL;
32
+ // Annotate the CommonJS export names for ESM import in node:
33
+ 0 && (module.exports = {
34
+ URL
35
+ });
36
+ //# sourceMappingURL=nodeIndex.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/nodeIndex.ts","../src/node/Url.ts"],"sourcesContent":["import { NodeUrl } from './node'\nexport const URL = NodeUrl\n","import { URL } from 'node:url'\nexport { URL as NodeUrl }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,aAAAA;AAAA;AAAA;;;ACAA,sBAAoB;;;ADCb,IAAMC,OAAM;","names":["URL","URL"]}
@@ -0,0 +1,9 @@
1
+ // src/node/Url.ts
2
+ import { URL } from "node:url";
3
+
4
+ // src/nodeIndex.ts
5
+ var URL2 = URL;
6
+ export {
7
+ URL2 as URL
8
+ };
9
+ //# sourceMappingURL=nodeIndex.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/node/Url.ts","../src/nodeIndex.ts"],"sourcesContent":["import { URL } from 'node:url'\nexport { URL as NodeUrl }\n","import { NodeUrl } from './node'\nexport const URL = NodeUrl\n"],"mappings":";AAAA,SAAS,WAAW;;;ACCb,IAAMA,OAAM;","names":["URL"]}
package/package.json CHANGED
@@ -16,10 +16,26 @@
16
16
  "exports": {
17
17
  ".": {
18
18
  "require": {
19
+ "browser": {
20
+ "types": "./dist/browserIndex.d.ts",
21
+ "default": "./dist/browserIndex.js"
22
+ },
23
+ "node": {
24
+ "types": "./dist/nodeIndex.d.ts",
25
+ "default": "./dist/nodeIndex.js"
26
+ },
19
27
  "types": "./dist/index.d.ts",
20
28
  "default": "./dist/index.js"
21
29
  },
22
30
  "import": {
31
+ "browser": {
32
+ "types": "./dist/browserIndex.d.mts",
33
+ "default": "./dist/browserIndex.mjs"
34
+ },
35
+ "node": {
36
+ "types": "./dist/nodeIndex.d.mts",
37
+ "default": "./dist/nodeIndex.mjs"
38
+ },
23
39
  "types": "./dist/index.d.mts",
24
40
  "default": "./dist/index.mjs"
25
41
  }
@@ -27,15 +43,9 @@
27
43
  "./dist/docs.json": {
28
44
  "default": "./dist/docs.json"
29
45
  },
30
- "./cjs": {
31
- "default": "./dist/index.js"
32
- },
33
46
  "./docs": {
34
47
  "default": "./dist/docs.json"
35
48
  },
36
- "./esm": {
37
- "default": "./dist/index.mjs"
38
- },
39
49
  "./package.json": "./package.json"
40
50
  },
41
51
  "main": "dist/index.js",
@@ -51,9 +61,9 @@
51
61
  "buffer": "^6.0.3"
52
62
  },
53
63
  "devDependencies": {
54
- "@xylabs/ts-scripts-yarn3": "^2.19.11",
55
- "@xylabs/tsconfig": "^2.19.11",
56
- "@xylabs/tsconfig-dom": "^2.19.11",
64
+ "@xylabs/ts-scripts-yarn3": "^2.19.12",
65
+ "@xylabs/tsconfig": "^2.19.12",
66
+ "@xylabs/tsconfig-dom": "^2.19.12",
57
67
  "publint": "^0.2.2",
58
68
  "tsup": "^7.2.0"
59
69
  },
@@ -69,5 +79,5 @@
69
79
  "package-recompile": "tsup && publint"
70
80
  },
71
81
  "sideEffects": false,
72
- "version": "2.10.16"
82
+ "version": "2.10.18"
73
83
  }
package/src/node/Url.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { URL } from 'url'
1
+ import { URL } from 'node:url'
2
2
  export { URL as NodeUrl }
package/tsup.config.ts CHANGED
@@ -6,9 +6,9 @@ export default defineConfig({
6
6
  cjsInterop: true,
7
7
  clean: false,
8
8
  dts: {
9
- entry: ['src/index.ts'],
9
+ entry: ['src/index.ts', 'src/browserIndex.ts', 'src/nodeIndex.ts'],
10
10
  },
11
- entry: ['src/index.ts'],
11
+ entry: ['src/index.ts', 'src/browserIndex.ts', 'src/nodeIndex.ts'],
12
12
  format: ['cjs', 'esm'],
13
13
  sourcemap: true,
14
14
  splitting: false,