@module-federation/retry-plugin 2.3.1 → 2.3.3

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,18 @@
1
1
  # @module-federation/retry-plugin
2
2
 
3
+ ## 2.3.3
4
+
5
+ ### Patch Changes
6
+
7
+ - @module-federation/sdk@2.3.3
8
+
9
+ ## 2.3.2
10
+
11
+ ### Patch Changes
12
+
13
+ - 0e7b1a1: Fix retryDelay not being applied on the first retry attempt in scriptRetry.
14
+ - @module-federation/sdk@2.3.2
15
+
3
16
  ## 2.3.1
4
17
 
5
18
  ### Patch Changes
package/dist/esm/index.js CHANGED
@@ -204,7 +204,7 @@ function scriptRetry({ retryOptions, retryFn, beforeExecuteRetry = () => {} }) {
204
204
  const maxAttempts = retryTimes;
205
205
  while (attempts < maxAttempts) try {
206
206
  beforeExecuteRetry();
207
- if (retryDelay > 0 && attempts > 0) await new Promise((resolve) => setTimeout(resolve, retryDelay));
207
+ if (retryDelay > 0) await new Promise((resolve) => setTimeout(resolve, retryDelay));
208
208
  const retryIndex = attempts + 1;
209
209
  retryWrapper = await retryFn({
210
210
  ...params,
package/dist/index.d.ts CHANGED
@@ -533,12 +533,24 @@ declare class ModuleFederation {
533
533
  createScript: SyncHook<[{
534
534
  url: string;
535
535
  attrs?: Record<string, any>;
536
+ /**
537
+ * The producer(remote) info bound to this resource.
538
+ * Only present when the loader is invoked in a remote-related context
539
+ * (e.g. preloadRemote / loading remoteEntry).
540
+ */
541
+ remoteInfo?: RemoteInfo;
536
542
  }], CreateScriptHookReturn>;
537
543
  createLink: SyncHook<[{
538
544
  url: string;
539
545
  attrs?: Record<string, any>;
546
+ /**
547
+ * The producer(remote) info bound to this resource.
548
+ * Only present when the loader is invoked in a remote-related context
549
+ * (e.g. preloadRemote / loading remoteEntry).
550
+ */
551
+ remoteInfo?: RemoteInfo;
540
552
  }], void | HTMLLinkElement>;
541
- fetch: AsyncHook<[string, RequestInit], false | void | Promise<Response>>;
553
+ fetch: AsyncHook<[string, RequestInit, (RemoteInfo | undefined)?], false | void | Promise<Response>>;
542
554
  loadEntryError: AsyncHook<[{
543
555
  getRemoteEntry: typeof getRemoteEntry;
544
556
  origin: ModuleFederation;
package/dist/index.js CHANGED
@@ -205,7 +205,7 @@ function scriptRetry({ retryOptions, retryFn, beforeExecuteRetry = () => {} }) {
205
205
  const maxAttempts = retryTimes;
206
206
  while (attempts < maxAttempts) try {
207
207
  beforeExecuteRetry();
208
- if (retryDelay > 0 && attempts > 0) await new Promise((resolve) => setTimeout(resolve, retryDelay));
208
+ if (retryDelay > 0) await new Promise((resolve) => setTimeout(resolve, retryDelay));
209
209
  const retryIndex = attempts + 1;
210
210
  retryWrapper = await retryFn({
211
211
  ...params,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/retry-plugin",
3
- "version": "2.3.1",
3
+ "version": "2.3.3",
4
4
  "author": "danpeen <dapeen.feng@gmail.com>",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/esm/index.js",
@@ -33,13 +33,13 @@
33
33
  }
34
34
  },
35
35
  "devDependencies": {
36
- "@module-federation/runtime": "2.3.1"
36
+ "@module-federation/runtime": "2.3.3"
37
37
  },
38
38
  "dependencies": {
39
- "@module-federation/sdk": "2.3.1"
39
+ "@module-federation/sdk": "2.3.3"
40
40
  },
41
41
  "scripts": {
42
- "build": "tsdown --config tsdown.config.ts && cp package.json dist && cp *.md dist",
42
+ "build": "tsdown --config tsdown.config.ts && cp *.md dist",
43
43
  "test": "vitest run -u -c vitest.config.ts",
44
44
  "lint": "ESLINT_USE_FLAT_CONFIG=false pnpm exec eslint --ignore-pattern node_modules \"**/*.ts\" \"package.json\"",
45
45
  "build-debug": "FEDERATION_DEBUG=true pnpm run build",
package/dist/package.json DELETED
@@ -1,48 +0,0 @@
1
- {
2
- "name": "@module-federation/retry-plugin",
3
- "version": "2.3.1",
4
- "author": "danpeen <dapeen.feng@gmail.com>",
5
- "main": "./dist/index.js",
6
- "module": "./dist/esm/index.js",
7
- "types": "./dist/index.d.ts",
8
- "license": "MIT",
9
- "repository": {
10
- "type": "git",
11
- "url": "git+https://github.com/module-federation/core.git",
12
- "directory": "packages/retry-plugin"
13
- },
14
- "publishConfig": {
15
- "access": "public"
16
- },
17
- "files": [
18
- "dist/",
19
- "README.md"
20
- ],
21
- "exports": {
22
- ".": {
23
- "types": "./dist/index.d.ts",
24
- "import": "./dist/esm/index.js",
25
- "require": "./dist/index.js"
26
- }
27
- },
28
- "typesVersions": {
29
- "*": {
30
- ".": [
31
- "./dist/index.d.ts"
32
- ]
33
- }
34
- },
35
- "devDependencies": {
36
- "@module-federation/runtime": "workspace:*"
37
- },
38
- "dependencies": {
39
- "@module-federation/sdk": "workspace:*"
40
- },
41
- "scripts": {
42
- "build": "tsdown --config tsdown.config.ts && cp package.json dist && cp *.md dist",
43
- "test": "vitest run -u -c vitest.config.ts",
44
- "lint": "ESLINT_USE_FLAT_CONFIG=false pnpm exec eslint --ignore-pattern node_modules \"**/*.ts\" \"package.json\"",
45
- "build-debug": "FEDERATION_DEBUG=true pnpm run build",
46
- "pre-release": "pnpm run test && pnpm run build"
47
- }
48
- }