rollup-plugin-concurrent-top-level-await 0.4.0 → 0.4.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/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  > [!Warning]
2
- > This plugin uses Rollup-specific APIs and is therefore not compatible with Rolldown or Vite >= 8. For more information, see [this issue](https://github.com/zOadT/concurrent-top-level-await-plugins/issues/35).
2
+ > This plugin uses Rollup-specific APIs and is therefore not compatible with Rolldown or Vite >= 8. For Rolldown compatibility use [rolldown-plugin-concurrent-top-level-await](https://www.npmjs.com/package/rolldown-plugin-concurrent-top-level-await).
3
3
 
4
4
  # rollup-plugin-concurrent-top-level-await
5
5
 
@@ -60,33 +60,7 @@ The plugin needs to handle not only modules that directly contain a top-level `a
60
60
 
61
61
  Consider the following module structure as an example:
62
62
 
63
- ```mermaid
64
- flowchart LR
65
- app[app.js]
66
- moduleA[moduleA.js]
67
- moduleB[moduleB.js]
68
- moduleC[moduleC.js]
69
- tla1[tla1.js]
70
- tla2[tla2.js]
71
- tla3[tla3.js]
72
- other[other.js]
73
-
74
- app --> moduleA
75
- moduleA --> moduleB
76
- moduleA --> moduleC
77
- moduleB --> tla1
78
- moduleC --> tla2
79
- moduleC --> tla3
80
- app --> other
81
-
82
- classDef tla fill:#ffe6e6,stroke:#ff0000,color:#660000
83
- classDef ancestor fill:#fff4cc,stroke:#ffcc00,color:#663300
84
- classDef unaffected fill:#e6ffe6,stroke:#00cc00,color:#006600
85
-
86
- class tla1,tla2,tla3 tla
87
- class moduleA,moduleB,moduleC ancestor
88
- class app,other unaffected
89
- ```
63
+ ![diagram](./images/README-1.svg)
90
64
 
91
65
  If the red modules contain top level awaits, these and their yellow ancestors should be included in the plugin's `include` option.
92
66
 
package/dist/index.mjs CHANGED
@@ -277,7 +277,7 @@ function concurrentTopLevelAwait(options = {}) {
277
277
  if (hasAwait) asyncTracker.setDependencies(id, []);
278
278
  let imports = (await Promise.all(importDeclarations.map(async (declaration) => {
279
279
  const importId = await resolveDeclarationSource(this, id, transformOptions?.attributes, declaration);
280
- if (!importId || !filter(importId.id)) return null;
280
+ if (!importId || importId.external || !filter(importId.id)) return null;
281
281
  return {
282
282
  declaration,
283
283
  id: importId.id
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rollup-plugin-concurrent-top-level-await",
3
- "version": "0.4.0",
3
+ "version": "0.4.2",
4
4
  "description": "Rollup (and Vite) plugin enabling concurrent execution of modules that contain top level await.",
5
5
  "keywords": [
6
6
  "rollup-plugin",
@@ -56,6 +56,7 @@
56
56
  "magic-string": "^0.30.21"
57
57
  },
58
58
  "devDependencies": {
59
+ "@mermaid-js/mermaid-cli": "^11.16.0",
59
60
  "@types/estree": "^1.0.8",
60
61
  "prettier": "3.7.4",
61
62
  "rollup": "^4.57.1",