Skip to content

build(many): remove commonjs build - #2683

Draft
joyenjoyer wants to merge 2 commits into
chore-remove-dead-babel-pluginsfrom
INSTUI-5148-remove-common-js-v2
Draft

joyenjoyer wants to merge 2 commits into
chore-remove-dead-babel-pluginsfrom
INSTUI-5148-remove-common-js-v2

Conversation

@joyenjoyer

Copy link
Copy Markdown
Contributor

Summary

  • Drop the --modules cjs build path from ui-scripts build (babel.ts, specify-commonjs-format.ts) and switch generate-all-tokens to import from es/ instead of require()-ing lib/
  • Ship every @instructure/* package ESM-only: remove the lib/CommonJS output, main field, and require export conditions; add type: module; rename each package's babel.config.js to babel.config.cjs

Stacked on #2682 (dead babel plugin removal) — base branch will move to master once that merges.

Test Plan

  • No manual verification needed; covered by pnpm run bootstrap, tsc -b, oxlint, and vitest.

Fixes INSTUI-5148

🤖 Generated with Claude Code

@joyenjoyer joyenjoyer self-assigned this Aug 10, 2026
@joyenjoyer
joyenjoyer requested a review from balzss August 10, 2026 13:08
@github-actions

github-actions Bot commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://instructure.design/pr-preview/pr-2683/

Built to branch gh-pages at 2026-09-25 15:30 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

github-actions Bot pushed a commit that referenced this pull request Aug 10, 2026
@github-actions

github-actions Bot commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

Visual regression report

Cypress suite: ✅ Passing

Visual diff: ⚠️ Changes detected.

Status Count
Unchanged 98
Changed 1
New 0
Removed 0

Accessibility (axe): ✅ No violations.

📊 View full report — click a screenshot's ⚠ badge to see each violation boxed on the image, with the offending element named and contrast failures shown as color swatches.

Diff images (1)

badge-canvas.png — 1573 pixels differ

Baselines come from the visual-baselines branch. They refresh on every merge to master. The Cypress suite line covers the a11y and console-error assertions — a ❌ there means the suite found real issues even if the visual diff is clean.

@balzss
balzss removed their request for review September 1, 2026 08:44
@joyenjoyer
joyenjoyer marked this pull request as draft September 7, 2026 14:27
@joyenjoyer
joyenjoyer force-pushed the chore-remove-dead-babel-plugins branch 2 times, most recently from 0b9bd46 to b02a710 Compare September 24, 2026 14:31
Remove the --modules flag and the cjs branch from `ui-scripts build`, along
with specify-commonjs-format.ts (which stamped lib/package.json with
{"type":"commonjs"}). Only the es build remains.

Switch generate-all-tokens to dynamic import() of the es output instead of
require()-ing the lib output.
Ship every InstUI package ESM-only: drop the `lib`/CommonJS build output,
`main` field, and `require` export conditions in favor of `type: module` and
the existing `es` output. Rename each package's babel.config.js to
babel.config.cjs (needed once the package itself is type: module).
@joyenjoyer
joyenjoyer force-pushed the INSTUI-5148-remove-common-js-v2 branch from 4f4d529 to 20b5b9b Compare September 25, 2026 15:26
github-actions Bot pushed a commit that referenced this pull request Sep 25, 2026

This branch has not been deployed

No deployments
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.

1 participant