Skip to content
This repository was archived by the owner on Oct 11, 2026. It is now read-only.

fix: explain invalid CSS module exports - #19

Merged
KyleJune merged 1 commit into
mainfrom
codex/18-module-export-diagnostics
Oct 3, 2026
Merged

KyleJune merged 1 commit into
mainfrom
codex/18-module-export-diagnostics

Conversation

@KyleJune

@KyleJune KyleJune commented Oct 3, 2026 •

Copy link
Copy Markdown
Member

Why

Importing a CSS module with keys such as foo-bar, default or css currently generates invalid JavaScript or duplicate stylesheet exports. Report these unsupported named exports as plugin build errors that identify the key and stylesheet and explain how to remap it.

Validate transformed keys only when emitting JavaScript named exports. Preserve valid Unicode and contextual identifiers, custom naming conventions, CSS entry-point class maps and modules: false. Document the existing named-export contract and supported remapping options.

Verification

  • Final regression against unchanged main: 20 diagnostic steps failed at intended assertions; six compatibility steps passed.
  • Final deno task check: passed.
  • Final deno task test --parallel --reporter=dot: eight suites / 56 steps, zero failures.
  • deno doc --lint postcss.ts: passed.
  • Tests build and import real bundles, inspect exact class values and CSS, and verify diagnostic ownership and stylesheet locations. Independent final pinned review cleared grammar, error boundaries, consumers and resources at a5c5695.

Risk

Door: two-way. Previously valid exports keep their names and values. Unsupported keys already produced invalid generated JavaScript; they now produce actionable plugin errors. CSS entry points and JSON class maps retain arbitrary keys.

Tradeoffs

Preserve the existing named-export API. A default class-map export or arbitrary-name export API remains separate design work.

Closes

Closes #18

@KyleJune

KyleJune commented Oct 3, 2026

Copy link
Copy Markdown
Member Author

fix: explain invalid CSS module exports — Independent OAuth2 review cleared pinned head a5c5695 against d42c36c. Exactly three frozen files and matching committed blobs; no actionable findings. The guard only applies to named-JavaScript generation, with actual bundle controls for Unicode/contextual/joiner names, custom conventions, CSS entry-point JSON and modules disabled. Diagnostics identify invalid keys and stylesheet paths without requiring error ordering. Caller documentation and the remapping example are valid. Final package check, eight suites / 56 steps and public doc lint passed; original source rejected 20 diagnostic steps while six compatibility controls passed. Declared and parsed closing sets are [18].

@KyleJune
KyleJune merged commit 055ebf2 into main Oct 3, 2026
9 checks passed
github-actions Bot pushed a commit that referenced this pull request Oct 3, 2026
## [0.4.4](0.4.3...0.4.4) (2026-10-03)

### Bug Fixes

* explain invalid CSS module exports ([#19](#19)) ([055ebf2](055ebf2)), closes [#18](#18)
@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 0.4.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Report unsupported CSS module export names

1 participant