@ms-cloudpack/esm-stub-utilities 0.0.2 → 0.1.2
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.
- package/CHANGELOG.json +82 -1
- package/CHANGELOG.md +27 -2
- package/lib/initializeBrowserEnvironment.js +1 -1
- package/lib/initializeBrowserEnvironment.js.map +1 -1
- package/lib/tsdoc-metadata.json +11 -0
- package/lib/writeESMStub.d.ts +1 -1
- package/lib/writeESMStub.js +6 -1
- package/lib/writeESMStub.js.map +1 -1
- package/package.json +9 -9
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,88 @@
|
|
|
2
2
|
"name": "@ms-cloudpack/esm-stub-utilities",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Tue, 02 Aug 2022 19:53:43 GMT",
|
|
6
|
+
"tag": "@ms-cloudpack/esm-stub-utilities_v0.1.2",
|
|
7
|
+
"version": "0.1.2",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "renovate@whitesourcesoftware.com",
|
|
12
|
+
"package": "@ms-cloudpack/esm-stub-utilities",
|
|
13
|
+
"commit": "dc1ecdc793357827f70515d00830ecd35491b76c",
|
|
14
|
+
"comment": "Update dependency @types/jsdom to v16.2.15"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"date": "Thu, 28 Jul 2022 18:39:20 GMT",
|
|
21
|
+
"tag": "@ms-cloudpack/esm-stub-utilities_v0.1.1",
|
|
22
|
+
"version": "0.1.1",
|
|
23
|
+
"comments": {
|
|
24
|
+
"patch": [
|
|
25
|
+
{
|
|
26
|
+
"author": "email not defined",
|
|
27
|
+
"package": "@ms-cloudpack/esm-stub-utilities",
|
|
28
|
+
"commit": "ddec754013e36611f3f6b25e1146cb214402de28",
|
|
29
|
+
"comment": "Update dependency @types/jsdom-global to v3.0.3"
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"date": "Wed, 29 Jun 2022 02:45:18 GMT",
|
|
36
|
+
"tag": "@ms-cloudpack/esm-stub-utilities_v0.1.0",
|
|
37
|
+
"version": "0.1.0",
|
|
38
|
+
"comments": {
|
|
39
|
+
"none": [
|
|
40
|
+
{
|
|
41
|
+
"author": "email not defined",
|
|
42
|
+
"package": "@ms-cloudpack/esm-stub-utilities",
|
|
43
|
+
"commit": "94790eee5ac4401529c3f1215168ffb3725dfd61",
|
|
44
|
+
"comment": "Pin devDependencies"
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"date": "Wed, 08 Jun 2022 20:07:00 GMT",
|
|
51
|
+
"tag": "@ms-cloudpack/esm-stub-utilities_v0.1.0",
|
|
52
|
+
"version": "0.1.0",
|
|
53
|
+
"comments": {
|
|
54
|
+
"minor": [
|
|
55
|
+
{
|
|
56
|
+
"author": "dzearing@microsoft.com",
|
|
57
|
+
"package": "@ms-cloudpack/esm-stub-utilities",
|
|
58
|
+
"commit": "0e78dd2f1cf4d366f04d52d54996418c4febcfb6",
|
|
59
|
+
"comment": "Updating writeESMStub to return the filepath, making path input option (using temp file if not provided.)"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"author": "beachball",
|
|
63
|
+
"package": "@ms-cloudpack/esm-stub-utilities",
|
|
64
|
+
"comment": "Bump @ms-cloudpack/path-utilities to v0.3.1",
|
|
65
|
+
"commit": "0e78dd2f1cf4d366f04d52d54996418c4febcfb6"
|
|
66
|
+
}
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"date": "Fri, 03 Jun 2022 21:51:54 GMT",
|
|
72
|
+
"tag": "@ms-cloudpack/esm-stub-utilities_v0.0.2",
|
|
73
|
+
"version": "0.0.2",
|
|
74
|
+
"comments": {
|
|
75
|
+
"none": [
|
|
76
|
+
{
|
|
77
|
+
"author": "bot@renovateapp.com",
|
|
78
|
+
"package": "@ms-cloudpack/esm-stub-utilities",
|
|
79
|
+
"commit": "c27f62a8cc6cef068c201ce4e0802f49508a01d4",
|
|
80
|
+
"comment": "Pin dev dependencies"
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"date": "Fri, 27 May 2022 20:32:39 GMT",
|
|
6
87
|
"tag": "@ms-cloudpack/esm-stub-utilities_v0.0.2",
|
|
7
88
|
"version": "0.0.2",
|
|
8
89
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,37 @@
|
|
|
1
1
|
# Change Log - @ms-cloudpack/esm-stub-utilities
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Tue, 02 Aug 2022 19:53:43 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 0.1.2
|
|
8
|
+
|
|
9
|
+
Tue, 02 Aug 2022 19:53:43 GMT
|
|
10
|
+
|
|
11
|
+
### Patches
|
|
12
|
+
|
|
13
|
+
- Update dependency @types/jsdom to v16.2.15 (renovate@whitesourcesoftware.com)
|
|
14
|
+
|
|
15
|
+
## 0.1.1
|
|
16
|
+
|
|
17
|
+
Thu, 28 Jul 2022 18:39:20 GMT
|
|
18
|
+
|
|
19
|
+
### Patches
|
|
20
|
+
|
|
21
|
+
- Update dependency @types/jsdom-global to v3.0.3 (email not defined)
|
|
22
|
+
|
|
23
|
+
## 0.1.0
|
|
24
|
+
|
|
25
|
+
Wed, 08 Jun 2022 20:07:00 GMT
|
|
26
|
+
|
|
27
|
+
### Minor changes
|
|
28
|
+
|
|
29
|
+
- Updating writeESMStub to return the filepath, making path input option (using temp file if not provided.) (dzearing@microsoft.com)
|
|
30
|
+
- Bump @ms-cloudpack/path-utilities to v0.3.1
|
|
31
|
+
|
|
7
32
|
## 0.0.2
|
|
8
33
|
|
|
9
|
-
Fri, 27 May 2022 20:32:
|
|
34
|
+
Fri, 27 May 2022 20:32:39 GMT
|
|
10
35
|
|
|
11
36
|
### Patches
|
|
12
37
|
|
|
@@ -9,7 +9,7 @@ export async function initializeBrowserEnvironment() {
|
|
|
9
9
|
await import('jsdom-global');
|
|
10
10
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
11
11
|
// @ts-ignore
|
|
12
|
-
await import('regenerator-runtime
|
|
12
|
+
await import('regenerator-runtime');
|
|
13
13
|
const dom = new JSDOM();
|
|
14
14
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
15
15
|
const globalThis = global;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initializeBrowserEnvironment.js","sourceRoot":"","sources":["../src/initializeBrowserEnvironment.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,4BAA4B;IAChD,IAAI,OAAO,MAAM,KAAK,WAAW,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;QAClE,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC,CAAC;QACxC,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,CAAC;QAClC,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,CAAC;QAElC,MAAM,MAAM,CAAC,cAAc,CAAC,CAAC;QAE7B,6DAA6D;QAC7D,aAAa;QACb,MAAM,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"initializeBrowserEnvironment.js","sourceRoot":"","sources":["../src/initializeBrowserEnvironment.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,4BAA4B;IAChD,IAAI,OAAO,MAAM,KAAK,WAAW,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;QAClE,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AAI,OAAO,KAAK,QAAQ,EAAE;4BACxB,OAAO;gCACL,UAAU,EAAE,GAAG,EAAE,CAAC,CAAC;oCACjB,QAAQ,EAAE,GAAG,EAAE;wCACb,WAAW;oCACb,CAAC;iCACF,CAAC;gCACF,WAAW,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC;6BACxB,CAAC;yBACH;wBAED,8DAA8D;wBAC9D,OAAQ,aAAqB,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC;oBAC/E,CAAC,CAAC;KACP;AACH,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// This file is read by tools that parse documentation comments conforming to the TSDoc standard.
|
|
2
|
+
// It should be published with your NPM package. It should not be tracked by Git.
|
|
3
|
+
{
|
|
4
|
+
"tsdocVersion": "0.12",
|
|
5
|
+
"toolPackages": [
|
|
6
|
+
{
|
|
7
|
+
"packageName": "@microsoft/api-extractor",
|
|
8
|
+
"packageVersion": "7.28.7"
|
|
9
|
+
}
|
|
10
|
+
]
|
|
11
|
+
}
|
package/lib/writeESMStub.d.ts
CHANGED
package/lib/writeESMStub.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { slash } from '@ms-cloudpack/path-utilities';
|
|
2
1
|
import fs from 'fs';
|
|
2
|
+
import os from 'os';
|
|
3
|
+
import path from 'path';
|
|
3
4
|
import { createESMStub } from './createESMStub.js';
|
|
5
|
+
import { slash } from '@ms-cloudpack/path-utilities';
|
|
4
6
|
const { writeFile } = fs.promises;
|
|
5
7
|
/**
|
|
6
8
|
* Generates an ESM stub for CommonJS modules.
|
|
@@ -8,9 +10,12 @@ const { writeFile } = fs.promises;
|
|
|
8
10
|
export async function writeESMStub(entryPath, stubPath) {
|
|
9
11
|
// Ensure forward slashes
|
|
10
12
|
entryPath = slash(entryPath);
|
|
13
|
+
// Ensure stub path is provided.
|
|
14
|
+
stubPath ?? (stubPath = path.join(os.tmpdir(), `esm-stub-${Date.now()}.js`));
|
|
11
15
|
// If we have a package export, we can generate an ESM stub.
|
|
12
16
|
const esmStub = createESMStub(entryPath, stubPath);
|
|
13
17
|
// Write the stub to disk.
|
|
14
18
|
await writeFile(stubPath, esmStub);
|
|
19
|
+
return stubPath;
|
|
15
20
|
}
|
|
16
21
|
//# sourceMappingURL=writeESMStub.js.map
|
package/lib/writeESMStub.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"writeESMStub.js","sourceRoot":"","sources":["../src/writeESMStub.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"writeESMStub.js","sourceRoot":"","sources":["../src/writeESMStub.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAErD,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC;AAElC;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,SAAiB,EAAE,QAAiB;IACrE,yBAAyB;IACzB,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC;IAE7B,gCAAgC;IAChC,QAAQ,KAAR,QAAQ,GAAK,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,YAAY,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,EAAC;IAEjE,4DAA4D;IAC5D,MAAM,OAAO,GAAG,aAAa,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IAEnD,0BAA0B;IAC1B,MAAM,SAAS,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAEnC,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ms-cloudpack/esm-stub-utilities",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Generates ESM stubs for CommonJS entry files.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@ms-cloudpack/path-utilities": "^0.3.
|
|
16
|
+
"@ms-cloudpack/path-utilities": "^0.3.1",
|
|
17
17
|
"atob": "^2.1.2",
|
|
18
18
|
"btoa": "^1.2.1",
|
|
19
19
|
"jsdom-global": "^3.0.2",
|
|
@@ -23,13 +23,13 @@
|
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@ms-cloudpack/eslint-config-base": "*",
|
|
25
25
|
"@ms-cloudpack/scripts": "*",
|
|
26
|
-
"@types/atob": "
|
|
27
|
-
"@types/btoa": "
|
|
28
|
-
"@types/jsdom-global": "
|
|
29
|
-
"@types/jsdom": "
|
|
30
|
-
"@types/regenerator-runtime": "
|
|
31
|
-
"react-dom": "
|
|
32
|
-
"react": "
|
|
26
|
+
"@types/atob": "2.1.2",
|
|
27
|
+
"@types/btoa": "1.2.3",
|
|
28
|
+
"@types/jsdom-global": "3.0.3",
|
|
29
|
+
"@types/jsdom": "16.2.15",
|
|
30
|
+
"@types/regenerator-runtime": "0.13.1",
|
|
31
|
+
"react-dom": "17.0.2",
|
|
32
|
+
"react": "17.0.2"
|
|
33
33
|
},
|
|
34
34
|
"scripts": {
|
|
35
35
|
"api:update": "cloudpack-scripts api-update",
|