@nitra/cursor 12.5.0 → 12.6.0

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
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## [12.6.0] - 2026-06-21
4
+
5
+ ### Changed
6
+
7
+ - Видалено правила для package.json та оновлено логіку перевірок інструментів
8
+
3
9
  ## [12.5.0] - 2026-06-21
4
10
 
5
11
  ### Changed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nitra/cursor",
3
- "version": "12.5.0",
3
+ "version": "12.6.0",
4
4
  "description": "CLI для завантаження cursor-правил (префікс n-) у локальний репозиторій",
5
5
  "keywords": [
6
6
  "cli",
@@ -76,8 +76,7 @@ async function checkLegacyCacheRemoved(pass, fail, cwd) {
76
76
 
77
77
  /**
78
78
  * Перевіряє відповідність проєкту правилу `image-compress.mdc`: `.n-minify-image.tsv` НЕ
79
- * в `.gitignore`, застарілий `.minify-image-cache.tsv` видалений. CI-workflow для image
80
- * не вимагається — лінт зображень виконується лише локально.
79
+ * в `.gitignore`, застарілий `.minify-image-cache.tsv` видалений.
81
80
  * @param {string} [cwd] корінь репозиторію
82
81
  * @returns {Promise<number>} 0 — все OK, 1 — є проблеми
83
82
  */
@@ -89,7 +88,7 @@ export async function check(cwd = process.cwd()) {
89
88
  fail('package.json не знайдено в корені — додай (image-compress.mdc)')
90
89
  return reporter.getExitCode()
91
90
  }
92
- pass('package.json є (структуру перевіряє npx @nitra/cursor fix → image_compress.package_json)')
91
+ pass('package.json є (dependency policy перевіряє npx @nitra/cursor fix → image_compress.package_json)')
93
92
 
94
93
  await checkHashCacheNotIgnored(pass, fail, cwd)
95
94
  await checkLegacyCacheRemoved(pass, fail, cwd)
@@ -18,7 +18,7 @@ export function check() {
18
18
  }
19
19
 
20
20
  if (existsSync('package.json')) {
21
- pass('package.json є (наявність lint-php перевіряє npx @nitra/cursor fix → php.package_json)')
21
+ pass('package.json є')
22
22
  } else {
23
23
  fail('package.json не знайдено в корені — додай (php.mdc)')
24
24
  }
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # Канон надходить через --data: { "template": { "snippet": ... } }
4
4
  # Структура --data сформована з template/lint-php.yml.snippet.yml.
5
- # Маркер `run:` (bun run lint-php) збирається з template's php-job steps.
5
+ # Маркер `run:` збирається з template's php-job steps.
6
6
  # Універсальні workflow-перевірки — у `ga.workflow_common`.
7
7
  package php.lint_php_yml
8
8
 
@@ -33,9 +33,9 @@ export function check(cwd = process.cwd()) {
33
33
  }
34
34
 
35
35
  if (existsSync(join(cwd, 'package.json'))) {
36
- pass('package.json є (наявність lint-python перевіряє fix → python.package_json)')
36
+ pass('package.json є')
37
37
  } else {
38
- fail('package.json не знайдено в корені — додай для `bun run lint-python` (python.mdc)')
38
+ fail('package.json не знайдено в корені — додай (python.mdc)')
39
39
  }
40
40
 
41
41
  const wfPath = '.github/workflows/lint-python.yml'
@@ -6,7 +6,7 @@
6
6
  # - кожен `uses` з template (підмножина): actions/checkout@v6,
7
7
  # ./.github/actions/setup-bun-deps, astral-sh/setup-uv@v8.0.0;
8
8
  # - кожен `run` з template має бути присутнім (як substring) серед run-кроків
9
- # input'а: `uv sync --frozen`, `bun run lint-python`.
9
+ # input'а: `uv sync --frozen`, `n-cursor lint python --read-only`.
10
10
  # Заборона Poetry-кроків (snok/install-poetry, `poetry install`) — через відсутність
11
11
  # у каноні: правило вимагає uv-кроки, а нав'язаних poetry-кроків у template немає.
12
12
  # Універсальні workflow-перевірки (name, concurrency, branches) — у `ga.workflow_common`.
@@ -1,18 +0,0 @@
1
- # Перевірка `package.json` (docker.mdc).
2
- #
3
- # Канон надходить через --data: { "template": { "snippet": ... } }
4
- # Backward-compatible: перевіряє ЛИШЕ зміст значення `scripts.lint-docker`, якщо ключ
5
- # присутній у старому проєкті. Нові проєкти використовують `n-cursor lint docker`
6
- # напряму, без package.json wrapper.
7
- package docker.package_json
8
-
9
- import rego.v1
10
-
11
- # Conditional snippet-check: тільки якщо значення непорожнє у input.
12
- deny contains msg if {
13
- some script_name, expected in data.template.snippet.scripts
14
- actual := object.get(object.get(input, "scripts", {}), script_name, "")
15
- actual != ""
16
- trim_space(actual) != expected
17
- msg := sprintf("package.json: scripts.%s має бути %q (зараз: %q) (docker.mdc)", [script_name, expected, actual])
18
- }
@@ -1,4 +0,0 @@
1
- {
2
- "$schema": "https://unpkg.com/@nitra/cursor/schemas/target.json",
3
- "files": { "single": "package.json" }
4
- }
@@ -1 +0,0 @@
1
- { "scripts": { "lint-docker": "n-cursor lint docker" } }