tailwindcss/src/lib
Robin Malfait 55aa4035f5
Fix format assumption when resolving module dependencies (#10878)
* fix assumption when resolving dependencies

When resolving dependencies given a path, we are only interested
relative files from the current file. We are not interested in the
dependencies that are listed in your `package.json` and thus in your
`node_modules` folder.

We made the assumption that your imports have at least 3 characters.
This sort of makes sense because there will be a `.`, then the OS
separator like `/` and than a file name. E.g.: `./a` is the minimal
amount of characters.

This makes sense for `import` statements, but in the case of `require`,
it is totally valid to write `require('.')`. This will require the
current `index.{js,ts,mjs,cjs,...}` in the current directory.

Before this change, having a `require('.')` wouldn't crash, but the
dependency would not be marked as a module dependencies and therefore we
won't listen for file changes for that dependency.

* update changelog
2023-03-27 19:41:20 +02:00
..
cacheInvalidation.js Invalidate context when main css changes (#7626) 2022-02-25 13:12:45 -05:00
collapseAdjacentRules.js Handle duplicate atrules without children (#8122) 2022-04-15 12:24:27 -04:00
collapseDuplicateDeclarations.js Improve collapsing of duplicate declarations (#6856) 2022-01-03 15:41:49 +01:00
content.js Oxide (#10252) 2023-01-13 12:22:00 +01:00
defaultExtractor.js Match arbitrary properties even when followed by square bracketed text (#10212) 2023-01-02 09:43:07 -05:00
detectNesting.js Allow direct nesting in root or @layer nodes (#10229) 2023-01-03 12:38:30 +01:00
evaluateTailwindFunctions.js Don't emit utilities containing invalid theme fn keys (#9319) 2022-09-14 13:27:01 -04:00
expandApplyAtRules.js Use :is to make important selector option insensitive to DOM order (#10835) 2023-03-21 17:50:44 +01:00
expandTailwindAtRules.js drop oxide api shim 2023-02-08 17:34:33 +01:00
findAtConfigPath.js Improve warning messages (#9608) 2022-10-19 18:35:42 +02:00
generateRules.js Use :is to make important selector option insensitive to DOM order (#10835) 2023-03-21 17:50:44 +01:00
getModuleDependencies.js Fix format assumption when resolving module dependencies (#10878) 2023-03-27 19:41:20 +02:00
load-config.ts Enable ESM and TS based config files (#10785) 2023-03-15 17:04:18 -04:00
normalizeTailwindDirectives.js Improve various warnings (#7118) 2022-01-19 15:09:13 -05:00
offsets.js Sort by layer inside variants layer (#10505) 2023-02-06 16:27:01 +01:00
partitionApplyAtRules.js Fix consecutive builds with at apply producing different CSS (#6999) 2022-01-10 12:36:14 -05:00
regex.js Rewrite default class extractor (#8204) 2022-05-04 16:08:25 -04:00
remap-bitfield.js Sort arbitrary variants deterministically regardless of content order (#10016) 2022-12-08 09:05:46 -05:00
resolveDefaultsAtRules.js Split ::backdrop into separate defaults group (#8567) 2022-06-09 16:26:18 -04:00
setupContextUtils.js Revert "Remove blocklisted classes from autocomplete (#10844)" 2023-03-23 15:18:49 -04:00
setupTrackingContext.js Enable ESM and TS based config files (#10785) 2023-03-15 17:04:18 -04:00
sharedState.js Separate stable and oxide engines (#10359) 2023-01-19 11:58:25 -05:00
substituteScreenAtRules.js Add tuple syntax to guarantee screens order (#6104) 2021-11-16 18:01:06 +01:00