4882 Commits

Author SHA1 Message Date
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
Jonathan Reinink
1ca51b6628 Put fill and stoke "none" values first 2022-10-17 18:16:40 -04:00
Robin Malfait
59395097ed
expose hasDash for the intellisense plugin (#9594) 2022-10-17 17:13:33 +02:00
Robin Malfait
4041c863b8
Ensure --content is used in the CLI when passed (#9587)
* update changelog

* ensure `--content` is taken into account

* cleanup tests

- Use `rm` instead of deprecated `rmdir`
- Type the returnType correctly

* use a file not included in `content` of your tailwind.config.js file
2022-10-17 16:40:50 +02:00
Robin Malfait
6f77caabfa
Normalize the value for aria-* and data-* variants (#9588)
* ensure to normalize the `value` for `aria-` and `data-` attributes

* update changelog
2022-10-17 13:30:23 +02:00
Robin Malfait
bc004455bc
Expose context.getVariants for intellisense (#9505)
* add `context.getVariants`

* use `modifier` instead of `label`

* handle `modifySelectors` version

* use reference

* reverse engineer manual format strings if container was touched

* use new positional API for `matchVariant`

* update changelog
2022-10-17 12:38:21 +02:00
Robin Malfait
b7d5a2f247
ensure all tests run 2022-10-16 21:50:30 +02:00
Robin Malfait
c2854dae71
Calculate tag for releases based on package.json version (#9572)
* calculate tag for the release

This is based on the name we use in the version e.g.: `3.2.0-beta.2`. If
no name can be found in the version, we will default to `latest`

* ignore node_modules caching for now
v3.2.0-beta.2
2022-10-16 16:20:21 +02:00
Jordan Pittman
855fa300a0 Disable npm cache for insiders for now 2022-10-16 08:43:21 -04:00
Jordan Pittman
9c48973a57
Fix content path detection on Windows (#9569)
* Fix content path detection on Windows

* Update changelog

* Drop npm caches for now
2022-10-16 08:42:19 -04:00
Robin Malfait
042089a775
split build and linking step 2022-10-15 23:51:57 +02:00
Robin Malfait
74df4c3980
re-add node_modules cache
This in combination with `cache: npm` for the `setup-node` would be
awesome if that works.
2022-10-15 23:43:23 +02:00
Robin Malfait
2a88642c08
use setup-node cache in other workflows as well 2022-10-15 23:28:39 +02:00
Robin Malfait
b02f0a0e59
use cache from setup-node 2022-10-15 23:22:18 +02:00
Robin Malfait
0929e00cbd
use Node 14 for insiders release 2022-10-15 23:13:13 +02:00
Adam Wathan
6cd1631be7
Add dynamic data-* variant (#9559)
* Add data variant

* Update CHANGELOG.md

Co-authored-by: Jonathan Reinink <jonathan@reinink.ca>
Co-authored-by: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
2022-10-15 08:41:13 -04:00
depfu[bot]
3f9ef7c72e Update eslint to version 8.25.0 2022-10-15 00:45:03 +00:00
Robin Malfait
963a836a62
bump GitHub action versions (#9560)
* bump GitHub action versions

* use GITHUB_ENV instead of the deprecated `::set-output`
2022-10-15 01:55:07 +02:00
Adam Wathan
9289e60001
Update CHANGELOG.md 2022-10-14 16:51:20 -04:00
depfu[bot]
e6f20a4223
Update postcss-nested to version 6.0.0 (#9546)
Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
2022-10-14 16:50:29 -04:00
Jonathan Reinink
a2bca6303b
Update CHANGELOG.md 2022-10-14 14:55:20 -04:00
Jonathan Reinink
2cae04296a
Add aria variants (#9557)
* Add aria variants

* Add group and peer variants to test

* Add support for group and peer modifiers
2022-10-14 14:54:10 -04:00
Jordan Pittman
66f39a46ab
Add new min and max variants (#9558)
* Rename test variants

* Allow internally negating screens

* Refactor

* Add min/max screen variants

* wip

* Update changelog

* Update tests

* Sort list of variants properly

Technically each test isn’t 100% sorted right in isolation because prettier decisions are basically project-wide. This is close enough though.

* Update tests
2022-10-14 14:25:25 -04:00
Jordan Pittman
3011f46cd8 Enable generalizedModifiers flag by default 2022-10-13 14:13:02 -04:00
Jordan Pittman
45d1a1b593
Add generalized modifier support to matchUtilities (#9541)
* Change `matchVariant` API to use positional arguments

* Fix CS

wip

* Change match variant wrap modifier in an object

Needed for compat w/ some group and peer plugins

* Add modifier support to matchUtilities

* refactor

* Hoist utility modifier splitting

* Rename fn

* refactor

* Add support for generic utility modifiers

* Fix CS

* wip

* update types

* Warn when using modifiers without the option

* Allow modifiers to be a config object

* Make sure we can return null from matchUtilities to omit rules

* Feature flag generalized modifiers

We’re putting a flag for modifiers in front of matchVariant and matchUtilities

* cleanup

* Update changelog

* Properly flag variants using modifiers

* Fix test
2022-10-13 14:01:17 -04:00
Jordan Pittman
b5651e88c3
Fix content key plugin types mismatch (#9545)
* Fix plugin types

* Update changelog
2022-10-13 13:46:50 -04:00
depfu[bot]
a8a2e2a719 Update autoprefixer to version 10.4.12 2022-10-13 00:03:00 +00:00