11import fs from 'node:fs/promises'
22import path , { extname } from 'node:path'
3+ import { createSignatureOptions } from '../../../../tailwindcss/src/canonicalize-candidates'
34import type { Config } from '../../../../tailwindcss/src/compat/plugin-api'
45import type { DesignSystem } from '../../../../tailwindcss/src/design-system'
56import { computeUtilitySignature } from '../../../../tailwindcss/src/signatures'
@@ -39,11 +40,10 @@ export const DEFAULT_MIGRATIONS: Migration[] = [
3940 migrateModernizeArbitraryValues ,
4041]
4142
42- let migrateCached = new DefaultMap <
43- DesignSystem ,
44- DefaultMap < Config | null , DefaultMap < string , Promise < string > > >
45- > ( ( designSystem ) => {
46- return new DefaultMap ( ( userConfig ) => {
43+ let migrateCached = new DefaultMap ( ( designSystem : DesignSystem ) => {
44+ let options = createSignatureOptions ( designSystem )
45+
46+ return new DefaultMap ( ( userConfig : Config | null ) => {
4747 return new DefaultMap ( async ( rawCandidate ) => {
4848 let original = rawCandidate
4949
@@ -57,7 +57,7 @@ let migrateCached = new DefaultMap<
5757 // Verify that the candidate actually makes sense at all. E.g.: `duration`
5858 // is not a valid candidate, but it will parse because `duration-<number>`
5959 // exists.
60- let signature = computeUtilitySignature . get ( designSystem ) . get ( rawCandidate )
60+ let signature = computeUtilitySignature . get ( options ) . get ( rawCandidate )
6161 if ( typeof signature !== 'string' ) return original
6262
6363 return rawCandidate
0 commit comments