Native CSS Packaging Full Integration#1075
Open
OscarCookeAbbott wants to merge 68 commits intomainfrom
Open
Conversation
- Add the atlaspack_packager_css crate stub - Close BundleGraph API gaps needed by the CSS packager - Wire the source map write path in - Add tests for present and absent cases.
- API hygiene: private fields, pub(crate) visibility - Test cleanup: remove stale TDD comments, fix fragile path construction, add missing diamond test - Docs: sibling-order caveat, TODO for context consolidation, Cargo dep rationale - Structure: move NativeBundleGraph test module to bottom of file
- Replace empty results with explicit `unimplemented!` macros
…css-packaging-core
…ested media query rules
…al diagnostics during packaging. - Updated `JsPackager` and `JsPackageResult` to include the new `warnings` field. - Enhanced CSS packager to emit warnings for default import usage and tree-shaking issues.
- Simplified comments and documentation for clarity. - Removed unnecessary comments and code related to CSS @import dependencies. - Enhanced readability by reducing redundant code and comments. - Maintained functionality for resolving asset paths and inline data URIs. - Updated tests to reflect changes in the URL replacement logic.
…packaging-tree-shaking
🦋 Changeset detectedLatest commit: 49bed0c The changes in this PR will be included in the next version bump. This PR includes changesets to release 113 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
…ame mismatches via JS
Contributor
Rust Package Changeset Check✅ The |
Contributor
📊 Type Coverage ReportCoverage Comparison
Files with Most Type Issues (Top 15)
This report was generated by the Type Coverage GitHub Action |
- Add more realistic, larger parity fixtures
- Small cleanup
| @@ -522,9 +682,10 @@ mod tests { | |||
| use atlaspack_core::database::{DatabaseRef, InMemoryDatabase}; | |||
| } | ||
|
|
||
| #[test] | ||
| fn inline_asset_replaced_with_base64_data_uri() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
With all the components in place we need to finish and properly integrate the native CSS packager and validate it with a comprehensive suite of tests.
Looks big but is mostly tests...
Changes
CSS Packaging
lightningcss::minify())HashMappackager-parity.tscomparitive test suite to validate Rust implementation against JScss_packager.rsandurl_replacer.rsatlaspack-v3.tssuiteGeneral
needs_stable_nameinheritance to allow proper filenames for CSS files imported from JSneeds_stable_namecarve-out for shared bundlesPerformance
The native implementation seems to be around 2.5x faster on average, varying significantly based on the CSS being packaged, especially since Node runtime is prone to random slowdown that native code is not. Based on basic but reasonably accurate and repeatable duration logging in the
package()function of each implementation.Checklist
docs/folder