@dalzoubi/dev-agents-sync 1.0.0 → 1.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/package.json +43 -43
- package/src/commands/check.mjs +1 -1
- package/src/commands/diff.mjs +1 -1
- package/src/commands/init.mjs +1 -1
- package/src/commands/update.mjs +1 -1
- package/src/fetcher.mjs +356 -356
- package/tests/fetcher.test.mjs +1247 -1247
- package/tests/init.test.mjs +17 -0
package/tests/init.test.mjs
CHANGED
|
@@ -210,6 +210,23 @@ describe('init — --targets flag', () => {
|
|
|
210
210
|
assert.ok(!existsSync(path.join(consumerDir, '.claude')));
|
|
211
211
|
});
|
|
212
212
|
|
|
213
|
+
it('passes BARE semver (no v prefix) as the tag to the fetcher', async () => {
|
|
214
|
+
// Regression: init/update/diff/check used to do fetcher(repo, `v${version}`),
|
|
215
|
+
// which combined with the fetcher's own `v` prefix to produce `vv1.0.0`
|
|
216
|
+
// and a 404 against real GitHub.
|
|
217
|
+
let capturedTag = null;
|
|
218
|
+
const spyFetcher = async (_repo, tag) => {
|
|
219
|
+
capturedTag = tag;
|
|
220
|
+
return buildFixtureFileMap(['claude', 'cursor']);
|
|
221
|
+
};
|
|
222
|
+
await runInit(consumerDir, {
|
|
223
|
+
targets: ['claude'],
|
|
224
|
+
fetcher: spyFetcher,
|
|
225
|
+
availableTags: AVAILABLE_TAGS,
|
|
226
|
+
});
|
|
227
|
+
assert.equal(capturedTag, '1.2.0', 'fetcher must receive bare semver, not v-prefixed');
|
|
228
|
+
});
|
|
229
|
+
|
|
213
230
|
it('--targets cursor records targets: ["cursor"] in lockfile', async () => {
|
|
214
231
|
await runInit(consumerDir, {
|
|
215
232
|
targets: ['cursor'],
|