Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
b6984e6
fix(bun-plugin): emit the stylesheet in Bun.build and compile alias a…
owjs3901 Sep 30, 2026
71a5984
fix(webpack-plugin,rsbuild-plugin): keep every extracted style in the…
owjs3901 Sep 30, 2026
383ca05
fix(next-plugin): isolate coordinator port file and explain unreachab…
owjs3901 Oct 2, 2026
2314d8f
Merge remote-tracking branch 'origin/fix/coordinator-port-isolation' …
owjs3901 Oct 3, 2026
8ab7c3e
Merge remote-tracking branch 'origin/fix/bun-plugin' into feat/determ…
owjs3901 Oct 3, 2026
1d6a14a
feat(plugins): number files and name classes independently of process…
owjs3901 Oct 3, 2026
1fc5744
chore: remove files test runs left behind
owjs3901 Oct 3, 2026
ffd7dc7
fix(plugins): number buckets and extracted files only, leave vite css…
owjs3901 Oct 3, 2026
a5cd7e5
fix(wasm): align deterministic atom names and persisted hoisting
owjs3901 Oct 4, 2026
818de80
test(next-plugin): verify real atom hoist loaders across builds
owjs3901 Oct 4, 2026
8689baa
test(rsbuild-plugin): verify real atom hoist hooks across builds
owjs3901 Oct 4, 2026
d859fb4
test(vite-plugin): verify real atom hoist transforms across builds
owjs3901 Oct 4, 2026
1999dde
docs(plugins): explain frozen canonical bucket hoisting
owjs3901 Oct 4, 2026
ada56b5
chore(changepack): patch atom hoist naming and plugin contracts
owjs3901 Oct 4, 2026
4f1f953
chore: merge main into deterministic numbering
owjs3901 Oct 4, 2026
f3ef138
Merge remote-tracking branch 'origin/feat/deterministic-numbering' in…
owjs3901 Oct 4, 2026
13ccaea
test(vite-plugin): follow array and restore plugin contract
owjs3901 Oct 4, 2026
aaab756
test(css): cover route unions and restored mixed atom placement
owjs3901 Oct 4, 2026
8e31bbc
fix(extractor): stabilize environment names and authored evaluation
owjs3901 Oct 5, 2026
1968ddf
fix(css): bound unnumbered source names with exact collision claims
owjs3901 Oct 6, 2026
ce6296e
fix(naming): bind scoped static atoms and transactional cache restora…
owjs3901 Oct 6, 2026
a9c804a
fix(extractor): preserve dynamic typography class selection and sourc…
owjs3901 Oct 6, 2026
135d0aa
fix(extractor): preserve styled creation and qualify naming coverage
owjs3901 Oct 7, 2026
f317421
fix(extractor): reject unsupported argument spreads and cover residua…
owjs3901 Oct 7, 2026
01485c1
Merge main b711ed1f into feat/deterministic-numbering
owjs3901 Oct 8, 2026
53d95c2
Merge main 9a953607 into feat/deterministic-numbering
owjs3901 Oct 8, 2026
143612f
Merge main db631c6c into feat/deterministic-numbering
owjs3901 Oct 8, 2026
43a8c7b
Merge main 11790bef into feat/deterministic-numbering
owjs3901 Oct 8, 2026
84af97a
Merge updated #743 into fix/atom-hoist-names
owjs3901 Oct 8, 2026
8722d16
fix(merge): integrate updated atom hoist base while preserving evalua…
owjs3901 Oct 8, 2026
4454159
fix(css): separate original allocation ownership from naming policy
owjs3901 Oct 8, 2026
2869372
fix(css): expose actual counter slots without changing allocation
owjs3901 Oct 8, 2026
a4970b5
fix(css): prepare dormant legacy counter allocation proofs
owjs3901 Oct 8, 2026
25d65c9
fix(sheet): prepare dormant counter expansion replay proofs
owjs3901 Oct 8, 2026
5f1bdd2
fix(extractor): prepare dormant numbered source scope capture
owjs3901 Oct 9, 2026
9331fc0
fix(extractor): capture dormant original producer policy before unions
owjs3901 Oct 9, 2026
fc4ba1a
fix(extractor): prepare dormant legacy counter producer adapters
owjs3901 Oct 9, 2026
f16193e
fix(sheet): qualify private counter linkage and scratch phase proofs
owjs3901 Oct 9, 2026
561f99b
fix(sheet): cover private counter kernel linkage and record paths
owjs3901 Oct 9, 2026
dcc7d90
fix(css): enforce exclusive naming attempts and exact nested rollback
owjs3901 Oct 9, 2026
71ca61b
fix(extractor): qualify original counter constructor fixtures
owjs3901 Oct 9, 2026
919bea8
fix(sheet): qualify dormant counter preparation and live rollback
owjs3901 Oct 9, 2026
cdf3bee
fix(sheet): qualify dormant kernel rejection and coverage boundaries
owjs3901 Oct 9, 2026
cfbd5e0
fix(sheet): cover current dynamic policy rejection
owjs3901 Oct 9, 2026
4735c0c
fix(sheet): own dormant counter state and literal provenance
owjs3901 Oct 9, 2026
c021e2b
fix(sheet): qualify counter grouping and typed literal rejection
owjs3901 Oct 9, 2026
40e1aef
fix(sheet): qualify dormant strict counter snapshots
owjs3901 Oct 10, 2026
7cdd0b3
fix(sheet): cover strict counter snapshot boundaries
owjs3901 Oct 10, 2026
f3c2d33
fix(wasm): qualify dormant counter cache sessions and rollback
owjs3901 Oct 10, 2026
4ef37bc
fix(wasm): cover dormant counter restore boundaries
owjs3901 Oct 10, 2026
f6b6aa3
fix(extractor): qualify dormant counter compiler receipts
owjs3901 Oct 10, 2026
6a64637
fix(extractor): cover dormant counter compiler boundaries
owjs3901 Oct 11, 2026
970247a
fix(extractor): canonicalize counter compiler coverage sources
owjs3901 Oct 11, 2026
e8e0b18
fix(extractor): cover counter operand protocol boundaries
owjs3901 Oct 11, 2026
41018b9
fix(extractor): separate operand origin from generic transport
owjs3901 Oct 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 7 additions & 0 deletions .changepacks/changepack_log_argument_spread_contract.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"changes": {
"bindings/devup-ui-wasm/package.json": "Patch"
},
"note": "Keep JavaScript argument-spread semantics in css() and styled(): compose supported literal arrays statically, and reject strings, other iterables and unknown spreads with a located composition error instructing users to pass the value itself instead. No iterators execute at build time or at styling runtime. Preserve optional producer coordinates and checked prelude offsets for located collision diagnostics.",
"date": "2026-10-07T00:00:00.000Z"
}
10 changes: 10 additions & 0 deletions .changepacks/changepack_log_atom_hoist_names.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": {
"bindings/devup-ui-wasm/package.json": "Patch",
"packages/next-plugin/package.json": "Patch",
"packages/rsbuild-plugin/package.json": "Patch",
"packages/vite-plugin/package.json": "Patch"
},
"note": "Make atomHoist class names deterministic and match generated references to emitted CSS, freeze hoisting from predeclared route reach, and preserve dynamic !important, keyframes, and first-value responsive-token identities. No new build errors.",
"date": "2026-10-01T00:00:00.000Z"
}
7 changes: 7 additions & 0 deletions .changepacks/changepack_log_coordinator_port_isolation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"changes": {
"packages/next-plugin/package.json": "Patch"
},
"note": "Isolate the coordinator port file per owning process when another live next dev/build holds it, record the owner pid, and report port, pid and recovery when the coordinator is missing or unreachable",
"date": "2026-10-02T12:41:12.3693972Z"
}
7 changes: 7 additions & 0 deletions .changepacks/changepack_log_counter_constructor_fixture.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"changes": {
"bindings/devup-ui-wasm/package.json": "Patch"
},
"note": "Qualify authentic original-numbered counter constructors across Rust test crates through non-default dev-only fixture support. Normal extraction, generated JavaScript, CSS naming and cache format remain unchanged; no new build errors or runtime helpers.",
"date": "2026-10-09T00:00:00.000Z"
}
7 changes: 7 additions & 0 deletions .changepacks/changepack_log_counter_owner_separation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"changes": {
"bindings/devup-ui-wasm/package.json": "Patch"
},
"note": "Separate original CSS allocation ownership from naming policy so the counter naming restoration can retain deferred original owners. Generated CSS, JavaScript and cache behavior are unchanged. No new build errors.",
"date": "2026-10-09T00:00:00.000Z"
}
7 changes: 7 additions & 0 deletions .changepacks/changepack_log_counter_slot_preparation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"changes": {
"bindings/devup-ui-wasm/package.json": "Patch"
},
"note": "Prepare typed access to actual CSS counter slots while preserving existing allocation keys, namespace streams and rollback behavior. Generated CSS, JavaScript, cache behavior and snapshots are unchanged. No new build errors.",
"date": "2026-10-09T00:00:00.000Z"
}
13 changes: 13 additions & 0 deletions .changepacks/changepack_log_deterministic_numbering.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"changes": {
"bindings/devup-ui-wasm/package.json": "Patch",
"packages/plugin-utils/package.json": "Patch",
"packages/vite-plugin/package.json": "Patch",
"packages/webpack-plugin/package.json": "Patch",
"packages/rsbuild-plugin/package.json": "Patch",
"packages/next-plugin/package.json": "Patch",
"packages/bun-plugin/package.json": "Patch"
},
"note": "Class names and file numbers no longer depend on the order files are processed in. Every plugin walks the files it can extract (the project's source and the included packages) before the first transform and numbers them in path order (a file collapsed into a bucket is numbered as the bucket, and only files that mention the package, StyleX or an aliased package take numbers) through the new seedFileMap, so identical builds give identical class prefixes, CSS file names and output hashes; in development, files that appear later are numbered after the existing ones. Styles are given class names in a fixed order, not the order of a hash set. The exported class, file and canonical maps are canonical JSON (sorted keys). Stylesheet evaluation (vanilla-extract) refuses Math.random(), Date.now(), new Date() and Date(), which differ between builds, with a build error; fixed dates such as new Date(0) are unchanged. resetBuildState starts a build from its own options: the prefix, atom hoisting, routes, buckets, names, numbers and styles an earlier build in the process left are cleared, and the prefix is set on every setup even when it is absent. Engine snapshots from concurrent transforms are written one after another per file, so an older snapshot is never written last. File lists are ordered by code point rather than the locale",
"date": "2026-10-01T00:00:00.000Z"
}
7 changes: 7 additions & 0 deletions .changepacks/changepack_log_dormant_counter_allocator.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"changes": {
"bindings/devup-ui-wasm/package.json": "Patch"
},
"note": "Prepare the exact legacy counter allocator and captured, map-independent naming inputs for the authoritative counter-cache transition. The new path is dormant until activation; current CSS, JavaScript and cache behavior are unchanged. No new build errors.",
"date": "2026-10-09T00:00:00.000Z"
}
5 changes: 5 additions & 0 deletions .changepacks/changepack_log_dormant_counter_kernel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"changes": { "bindings/devup-ui-wasm/package.json": "Patch" },
"note": "Add a dormant Rust-only scoped prepared/live Counter kernel with independent retained evidence and exact rollback. Production Current extraction, cache4 and JavaScript output remain unchanged; no new activated JavaScript build errors.",
"date": "2026-10-09T00:00:00.000Z"
}
7 changes: 7 additions & 0 deletions .changepacks/changepack_log_dormant_counter_producers.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"changes": {
"bindings/devup-ui-wasm/package.json": "Patch"
},
"note": "Prepare dormant original-owned static, dynamic and keyframe counter producers with exact legacy allocation inputs and request order, retaining source-site variable separation. Current production naming, generated output and cache behavior remain unchanged. No new build errors.",
"date": "2026-10-09T00:00:00.000Z"
}
7 changes: 7 additions & 0 deletions .changepacks/changepack_log_dormant_counter_replay.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"changes": {
"bindings/devup-ui-wasm/package.json": "Patch"
},
"note": "Prepare dormant frozen-input declaration replay and complete counter expansion witnesses for the authoritative cache transition. The test-driven path preserves reset, typography, keyframe and cleanup evidence without changing current CSS, JavaScript or cache behavior. No new build errors.",
"date": "2026-10-09T00:00:00.000Z"
}
7 changes: 7 additions & 0 deletions .changepacks/changepack_log_dormant_numbered_sites.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"changes": {
"bindings/devup-ui-wasm/package.json": "Patch"
},
"note": "Prepare dormant original-file numeric registration and numbered source-scope capture for the counter transition, preserving source positions, roles and ownership independently of delivery. Current production naming, generated output and cache behavior remain unchanged. No new build errors.",
"date": "2026-10-09T00:00:00.000Z"
}
7 changes: 7 additions & 0 deletions .changepacks/changepack_log_dormant_producer_policy.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"changes": {
"bindings/devup-ui-wasm/package.json": "Patch"
},
"note": "Prepare dormant construction-time producer policy so original counter ownership survives deferred style unions, including dynamic and keyframe producers. Current production naming, generated output and cache behavior remain unchanged. No new build errors.",
"date": "2026-10-09T00:00:00.000Z"
}
12 changes: 12 additions & 0 deletions .changepacks/changepack_log_environment_stable_names.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"changes": {
"bindings/devup-ui-wasm/package.json": "Patch",
"packages/react/package.json": "Patch",
"packages/components/package.json": "Patch",
"packages/next-plugin/package.json": "Patch",
"packages/vite-plugin/package.json": "Patch",
"packages/rsbuild-plugin/package.json": "Patch"
},
"note": "Stabilize class and runtime-variable names across build environments, bound unnumbered source identities with compact deterministic names, reset generated variables on their owning elements, and preserve authored evaluation order and lazy selection. Exact content-name and source-name collisions report both contents and their best real source locations; conflicting source-variable roles and unprotected naming caches now fail closed without rejecting literal CSS content strings.",
"date": "2026-10-05T00:00:00.000Z"
}
7 changes: 7 additions & 0 deletions .changepacks/changepack_log_exclusive_attempt.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"changes": {
"bindings/devup-ui-wasm/package.json": "Patch"
},
"note": "Enforce build-time exclusive ownership of naming state and exact rollback when extraction or output construction fails, without changing production naming or cache format. Native lock-held recursive callbacks and same-owner configuration administration during an active exact attempt fail synchronously as programmer-contract violations; normal compilation gains no new build errors.",
"date": "2026-10-09T00:00:00.000Z"
}
13 changes: 13 additions & 0 deletions .changepacks/changepack_log_static_scoped_names.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"changes": {
"bindings/devup-ui-wasm/package.json": "Patch",
"packages/vite-plugin/package.json": "Patch",
"packages/webpack-plugin/package.json": "Patch",
"packages/rsbuild-plugin/package.json": "Patch",
"packages/next-plugin/package.json": "Patch",
"packages/bun-plugin/package.json": "Patch",
"packages/components/package.json": "Patch"
},
"note": "Compile proven static responsive arrays directly to classes and isolate content-named atoms by their existing delivered sheet identity. Safe original sources keep independent D9 counter namespaces even when their CSS shares a collapsed bucket. Build adapters supply an independent names-only project root; resolver IDs, D9 numbering and stylesheet placement stay unchanged. Versioned self-contained naming snapshots ignore and rebuild obsolete or invalid cache data that reaches WASM; cache build errors are reserved for real exact name collisions with located diagnostics. Static Textarea font-size arrays retain their declarations and DOM while compiling directly to classes.",
"date": "2026-10-06T00:00:00.000Z"
}
7 changes: 7 additions & 0 deletions .changepacks/changepack_log_styled_creation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"changes": {
"bindings/devup-ui-wasm/package.json": "Patch"
},
"note": "Evaluate supported conditional styled rule arguments once when the component is created, preserving branch laziness, authored field order, static selectors and layers, typography and runtime value associations. Keep rule capture outside attrs wrappers while authored attrs callbacks remain render-time. Responsive typography retains its shared base class and order-aware class selection without introducing empty styles for proven inert base-preset lookups. This scheduling repair adds no build errors or styling runtime.",
"date": "2026-10-07T00:00:00.000Z"
}
7 changes: 7 additions & 0 deletions .changepacks/changepack_log_typography_classes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"changes": {
"bindings/devup-ui-wasm/package.json": "Patch"
},
"note": "Select dynamic typography and enum classes from the authored value exactly once in source order, without typography CSS variables or declarations. Preserve responsive and selector-scoped presets, conditional style order, template coercion and the existing spread contract. No new build errors or styling runtime are introduced.",
"date": "2026-10-07T00:00:00.000Z"
}
7 changes: 7 additions & 0 deletions .changepacks/changepack_log_w31s_u1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"changes": {
"bindings/devup-ui-wasm/package.json": "Patch"
},
"note": "Keep dormant Rust counter state owned by the sheet with pure linkage checks and explicit literal ownership. The doc-hidden CounterSheet constructor now takes only the sheet. Production Current naming and cache4 remain unchanged; no new JavaScript build errors.",
"date": "2026-10-10T00:00:00.000Z"
}
5 changes: 5 additions & 0 deletions .changepacks/changepack_log_w31t_u2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"changes": { "bindings/devup-ui-wasm/package.json": "Patch" },
"note": "Add dormant Rust strict snapshot6 export and consuming admission APIs without changing production cache4 or JavaScript extraction. Invalid candidates and stale installation authority return typed Rust rejections; no new ordinary JavaScript build errors.",
"date": "2026-10-10T00:00:00.000Z"
}
2 changes: 2 additions & 0 deletions bindings/devup-ui-wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ getrandom = { version = "0.4", features = ["wasm_js"] }
boa_engine = { version = "0.22", features = ["js"] }

