@simpleapps-com/augur-config 2.2.4 → 2.2.5

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.
@@ -164,11 +164,22 @@ if (actionsFile && fileContains(actionsFile, /site\.actions|actions\./)) {
164
164
  actionsFile
165
165
  );
166
166
  } else {
167
- fail(
168
- "actions",
169
- "augur-actions.ts re-exporting site.actions.*",
170
- "Expected lib/augur-actions.ts"
171
- );
167
+ // Migrated sites using createServerQueryProxy don't need augur-actions.ts
168
+ const usesProxyPattern = [
169
+ "lib/augur-query.ts", "src/lib/augur-query.ts",
170
+ "lib/augur.ts", "src/lib/augur.ts",
171
+ "app/providers.tsx", "src/app/providers.tsx",
172
+ ].some((f) => fileExists(f) && fileContains(f, /createServerQueryProxy|queryAction/));
173
+
174
+ if (usesProxyPattern) {
175
+ pass("actions", "Using proxy pattern (augur-actions.ts not needed)", "");
176
+ } else {
177
+ fail(
178
+ "actions",
179
+ "augur-actions.ts re-exporting site.actions.*",
180
+ "Expected lib/augur-actions.ts or createServerQueryProxy usage"
181
+ );
182
+ }
172
183
  }
173
184
 
174
185
  // 4. Client hooks with createSiteHooks()
@@ -609,7 +620,8 @@ if (pkg) {
609
620
 
610
621
  // 19. Pre-commit hooks (lefthook + lint-staged)
611
622
  const lefthookFile = findFile("lefthook.yml", ".lefthook.yml");
612
- if (lefthookFile) {
623
+ const hasLefthookDep = !!(pkg?.devDependencies?.lefthook || pkg?.dependencies?.lefthook);
624
+ if (lefthookFile || hasLefthookDep) {
613
625
  const lefthookContent = readFile(lefthookFile);
614
626
  const hasPreCommit = lefthookContent && lefthookContent.includes("pre-commit");
615
627
  const lintStagedConfig =
@@ -620,19 +632,25 @@ if (lefthookFile) {
620
632
  fileExists("lint-staged.config.mjs");
621
633
 
622
634
  if (hasPreCommit && lintStagedConfig) {
623
- pass("pre-commit", "Pre-commit hooks: lefthook + lint-staged", lefthookFile);
635
+ pass("pre-commit", "Pre-commit hooks: lefthook + lint-staged", lefthookFile || "package.json");
624
636
  } else if (hasPreCommit) {
625
637
  suggest(
626
638
  "pre-commit",
627
639
  "Pre-commit hooks: lefthook found but no lint-staged config",
628
640
  "See https://github.com/simpleapps-com/augur-packages/wiki/guide-migration-runbook#pre-commit-hooks"
629
641
  );
630
- } else {
642
+ } else if (lefthookFile) {
631
643
  suggest(
632
644
  "pre-commit",
633
645
  "Pre-commit hooks: lefthook found but no pre-commit section",
634
646
  "See https://github.com/simpleapps-com/augur-packages/wiki/guide-migration-runbook#pre-commit-hooks"
635
647
  );
648
+ } else {
649
+ suggest(
650
+ "pre-commit",
651
+ "Pre-commit hooks: lefthook in devDependencies but no config file",
652
+ "Add lefthook.yml -- see https://github.com/simpleapps-com/augur-packages/wiki/guide-migration-runbook#pre-commit-hooks"
653
+ );
636
654
  }
637
655
  } else if (findFile(".husky/pre-commit", ".husky/_/pre-commit")) {
638
656
  suggest(
@@ -718,25 +736,28 @@ if (usesServerProxy) {
718
736
  if (pkg) {
719
737
  const allDeps = { ...pkg.dependencies, ...pkg.devDependencies };
720
738
  const apiVersion = allDeps["@simpleapps-com/augur-api"] || "";
721
- if (
722
- apiVersion.includes("2026.3.4") ||
723
- apiVersion.includes("2026.3.5") ||
724
- apiVersion.includes("2026.4") ||
725
- apiVersion.includes("2027")
726
- ) {
727
- pass("api-version", "augur-api SDK version supports typed proxies", apiVersion);
728
- } else if (apiVersion.includes("2026.3")) {
729
- warn(
730
- "api-version",
731
- "augur-api SDK may lack typed proxy support",
732
- `${apiVersion} -- upgrade to >= 2026.3.4 for typed responses`
733
- );
739
+
740
+ // Extract base version from range (strip ^, ~, >=, etc.)
741
+ const versionMatch = apiVersion.match(/(\d{4})\.(\d+)\.(\d+)/);
742
+
743
+ if (versionMatch) {
744
+ const [, year, minor, patch] = versionMatch.map(Number);
745
+ const isTypedProxy =
746
+ year > 2026 ||
747
+ (year === 2026 && minor > 3) ||
748
+ (year === 2026 && minor === 3 && patch >= 4);
749
+
750
+ if (isTypedProxy) {
751
+ pass("api-version", "augur-api SDK version supports typed proxies", apiVersion);
752
+ } else {
753
+ warn(
754
+ "api-version",
755
+ "augur-api SDK may lack typed proxy support",
756
+ `${apiVersion} -- upgrade to >= 2026.3.4 for typed responses`
757
+ );
758
+ }
734
759
  } else if (apiVersion) {
735
- fail(
736
- "api-version",
737
- "augur-api SDK version",
738
- `${apiVersion} -- upgrade to >= 2026.3.4`
739
- );
760
+ warn("api-version", "augur-api version format not recognized", apiVersion);
740
761
  } else {
741
762
  warn("api-version", "No augur-api dependency found", "");
742
763
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simpleapps-com/augur-config",
3
- "version": "2.2.4",
3
+ "version": "2.2.5",
4
4
  "description": "Shared tooling configuration presets for Augur ecommerce sites",
5
5
  "license": "MIT",
6
6
  "repository": {