@kubohiroya/turbowarp-extension-loader 0.3.0 → 0.3.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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,16 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.3.1
6
+
7
+ Released on 2026-11-02. One fix, the one 0.3.0 said would follow here: `./project-catalog` no
8
+ longer leaves behind the archive copy a replaced Embedded or Cached entry kept. No exported API
9
+ and no default changes, so a host needs nothing but the version bump.
10
+
11
+ - `./project-catalog` releases the archive copy a replaced Embedded or Cached entry kept. Switching
12
+ an extension to Remote left the old `extensions/…` file in the SB3 although no Manifest entry named
13
+ it any more. A copy the new entry still uses (Cached ↔ Embedded) stays.
14
+
5
15
  ## 0.3.0
6
16
 
7
17
  Released on 2026-11-02. A bounded retry for Remote fetching, so one transient failure no longer
@@ -114,7 +114,12 @@ export async function prepareCatalogExtensionChanges(input, requests, ports, { z
114
114
  fetched.set(url, bytes);
115
115
  return bytes;
116
116
  }
117
+ // Copies the replaced entries kept; released below unless a final entry still names them.
118
+ const replacedPaths = new Set();
117
119
  for (const choice of choices) {
120
+ const replaced = prepared.manifest?.extensions.find(spec => spec.id === choice.id)?.source;
121
+ if (replaced && replaced.type !== 'remote')
122
+ replacedPaths.add(replaced.path);
118
123
  const old = previous.get(choice.id);
119
124
  // Every catalog request was validated as a Remote source above.
120
125
  const bytes = old ? encoder.encode(old.code) : await fetchBytes(choice.source.url);
@@ -145,6 +150,11 @@ export async function prepareCatalogExtensionChanges(input, requests, ports, { z
145
150
  capabilities: old?.capabilities || [], dependencies: choice.dependencies });
146
151
  }
147
152
  const manifest = validateManifest({ schemaVersion: 1, extensions: [...extensions.values()] }, loaderOptions);
153
+ for (const spec of manifest.extensions)
154
+ if (spec.source.type !== 'remote')
155
+ replacedPaths.delete(spec.source.path);
156
+ for (const path of replacedPaths)
157
+ delete files[path];
148
158
  project.turboWarpPlus = manifest;
149
159
  project.extensions = [...new Set([...(project.extensions || []), ...manifest.extensions.map(spec => spec.id)])];
150
160
  const urls = { ...(project.extensionURLs || {}) };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubohiroya/turbowarp-extension-loader",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Host-independent verified TurboWarp Plus extension loading core",
5
5
  "keywords": [
6
6
  "turbowarp",