removed unused classNameCompressionMap to simplify code#1921
Conversation
✅ Deploy Preview for compiled-css-in-js canceled.
|
🦋 Changeset detectedLatest commit: 41badc1 The changes in this PR will be included in the next version bump. This PR includes changesets to release 14 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 |
| t.arrayExpression(classNames), | ||
| ]) | ||
| ); | ||
| path.replaceWith(t.callExpression(t.identifier('ax'), [t.arrayExpression(classNames)])); |
There was a problem hiding this comment.
get-runtime-class-name-library.ts is one of the files we deleted. Its only job was to decide which runtime function to emit:
return meta.state.opts.classNameCompressionMap ? 'ac' : 'ax';
• ac = the compression-aware runtime (looks up compressed class names)
• ax = the standard runtime (plain atomic class merging)
Since we removed compression entirely, this decision no longer exists — it's always ax.
| @@ -0,0 +1,17 @@ | |||
| --- | |||
| '@compiled/babel-plugin': major | |||
There was a problem hiding this comment.
feature is unused within Atlassian, setting it to major for other consumers
There was a problem hiding this comment.
We finally got a 1.0 🎉
| preserveLeadingComments(path); | ||
|
|
||
| appendRuntimeImports(path, state); | ||
| appendRuntimeImports(path); |
There was a problem hiding this comment.
We removed state because the only reason it needed state was to check state.opts.classNameCompressionMap to decide whether to import ac or ax; it is no longer needs to know anything about state in packages/babel-plugin/src/utils/append-runtime-imports.ts
What is this change?
As discussed in #1920 (comment), we are removing
classNameCompressionMap, a feature that was create over 3 years ago and was never shipped. This allows us to simplify codebase ahead of changes to the hash algorithm.PR checklist
Don't delete me!
I have...
website/-> will do in another PR, I am tracking this in a ticket