Skip to content

chore: upgrade to Stencil 3 + fix release pipeline (single-Node OIDC publish) - #9

Open
arturoburigo wants to merge 4 commits into
masterfrom
fix/release-pipeline-stencil3
Open

chore: upgrade to Stencil 3 + fix release pipeline (single-Node OIDC publish)#9
arturoburigo wants to merge 4 commits into
masterfrom
fix/release-pipeline-stencil3

Conversation

@arturoburigo

Copy link
Copy Markdown
Contributor

What

Upgrade @stencil/core 2 → 3.4.2 (and the test toolchain) and fix the release pipeline to publish on a single modern Node via the npm OIDC trusted publisherwithout breaking downstream consumers.

Why

  • The release pipeline was failing at the e2e test step (Puppeteer's bundled Chromium no longer installs/launches on modern runners) and at publish (no token; the repo moved to an OIDC trusted publisher, which needs npm ≥ 11.5.1).
  • Stencil 4 was ruled out: it emits TS5-only type declarations (const type params, attr:${K} key remapping) that TypeScript 4.0 / Angular 11 consumers cannot parse, even with skipLibCheck — this breaks app-documentos.
  • Stencil 3 keeps the generated .d.ts TS4-compatible while modernizing the toolchain and unlocking a modern Node (so OIDC publish works in one job).

Changes

  • @stencil/core 2.19.2-0^3.4.2, @stencil/sass^2.0.4
  • Test toolchain: jest/jest-cli^27.5.1, @types/jest^27.5.2, puppeteer 9.1.1^20.9.0
  • Cast window['___bth'] accesses to any (stricter TS under Stencil 3)
  • Regenerate components.d.ts + readme (drops a phantom varianteLinkAssinador prop that never existed in source)
  • CI on Node 20 (build/test/release); e2e uses the runner's pre-installed Chrome via PUPPETEER_EXECUTABLE_PATH
  • Publish via OIDC trusted publisher (npm install -g npm@latest then npm publish); no NODE_AUTH_TOKEN

Verified locally (Node 20)

  • yarn build
  • yarn test32/32 (spec + e2e)
  • app-documentos ng build ✅ against the produced types — no app changes required

🤖 Generated with Claude Code

… release

Upgrade @stencil/core 2 -> 3.4.2 (+ @stencil/sass 2, jest 27.5, puppeteer 20)
to modernize the toolchain while keeping the generated .d.ts compatible with
TypeScript 4.0 / Angular 11 consumers like app-documentos. Stencil 4 was ruled
out: it emits TS5-only type syntax (const type params, attr:${K} key remapping)
that those consumers cannot parse, even with skipLibCheck.

- Cast window['___bth'] accesses to any (stricter TS under Stencil 3)
- Regenerate components.d.ts + readme (drops a phantom varianteLinkAssinador)
- Run the whole pipeline on Node 20; e2e uses the runner's pre-installed Chrome
- Publish via npm OIDC trusted publisher (npm@latest for >= 11.5.1); no token

Verified on Node 20: build, 32/32 tests (spec + e2e), and app-documentos
ng build all pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Upgrades the Stencil toolchain from v2 to Stencil v3 (keeping TS4-compatible .d.ts) and updates CI/release workflows to run on a modern Node and publish via npm OIDC trusted publishing.

Changes:

  • Upgrade @stencil/core to ^3.4.2 and update the Jest + Puppeteer test toolchain accordingly.
  • Adjust window['___bth'] accesses to satisfy stricter typing under Stencil 3 and regenerate generated typings/docs.
  • Update GitHub Actions workflows to run on Node 20 and publish from a single job using npm OIDC (no auth token).

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/components/documentos-natureza-pasta-link/documentos-natureza-pasta-link.tsx Updates window['___bth'] access typing in host resolution logic.
src/components/detalhes-assinatura/detalhes-assinatura.tsx Updates window['___bth'] access typing for service base URL resolution.
src/components/detalhes-assinatura/readme.md Regenerated component docs; removes the phantom varianteLinkAssinador prop from the docs table.
src/components.d.ts Regenerated Stencil type definitions; exports AuthorizationConfig and refines event typing.
package.json Bumps Stencil + test dependencies (Jest, Puppeteer) for the Stencil 3 toolchain.
.github/workflows/pull_request.yml Runs PR build/test on Node 20 and configures e2e to use runner Chrome.
.github/workflows/main.yml Runs release job on Node 20 and switches publish to npm OIDC flow.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/components/documentos-natureza-pasta-link/documentos-natureza-pasta-link.tsx Outdated
Comment thread .github/workflows/main.yml
arturoburigo and others added 3 commits June 18, 2026 16:15
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
The Install step hung in [4/4] Building fresh packages: puppeteer's
postinstall stalled downloading Chrome (52 min until cancelled). e2e
already uses the runner's pre-installed Chrome via PUPPETEER_EXECUTABLE_PATH,
so the bundled download is unused — set PUPPETEER_SKIP_DOWNLOAD to skip it.
Add timeout-minutes as a guard against future install hangs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@arturoburigo
arturoburigo requested review from gabrieldewes and removed request for gabrieldewes June 19, 2026 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants