@module-federation/third-party-dts-extractor 0.3.0 → 0.3.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/dist/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @module-federation/third-party-dts-extractor
2
2
 
3
+ ## 0.3.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 0de1c83: fix: do not collect node internal utils
8
+
9
+ ## 0.3.1
10
+
3
11
  ## 0.3.0
4
12
 
5
13
  ## 0.2.8
package/dist/index.js CHANGED
@@ -19,6 +19,9 @@ function getTypedName(name) {
19
19
 
20
20
  // packages/third-party-dts-extractor/src/ThirdPartyExtractor.ts
21
21
  var ignoredPkgs = ["typescript"];
22
+ var isNodeUtils = (pkgJsonPath, importPath) => {
23
+ return pkgJsonPath === importPath;
24
+ };
22
25
  var ThirdPartyExtractor = class {
23
26
  constructor(destDir, context = process.cwd()) {
24
27
  this.destDir = destDir;
@@ -43,9 +46,13 @@ var ThirdPartyExtractor = class {
43
46
  return;
44
47
  }
45
48
  try {
46
- const pkgJsonPath = _findpkg2.default.sync(
47
- __require.resolve(importPath, { paths: [this.context] })
48
- );
49
+ const importEntry = __require.resolve(importPath, {
50
+ paths: [this.context]
51
+ });
52
+ if (isNodeUtils(importEntry, importPath)) {
53
+ return;
54
+ }
55
+ const pkgJsonPath = _findpkg2.default.sync(importEntry);
49
56
  const dir = _path2.default.dirname(pkgJsonPath);
50
57
  const pkg = JSON.parse(_fsextra2.default.readFileSync(pkgJsonPath, "utf-8"));
51
58
  const types = pkg.types || pkg.typings;
package/dist/index.mjs CHANGED
@@ -19,6 +19,9 @@ function getTypedName(name) {
19
19
 
20
20
  // packages/third-party-dts-extractor/src/ThirdPartyExtractor.ts
21
21
  var ignoredPkgs = ["typescript"];
22
+ var isNodeUtils = (pkgJsonPath, importPath) => {
23
+ return pkgJsonPath === importPath;
24
+ };
22
25
  var ThirdPartyExtractor = class {
23
26
  constructor(destDir, context = process.cwd()) {
24
27
  this.destDir = destDir;
@@ -43,9 +46,13 @@ var ThirdPartyExtractor = class {
43
46
  return;
44
47
  }
45
48
  try {
46
- const pkgJsonPath = findPkg.sync(
47
- __require.resolve(importPath, { paths: [this.context] })
48
- );
49
+ const importEntry = __require.resolve(importPath, {
50
+ paths: [this.context]
51
+ });
52
+ if (isNodeUtils(importEntry, importPath)) {
53
+ return;
54
+ }
55
+ const pkgJsonPath = findPkg.sync(importEntry);
49
56
  const dir = path.dirname(pkgJsonPath);
50
57
  const pkg = JSON.parse(fs.readFileSync(pkgJsonPath, "utf-8"));
51
58
  const types = pkg.types || pkg.typings;
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/third-party-dts-extractor",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "files": [
5
5
  "dist/",
6
6
  "README.md"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/third-party-dts-extractor",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "files": [
5
5
  "dist/",
6
6
  "README.md"