@ms-cloudpack/esm-stub-utilities 0.1.2 → 0.2.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.
package/CHANGELOG.json CHANGED
@@ -2,7 +2,22 @@
2
2
  "name": "@ms-cloudpack/esm-stub-utilities",
3
3
  "entries": [
4
4
  {
5
- "date": "Tue, 02 Aug 2022 19:53:43 GMT",
5
+ "date": "Sat, 06 Aug 2022 08:15:24 GMT",
6
+ "tag": "@ms-cloudpack/esm-stub-utilities_v0.2.0",
7
+ "version": "0.2.0",
8
+ "comments": {
9
+ "minor": [
10
+ {
11
+ "author": "dzearing@microsoft.com",
12
+ "package": "@ms-cloudpack/esm-stub-utilities",
13
+ "commit": "70b5e51ee1e2bbb80d6b6fef1dbbf819d3634a0b",
14
+ "comment": "Fixing stub generation to emit to a physical location on macs, rather than symlink."
15
+ }
16
+ ]
17
+ }
18
+ },
19
+ {
20
+ "date": "Tue, 02 Aug 2022 19:53:54 GMT",
6
21
  "tag": "@ms-cloudpack/esm-stub-utilities_v0.1.2",
7
22
  "version": "0.1.2",
8
23
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,20 @@
1
1
  # Change Log - @ms-cloudpack/esm-stub-utilities
2
2
 
3
- This log was last generated on Tue, 02 Aug 2022 19:53:43 GMT and should not be manually modified.
3
+ This log was last generated on Sat, 06 Aug 2022 08:15:24 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 0.2.0
8
+
9
+ Sat, 06 Aug 2022 08:15:24 GMT
10
+
11
+ ### Minor changes
12
+
13
+ - Fixing stub generation to emit to a physical location on macs, rather than symlink. (dzearing@microsoft.com)
14
+
7
15
  ## 0.1.2
8
16
 
9
- Tue, 02 Aug 2022 19:53:43 GMT
17
+ Tue, 02 Aug 2022 19:53:54 GMT
10
18
 
11
19
  ### Patches
12
20
 
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.28.7"
8
+ "packageVersion": "7.29.0"
9
9
  }
10
10
  ]
11
11
  }
@@ -3,7 +3,7 @@ import os from 'os';
3
3
  import path from 'path';
4
4
  import { createESMStub } from './createESMStub.js';
5
5
  import { slash } from '@ms-cloudpack/path-utilities';
6
- const { writeFile } = fs.promises;
6
+ const { writeFile, realpath } = fs.promises;
7
7
  /**
8
8
  * Generates an ESM stub for CommonJS modules.
9
9
  */
@@ -11,7 +11,7 @@ export async function writeESMStub(entryPath, stubPath) {
11
11
  // Ensure forward slashes
12
12
  entryPath = slash(entryPath);
13
13
  // Ensure stub path is provided.
14
- stubPath ?? (stubPath = path.join(os.tmpdir(), `esm-stub-${Date.now()}.js`));
14
+ stubPath ?? (stubPath = path.join(await realpath(os.tmpdir()), `esm-stub-${Date.now()}.js`));
15
15
  // If we have a package export, we can generate an ESM stub.
16
16
  const esmStub = createESMStub(entryPath, stubPath);
17
17
  // Write the stub to disk.
@@ -1 +1 @@
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"}
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,QAAQ,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC;AAE5C;;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,MAAM,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,EAAE,YAAY,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,EAAC;IAEjF,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.1.2",
3
+ "version": "0.2.0",
4
4
  "description": "Generates ESM stubs for CommonJS entry files.",
5
5
  "license": "MIT",
6
6
  "type": "module",