diff --git a/.changeset/add-plugin-content-schema-extension.md b/.changeset/add-plugin-content-schema-extension.md new file mode 100644 index 00000000..36573fd7 --- /dev/null +++ b/.changeset/add-plugin-content-schema-extension.md @@ -0,0 +1,7 @@ +--- +"@stackwright/types": minor +--- + +Add `contentItemSchemas` and `knownContentTypeKeys` to `PrebuildPlugin` interface. +Add `buildExtendedPageContentSchema()` function for merging OSS and plugin content schemas. +Add `ValidatePageContentOptions` to `validatePageContent()` for plugin-aware validation. diff --git a/.changeset/add-pro-content-normalization.md b/.changeset/add-pro-content-normalization.md new file mode 100644 index 00000000..8e63d51e --- /dev/null +++ b/.changeset/add-pro-content-normalization.md @@ -0,0 +1,6 @@ +--- +"@stackwright/build-scripts": minor +--- + +Add content format normalization (mapping-key YAML format → type-field format) to prebuild pipeline. +Plugin `contentItemSchemas` and `knownContentTypeKeys` are now applied during page validation. diff --git a/.changeset/dependabot-batch-updates.md b/.changeset/dependabot-batch-updates.md new file mode 100644 index 00000000..d5b22d58 --- /dev/null +++ b/.changeset/dependabot-batch-updates.md @@ -0,0 +1,15 @@ +--- +"@stackwright/core": patch +"@stackwright/icons": patch +"@stackwright/maplibre": patch +"@stackwright/nextjs": patch +"@stackwright/ui-shadcn": patch +--- + +chore: consolidate dependabot dependency updates + +- `lucide-react`: `^0.525.0` → `^1.8.0` (icons, ui-shadcn) — includes icon rename fixes for v1 API (`CheckCircle` → `CircleCheck`, `Code2`/`Layout` backward-compat aliases) +- `@swc/core`: `^1.15.18` → `^1.15.26` (core, nextjs) +- `jsdom`: `^28.1.0` → `^29.0.2` (maplibre) +- `react-dom`: `19.2.4` → `19.2.5` (pnpm.overrides) +- `prettier`: `^3.8.1` → `^3.8.3` (devDependencies) diff --git a/.changeset/feat-188-page-add-content-flag.md b/.changeset/feat-188-page-add-content-flag.md new file mode 100644 index 00000000..eab52a5e --- /dev/null +++ b/.changeset/feat-188-page-add-content-flag.md @@ -0,0 +1,7 @@ +--- +"@stackwright/cli": patch +--- + +feat(cli): add --content flag to `page add` for inline YAML (#188) + +Agents can now create a page with full content in a single command instead of a two-step add + write sequence. Content is validated before writing; invalid YAML is rejected with field-level errors. diff --git a/.changeset/feat-243-security-headers.md b/.changeset/feat-243-security-headers.md new file mode 100644 index 00000000..76a47d9a --- /dev/null +++ b/.changeset/feat-243-security-headers.md @@ -0,0 +1,5 @@ +--- +"@stackwright/nextjs": minor +--- + +Add security headers (CSP, HSTS, COOP/CORP/COEP) to Next.js integration with customizable configuration diff --git a/.changeset/fix-352-install-flag-actually-installs.md b/.changeset/fix-352-install-flag-actually-installs.md new file mode 100644 index 00000000..2cf34eda --- /dev/null +++ b/.changeset/fix-352-install-flag-actually-installs.md @@ -0,0 +1,5 @@ +--- +"@stackwright/cli": patch +--- + +fix(cli): --install flag now runs pnpm install before postInstall hooks diff --git a/.changeset/fix-plugin-config-schema-242.md b/.changeset/fix-plugin-config-schema-242.md new file mode 100644 index 00000000..88db2c67 --- /dev/null +++ b/.changeset/fix-plugin-config-schema-242.md @@ -0,0 +1,6 @@ +--- +"@stackwright/types": patch +"@stackwright/build-scripts": patch +--- + +Add configSchema field to PrebuildPlugin for plugin config validation diff --git a/.changeset/fix-plugin-this-binding.md b/.changeset/fix-plugin-this-binding.md new file mode 100644 index 00000000..dbb13b74 --- /dev/null +++ b/.changeset/fix-plugin-this-binding.md @@ -0,0 +1,14 @@ +--- +"@stackwright/build-scripts": patch +--- + +fix(executePluginHook): preserve `this` binding when calling plugin lifecycle hooks + +`executePluginHook` was extracting hook methods as unbound references +(`const hookFn = plugin[hook]`) and calling them as plain functions +(`hookFn(context)`). In strict-mode ES classes, this strips `this`, +causing any plugin that calls a private/instance method from `beforeBuild` +or `afterBuild` to throw `Cannot read properties of undefined`. + +Fix: use `hookFn.call(plugin, context)` so the plugin instance is always +the receiver. diff --git a/.changeset/fix-prebuild-mkdir-nested-slugs.md b/.changeset/fix-prebuild-mkdir-nested-slugs.md new file mode 100644 index 00000000..e1973b42 --- /dev/null +++ b/.changeset/fix-prebuild-mkdir-nested-slugs.md @@ -0,0 +1,5 @@ +--- +"@stackwright/build-scripts": patch +--- + +fix(build-scripts): create parent directory before writing nested page slug output files diff --git a/.changeset/fix-preinstall-double-run.md b/.changeset/fix-preinstall-double-run.md new file mode 100644 index 00000000..df264ead --- /dev/null +++ b/.changeset/fix-preinstall-double-run.md @@ -0,0 +1,18 @@ +--- +"@stackwright/cli": patch +--- + +fix(cli): remove duplicate preInstall hook call from processTemplate + +`processTemplate()` was calling `runScaffoldHooks('preInstall', ...)` internally, +then `scaffold.ts` called it again after `processTemplate` returned — running every +preInstall handler twice. Worse, the second call passed the original empty `{}` object +(not the built package.json), so hooks registered via `scaffold.ts` could never affect +the written file. + +Fix: lifecycle orchestration now lives entirely in `scaffold.ts`. `buildPackageJson` is +exported so `scaffold.ts` can build the default package.json before running preInstall +hooks, then passes the already-hooks-modified object into `processTemplate` for writing. +`processTemplate` no longer calls hooks. + +Fixes #351. diff --git a/.changeset/grumpy-paws-create.md b/.changeset/grumpy-paws-create.md new file mode 100644 index 00000000..3394347b --- /dev/null +++ b/.changeset/grumpy-paws-create.md @@ -0,0 +1,5 @@ +--- +"@stackwright/core": patch +--- + +fix(core): prevent duplicate TopAppBar rendering that caused a double dark-mode toggle icon diff --git a/.changeset/pre.json b/.changeset/pre.json new file mode 100644 index 00000000..a4c24310 --- /dev/null +++ b/.changeset/pre.json @@ -0,0 +1,37 @@ +{ + "mode": "pre", + "tag": "alpha", + "initialVersions": { + "stackwright-docs": "0.1.2", + "@stackwright/build-scripts": "0.5.0", + "@stackwright/cli": "0.8.0", + "@stackwright/collections": "0.1.0", + "@stackwright/core": "0.8.0", + "@stackwright/e2e": "0.3.0", + "@stackwright/hooks-registry": "0.1.0", + "@stackwright/icons": "0.5.0", + "launch-stackwright": "0.2.0", + "@stackwright/maplibre": "2.0.0", + "@stackwright/mcp": "0.4.0", + "@stackwright/nextjs": "0.4.0", + "@stackwright/otters": "0.2.0", + "@stackwright/sbom-generator": "0.2.0", + "@stackwright/scaffold-core": "0.3.0", + "@stackwright/themes": "0.5.2", + "@stackwright/types": "1.2.0", + "@stackwright/ui-shadcn": "0.1.1" + }, + "changesets": [ + "add-plugin-content-schema-extension", + "add-pro-content-normalization", + "dependabot-batch-updates", + "feat-188-page-add-content-flag", + "feat-243-security-headers", + "fix-352-install-flag-actually-installs", + "fix-plugin-config-schema-242", + "fix-plugin-this-binding", + "fix-prebuild-mkdir-nested-slugs", + "fix-preinstall-double-run", + "grumpy-paws-create" + ] +} diff --git a/examples/stackwright-docs/CHANGELOG.md b/examples/stackwright-docs/CHANGELOG.md index d862bff6..0bead377 100644 --- a/examples/stackwright-docs/CHANGELOG.md +++ b/examples/stackwright-docs/CHANGELOG.md @@ -1,5 +1,17 @@ # stackwright-docs +## 0.1.3-alpha.0 + +### Patch Changes + +- Updated dependencies [c036f5b] +- Updated dependencies [6326d49] +- Updated dependencies [5ad5035] + - @stackwright/core@0.8.1-alpha.0 + - @stackwright/icons@0.5.1-alpha.0 + - @stackwright/nextjs@0.5.0-alpha.0 + - @stackwright/ui-shadcn@0.1.2-alpha.0 + ## 0.1.2 ### Patch Changes diff --git a/examples/stackwright-docs/package.json b/examples/stackwright-docs/package.json index 1ac7886f..d5874d71 100644 --- a/examples/stackwright-docs/package.json +++ b/examples/stackwright-docs/package.json @@ -1,6 +1,6 @@ { "name": "stackwright-docs", - "version": "0.1.2", + "version": "0.1.3-alpha.0", "private": true, "scripts": { "prebuild": "stackwright-prebuild", diff --git a/package.json b/package.json index 6fa262b7..bbe31490 100644 --- a/package.json +++ b/package.json @@ -91,7 +91,8 @@ "hono": ">=4.12.14", "@hono/node-server": ">=1.19.10", "basic-ftp": ">=5.3.0", - "express-rate-limit": ">=8.2.2" + "express-rate-limit": ">=8.2.2", + "uuid": ">=14.0.0" }, "onlyBuiltDependencies": [ "@swc/core", @@ -114,4 +115,4 @@ "@commitlint/config-conventional" ] } -} \ No newline at end of file +} diff --git a/packages/build-scripts/CHANGELOG.md b/packages/build-scripts/CHANGELOG.md index bc21a353..529c487e 100644 --- a/packages/build-scripts/CHANGELOG.md +++ b/packages/build-scripts/CHANGELOG.md @@ -1,5 +1,36 @@ # @stackwright/build-scripts +## 0.6.0-alpha.1 + +### Patch Changes + +- bb4ecb7: fix(build-scripts): create parent directory before writing nested page slug output files + +## 0.6.0-alpha.0 + +### Minor Changes + +- bdf7fe0: Add content format normalization (mapping-key YAML format → type-field format) to prebuild pipeline. + Plugin `contentItemSchemas` and `knownContentTypeKeys` are now applied during page validation. + +### Patch Changes + +- 68bdad5: Add configSchema field to PrebuildPlugin for plugin config validation +- 83ba70c: fix(executePluginHook): preserve `this` binding when calling plugin lifecycle hooks + + `executePluginHook` was extracting hook methods as unbound references + (`const hookFn = plugin[hook]`) and calling them as plain functions + (`hookFn(context)`). In strict-mode ES classes, this strips `this`, + causing any plugin that calls a private/instance method from `beforeBuild` + or `afterBuild` to throw `Cannot read properties of undefined`. + + Fix: use `hookFn.call(plugin, context)` so the plugin instance is always + the receiver. + +- Updated dependencies [bdf7fe0] +- Updated dependencies [68bdad5] + - @stackwright/types@1.3.0-alpha.0 + ## 0.5.0 ### Minor Changes diff --git a/packages/build-scripts/package.json b/packages/build-scripts/package.json index 5e99ce67..3b27ca5a 100644 --- a/packages/build-scripts/package.json +++ b/packages/build-scripts/package.json @@ -1,6 +1,6 @@ { "name": "@stackwright/build-scripts", - "version": "0.5.0", + "version": "0.6.0-alpha.1", "description": "Build-time scripts for Stackwright projects (prebuild image processing, YAML compilation)", "license": "MIT", "repository": { diff --git a/packages/build-scripts/src/prebuild.ts b/packages/build-scripts/src/prebuild.ts index d5173724..aba66e1d 100644 --- a/packages/build-scripts/src/prebuild.ts +++ b/packages/build-scripts/src/prebuild.ts @@ -1139,7 +1139,9 @@ export async function runPrebuild(options?: string | PrebuildOptions): Promise=1.19.10' basic-ftp: '>=5.3.0' express-rate-limit: '>=8.2.2' + uuid: '>=14.0.0' importers: @@ -286,8 +287,8 @@ importers: specifier: ^1.30.0 version: 1.30.0 uuid: - specifier: ^13.0.0 - version: 13.0.0 + specifier: '>=14.0.0' + version: 14.0.0 zod: specifier: ^4.3.6 version: 4.3.6 @@ -5831,8 +5832,8 @@ packages: uri-js@4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} - uuid@13.0.0: - resolution: {integrity: sha512-XQegIaBTVUjSHliKqcnFqYypAd4S+WCYt5NIeRs6w/UAry7z8Y9j5ZwRRL4kzq9U3sD6v+85er9FvkEaBpji2w==} + uuid@14.0.0: + resolution: {integrity: sha512-Qo+uWgilfSmAhXCMav1uYFynlQO7fMFiMVZsQqZRMIXp0O7rR7qjkj+cPvBHLgBqi960QCoo/PH2/6ZtVqKvrg==} hasBin: true vary@1.1.2: @@ -11443,7 +11444,7 @@ snapshots: dependencies: punycode: 2.3.1 - uuid@13.0.0: {} + uuid@14.0.0: {} vary@1.1.2: {}