[dev-dependencies]
extractor = { path = "../../libs/extractor", features = ["counter-fixtures"] }
css = { path = "../../libs/css", features = ["admission-observer"] }
wasm-bindgen-test = "0.3.78"
serial_test = "4.0.1"
insta = "1.48.0"
Expand Down
8 changes: 8 additions & 0 deletions bindings/devup-ui-wasm/src/administration.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/// Native programmer contract: ordinary extraction never administers build state.
/// Real linkage activation will replace this panic with a recoverable typed error.
pub(crate) fn with_administration<R>(operation: &str, build: impl FnOnce() -> R) -> R {
css::admission::with_admission(|| {
css::admission::assert_administration_allowed(operation);
build()
})
}
131 changes: 131 additions & 0 deletions bindings/devup-ui-wasm/src/admission_contract_tests.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
use super::*;
use exact_test_support::{authority, fixture};
use rstest::rstest;
use serial_test::serial;
use std::panic::{AssertUnwindSafe, catch_unwind};

#[rstest]
#[case("set_debug", || set_debug(true))]
#[case("set_prefix", || set_prefix(Some("changed".into())))]
#[case("set_naming_root", || set_naming_root(Some("/changed".into()), None))]
#[case("set_atom_hoist", || set_atom_hoist(Some(2)))]
#[case("import_canonical_map_internal", || import_canonical_map_internal(HashMap::new()))]
#[case("import_file_routes_internal", || import_file_routes_internal(HashMap::new()))]
#[case("register_theme_internal", || register_theme_internal(sheet::theme::Theme::default()))]
#[case("register_shorthands_internal", || register_shorthands_internal(BTreeMap::new()))]
#[case("set_module_resolver", || set_module_resolver_internal(None))]
#[case("seed_file_map", || seed_file_map(vec!["changed.tsx".into()]))]
#[case("reset_build_state_internal", reset_build_state_internal)]
#[case("import_sheet_internal", || { import_sheet_internal(StyleSheet::default()).unwrap_or_else(|error| panic!("sheet import failed: {error}")); })]
#[case("cache_restore::clear", cache_restore::clear)]
#[case("cache_restore::seeded", || cache_restore::seeded(&["changed.tsx".into()]))]
#[case("cache_restore::classes", || cache_restore::classes(None))]
#[case("cache_restore::files", || cache_restore::files(None))]
#[case("cache_restore::import", || { cache_restore::import(StyleSheet::default()).unwrap_or_else(|error| panic!("cache import failed: {error}")); })]
#[case("StyleSheet::set_theme", || StyleSheet::default().set_theme(sheet::theme::Theme::default()))]
#[serial]
fn guarded_entry_panics_with_exact_message_before_mutation(
#[case] operation: &str,
#[case] administer: fn(),
) {
// Given
fixture();
set_prefix(Some("retained".into()));
set_atom_hoist(Some(7));
register_shorthands_internal(BTreeMap::from([("custom".into(), vec!["color".into()])]));
let before = authority();
cache_names::record(&Err("sticky retained".into()));
// When
let panic = match catch_unwind(AssertUnwindSafe(|| {
let _: Result<(), ()> = css::exact_attempt::with_exclusive_attempt(|| {
administer();
Ok(())
});
})) {
Err(payload) => payload,
Ok(()) => panic!("guarded administration did not panic"),
};
// Then
let message = match panic.downcast_ref::<String>() {
Some(message) => message.as_str(),
None => *panic
.downcast_ref::<&str>()
.unwrap_or_else(|| panic!("guarded administration panic is not a string")),
};
assert_eq!(message, format!("{operation}: an exact attempt is active"));
assert_eq!(authority(), before);
assert_eq!(get_prefix(), Some("retained".into()));
assert_eq!(css::atom_hoist::atom_hoist_threshold(), Some(7));
assert_eq!(
css::get_custom_shorthand_names(),
vec!["custom".to_string()]
);
assert_eq!(cache_names::check(), Err("sticky retained".into()));
register_shorthands_internal(BTreeMap::new());
reset_build_state_internal();
}

