Skip to content

Create build and publish process.#9

Merged
Hug0-Drelon merged 2 commits into
masterfrom
build-and-publish
Jun 10, 2026
Merged

Create build and publish process.#9
Hug0-Drelon merged 2 commits into
masterfrom
build-and-publish

Conversation

@Hug0-Drelon

Copy link
Copy Markdown
Member

What

Adds an esbuild build pipeline so @wpsyntex/e2e-test-utils ships compiled CommonJS (build/**/*.cjs) instead of raw ESM source. Adds CI for static analysis and npm publishing (stable + bleeding edge).

Why

Loading raw ESM from Playwright config caused:

ERR_MODULE_NOT_FOUND: .../@wordpress/e2e-test-utils-playwright/src/index.ts

Pre-built CJS fixes peer dependency resolution. Dynamic imports for @wordpress/e2e-test-utils-playwright avoid loading that package when Playwright reads the config.

How

  • build.mjs — compiles src/**/*.jsbuild/**/*.cjs (multi-file, peers external), rewrites relative require paths to .cjs
  • package.json — v0.2.0, main/exportsbuild/, prepare / prepublishOnly, peer deps unchanged
  • Source — deferred imports for RequestUtils, expect, and request; default globalSetupglobal.setup.cjs
  • CIstatic-analysis.yml (build, lint, smoke test, reusable via workflow_call)
  • Publishpublish-npm.yml reuses static analysis; GitHub release → latest, manual dispatch → {version}-dev.{sha} on next
  • Docs — README updated (install, dev, publishing)

@Hug0-Drelon Hug0-Drelon self-assigned this Jun 2, 2026
@Hug0-Drelon Hug0-Drelon added the enhancement New feature or request label Jun 2, 2026

@Screenfeed Screenfeed 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.

Image

@Hug0-Drelon Hug0-Drelon merged commit aa50bc6 into master Jun 10, 2026
2 checks passed
@Hug0-Drelon Hug0-Drelon deleted the build-and-publish branch June 10, 2026 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants