iterate-skill-installer 2.12.0 → 3.0.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/lib/installer.js CHANGED
@@ -189,11 +189,13 @@ function parseChecksums(text) {
189
189
  const parts = trimmed.split(/\s+/);
190
190
  if (parts.length >= 2) {
191
191
  // Normalize the filename the same way scripts/install.py does
192
- // (_parse_checksum): strip the GNU tar binary-mode marker ('*') and the
192
+ // (_parse_checksum): strip all leading GNU tar binary-mode markers a la
193
+ // Python's name.lstrip("*") (ONE '*', or several in a malformed entry —
194
+ // strip them all so the two parsers can never disagree), then strip the
193
195
  // './' prefix, then match on the basename so entries with a subpath or
194
196
  // versioned component (e.g. "dist/iterate-skill.tar.gz" or
195
197
  // "./iterate-skill.tar.gz") still resolve to the expected asset.
196
- const normalized = parts[1].replace(/^\*/, '').replace(/^\.\//, '');
198
+ const normalized = parts[1].replace(/^\*+/, '').replace(/^\.\//, '');
197
199
  const basename = normalized.split('/').pop();
198
200
  map.set(basename, parts[0]);
199
201
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iterate-skill-installer",
3
- "version": "2.12.0",
3
+ "version": "3.0.1",
4
4
  "description": "One-command installer for iterate-skill across AI coding assistants",
5
5
  "main": "lib/installer.js",
6
6
  "bin": {
package/test/mode.test.js CHANGED
@@ -107,6 +107,11 @@ async function run() {
107
107
  const starredSubpath = parseChecksums('abc123 *./release/iterate-skill-1.2.3.tar.gz\n');
108
108
  assert.strictEqual(starredSubpath.get('iterate-skill-1.2.3.tar.gz'), 'abc123', '*./ and versioned subpath should match by basename');
109
109
 
110
+ // Multiple leading '*' markers must be stripped like Python's lstrip("*")
111
+ // (a malformed entry must never leave a leading '*' in the basename).
112
+ const multiStar = parseChecksums('abc123 **iterate-skill.tar.gz\n');
113
+ assert.strictEqual(multiStar.get('iterate-skill.tar.gz'), 'abc123', 'all leading * markers should strip (lstrip matching)');
114
+
110
115
  console.log('mode.test.js: all parseChecksums tests passed');
111
116
 
112
117
  // parseArgs: --no-cli must toggle skill-only mode, and default to off.