4908 Commits

Author SHA1 Message Date
Adam Wathan
22d45dd2dd
Update CHANGELOG.md 2022-11-11 12:14:29 -05:00
Jordan Pittman
602101d030
Allow users to block generation of certain utilities (#9812)
* Add blocklist tests

* Build initial implementation of blocklist

* wip

* wip

* wip

* Update changelog
2022-11-11 11:47:20 -05:00
Jordan Pittman
4ccc0fa12a
Make sure errors are always displayed when watching for changes (#9810)
* Make sure errors are always displayed when watching for changes

* Update changelog
2022-11-11 10:14:14 -05:00
Jordan Pittman
1482c7512a
Fix watching of files on Linux when renames are involved (#9796)
* Fix watching files on Linux

* Update changelog
2022-11-10 12:33:42 -05:00
Jordan Pittman
757a8d64a8 update changelog v3.2.3 2022-11-09 17:13:39 -05:00
Jordan Pittman
6166e592d7 3.2.3 2022-11-09 17:11:01 -05:00
Ankan Bag
8a2f9ed0d1
Fix !important selectors not being classified as valid class inside safelist config (#9791)
* fix !imp selector not safelisted as valid class

* add tests for !imp selectors in safelist config

* add test to check for invalid variants

* Only check important utilities for patterns that include a `!`

* Update changelog

Co-authored-by: Jordan Pittman <jordan@cryptica.me>
2022-11-09 16:58:12 -05:00
Jordan Pittman
6bd991201f
Only sort pseudo elements after classes when using @apply and variants (#9765)
* Sort pseudo elements ONLY after classes

* Update changelog
2022-11-09 16:41:16 -05:00
Jordan Pittman
aac468c1fb
Pick up changes from files that are both context and content deps (#9787)
* Pick up changes from files that are both context and content deps

We switched to absolute paths and it broke this revealing a lurking bug. Fun.

* Update changelog

* Update changelog
2022-11-09 10:22:25 -05:00
Will Cosgrove
1f5d117cf9
Fix shadowed variable when using raw content (#9773)
* Fix shadowed variable when using raw content

* Add test

* Update changelog

Co-authored-by: Jordan Pittman <jordan@cryptica.me>
2022-11-08 17:02:10 -05:00
depfu[bot]
48c0dcaf50 Update eslint to version 8.26.0 2022-11-04 23:00:18 +00:00
Robin Malfait
763fddefac
3.2.2 v3.2.2 2022-11-04 21:28:47 +01:00
Robin Malfait
a5b6ec2517
update changelog 2022-11-04 21:28:46 +01:00
depfu[bot]
260e392bf3 Update cssnano to version 5.1.14 2022-11-04 14:12:50 +00:00
depfu[bot]
30d2595083 Update autoprefixer to version 10.4.13 2022-11-03 20:58:42 +00:00
Robin Malfait
226be119df
update changelog 2022-11-03 17:22:06 +01:00
Robin Malfait
aa979d645f
ensure we fallback to '' for backwards compatibility reasons 2022-11-03 17:21:27 +01:00
Konstantin Lapeev
bf28bf61c1
Fix cannot read properties of undefined (reading 'modifier') (#9656)
* fix #9655

* update changelog

* add test for making sure calling variantFn doesn't crash

* make it behave as-if modifiers didn't exist

Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
2022-11-03 15:10:45 +01:00
Imran Khan
0a4ae7730d
Fix not rebuilding files when rename event is emit (#9689)
* Fix CLI not rebuilding files when `rename` event is emit

* Refactor watching code

* Simplify

* Add rebuild timer

* Move timer into `recordChangedFile`

Co-authored-by: Jordan Pittman <jordan@cryptica.me>
2022-11-03 09:00:38 -04:00
Robin Malfait
d33b6503ea
Fix incorrect selectors when using @apply in selectors with combinators and pseudos (#9722)
* sort tags, classes and pseudos per group (separated by combinators)

* use default behaviour of sort

* update changelog
2022-11-03 12:20:38 +01:00
Ankan Bag
c10ba4e9ba
Fix fractional values not being parsed properly inside arbitrary properties (#9705)
* remove redundant closing bracket in regex pattern

* test fractional spacing values in theme function

* add test that ensures arbitrary properties are separate

* update changelog

Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
2022-11-03 11:10:33 +01:00
depfu[bot]
88dcb6ebc5 Update @swc/core to version 1.3.11 2022-11-02 12:44:28 +00:00
Brad Cornes
7ec9dc311b
Ensure configured font-feature-settings are included in Preflight (#9707)
* Add `font-feature-settings` to `html` in preflight

* Update source map test snapshots

* Update changelog
2022-11-01 17:52:59 +00:00
Brad Cornes
e231ea6c61
Fix merging of arrays during config resolution (#9706)
* Fix merging of arrays during config resolution

* Update changelog
2022-11-01 16:29:47 +00:00
Connor Pearson
661f58ce8b
Exclude non-relevant selectors when generating rules with the important modifier. Fixes #9677. (#9704) 2022-11-01 09:06:03 -04:00
depfu[bot]
c9369894d6 Update postcss to version 8.4.18 2022-10-28 12:57:04 +00:00
depfu[bot]
2cd6fadba6 Update esbuild to version 0.15.12 2022-10-27 22:27:45 +00:00
Khoo Hao Yit
0bdd19aae0
Fix nested style have redundant CSS (#9644)
* Fix nested style have redundant `CSS`

* wip

* Update changelog

Co-authored-by: Jordan Pittman <jordan@cryptica.me>
2022-10-24 11:44:32 -04:00
Jordan Pittman
e63c111c03
Escape special characters in resolved content base path (#9650)
* Refactor

* Escape special characters in the content pattern base path

* Update changelog
2022-10-24 08:06:39 -04:00
Robin Malfait
547f9f674a
3.2.1 v3.2.1 2022-10-21 18:15:16 +02:00
Robin Malfait
8967a5154d
update changelog 2022-10-21 18:15:15 +02:00
Robin Malfait
726b0238f7
update changelog 2022-10-21 18:14:14 +02:00
Robin Malfait
0bbca33a85
ensure we also check wether the modifier exists in the modifiers object
Before we were just checking if the `modifiers` option is `any` or an
object, without actually checking that in case it is an object, the
value actually existed.
2022-10-21 18:11:48 +02:00
Robin Malfait
1445aafd3f
Ensure micromatch is a proper CLI dependency (#9620)
* ensure `micromatch` is a proper dependency

* update changelog
2022-10-20 19:14:05 +02:00
Robin Malfait
3c7fc692d3
Workflow improvements (#9609)
* remove unnecessary download links

GitHub already shows them in a table right below it.

* detach `npm run style` from `npm run test`

* decouple lint from test in workflows

Which means that we don't need to do the crazy linking in certain
workflows.

* hoist the `CI` environment variable

* create dedicated `lint` job

The `lint` tests will run against source files and should not be
dependant on a specific node version. Instead of running the `npm run
style` on every node version we use, we can and should only run it once.

* remove `prettier-plugin-tailwindcss`

As long as we use older versions of node/npm where we can't have
ourselves as a dependency, it is a bit of a mess to maintain properly
sorted html in tests.

Let's remove it for now until we have a better solution!
2022-10-20 18:10:18 +02:00
Robin Malfait
40f6b4ff64
Fix missing PostCSS dependencies in the CLI (#9617)
* Record and watch PostCSS dependencies in the CLI

* ensure `changedContent` gets cleared

Otherwise this list gets bigger and bigger, not only that there is a
subtle bug. The moment you save a `.css` file we want to create a new
context and start from scratch. However, since the list was never
cleared, it meant that every subsequent save to *any* file (not only
config / css files) creates a new context...

By clearing the least we should work around this problem.

* add test that verifies an odd bug

The story goes like this:

1. add `underline` to html file
  -> css contains `underline` rule
2. add `font-bold` to html file
  -> css contains `underline` and `font-bold`
3. remove `underline` from html file
  -> css still contains `underline` and `font-bold` for performance reasons
4. Save a css file (! RED FLAG)
  -> css contains `font-bold` because we started from scratch
5. add `underline` to html file
  -> css contains `underline` and `font-bold`
6. remove `underline` from html file
  -> css only contains `font-bold`... (UH OH)

This is because the moment we did step 4, every single save in any file created a new context. Every. Single. Time.

* use a property that doesn't require `autoprefixer`

* update changelog

Co-authored-by: Jordan Pittman <jordan@cryptica.me>
2022-10-20 18:01:39 +02:00
Robin Malfait
4dfb1e3f87
Fix missing supports in types (#9616)
* add `supports` to types

* update changelog
2022-10-20 14:29:00 +02:00
Brandon McConnell
2faf86fba1
Resolve broken relative logo sources on npmjs (relative → absolute) (#9610) 2022-10-20 00:51:56 +02:00
Robin Malfait
1dc4a76cc7
increase jest test timeout 2022-10-19 18:57:00 +02:00
Robin Malfait
642c5c8aa9
3.2.0 v3.2.0 2022-10-19 18:41:09 +02:00
Robin Malfait
269d73787e
update changelog 2022-10-19 18:41:09 +02:00
Jonathan Reinink
c179f71bf2
Update CHANGELOG.md 2022-10-19 12:35:59 -04:00
Robin Malfait
7f736084d2
Improve warning messages (#9608)
* drop experimental log

* reword some warning messages
2022-10-19 18:35:42 +02:00
Brandon McConnell
ea5b11c371
Update README to use picture/source syntax to avoid deprecation (#9606) 2022-10-19 16:49:30 +02:00
Robin Malfait
0c2c179555
use proper CSS casing 2022-10-19 16:31:46 +02:00
Robin Malfait
08a7321849
update chagnelog 2022-10-19 16:26:57 +02:00
Robin Malfait
cb6e45a3bc
Prepare for release (#9605)
* rename `build-cli.yml` to `prepare-release.yml`

In other repo's we will also have a `prepare-release` so this makes it a
bit more consistent.

* use common CONSTANT_CASE for environment variables

* use `strategy` for defining the node version

* add script to get the release notes

* add release notes to release draft

* use CONSTANT_CASE for environment variables

* improve consistency for relase related scripts
2022-10-19 15:52:39 +02:00
Robin Malfait
ddb9b4d7bc
ensure DEFAULT is taken into account for matchVariant (#9603)
This means that if you define your `matchVariant` as:

```js
matchVariant('foo', (value) => '.foo-${value} &')
```

Then you can't use `foo:underline`, if you want to be able to use
`foo:underline` then you have to define a `DEFAULT` value:

```js
matchVariant('foo', (value) => '.foo-${value} &', {
  values: {
    DEFAULT: 'bar'
  }
})
```

Now `foo:underline` will generate `.foo-bar &` as a selector!
2022-10-18 21:42:17 +02:00
Robin Malfait
24fc365173
Automatically trigger Tailwind Play PRs on release (#9601)
* trigger a Taiwind Play build on release

* ensure version has quotes
2022-10-18 16:06:53 +02:00
Robin Malfait
b67f52cd57
Increase strictness when using applyVariant on illegale candidates (#9599)
* ensure that cases like `@-[200px]` and `group[:hover]` aren't allowed

* update changelog
2022-10-18 12:03:41 +02:00