Commit graph

5236 commits

Author SHA1 Message Date
depfu[bot]
05e307bb6c Update browserslist to version 4.21.10 2023-08-06 22:20:15 +00:00
depfu[bot]
26c4cb3b5c Update eslint-config-prettier to version 8.10.0 2023-08-04 08:55:18 +00:00
depfu[bot]
778bea7567 Update all of jest to version 29.6.2 2023-08-03 16:04:35 +00:00
depfu[bot]
cfc853b741 Update postcss to version 8.4.27 2023-08-03 14:03:56 +00:00
depfu[bot]
eeec89a07a Update turbo to version 1.10.12 2023-08-01 23:03:10 +00:00
wimbarelds
0f0d06074c
Make content optional for presets in TypeScript types (#11730)
* Update config.d.ts, Make array members partial in Config

Instead of `Partial<Array<Thing>>` have `Array<Partial<Thing>>`

* simplify types further

* update changelog

---------

Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
2023-08-01 16:19:21 +02:00
Jordan Pittman
a93c61f635 Fix grouping prototype 2023-07-31 12:59:18 -04:00
Jordan Pittman
703a8b014d Update tests 2023-07-31 12:57:46 -04:00
depfu[bot]
86fb660593 Update fast-glob to version 3.3.1 2023-07-29 09:02:32 +00:00
Robin Malfait
e4b398b24f
Fix incorrectly generated CSS when using square brackets inside arbitrary properties (#11709)
* ensure nested square brackets are handled properly inside arbitrary properties

* update changelog
2023-07-28 12:37:43 +02:00
depfu[bot]
5e24f8e08a Update sass to version 1.64.1 2023-07-27 22:58:48 +00:00
Robin Malfait
a72d97cebb
Skip calc() normalisation in nested theme() calls (#11705)
* add `calc` normalisation test cases using `theme()`

* ignore formatting in some known functions, such as `theme`

* update changelog
2023-07-27 17:50:58 +02:00
Robin Malfait
ae4d21308d
Improve normalisation of calc()-like functions (#11686)
* parse the `calc()`-like expressions and format them

* update changelog

* Add test case for double negatives

wanted to be sure this worked

---------

Co-authored-by: Jordan Pittman <jordan@cryptica.me>
2023-07-26 16:26:13 +02:00
Robin Malfait
e0c52a9332
sync package-lock.json 2023-07-25 13:23:27 +02:00
depfu[bot]
757879442f Update @napi-rs/cli to version 2.16.2 2023-07-24 15:54:15 +00:00
Balázs Orbán
2a58e7c431
chore: add GitHub Action to manage +1 comments (#11645) 2023-07-24 11:57:35 +02:00
Robin Malfait
dba5043591
Ensure all built-in plugins have tests (#11618)
* move `preflight` tests to `plugins` test folder

* move `container` tests to `plugins` test folder

* add a test that ensures that all built-in plugins have tests

This is based on a few assumptions:

1. All plugins exist in the `corePlugins.js` file and are exported as
   `corePlugins`
2. Each exported plugin in that object has a file with a corresponding
   name in the current (`tests/plugins/`) folder

* add dedicated plugin tests in the `plugins` folder

* add a test that ensures that all built-in variant plugins have tests

This is based on a few assumptions:

1. All variant plugins exist in the `corePlugins.js` file and are
   exported as `variantPlugins`
2. Each exported plugin in that object has a file with a corresponding
   name in the current (`tests/plugins/variants/`) folder

* add dedicated variant plugin tests in the `plugins/variants` folder

* cleanup basic usage test

* move existing animation tests to animation plugin tests

* move `apply-important-selector` tests to more appropriate location
2023-07-24 11:41:52 +02:00
depfu[bot]
6eed8cb3f6 Update sucrase to version 3.34.0 2023-07-22 00:34:40 +00:00
depfu[bot]
6e8c5c9868 Update eslint to version 8.45.0 2023-07-21 18:04:16 +00:00
depfu[bot]
88316a18e5 Update vite to version 4.4.4 2023-07-18 17:02:16 +00:00
Robin Malfait
7f31ac15ff
ensure we await the processTailwindFeatures when we have multiple roots 2023-07-13 17:20:46 +02:00
depfu[bot]
adadf807fa Update postcss to version 8.4.25 2023-07-13 14:01:01 +00:00
depfu[bot]
3664fd5e02 Update rollup to version 3.26.2 2023-07-13 13:43:32 +00:00
depfu[bot]
ceba1321ec Update sass to version 1.63.6 2023-07-12 02:28:39 +00:00
Jordan Pittman
516c1498c7
Allow variant to be an at-rule without a prelude (#11589)
* Allow variant to be an at-rule without a prelude

* Update changelog
2023-07-11 16:04:38 -04:00
depfu[bot]
bc1af02a56 Update all of jest to version 29.6.1 2023-07-11 17:19:31 +00:00
Robin Malfait
b6b3f854a7
fix experimental feature flag resolution for 'all'
When you have a custom config for the prefix/separator values, then we
want to disable the `oxideParser` for now. But we also have to ensure
that if you use the value `"all"` for the experimental feature flag that
we enable all feature flags.

We were using the keys of the array instead of the values.
2023-07-10 16:09:49 +02:00
depfu[bot]
3779be2bab Update @swc/core to version 1.3.68 2023-07-09 11:30:36 +00:00
depfu[bot]
adbc7593dc Update turbo to version 1.10.7 2023-07-09 11:00:43 +00:00
depfu[bot]
2bfdbce964 Update parcel to version 2.9.3 2023-07-06 22:14:53 +00:00
Robin Malfait
01d1b9a607
Make PostCSS plugin async to improve performance (#11548)
* make main plugin async

This way we can improve the `fs.readFileSync` to a bunch of
`fs.promises.readFile` in a `Promise.all` instead.

* make CLI plugin async

* update CHANGELOG
2023-07-05 16:19:03 +02:00
Robin Malfait
b57f4d74e2
Bump jiti, lightningcss, fast-glob and browserlist dependencies and reflect lightningcss related improvements in tests (#11550)
* bump dependencies

* reflect lightningcss related changes

* update changelog
2023-07-05 15:03:46 +02:00
Jordan Pittman
37575ea0bd Update changelog 2023-06-29 13:36:34 -04:00
Jordan Pittman
40cb82ce75
Sort classes using position of first matching rule (#11504)
* Refactor

* Sort based on first occurence of a candidate

This primarily affects components and utilities which contain multiple matched classes

* Simplify

* Update changelog

* Update
2023-06-29 09:49:53 -04:00
Jordan Pittman
615c157a27
Don't prefix arbitrary classes in peer/group variants (#11454)
* Refactor

* Don’t prefix classes in arbitrary values for group and peer

* use `foo` instead of `lol`

* handle the prefix inside the group/peer variants

Then add the `NoPrefix` feature to the variant itself, which will skip
prefixing any other class in the generated selector (because we already
took care of prefixing `.group` and `.peer`).

We are using an internal symbol such that:

- We can keep it as a private API
- We don't introduce a breaking change

* refactor to simple object instead

We will still use a symbol as an internal/private marker, but the data
itself will be a simple object for now.

If we want to refactor this (and more) in the future using bitflags then
we can refactor that in a separate PR.

---------

Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
2023-06-28 12:37:52 -04:00
A Dev $el
6722e78b35
Ensure CI jobs don't run for longer than 15 minutes (#11496)
* fix: prevent long unwanted runs!

* add timeout-minutes to all the workflows

---------

Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
2023-06-27 23:11:57 +02:00
depfu[bot]
e4af07f7ad Update browserslist to version 4.21.9 2023-06-26 07:01:20 +00:00
depfu[bot]
c6370e15f9 Update parcel to version 2.9.2 2023-06-25 11:28:59 +00:00
Robin Malfait
9f591a5586
Always prepend the license comment (#11476)
* always prepend the Tailwind License

Even when you are not using preflight.

* drop the Tailwind License from the preflight plugin

* drop the license in the tests

This allows us to focus on the actual generated CSS without the license.
The license also includes the version number which we would have to
update every time we release a new version.

* update the source maps snapshots

* always prepend the license when using the CLI

* update Tailwind CLI integration test
2023-06-22 16:41:37 -04:00
Jordan Pittman
a2196b06ab
Escape animation names when prefixes contain special characters (#11470)
* Escape animation names when prefixes contain special characters

* Update changelog
2023-06-21 10:13:19 -04:00
depfu[bot]
eae2b7a3f4 Update turbo to version 1.10.3 2023-06-20 21:32:30 +00:00
depfu[bot]
776d5bf614 Update rollup to version 3.25.1 2023-06-19 06:30:22 +00:00
depfu[bot]
ac6e8733e9 Update eslint to version 8.42.0 2023-06-16 21:17:40 +00:00
depfu[bot]
a7a1f9347c Update sass to version 1.63.4 2023-06-16 17:58:29 +00:00
Robin Malfait
86f9c6f092
Simplify browserslist setup by relying on defaults (#11412)
* use `defaults` for `browserslist`

+ some features that we require for Tailwind to work.

* simplify Lightning CSS features

Always transpile `Nesting`, never transpile `LogicalProperties`.

* bump caniuse-lite (`npx browserslist@latest --update-db`)

* reflect changes in the tests

* update changelog
2023-06-12 22:07:06 +02:00
cunzaizhuyi
3be258c218
chore: make sentence smooth (#11407)
* chore: make sentence smooth

* chore: everything typo

* chore: its

* feat: e.g.

* chore: a => an; remove repeated `to`

* Update offsets.js

* Update generateRules.js

---------

Co-authored-by: Adam Wathan <adam.wathan@gmail.com>
2023-06-11 11:06:03 -04:00
Robin Malfait
ef2ebb28d5
Explicitly configure Lightning CSS features, and prefer user browserslist over default browserslist (#11402)
* exclude `Features.LogicalProperties` lightningcss feature

We don't want this to automatically apply since we have dedicated
logical property based utilities already.

We also have a feature flag to toggle some utilities to make use of
logical property based ones.

This feature should be opt-in to prevent backwards compatibility (e.g.:
RTL sites that _did_ use a mr-4 explicitly).

* update default browserslist

* explicitly include/exclude Lightning CSS features

* update tests based on new browserslist and include/exclude features from Lightning CSS

* update integration tests

* prefer user browserslist, fallback to built-in browserslist

* always include Nesting

If a custom browserslist config is used, then we don't explicitly set
the include/exclude features from Lightning CSS (except for nesting, we
always want to process nesting)

* ensure to fallback to the current working directory

* update changelog
2023-06-09 20:37:36 +02:00
Robin Malfait
ea3d9cd57a
compare the correct values in Jest tests 2023-06-09 16:04:24 +02:00
Jordan Pittman
e51b09ca65
Move unknown pseudo elements outside of :is (#11345)
* More pseudo elements outside of `:is` by default

* Update changelog
2023-06-08 15:00:58 -04:00
Robin Malfait
eb8d9294c5
Make the Rust based parser the default (#11394)
* add failling test using array syntax without space delimiter

* add Rust test with candidates in array without spaces

* Fix JS arrays without spaces

* make the `oxideParser` the default

* sync feature flags with reality

* use better example in tests to be more real

* skip failing tests in the RegEx parser

* update changelog

* make `clippy` happy

---------

Co-authored-by: Jordan Pittman <jordan@cryptica.me>
2023-06-08 14:13:21 +02:00