webpack-federation-types-plugin 1.4.0 → 1.4.1

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.
@@ -162,6 +162,11 @@ class FederationTypesPlugin {
162
162
  .then((response) => response?.data)
163
163
  .then((modulesNames) => {
164
164
  if (!modulesNames) return
165
+ // Ensure modulesNames is an array
166
+ if (!Array.isArray(modulesNames)) {
167
+ logger.warn(`Expected array but got ${typeof modulesNames} for remote ${remoteName}`)
168
+ return
169
+ }
165
170
  // for each remote module get his types
166
171
  modulesNames.forEach((moduleName) => {
167
172
  const moduleDeclarationFileUrl = federationTypesUrl + moduleName
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2024 Daniel Amenou
3
+ Copyright (c) 2026 Daniel Amenou
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # webpack-federation-types-plugin
2
2
 
3
+ [![License](https://img.shields.io/npm/l/webpack-federation-types-plugin.svg)](https://github.com/DanielAmenou/webpack-federation-types-plugin/blob/main/LICENSE) [![npm downloads](https://img.shields.io/npm/dt/webpack-federation-types-plugin.svg)](https://www.npmjs.com/package/webpack-federation-types-plugin) [![npm version](https://img.shields.io/npm/v/webpack-federation-types-plugin.svg)](https://www.npmjs.com/package/webpack-federation-types-plugin)
4
+
3
5
  This plugin generates TypeScript type declaration files for the modules exposed by a remote application. It enables the automatic creation, sharing, and fetching of type definitions for your modules across different applications in a Webpack Module Federation setup.
4
6
 
5
7
  The plugin compiles the exposed modules into TypeScript declaration files and shares them as public assets. On the consumer side, it automatically fetches these remote type declaration files and places them in the standard node_modules/@types directory. This ensures that the consuming application can seamlessly access the type definitions without any additional setup, making the integration of remote types effortless and transparent.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "webpack-federation-types-plugin",
3
3
  "description": "This plugin adds type definitions for remote modules",
4
- "version": "1.4.0",
4
+ "version": "1.4.1",
5
5
  "main": "FederationTypesPlugin.js",
6
6
  "types": "types.d.ts",
7
7
  "scripts": {
@@ -24,11 +24,11 @@
24
24
  "author": "Daniel Amenou <amenou.daniel@gmail.com>",
25
25
  "license": "MIT",
26
26
  "dependencies": {
27
- "axios": "^1.7.9",
28
- "fs-extra": "^11.2.0",
27
+ "axios": "^1.13.2",
28
+ "fs-extra": "^11.3.3",
29
29
  "ms": "^2.1.3",
30
- "schema-utils": "^4.3.0",
31
- "typescript": "^4.9.4",
30
+ "schema-utils": "^4.3.3",
31
+ "typescript": "^5.9.3",
32
32
  "webpack-merge": "^6.0.1"
33
33
  }
34
34
  }