5090 Commits

Author SHA1 Message Date
depfu[bot]
eadd6e5de9 Update sass to version 1.59.3 2023-03-21 22:45:06 +00:00
Adam Wathan
266f0292ba
Use :is to make important selector option insensitive to DOM order (#10835)
* Use `:is` to make important selector option insensitive to DOM order

* WIP

* add `applyImportantSelector` helper

* use new `applyImportantSelector`

* update tests

* remove unnecessary slice adjustment

Not 100% sure.

* update changelog

---------

Co-authored-by: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
2023-03-21 17:50:44 +01:00
Robin Malfait
e4482c7596
ensure stacking dark and rtl variants with pseudo elements works as expected 2023-03-21 15:32:16 +01:00
depfu[bot]
4d2d870add Update rollup to version 3.20.0 2023-03-21 09:49:20 +00:00
Adam Wathan
bac5ecf004
Add list-style-image support (#10817)
* add `listStyle` instead of `listStyleType`

Co-authored-by: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
Co-authored-by: Jordan Pittman <jordan@cryptica.me>

* add `listStyleType` related deprecation warnings

* Implement list-style-image as separate plugin

* Remove unused code, update tests

* Always generate `list-none`, don't pull it from theme

* Gracefully handle missing listStyleType configuration

* Just use `list-image-*` fuck it

* Update changelog

---------

Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
Co-authored-by: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
Co-authored-by: Jordan Pittman <jordan@cryptica.me>
Co-authored-by: Peter Neupauer <peter@neupauer.sk>
2023-03-20 14:40:35 -04:00
Adam Wathan
69d29c9218 Update changelog 2023-03-20 14:34:31 -04:00
Robin Malfait
439fdadb3a
ensure we look at the extension from the "parent" file
If you have a file `./a.js`, and you import `./b`, then `./b` should be
resolved based on the `./a.js` extension and use the
`jsResolutionOrder`.
2023-03-20 19:02:52 +01:00
Robin Malfait
e046a37dbc
Improve bundle size by replacing detective-typescript (#10825)
* replace `detective-typescript` with our own implementation

We are not parsing the code but just trying to pluck out the
dependencies used via `import` and `require`.

* drop `detective-typescript`

* return a `Set` instead of an `Array`

* resolve rebuilds, but log errors in case they occur

This won't be the prettiest if it happens, but at least we are not
swallowing errors which should make bugs be easier to discover.

See previous commit for an example... 😅

Co-authored-by: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
Co-authored-by: Jordan Pittman <jordan@cryptica.me>
2023-03-20 18:30:47 +01:00
depfu[bot]
6a2c58acf8 Update @swc/core to version 1.3.41 2023-03-20 06:31:33 +00:00
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