@ms-cloudpack/esm-stub-utilities 0.13.16 → 0.13.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.
@@ -1 +1 @@
1
- {"version":3,"file":"generateESMStubFromCJS.d.ts","sourceRoot":"","sources":["../src/generateESMStubFromCJS.ts"],"names":[],"mappings":"AASA;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAoD9F"}
1
+ {"version":3,"file":"generateESMStubFromCJS.d.ts","sourceRoot":"","sources":["../src/generateESMStubFromCJS.ts"],"names":[],"mappings":"AASA;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAuB9F"}
@@ -3,7 +3,7 @@ import { createRequire } from 'module';
3
3
  import os from 'os';
4
4
  import path from 'path';
5
5
  import { getExportInfo } from './getExportInfo.js';
6
- import { isValidIdentifierName } from './isValidIdentifierName.js';
6
+ import { generateESMStubFromExports } from './generateESMStubFromExports.js';
7
7
  const require = createRequire(import.meta.url);
8
8
  /**
9
9
  * Given entry/stub paths and cjs export info, generates the esm stub content.
@@ -22,33 +22,10 @@ export function generateESMStubFromCJS(options) {
22
22
  else {
23
23
  relativePath = './' + slash(path.relative(path.dirname(stubPath), filePath));
24
24
  }
25
- if (exportType === 'none') {
26
- // No exports. Just import the module.
27
- return `import "${relativePath}";`;
28
- }
29
- if (exportType === 'other') {
30
- // Some kind of value. Import then re-export as default.
31
- // (Note that even for values such as numbers which we could in theory rewrite inline,
32
- // we don't know how the value is calculated at runtime or what other side effects the module
33
- // might have, so we should preserve the import.)
34
- return `import moduleExport from "${relativePath}";\nexport default moduleExport;`;
35
- }
36
- // Object or function. Export both named properties (if any, and filtering keywords) and a default.
37
- const namedExports = exportInfo.keys.filter((name) => isValidIdentifierName(name));
38
- const hasDefaultExport = exportInfo.keys.includes('default');
39
- const stub = [`import moduleExport from "${relativePath}";`];
40
- if (namedExports.length) {
41
- stub.push(`const { ${namedExports.join(', ')} } = moduleExport;`);
42
- }
43
- if (hasDefaultExport) {
44
- stub.push(`const defaultExport = (moduleExport?.default?.default) ?? moduleExport?.default;`, `export default defaultExport;`);
45
- }
46
- else {
47
- stub.push(`export default moduleExport;`);
48
- }
49
- if (namedExports.length) {
50
- stub.push(`export { ${namedExports.join(', ')} }`);
51
- }
52
- return stub.join('\n');
25
+ const stubContent = generateESMStubFromExports({
26
+ importStatement: exportType === 'none' ? `import "${relativePath}";` : `import moduleExport from "${relativePath}";`,
27
+ export: exportInfo,
28
+ });
29
+ return stubContent;
53
30
  }
54
31
  //# sourceMappingURL=generateESMStubFromCJS.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"generateESMStubFromCJS.js","sourceRoot":"","sources":["../src/generateESMStubFromCJS.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,mCAAmC,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAEnE,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAE/C;;;GAGG;AACH,MAAM,UAAU,sBAAsB,CAAC,OAA+C;IACpF,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC;IAEvC,MAAM,UAAU,GAAG,aAAa,CAAC,OAAO,CAAC,QAAQ,CAAY,CAAC,CAAC;IAE/D,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,UAAU,CAAC;IACxC,IAAI,YAAoB,CAAC;IAEzB,4GAA4G;IAC5G,IAAI,EAAE,CAAC,QAAQ,EAAE,KAAK,OAAO,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,IAAI,EAAE,CAAC;QACzF,kEAAkE;QAClE,YAAY,GAAG,QAAQ,CAAC;IAC1B,CAAC;SAAM,CAAC;QACN,YAAY,GAAG,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC;IAC/E,CAAC;IAED,IAAI,UAAU,KAAK,MAAM,EAAE,CAAC;QAC1B,sCAAsC;QACtC,OAAO,WAAW,YAAY,IAAI,CAAC;IACrC,CAAC;IAED,IAAI,UAAU,KAAK,OAAO,EAAE,CAAC;QAC3B,wDAAwD;QACxD,sFAAsF;QACtF,6FAA6F;QAC7F,iDAAiD;QACjD,OAAO,6BAA6B,YAAY,kCAAkC,CAAC;IACrF,CAAC;IAED,mGAAmG;IACnG,MAAM,YAAY,GAAG,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC,CAAC;IACnF,MAAM,gBAAgB,GAAG,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;IAC7D,MAAM,IAAI,GAAG,CAAC,6BAA6B,YAAY,IAAI,CAAC,CAAC;IAE7D,IAAI,YAAY,CAAC,MAAM,EAAE,CAAC;QACxB,IAAI,CAAC,IAAI,CAAC,WAAW,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;IACpE,CAAC;IAED,IAAI,gBAAgB,EAAE,CAAC;QACrB,IAAI,CAAC,IAAI,CACP,kFAAkF,EAClF,+BAA+B,CAChC,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,IAAI,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAC;IAC5C,CAAC;IAED,IAAI,YAAY,CAAC,MAAM,EAAE,CAAC;QACxB,IAAI,CAAC,IAAI,CAAC,YAAY,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACrD,CAAC;IAED,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACzB,CAAC","sourcesContent":["import { slash } from '@ms-cloudpack/path-string-parsing';\nimport { createRequire } from 'module';\nimport os from 'os';\nimport path from 'path';\nimport { getExportInfo } from './getExportInfo.js';\nimport { isValidIdentifierName } from './isValidIdentifierName.js';\n\nconst require = createRequire(import.meta.url);\n\n/**\n * Given entry/stub paths and cjs export info, generates the esm stub content.\n * The stubPath is required to generate the proper import statement.\n */\nexport function generateESMStubFromCJS(options: { filePath: string; stubPath: string }): string {\n const { filePath, stubPath } = options;\n\n const exportInfo = getExportInfo(require(filePath) as unknown);\n\n const { type: exportType } = exportInfo;\n let relativePath: string;\n\n // We need to compute a relative path from the stub to the entry to construct the proper import in the stub.\n if (os.platform() === 'win32' && path.parse(filePath).root !== path.parse(stubPath).root) {\n // Different drive letters. These can't be relative to each other.\n relativePath = filePath;\n } else {\n relativePath = './' + slash(path.relative(path.dirname(stubPath), filePath));\n }\n\n if (exportType === 'none') {\n // No exports. Just import the module.\n return `import \"${relativePath}\";`;\n }\n\n if (exportType === 'other') {\n // Some kind of value. Import then re-export as default.\n // (Note that even for values such as numbers which we could in theory rewrite inline,\n // we don't know how the value is calculated at runtime or what other side effects the module\n // might have, so we should preserve the import.)\n return `import moduleExport from \"${relativePath}\";\\nexport default moduleExport;`;\n }\n\n // Object or function. Export both named properties (if any, and filtering keywords) and a default.\n const namedExports = exportInfo.keys.filter((name) => isValidIdentifierName(name));\n const hasDefaultExport = exportInfo.keys.includes('default');\n const stub = [`import moduleExport from \"${relativePath}\";`];\n\n if (namedExports.length) {\n stub.push(`const { ${namedExports.join(', ')} } = moduleExport;`);\n }\n\n if (hasDefaultExport) {\n stub.push(\n `const defaultExport = (moduleExport?.default?.default) ?? moduleExport?.default;`,\n `export default defaultExport;`,\n );\n } else {\n stub.push(`export default moduleExport;`);\n }\n\n if (namedExports.length) {\n stub.push(`export { ${namedExports.join(', ')} }`);\n }\n\n return stub.join('\\n');\n}\n"]}
1
+ {"version":3,"file":"generateESMStubFromCJS.js","sourceRoot":"","sources":["../src/generateESMStubFromCJS.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,mCAAmC,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAE7E,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAE/C;;;GAGG;AACH,MAAM,UAAU,sBAAsB,CAAC,OAA+C;IACpF,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC;IAEvC,MAAM,UAAU,GAAG,aAAa,CAAC,OAAO,CAAC,QAAQ,CAAY,CAAC,CAAC;IAE/D,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,UAAU,CAAC;IACxC,IAAI,YAAoB,CAAC;IAEzB,4GAA4G;IAC5G,IAAI,EAAE,CAAC,QAAQ,EAAE,KAAK,OAAO,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,IAAI,EAAE,CAAC;QACzF,kEAAkE;QAClE,YAAY,GAAG,QAAQ,CAAC;IAC1B,CAAC;SAAM,CAAC;QACN,YAAY,GAAG,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC;IAC/E,CAAC;IAED,MAAM,WAAW,GAAG,0BAA0B,CAAC;QAC7C,eAAe,EACb,UAAU,KAAK,MAAM,CAAC,CAAC,CAAC,WAAW,YAAY,IAAI,CAAC,CAAC,CAAC,6BAA6B,YAAY,IAAI;QACrG,MAAM,EAAE,UAAU;KACnB,CAAC,CAAC;IAEH,OAAO,WAAW,CAAC;AACrB,CAAC","sourcesContent":["import { slash } from '@ms-cloudpack/path-string-parsing';\nimport { createRequire } from 'module';\nimport os from 'os';\nimport path from 'path';\nimport { getExportInfo } from './getExportInfo.js';\nimport { generateESMStubFromExports } from './generateESMStubFromExports.js';\n\nconst require = createRequire(import.meta.url);\n\n/**\n * Given entry/stub paths and cjs export info, generates the esm stub content.\n * The stubPath is required to generate the proper import statement.\n */\nexport function generateESMStubFromCJS(options: { filePath: string; stubPath: string }): string {\n const { filePath, stubPath } = options;\n\n const exportInfo = getExportInfo(require(filePath) as unknown);\n\n const { type: exportType } = exportInfo;\n let relativePath: string;\n\n // We need to compute a relative path from the stub to the entry to construct the proper import in the stub.\n if (os.platform() === 'win32' && path.parse(filePath).root !== path.parse(stubPath).root) {\n // Different drive letters. These can't be relative to each other.\n relativePath = filePath;\n } else {\n relativePath = './' + slash(path.relative(path.dirname(stubPath), filePath));\n }\n\n const stubContent = generateESMStubFromExports({\n importStatement:\n exportType === 'none' ? `import \"${relativePath}\";` : `import moduleExport from \"${relativePath}\";`,\n export: exportInfo,\n });\n\n return stubContent;\n}\n"]}
@@ -0,0 +1,10 @@
1
+ import type { StubExportInfo } from './types/StubExportInfo.js';
2
+ /**
3
+ * Given export info and the import statement, generates the esm stub content.
4
+ * The import statement must have moduleExport as the imported value.
5
+ */
6
+ export declare function generateESMStubFromExports(options: {
7
+ importStatement: string;
8
+ export: StubExportInfo;
9
+ }): string;
10
+ //# sourceMappingURL=generateESMStubFromExports.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generateESMStubFromExports.d.ts","sourceRoot":"","sources":["../src/generateESMStubFromExports.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAEhE;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE;IAAE,eAAe,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,cAAc,CAAA;CAAE,UA8CtG"}
@@ -0,0 +1,43 @@
1
+ import { isValidIdentifierName } from './isValidIdentifierName.js';
2
+ /**
3
+ * Given export info and the import statement, generates the esm stub content.
4
+ * The import statement must have moduleExport as the imported value.
5
+ */
6
+ export function generateESMStubFromExports(options) {
7
+ const { export: exports, importStatement } = options;
8
+ const exportType = exports.type;
9
+ if (exportType === 'none') {
10
+ // No exports. Just import the module.
11
+ return importStatement;
12
+ }
13
+ // importStatement must have moduleExport as the imported value.
14
+ // This is not the best way to check this, but it's the best we can do without parsing the code.
15
+ if (!importStatement.includes('moduleExport')) {
16
+ throw new Error('importStatement must have moduleExport');
17
+ }
18
+ if (exportType === 'other') {
19
+ // Some kind of value. Import then re-export as default.
20
+ // (Note that even for values such as numbers which we could in theory rewrite inline,
21
+ // we don't know how the value is calculated at runtime or what other side effects the module
22
+ // might have, so we should preserve the import.)
23
+ return [importStatement, `export default moduleExport;`].join('\n');
24
+ }
25
+ // Object or function. Export both named properties (if any, and filtering keywords) and a default.
26
+ const namedExports = exports.keys.filter((name) => isValidIdentifierName(name));
27
+ const hasDefaultExport = exports.keys.includes('default');
28
+ const stub = [importStatement];
29
+ if (namedExports.length) {
30
+ stub.push(`const { ${namedExports.join(', ')} } = moduleExport;`);
31
+ }
32
+ if (hasDefaultExport) {
33
+ stub.push(`const defaultExport = (moduleExport?.default?.default) ?? moduleExport?.default;`, `export default defaultExport;`);
34
+ }
35
+ else {
36
+ stub.push(`export default moduleExport;`);
37
+ }
38
+ if (namedExports.length) {
39
+ stub.push(`export { ${namedExports.join(', ')} }`);
40
+ }
41
+ return stub.join('\n');
42
+ }
43
+ //# sourceMappingURL=generateESMStubFromExports.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generateESMStubFromExports.js","sourceRoot":"","sources":["../src/generateESMStubFromExports.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAGnE;;;GAGG;AACH,MAAM,UAAU,0BAA0B,CAAC,OAA4D;IACrG,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,EAAE,GAAG,OAAO,CAAC;IACrD,MAAM,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAEhC,IAAI,UAAU,KAAK,MAAM,EAAE,CAAC;QAC1B,sCAAsC;QACtC,OAAO,eAAe,CAAC;IACzB,CAAC;IAED,gEAAgE;IAChE,gGAAgG;IAChG,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC;QAC9C,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;IAC5D,CAAC;IAED,IAAI,UAAU,KAAK,OAAO,EAAE,CAAC;QAC3B,wDAAwD;QACxD,sFAAsF;QACtF,6FAA6F;QAC7F,iDAAiD;QACjD,OAAO,CAAC,eAAe,EAAE,8BAA8B,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACtE,CAAC;IAED,mGAAmG;IACnG,MAAM,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC,CAAC;IAChF,MAAM,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;IAC1D,MAAM,IAAI,GAAG,CAAC,eAAe,CAAC,CAAC;IAE/B,IAAI,YAAY,CAAC,MAAM,EAAE,CAAC;QACxB,IAAI,CAAC,IAAI,CAAC,WAAW,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;IACpE,CAAC;IAED,IAAI,gBAAgB,EAAE,CAAC;QACrB,IAAI,CAAC,IAAI,CACP,kFAAkF,EAClF,+BAA+B,CAChC,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,IAAI,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAC;IAC5C,CAAC;IAED,IAAI,YAAY,CAAC,MAAM,EAAE,CAAC;QACxB,IAAI,CAAC,IAAI,CAAC,YAAY,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACrD,CAAC;IAED,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACzB,CAAC","sourcesContent":["import { isValidIdentifierName } from './isValidIdentifierName.js';\nimport type { StubExportInfo } from './types/StubExportInfo.js';\n\n/**\n * Given export info and the import statement, generates the esm stub content.\n * The import statement must have moduleExport as the imported value.\n */\nexport function generateESMStubFromExports(options: { importStatement: string; export: StubExportInfo }) {\n const { export: exports, importStatement } = options;\n const exportType = exports.type;\n\n if (exportType === 'none') {\n // No exports. Just import the module.\n return importStatement;\n }\n\n // importStatement must have moduleExport as the imported value.\n // This is not the best way to check this, but it's the best we can do without parsing the code.\n if (!importStatement.includes('moduleExport')) {\n throw new Error('importStatement must have moduleExport');\n }\n\n if (exportType === 'other') {\n // Some kind of value. Import then re-export as default.\n // (Note that even for values such as numbers which we could in theory rewrite inline,\n // we don't know how the value is calculated at runtime or what other side effects the module\n // might have, so we should preserve the import.)\n return [importStatement, `export default moduleExport;`].join('\\n');\n }\n\n // Object or function. Export both named properties (if any, and filtering keywords) and a default.\n const namedExports = exports.keys.filter((name) => isValidIdentifierName(name));\n const hasDefaultExport = exports.keys.includes('default');\n const stub = [importStatement];\n\n if (namedExports.length) {\n stub.push(`const { ${namedExports.join(', ')} } = moduleExport;`);\n }\n\n if (hasDefaultExport) {\n stub.push(\n `const defaultExport = (moduleExport?.default?.default) ?? moduleExport?.default;`,\n `export default defaultExport;`,\n );\n } else {\n stub.push(`export default moduleExport;`);\n }\n\n if (namedExports.length) {\n stub.push(`export { ${namedExports.join(', ')} }`);\n }\n\n return stub.join('\\n');\n}\n"]}
package/lib/index.d.ts CHANGED
@@ -3,4 +3,6 @@ export type { WriteESMStubsOptions } from './types/WriteESMStubsOptions.js';
3
3
  export type { WriteESMStubsResult } from './types/WriteESMStubsResult.js';
4
4
  export { _verifyStub } from './verifyStub/verifyStub.js';
5
5
  export type { _VerifyStubOptions } from './types/VerifyStubOptions.js';
6
+ export { generateESMStubFromExports } from './generateESMStubFromExports.js';
7
+ export type { StubExportInfo } from './types/StubExportInfo.js';
6
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAC1F,YAAY,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAC5E,YAAY,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,YAAY,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAC1F,YAAY,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAC5E,YAAY,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,YAAY,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAC7E,YAAY,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC"}
package/lib/index.js CHANGED
@@ -1,3 +1,4 @@
1
1
  export { writeESMStubsInWorker, disposeStubWorkerPool } from './writeESMStubsInWorker.js';
2
2
  export { _verifyStub } from './verifyStub/verifyStub.js';
3
+ export { generateESMStubFromExports } from './generateESMStubFromExports.js';
3
4
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAG1F,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC","sourcesContent":["export { writeESMStubsInWorker, disposeStubWorkerPool } from './writeESMStubsInWorker.js';\nexport type { WriteESMStubsOptions } from './types/WriteESMStubsOptions.js';\nexport type { WriteESMStubsResult } from './types/WriteESMStubsResult.js';\nexport { _verifyStub } from './verifyStub/verifyStub.js';\nexport type { _VerifyStubOptions } from './types/VerifyStubOptions.js';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAG1F,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAEzD,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC","sourcesContent":["export { writeESMStubsInWorker, disposeStubWorkerPool } from './writeESMStubsInWorker.js';\nexport type { WriteESMStubsOptions } from './types/WriteESMStubsOptions.js';\nexport type { WriteESMStubsResult } from './types/WriteESMStubsResult.js';\nexport { _verifyStub } from './verifyStub/verifyStub.js';\nexport type { _VerifyStubOptions } from './types/VerifyStubOptions.js';\nexport { generateESMStubFromExports } from './generateESMStubFromExports.js';\nexport type { StubExportInfo } from './types/StubExportInfo.js';\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ms-cloudpack/esm-stub-utilities",
3
- "version": "0.13.16",
3
+ "version": "0.13.18",
4
4
  "description": "Generates ESM stubs for CommonJS entry files.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -14,9 +14,9 @@
14
14
  }
15
15
  },
16
16
  "dependencies": {
17
- "@ms-cloudpack/common-types": "^0.23.4",
17
+ "@ms-cloudpack/common-types": "^0.23.5",
18
18
  "@ms-cloudpack/json-utilities": "^0.1.8",
19
- "@ms-cloudpack/package-utilities": "^10.3.0",
19
+ "@ms-cloudpack/package-utilities": "^10.4.1",
20
20
  "@ms-cloudpack/path-string-parsing": "^1.2.5",
21
21
  "@ms-cloudpack/worker-pool": "^0.3.0",
22
22
  "jsdom": "^24.0.0",