Skip to content

Add agent configurations and apply documentation and known issues fixes - #588

Merged
jamesrweb merged 3 commits into
mainfrom
add-agents-files
Sep 4, 2026
Merged

Add agent configurations and apply documentation and known issues fixes#588
jamesrweb merged 3 commits into
mainfrom
add-agents-files

Conversation

@jamesrweb

Copy link
Copy Markdown
Member

Related Issue

N / A

PR Type

  • 🐛 Bug Fix
  • ✨ New Feature
  • 🔨 Code Refactor
  • 📝 Documentation Update
  • 🧪 Test Update
  • 🔧 Build/CI Update
  • 🧹 Chore
  • ⏪ Revert

Description

Updates the project dependencies (including a major pnpm 10 → 11 migration), adds agent configuration files (AGENTS.md plus a CLAUDE.md symlink), and fixes a published-package bug where the CommonJS entry could not be require()d by Node consumers. The README is also corrected and extended with contribution guidelines, and the demo build's chunk size warning limit is raised to clear a false-positive warning.

Proposed Changes

  • Add AGENTS.md documenting project standards for agents (quality gates, git safety, scope of operation, code philosophy, testing, PR description, and commit attribution rules following the Linux kernel team's AI coding assistant guidelines) and symlink CLAUDE.md to it.
  • Upgrade packageManager from pnpm 10.33.0 to 11.25.0, bump the Node.js engine to >=24.20.0, update all dependencies to their latest versions, and regenerate pnpm-lock.yaml.
  • Replace the manual security overrides in pnpm-workspace.yaml with pnpm 11's minimumReleaseAgeStrict supply-chain setting, keeping a minimal onlyBuiltDependencies allowlist (esbuild only).
  • Migrate vite-plugin-dts from v4 (rollupTypes) to v5 (bundleTypes).
  • Pin the library entry filenames in config/vite/library.ts to main.mjs/main.cjs — Vite 8's [format] placeholder renamed esm to es, which stopped the build output from matching the package.json exports map.
  • Rename the published entry files from main.cjs.js/main.esm.js to main.cjs/main.mjs and update main, module, and exports in package.json in lockstep — because the package uses "type": "module", a .js CJS entry is parsed as ESM, so require() threw exports is not defined in ES module scope (broken in the published 5.0.4).
  • Pin typescript to the exact version 6.0.3 (typescript-eslint does not support the Go-based TypeScript 7 yet).
  • Raise the demo build chunkSizeWarningLimit from 1200 to 1250 to clear the warning triggered by the ~1203 kB p5 chunk.
  • Fix README inaccuracies: pnpm previewpnpm dev, port 3001 → 5173, remove the outdated @types/p5 setup (p5 ships its own types), and correct two "occured" typos.
  • Add README sections for development setup, contributing guidelines, the TypeScript pin rationale, and AI-assisted contribution attribution (--signoff, optional Assisted-by: LLM trailer).

How Has This Been Tested?

  • Unit Tests
  • Integration Tests
  • Manual Testing (please describe)

All 43 unit tests pass (2 pre-existing skips remain). Manual testing: the library was built, packed with npm pack, and installed into a clean consumer project in /tmprequire('@p5-wrapper/react') and import ... from '@p5-wrapper/react' both resolve and return P5Canvas and CanvasContainerClassName; the tarball ships main.cjs, main.mjs, and main.d.ts matching the exports map. pnpm integrate (format check, lint, test, build) passes locally.

Screenshots/Recordings

Breaking Changes

  • Yes (please describe)
  • No

Checklist

  • My code follows the code style of this project
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed
  • My changes generate no new warnings

Additional Notes

The published filenames change (main.cjs.jsmain.cjs, main.esm.jsmain.mjs), but consumers import through the package.json exports map, which is updated in the same commit — deep imports of dist/ were never supported, so no supported usage breaks. This change actually repairs require() for Node CJS consumers, which has been broken since "type": "module" was introduced, so it is worth calling out in the release notes when the next version is published. The Vite configLoader: 'native' warning about __dirname and extension-less imports in config/vite/vite.config.ts is pre-existing and documented in AGENTS.md as a future task.

@jamesrweb jamesrweb self-assigned this Sep 2, 2026
@jamesrweb
jamesrweb requested a review from yevdyko as a code owner September 2, 2026 22:58
@jamesrweb jamesrweb added bug enhancement help wanted dependencies Pull requests that update a dependency file security This label applies to security issues documentation Pull requests that update project documentation npm labels Sep 2, 2026
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

Coverage report for commit: cd37924
File: ./coverage/clover.xml

Cover ┌─────────────────────────┐ Freq.
   0% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  10% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  20% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  30% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  40% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  50% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  60% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  70% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  80% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  90% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
 100% │ ███████████████████████ │ 100.0%
      └─────────────────────────┘
 *Legend:* █ = Current Distribution / ▒ = Previous Distribution
Summary - Lines: 100.00% ⏹️ | Methods: 100.00% ⏹️ | Branches: 100.00% 🔼
FilesLinesMethodsBranches
src/components
   P5Canvas.tsx100.00%100.00%100.00%
   P5CanvasGuard.tsx100.00%100.00%100.00%
   P5CanvasWithSketch.tsx100.00%100.00%100.00%
src/constants
   CanvasContainerClassName.ts100.00%100.00%100.00%
src/contracts
   CanvasContainer.ts100.00%100.00%100.00%
   CanvasContainerRef.ts100.00%100.00%100.00%
   P5CanvasInstance.ts100.00%100.00%100.00%
   P5CanvasInstanceRef.ts100.00%100.00%100.00%
   P5CanvasInternalProps.ts100.00%100.00%100.00%
   P5CanvasProps.ts100.00%100.00%100.00%
   Sketch.ts100.00%100.00%100.00%
   SketchProps.ts100.00%100.00%100.00%
   Updater.ts100.00%100.00%100.00%
   p5.ts100.00%100.00%100.00%
src
   main.tsx100.00%100.00%100.00%
src/utils
   createP5CanvasInstance.ts100.00%100.00%100.00%
   logErrorBoundaryError.ts100.00%100.00%100.00%
   propsAreEqual.ts100.00%100.00%100.00%
   removeP5CanvasInstance.ts100.00%100.00%100.00%
   updateP5CanvasInstance.ts100.00%100.00%100.00%

🤖 comment via lucassabreu/comment-coverage-clover

@jamesrweb jamesrweb changed the title feat: Add agent configurations and apply documentation and known issu… Add agent configurations and apply documentation and known issues fixes Sep 2, 2026
Base automatically changed from update-project-dependencies to main September 3, 2026 21:03
…workflow

Signed-off-by: James Robb <47126579+jamesrweb@users.noreply.github.com>
…o avoid lock file formatting issues

Signed-off-by: James Robb <47126579+jamesrweb@users.noreply.github.com>

@yevdyko yevdyko left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢

Comment thread AGENTS.md
@jamesrweb
jamesrweb merged commit 9dfbe31 into main Sep 4, 2026
7 checks passed
@jamesrweb
jamesrweb deleted the add-agents-files branch September 4, 2026 00:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug dependencies Pull requests that update a dependency file documentation Pull requests that update project documentation enhancement help wanted npm security This label applies to security issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants