Commit Graph
5095 Commits
Author SHA1 Message Date
Jordan Pittman f97ded08ac Update warning message 2023-03-24 10:44:18 -04:00
Jordan PittmanandGitHub 70ddf281b0 Warn when @tailwindcss/line-clamp plugin is being used (#10862)
* Warn if line-clamp plugin is installed

* Replace line-clamp in standalone CLI

* Update import

* Remove line-clamp plugin if found

* update lockfiles

* Update changelog
2023-03-24 09:58:06 -04:00
depfu[bot] cddb9d490f Update esbuild to version 0.17.12 2023-03-24 07:45:03 +00:00
Jordan Pittman cfdd8ef2de Revert "Remove blocklisted classes from autocomplete (#10844)"
This reverts commit 3d60b3cdb1.
2023-03-23 15:18:49 -04:00
3d60b3cdb1 Remove blocklisted classes from autocomplete (#10844)
* Remove blocklisted classes from autocomplete

* Update changelog

* Don't unnecessary loop over classes

Co-authored-by: Robin Malfait <[email protected]>
2023-03-23 15:03:56 -04:00
depfu[bot] c398dbd265 Update sass to version 1.59.3 2023-03-21 22:45:06 +00:00
cd76b4a6e0 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 <[email protected]>
Co-authored-by: Robin Malfait <[email protected]>
2023-03-21 17:50:44 +01:00
Robin Malfait c41573beb9 ensure stacking dark and rtl variants with pseudo elements works as expected 2023-03-21 15:32:16 +01:00
depfu[bot] c792feaecf Update rollup to version 3.20.0 2023-03-21 09:49:20 +00:00
4932e20359 Add list-style-image support (#10817)
* add `listStyle` instead of `listStyleType`

Co-authored-by: Adam Wathan <[email protected]>
Co-authored-by: Jordan Pittman <[email protected]>

* 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 <[email protected]>
Co-authored-by: Adam Wathan <[email protected]>
Co-authored-by: Jordan Pittman <[email protected]>
Co-authored-by: Peter Neupauer <[email protected]>
2023-03-20 14:40:35 -04:00
Adam Wathan cf34d8f06a Update changelog 2023-03-20 14:34:31 -04:00
Robin Malfait 8709818aaa 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
a4d6440a5a 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 <[email protected]>
Co-authored-by: Jordan Pittman <[email protected]>
2023-03-20 18:30:47 +01:00
depfu[bot] 714d7172a3 Update @swc/core to version 1.3.41 2023-03-20 06:31:33 +00:00
Robin MalfaitandGitHub 0888feb0e2 transform files using @swc/jest (#10815) 2023-03-17 16:22:16 +01:00
Robin Malfait 77557a0730 refactor log.warn checks in tests 2023-03-17 14:49:36 +01:00
Robin Malfait 920612ffe4 add toHaveBeenWarned and toHaveBeenWarnedWith custom matchers 2023-03-17 14:46:44 +01:00
depfu[bot] c538a43289 Update autoprefixer to version 10.4.14 2023-03-16 22:19:27 +00:00
Robin Malfait e11e55337f fix stubs glob in files of package.json 2023-03-15 22:31:12 +01:00
Robin Malfait 23af53bceb delete unused stub 2023-03-15 22:30:42 +01:00
2987346fab 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 <[email protected]>
Co-authored-by: Jordan Pittman <[email protected]>
Co-authored-by: Nate Moore <[email protected]>
Co-authored-by: Enzo Innocenzi <[email protected]>
2023-03-15 17:04:18 -04:00
Jordan Pittmananddepfu[bot] a152b2ae81 Update lockfile 2023-03-15 18:02:13 +00:00
depfu[bot] b4b2a93f03 Update rimraf to version 4.4.0 2023-03-15 18:02:13 +00:00
depfu[bot] f1ba6d561a Update all of jest to version 29.5.0 2023-03-15 13:03:01 +00:00
depfu[bot] 31482285c7 Update eslint-config-prettier to version 8.7.0 2023-03-13 11:23:35 +00:00
Robin Malfait ef49d13244 fix typo 2023-03-10 22:44:25 +01:00
depfu[bot] 37be4f8864 Update eslint to version 8.35.0 2023-03-10 20:51:07 +00:00
Robin MalfaitandGitHub cdec2f8429 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
dcba4db615 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 <[email protected]>
2023-03-10 12:03:38 -05:00
Robin MalfaitandGitHub da00e47d79 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
dcf1d68322 Remove warnings when using RTL/LTR variants (#10764)
* Remove warnings when using RTL/LTR variants

* Update changelog

---------

Co-authored-by: Adam Wathan <[email protected]>
2023-03-10 10:35:41 -05:00
depfu[bot] fb8821db4f Update lilconfig to version 2.1.0 2023-03-09 20:49:16 +00:00
depfu[bot] be86b4429a Update @napi-rs/cli to version 2.14.8 2023-03-08 10:07:12 +00:00
depfu[bot] 140aa1b4d6 Update turbo to version 1.8.3 2023-03-08 00:32:06 +00:00
depfu[bot] d21251a1ff Update vite to version 4.1.4 2023-03-03 02:44:15 +00:00
depfu[bot] 3e67b57bd1 Update @swc/cli to version 0.1.62 2023-03-02 21:47:26 +00:00
Jonathan ReininkandGitHub c554ccd1f2 Update changelog 2023-03-01 09:04:46 -05:00
c6bc5b9d3d Add content-normal and content-stretch utilities (#10645)
* Add content-stretch utility

* Add `content-normal` utility

---------

Co-authored-by: Jonathan Reinink <[email protected]>
2023-03-01 09:03:50 -05:00
depfu[bot] 9bc2af75ed Update sass to version 1.58.3 2023-03-01 02:16:15 +00:00
Robin MalfaitandGitHub 416acfbd09 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] edfffe5538 Update esbuild to version 0.17.10 2023-02-27 06:33:57 +00:00
depfu[bot] 313587e107 Update postcss-nested to version 6.0.1 2023-02-26 10:01:49 +00:00
Jordan PittmanandGitHub f13ef5bad3 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] 58db15b327 Update all of jest to version 29.4.3 2023-02-23 16:49:54 +00:00
depfu[bot] a70ddb0e8f Update cssnano to version 5.1.15 2023-02-22 22:32:04 +00:00
Jordan PittmanandGitHub edc285e18d 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] fad36db143 Update eslint to version 8.34.0 2023-02-17 20:52:54 +00:00
Robin MalfaitandGitHub 3dc6c43480 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 MalfaitandGitHub b31cfc5223 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] d6fab6745e Update @swc/core to version 1.3.35 2023-02-17 07:30:59 +00:00