specline 2.0.0 → 2.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.
Files changed (2) hide show
  1. package/lib/merge.mjs +7 -3
  2. package/package.json +1 -1
package/lib/merge.mjs CHANGED
@@ -19,12 +19,16 @@ export function mergeHooksJson(existingContent, templateContent, warn = () => {}
19
19
  return existingContent;
20
20
  }
21
21
 
22
- for (const eventName of Object.keys(templateObj.hooks || {})) {
23
- if (!existingObj.hooks) existingObj.hooks = {};
24
- if (!existingObj.hooks[eventName]) existingObj.hooks[eventName] = [];
22
+ if (!existingObj.hooks) existingObj.hooks = {};
23
+
24
+ for (const eventName of Object.keys(existingObj.hooks)) {
25
25
  existingObj.hooks[eventName] = existingObj.hooks[eventName].filter(
26
26
  (entry) => !(entry.command || '').includes('specline-') && !(entry.command || '').includes('specline '),
27
27
  );
28
+ }
29
+
30
+ for (const eventName of Object.keys(templateObj.hooks || {})) {
31
+ if (!existingObj.hooks[eventName]) existingObj.hooks[eventName] = [];
28
32
  existingObj.hooks[eventName] = [
29
33
  ...templateObj.hooks[eventName],
30
34
  ...existingObj.hooks[eventName],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "specline",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "Spec-driven AI coding pipeline with deterministic quality gates for Cursor IDE",
5
5
  "bin": {
6
6
  "specline": "./cli.mjs"