@se-studio/skills 1.8.0 → 1.8.2

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,17 @@
1
1
  # @se-studio/skills
2
2
 
3
+ ## 1.8.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Map page-test homepage canonical paths (`/`) to CMS slug `index` so control `indexed` is used instead of the variant's `noindex`.
8
+
9
+ ## 1.8.1
10
+
11
+ ### Patch Changes
12
+
13
+ - 5c18a78: Document that `docs/schema-export.json` is the committed Pedestal golden schema, and that every core migration refreshes and commits that export in the same PR.
14
+
3
15
  ## 1.8.0
4
16
 
5
17
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@se-studio/skills",
3
- "version": "1.8.0",
3
+ "version": "1.8.2",
4
4
  "description": "SE Studio agent skills for marketing site development with Contentful CMS",
5
5
  "repository": {
6
6
  "type": "git",
@@ -11,9 +11,11 @@ Use when a customer Contentful space should match the **structural** core schema
11
11
 
12
12
  | Artifact | Purpose |
13
13
  |----------|---------|
14
- | `docs/schema-export.json` | Structural golden (Pedestal `h4s3ip99qawo` / `master`) |
14
+ | `docs/schema-export.json` | **Committed** structural golden (Pedestal `h4s3ip99qawo` / `master`) |
15
15
  | `docs/blank-schema.json` | New-project **bootstrap only** — not the sync target |
16
16
 
17
+ `docs/schema-export.json` is committed. It is not a local-only artifact.
18
+
17
19
  Refresh golden:
18
20
 
19
21
  ```bash
@@ -23,8 +25,11 @@ contentful space export \
23
25
  --management-token "$CONTENTFUL_MANAGEMENT_TOKEN" \
24
26
  --skip-content --skip-webhooks --skip-roles --skip-tags \
25
27
  --content-file docs/schema-export.json
28
+ pnpm exec biome format --write docs/schema-export.json
26
29
  ```
27
30
 
31
+ **Required after a core migration.** After any core migration is applied to the golden space (Pedestal `master`), re-run the Refresh golden export above and commit the updated `docs/schema-export.json` in the same PR as the migration script. The Biome format step keeps `pnpm format:check` green; the CLI export is valid JSON but not Biome-formatted.
32
+
28
33
  ## Workflow
29
34
 
30
35
  ### 1. Resolve target space
@@ -138,7 +138,7 @@ If the slug is not a known variant in `testsByPath`, **return 404** (`notFound()
138
138
  Direct visits to a variant's own CMS URL (normal `[...slugs]` route) continue to use `generatePage` and show variant breadcrumbs.
139
139
 
140
140
  ```typescript
141
- import { findCanonicalPath } from '@se-studio/ab-testing';
141
+ import { controlSlugFromCanonicalPath, findCanonicalPath } from '@se-studio/ab-testing';
142
142
  import { joinCmsPathSegments } from '@se-studio/core-ui';
143
143
  import type { ResolvingMetadata } from 'next';
144
144
  import { notFound } from 'next/navigation';
@@ -174,7 +174,10 @@ export async function generateMetadata(
174
174
  ) {
175
175
  const { slug } = await extractDetails(props);
176
176
  const canonicalPath = requireCanonicalPath(slug);
177
- const canonicalSlug = canonicalPath.replace(/^\/|\/$/g, '') || slug;
177
+ // `/` → CMS slug `index`. Never `replace(...) || slug` — that uses the variant
178
+ // (indexed: false) and flip-flops robots on the homepage. generatePageTest*
179
+ // also re-resolves so a stale `|| slug` cannot noindex `/`.
180
+ const canonicalSlug = controlSlugFromCanonicalPath(canonicalPath);
178
181
  // Use generatePageTestMetadata: merges variant title/description with
179
182
  // canonical page's indexed flag so robots directives are always correct.
180
183
  return generatePageTestMetadata(slug, canonicalSlug, canonicalPath, getPageRouteConfig(canonicalSlug), parent);
@@ -183,12 +186,14 @@ export async function generateMetadata(
183
186
  export default async function (props: PageProps<'/page-test/[...slugs]'>) {
184
187
  const { slug } = await extractDetails(props);
185
188
  const canonicalPath = requireCanonicalPath(slug);
186
- const canonicalSlug = canonicalPath.replace(/^\/|\/$/g, '') || slug;
189
+ const canonicalSlug = controlSlugFromCanonicalPath(canonicalPath);
187
190
  // Use generatePageTest: variant contents with control identity (href, breadcrumbs, JSON-LD).
188
191
  return generatePageTest(slug, canonicalSlug, canonicalPath, getPageRouteConfig(canonicalSlug));
189
192
  }
190
193
  ```
191
194
 
195
+ If the site homepage CMS slug is not `index` (e.g. Pedestal `home`), pass it: `controlSlugFromCanonicalPath(canonicalPath, 'home')`.
196
+
192
197
  Also export `generatePageTestMetadata` and `generatePageTest` from the app's `src/lib/route-handlers.ts` destructuring alongside `generatePageMetadata`.
193
198
 
194
199
  ## See Also