5081 Commits

Author SHA1 Message Date
Robin Malfait
acf9403826
transform files using @swc/jest (#10815) 2023-03-17 16:22:16 +01:00
Robin Malfait
8132de6660
refactor log.warn checks in tests 2023-03-17 14:49:36 +01:00
Robin Malfait
ab66c5afe3
add toHaveBeenWarned and toHaveBeenWarnedWith custom matchers 2023-03-17 14:46:44 +01:00
depfu[bot]
2de0aa9d91 Update autoprefixer to version 10.4.14 2023-03-16 22:19:27 +00:00
Robin Malfait
ac1738e748
fix stubs glob in files of package.json 2023-03-15 22:31:12 +01:00
Robin Malfait
27cb947784
delete unused stub 2023-03-15 22:30:42 +01:00
Robin Malfait
7e9a53f6cb
Enable ESM and TS based config files (#10785)
* add `jiti` and `detective-typescript` dependencies

* use `jiti` and `detective-typescript`

Instead of `detective`, this way we will be able to support
`tailwind.config.ts` files and `ESM` files.

* use `@swc/core` instead of the built-in `babel` form `jiti`

* update changelog

* add `jiti` and `detective-typescript` dependencies to `stable`

* use `sucrase` to transform the configs

* add `sucrase` dependency to `stable` engine

* make loading the config easier

* use abstracted loading config utils

* WIP: make `load` related files public API

* use new config loader in PostCSS plugin

* add list of default config files to look for

* cleanup unused arguments

* find default config path when using CLI

* improve `init` command

* make eslint happy

* keep all files in `stubs` folder

* add `tailwind.config.js` stub file

* Initialize PostCSS config using the same format as Tailwind config

* Rename config content stubs to config.*.js

* Improve option descriptions for init options

* Remove unused code, remove `constants` file

* Fix TS warning

* apply CLI changes to the Oxide version

* update `--help` output in CLI tests

* WIP: make tests work on CI

TODO: Test all combinations of `--full`, `--ts`, `--postcss`, and `--esm`.

* wip

* remove unused `fs`

* Fix init tests

Did you know you could pass an empty args to a command? No? Me neither. ¯\_(ツ)_/¯

* bump `napi-derive`

* list extensions we are interested in

* no-op the `removeFile` if file doesn't exist

* ensure all `init` flags work

* ensure we cleanup the new files

* test ESM/CJS generation based on package.json

* remove unnecessary test

We are not displaying output in the `--help` anymore based on whether
`type: module` is present or not.
Therefore this test is unneeded.

* only look for `TypeScript` files when the entryFile is `TypeScript` as well

* refactor `load` to be `loadConfig`

This will allow you to use:

```js
import loadConfig from 'tailwindcss/loadConfig'

let config = loadConfig("/Users/xyz/projects/my-app/tailwind.config.ts")
```

The `loadConfig` function will return the configuration object based on
the given absolute path of a tailwind configuration file.

The given path can be a CJS, an ESM or a TS file.

* use the `config.full.js` stub instead of the `defaultConfig.stub.js` file

The root `defaultConfig` is still there for backwards compatibilty
reasons. But the `module.exports = requrie('./config.full.js')` was
causing some problems when actually using tailwindcss.

So dropped it instead.

* apply `load` -> `loadConfig` changes to `Oxide` engine CLI

* ensure we write the config file in the Oxide engine

* improve type in Oxide engine CLI

* catch errors instead of checking if the file exists

A little smaller but just for tests so doesn't matter too much here 👍

* ensure we publish the correct stub files

---------

Co-authored-by: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
Co-authored-by: Jordan Pittman <jordan@cryptica.me>
Co-authored-by: Nate Moore <nate@natemoo.re>
Co-authored-by: Enzo Innocenzi <enzo@innocenzi.dev>
2023-03-15 17:04:18 -04:00
Jordan Pittman
694aea0e2c Update lockfile 2023-03-15 18:02:13 +00:00
depfu[bot]
c0da7bb0c5 Update rimraf to version 4.4.0 2023-03-15 18:02:13 +00:00
depfu[bot]
66fd0c9983 Update all of jest to version 29.5.0 2023-03-15 13:03:01 +00:00
depfu[bot]
c33c5234ef Update eslint-config-prettier to version 8.7.0 2023-03-13 11:23:35 +00:00
Robin Malfait
7b4385cdfd
fix typo 2023-03-10 22:44:25 +01:00
depfu[bot]
990398f52c Update eslint to version 8.35.0 2023-03-10 20:51:07 +00:00
Robin Malfait
7eab762a3d
Add line-clamp utilities from @tailwindcss/line-clamp to core (#10768)
* add `lineClamp` utility

This is coming from the `@tailwindcss/line-clamp` package that we now
merged into the core of Tailwind itself.

* update changelog
2023-03-10 18:47:43 +01:00
Adam Wathan
e40b73a127
Make dark and rtl/ltr variants insensitive to DOM order (#10766)
* Make `dark` and `rtl`/`ltr` variants insensitive to DOM order

* Add explicit test for stacking dark and rtl variants

* Update changelog

---------

Co-authored-by: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
2023-03-10 12:03:38 -05:00
Robin Malfait
ba56e426af
Use inset instead of top, right, bottom, and left properties (#10765)
* use `inset` instead of `top`, `right`, `bottom` and `left` properties

* update changelog
2023-03-10 16:52:08 +01:00
Adam Wathan
c7d605f8c5
Remove warnings when using RTL/LTR variants (#10764)
* Remove warnings when using RTL/LTR variants

* Update changelog

---------

Co-authored-by: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
2023-03-10 10:35:41 -05:00
depfu[bot]
5e9470c5cb Update lilconfig to version 2.1.0 2023-03-09 20:49:16 +00:00
depfu[bot]
5bb351ea75 Update @napi-rs/cli to version 2.14.8 2023-03-08 10:07:12 +00:00
depfu[bot]
a64ce192cc Update turbo to version 1.8.3 2023-03-08 00:32:06 +00:00
depfu[bot]
994b541779 Update vite to version 4.1.4 2023-03-03 02:44:15 +00:00
depfu[bot]
bfdf3a7d1f Update @swc/cli to version 0.1.62 2023-03-02 21:47:26 +00:00
Jonathan Reinink
d91344c148
Update changelog 2023-03-01 09:04:46 -05:00
Dany Castillo
e366985a82
Add content-normal and content-stretch utilities (#10645)
* Add content-stretch utility

* Add `content-normal` utility

---------

Co-authored-by: Jonathan Reinink <jonathan@reinink.ca>
2023-03-01 09:03:50 -05:00
depfu[bot]
52ca21bcea Update sass to version 1.58.3 2023-03-01 02:16:15 +00:00
Robin Malfait
1874798bdd
Ensure CLI builds have a non-zero exit code on failure (#10703)
* ensure simple builds have a non-zero exit code on failure

This is not used for the watcher.

* update changelog
2023-02-28 16:50:06 +01:00
depfu[bot]
0c9b3f9333 Update esbuild to version 0.17.10 2023-02-27 06:33:57 +00:00
depfu[bot]
b42e7d9b76 Update postcss-nested to version 6.0.1 2023-02-26 10:01:49 +00:00
Jordan Pittman
d2a95a00a8
Sort class lists deterministically for Prettier plugin (#10672)
* Ensure class sorting is deterministic for Prettier

* Update changelog
2023-02-23 13:32:24 -05:00
depfu[bot]
261a8b42cb Update all of jest to version 29.4.3 2023-02-23 16:49:54 +00:00
depfu[bot]
0439d44ce0 Update cssnano to version 5.1.15 2023-02-22 22:32:04 +00:00
Jordan Pittman
9bbdd9b10d
Disallow multi-selector arbitrary variants (#10655)
* Allow escaping in `splitAtTopLevelOnly`

* Correctly parse arbitrary variants that have multiple selectors

* Explicitly disallow multiple selector arbitrary variants

Now that we parse them correctly we can restrict them to explicitly supporting only a single selector

* Add test to verify that multiple selector arbitrary variants are dropped

* Add test

* Make prettier happy

* Fix CS

* Update changelog
2023-02-22 14:44:54 -05:00
depfu[bot]
d6121f0ede Update eslint to version 8.34.0 2023-02-17 20:52:54 +00:00
Robin Malfait
962eb52ec6
Enable relative content paths for the oxide engine (#10621)
* enable `relativeContentPathsByDefault` for the `oxide` engine

* update tests to reflect `relative` change in the `oxide` engine

* update changelog
2023-02-17 21:42:10 +01:00
Robin Malfait
c8bf2d49b6
Disable color opacity plugins by default in the oxide engine (#10618)
* disable color opacity plugins by default for the `oxide` engine

* update tests to reflect this change in the `oxide` engine

* update changelog

* reflect changes in integration tests
2023-02-17 20:21:22 +01:00
depfu[bot]
316282d719 Update @swc/core to version 1.3.35 2023-02-17 07:30:59 +00:00
depfu[bot]
77f2f5d3d1 Update rollup to version 3.15.0 2023-02-17 05:58:21 +00:00
Robin Malfait
509a5e091a
update changelog 2023-02-16 23:16:04 +01:00
Adam Wathan
e7ae7f1931 Update version and changelog 2023-02-16 14:28:15 -05:00
Jonathan Reinink
6e92dfa4ea
Revert including outline-color in transition and transition-colors by default (#10604)
* Remove `outline-color` from default color properties to transition (Reverts #10385)

* Update changelog
2023-02-16 13:46:43 -05:00
Jordan Pittman
17159ff6c2 Update changelog 2023-02-16 10:16:36 -05:00
Jordan Pittman
89fe09bfe1
Fix use of :where(.btn) when matching !btn (#10601)
* Cleanup code

This makes it more explicit that we’re parsing a string selector, modifying it, and turning it back into a string

* Fix important modifier when :where is involved

* Only parse selector list once when handling the important modifier

* Fix import

* Fix lint errors
2023-02-16 10:13:42 -05:00
Robin Malfait
66c640b735
Upgrade rimraf: 3.0.2 → 4.1.2 (major) (#10596)
* Update rimraf to version 4.1.2

* use rimraf sync API

Our `oxide` engine uses rimraf v4, our `stable` engine uses rimraf v3
and the API is different in both. However the tests are currently shared
for both engines so we have to use the correct API for the correct
version.

However, we can also just use the `sync` API.

More info: https://github.com/isaacs/rimraf#major-changes-from-v3-to-v4

---------

Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
2023-02-16 00:52:36 +01:00
Jonathan Reinink
e3f9ea413a Update changelog 2023-02-15 11:45:53 -05:00
Davy
c0670ccb35
Add justify-normal and justify-stretch classes (#10560)
* Added justify-normal class

* Update corePlugins.js

* Add `justify-normal` utility

---------

Co-authored-by: Jonathan Reinink <jonathan@reinink.ca>
2023-02-15 11:44:23 -05:00
depfu[bot]
59b7e70859 Update postcss-js to version 4.0.1 2023-02-15 16:00:51 +00:00
depfu[bot]
6cf5ab43a4 Update @napi-rs/cli to version 2.14.7 2023-02-15 10:06:20 +00:00
depfu[bot]
48c35b7d47 Update prettier to version 2.8.4 2023-02-15 03:50:36 +00:00
depfu[bot]
1c9b2d116d Update turbo to version 1.7.4 2023-02-15 00:31:31 +00:00
Adam Wathan
fa693e50c5
Update CHANGELOG.md 2023-02-14 09:14:54 -05:00