#[test]
#[serial]
fn sheet_entry_marker_recovers_after_unwind_and_allows_sequential_calls() {
// Given
reset_build_state_internal();
let _poison_cleanup = exact_test_support::SheetPoisonCleanup::new();
// When
let result = catch_unwind(AssertUnwindSafe(|| {
with_style_sheet_mut(|_| panic!("sheet unwind"));
}));
// Then
assert!(result.is_err());
with_admission(|| {
with_style_sheet_mut(|sheet| sheet.add_css("after.tsx", concat!("body{", "color:red}")));
with_style_sheet(|sheet| assert!(sheet.css.contains_key("after.tsx")));
});
reset_build_state_internal();
}

#[test]
#[serial]
fn failed_extraction_leaves_cache_authority_and_ordered_fresh_seed_replay_unchanged() {
// Given
reset_build_state_internal();
let serialized = export_sheet_internal()
.unwrap_or_else(|error| panic!("cache fixture export failed: {error}"));
seed_file_map(vec!["before.tsx".into()]);
import_sheet_internal(
serde_json::from_str(&serialized)
.unwrap_or_else(|error| panic!("cache fixture decoding failed: {error}")),
)
.unwrap_or_else(|error| panic!("cache fixture import failed: {error}"));
seed_file_map(vec!["b.tsx".into(), "b.tsx".into()]);
seed_file_map(vec!["a.tsx".into(), "b.tsx".into()]);
let before = authority();
// When
let failed = exact_test_support::compile(
"broken.tsx",
"import {Box} from '@devup-ui/react'; const x=<Box",
);
// Then
assert!(failed.is_err());
assert_eq!(authority(), before);
cache_restore::classes(None);
assert_eq!(
css::file_map::get_original_ids(),
BTreeMap::from([
("before.tsx".into(), 0),
("b.tsx".into(), 1),
("a.tsx".into(), 2),
])
);
assert_eq!(
css::file_map::get_file_map(),
[
("before.tsx".into(), 0),
("b.tsx".into(), 1),
("a.tsx".into(), 2),
]
.into_iter()
.collect()
);
reset_build_state_internal();
}
Loading
Loading