Skip to content

Beta#7

Merged
akzhy merged 56 commits into
masterfrom
beta
Feb 16, 2026
Merged

Beta#7
akzhy merged 56 commits into
masterfrom
beta

Conversation

@akzhy

@akzhy akzhy commented Feb 16, 2026

Copy link
Copy Markdown
Owner
  • Add sourcemap support
  • Show better CSS error and warning
  • Bug fixes

akzhy and others added 30 commits November 2, 2025 10:59
…for getting unused_classnames with exact line and column numbers using rope
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ttern

Co-authored-by: akzhy <20243910+akzhy@users.noreply.github.com>
Fix error handling to use captured error value instead of consuming Result twice

Copilot AI 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.

Pull request overview

This pull request introduces beta release changes for FlairJS, adding sourcemap support for CSS, improved error/warning messages, and several bug fixes. The changes include two breaking API modifications that are well-documented in the changelogs.

Changes:

  • Added CSS sourcemap generation with proper file location reporting for errors and unused classnames
  • Improved CSS error messages with detailed file locations and human-readable descriptions
  • Enhanced unused classname detection with accurate line/column reporting via sourcemaps
  • Breaking change: TransformOutput now always returns a value with a success property instead of returning null
  • Breaking change: cssPreprocessor function signature changed to accept CssData object instead of plain string
  • Updated dependencies: rolldown 1.0.0-beta.37 → 1.0.0-rc.4, @changesets/cli ^2.29.7 → ^2.29.8
  • Removed Rolldown-based build configuration in favor of direct NAPI bindings
  • Performance improvements through pre-compiled regex matchers for classname detection

Reviewed changes

Copilot reviewed 46 out of 48 changed files in this pull request and generated no comments.

Show a summary per file
File Description
pnpm-workspace.yaml Updated rolldown version to 1.0.0-rc.4
pnpm-lock.yaml Updated lock file with new dependencies including sourcemap libraries
packages/core/src/utils.rs New utility module with CSS error mapping and line/column tracking
packages/core/src/transform.rs Updated transform logic with sourcemap support and unused classname detection
packages/core/src/parse_css.rs Added sourcemap generation during CSS parsing with proper offset tracking
packages/core/src/update_attribute.rs Added consumed classnames tracking and pre-compiled regex matchers
packages/core/src/style_tag.rs Enhanced to track CSS source locations for better error reporting
packages/core/src/flair_property.rs Added line/column tracking for flair property CSS
packages/core/Cargo.toml Added new dependencies: data-encoding, lazy_static, parcel_sourcemap, sourcemap, smallvec
packages/shared/src/transform.ts Updated to handle new CssData type and log unused classnames
packages/shared/src/plugin-core.ts Updated cssPreprocessor signature
packages/vite-plugin/src/index.ts Updated to use result.success check and CssData type
packages/rollup-plugin/src/index.ts Updated to use result.success check and CssData type
packages/webpack-loader/src/index.ts Updated to use result.success check and CssData type
packages/parcel-transformer/src/index.ts Updated to use result.success check and CssData type
packages/core/index.d.ts Added CssData and UnusedCss interfaces, updated TransformOutput
packages/core/package.json Updated main/types to point to index.js/d.ts, removed Rolldown build scripts
packages/core/test/index.spec.ts Added test for unused classname detection
.github/workflows/*.yml Removed build:core-js step from CI workflows
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (1)

packages/core/test/index.spec.ts:45

  • Inconsistent null check handling. Line 43-45 checks if (!result) and throws an error, but line 30 in the previous test directly uses result.code without this check. Since TransformOutput now always returns a value (as indicated by the breaking change), these null checks are unnecessary and should be removed for consistency across all tests.
    if (!result) {
      throw new Error('transformCode returned null or undefined')
    }

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

@akzhy akzhy merged commit 37ea203 into master Feb 16, 2026
1 check passed
@akzhy akzhy deleted the beta branch February 16, 2026 16:06
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.

3 participants