Commit graph

749 commits

Author SHA1 Message Date
depfu[bot]
614c7e2a36 Update browserslist to version 4.22.1 2023-10-04 00:36:35 +00:00
depfu[bot]
0d205f9376 Update postcss to version 8.4.31 2023-10-03 16:26:45 +00:00
depfu[bot]
aa1be48d39 Update lightningcss to version 1.22.0 2023-10-02 15:12:09 +00:00
depfu[bot]
61dc99f4ad Update postcss to version 8.4.30 2023-09-26 22:37:03 +00:00
depfu[bot]
b33c30284f Update eslint to version 8.49.0 2023-09-22 21:35:46 +00:00
depfu[bot]
2e031337ce Update turbo to version 1.10.14 2023-09-22 20:34:49 +00:00
depfu[bot]
0e7f936995 Update resolve to version 1.22.6 2023-09-22 00:07:11 +00:00
depfu[bot]
3e16028406 Update all of jest to version 29.7.0 2023-09-21 13:22:32 +00:00
depfu[bot]
42e75ba4b8 Update jiti to version 1.20.0 2023-09-15 14:37:13 +00:00
depfu[bot]
0bb275797f Update @swc/core to version 1.3.84 2023-09-14 03:53:10 +00:00
depfu[bot]
87d7b91ac7 Update postcss to version 8.4.29 2023-09-12 22:22:06 +00:00
depfu[bot]
63252a57e4 Update lightningcss to version 1.21.7 2023-08-28 09:53:46 +00:00
depfu[bot]
68260bd9e2 Update jiti to version 1.19.3 2023-08-25 14:34:20 +00:00
depfu[bot]
73272faaa8 Update postcss to version 8.4.28 2023-08-23 14:02:19 +00:00
depfu[bot]
28e8fdf24c Update @swc/jest to version 0.2.29 2023-08-19 05:35:05 +00:00
depfu[bot]
a2fa693276 Update eslint to version 8.47.0 2023-08-18 17:06:36 +00:00
depfu[bot]
d58d5b2797
Update eslint-config-prettier to version 9.0.0 (#11815)
Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
2023-08-17 16:58:51 -04:00
depfu[bot]
4c34b2ed34 Update resolve to version 1.22.4 2023-08-12 00:36:22 +00:00
depfu[bot]
739df89264 Update @swc/core to version 1.3.75 2023-08-10 11:02:05 +00:00
depfu[bot]
05e307bb6c Update browserslist to version 4.21.10 2023-08-06 22:20:15 +00:00
depfu[bot]
26c4cb3b5c Update eslint-config-prettier to version 8.10.0 2023-08-04 08:55:18 +00:00
depfu[bot]
778bea7567 Update all of jest to version 29.6.2 2023-08-03 16:04:35 +00:00
depfu[bot]
cfc853b741 Update postcss to version 8.4.27 2023-08-03 14:03:56 +00:00
depfu[bot]
eeec89a07a Update turbo to version 1.10.12 2023-08-01 23:03:10 +00:00
depfu[bot]
86fb660593 Update fast-glob to version 3.3.1 2023-07-29 09:02:32 +00:00
depfu[bot]
6eed8cb3f6 Update sucrase to version 3.34.0 2023-07-22 00:34:40 +00:00
depfu[bot]
6e8c5c9868 Update eslint to version 8.45.0 2023-07-21 18:04:16 +00:00
depfu[bot]
adadf807fa Update postcss to version 8.4.25 2023-07-13 14:01:01 +00:00
depfu[bot]
bc1af02a56 Update all of jest to version 29.6.1 2023-07-11 17:19:31 +00:00
depfu[bot]
3779be2bab Update @swc/core to version 1.3.68 2023-07-09 11:30:36 +00:00
depfu[bot]
adbc7593dc Update turbo to version 1.10.7 2023-07-09 11:00:43 +00:00
Robin Malfait
b57f4d74e2
Bump jiti, lightningcss, fast-glob and browserlist dependencies and reflect lightningcss related improvements in tests (#11550)
* bump dependencies

* reflect lightningcss related changes

* update changelog
2023-07-05 15:03:46 +02:00
depfu[bot]
e4af07f7ad Update browserslist to version 4.21.9 2023-06-26 07:01:20 +00:00
depfu[bot]
eae2b7a3f4 Update turbo to version 1.10.3 2023-06-20 21:32:30 +00:00
depfu[bot]
ac6e8733e9 Update eslint to version 8.42.0 2023-06-16 21:17:40 +00:00
Robin Malfait
86f9c6f092
Simplify browserslist setup by relying on defaults (#11412)
* use `defaults` for `browserslist`

+ some features that we require for Tailwind to work.

* simplify Lightning CSS features

Always transpile `Nesting`, never transpile `LogicalProperties`.

* bump caniuse-lite (`npx browserslist@latest --update-db`)

* reflect changes in the tests

* update changelog
2023-06-12 22:07:06 +02:00
Robin Malfait
ef2ebb28d5
Explicitly configure Lightning CSS features, and prefer user browserslist over default browserslist (#11402)
* exclude `Features.LogicalProperties` lightningcss feature

We don't want this to automatically apply since we have dedicated
logical property based utilities already.

We also have a feature flag to toggle some utilities to make use of
logical property based ones.

This feature should be opt-in to prevent backwards compatibility (e.g.:
RTL sites that _did_ use a mr-4 explicitly).

* update default browserslist

* explicitly include/exclude Lightning CSS features

* update tests based on new browserslist and include/exclude features from Lightning CSS

* update integration tests

* prefer user browserslist, fallback to built-in browserslist

* always include Nesting

If a custom browserslist config is used, then we don't explicitly set
the include/exclude features from Lightning CSS (except for nesting, we
always want to process nesting)

* ensure to fallback to the current working directory

* update changelog
2023-06-09 20:37:36 +02:00
Robin Malfait
e572dc645a
Bump lightningcss dependency (#11388)
* bump `lightningcss`

* allow for non-standard selector combinators such as `::deep`

* just use Prettier when comparing CSS results

We were using 2 different engines where the stable one was not using
Lightning CSS and the Oxide one was using Lightning CSS.

To ensure that we didn't have to rewrite every single test expectation,
the `toMatchFormattedCss` parsed both the actual and expected value
using Lightning CSS (to make the result similar), then it used Prettier
to make it... pretty.

Right now we _only_ use Lightning CSS, which means that we can drop the
additional lightningcss format step and just use Prettier on both the
actual and expected values.

Pretty also only prettifies the CSS, it doesn't rewrite it. E.g.:
`@media (min-width: 768px)` will not be optimized to `@media (width >=
768px)`, that's something that Lightning CSS does for us.

This will require some changes in our test output, but it will be
consistent afterwards because there won't be hidden transformation steps
anymore. Because up until now it could be that the actual result was
`color: black` but the tests showed `color: #000` (because it is
shorter).

This change will reflect reality.

* update tests based on previous commit

* only use `toMatchFormattedCss` instead of `toMatchCss`

They both do the exact same thing right now. While `toMatchCss` is
shorter, `toMatchFormattedCss` makes a bit more sense since we are
comparing the Prettier results.

* update integration tests
2023-06-07 15:56:32 +02:00
depfu[bot]
571c27e1f1 Update @swc/core to version 1.3.62 2023-06-06 08:00:26 +00:00
depfu[bot]
f661c0371c Update browserslist to version 4.21.7 2023-06-04 10:31:31 +00:00
depfu[bot]
729dafeb82 Update postcss to version 8.4.24 2023-06-04 10:00:20 +00:00
Robin Malfait
820815be0b
Remove autoprefixer dependency (#11315)
* remove `autoprefixer` dependency

This was only used in the CLI and we are not using it anymore. The
functionality of `autoprefixer` is baked into `lightningcss`.

* update changelog
2023-05-30 13:27:15 +02:00
Robin Malfait
581cf6abcc
Merge engines (#11275)
* Simplify CI, make oxide engine the default (#11281)

* remove integration tests for the `stable` engine

* make `integration-tests-oxide` the default integration tests workflow

* remove unnecessary CACHE_PREFIX

* drop `ci-stable.yml` workflow

* make `CI — Oxide` the default

+ drop testing against 3.3 branch (since this is stable only)
+ remove unnecessary CACHE_PREFIX

* drop `release-insiders-stable.yml` workflow

* make `Release Insiders — Oxide` the default

+ change release channel to just `insiders` instead of `oxide-insders`

* drop 3.3 branch from integration tests

* change job name for insiders release

This makes it consistent with the other job names

* prep `release-oxide.yml` workflow to be the default workflow

* add Tailwind Play update

Currently commented out until we figure out how this will work exactly.

* use `env.VERSION` for the version we want to release

* drop `release-stable.yml` workflow

* make `release-oxide.yml` the default `release.yml` workflow

* inline "Calculate environment variables" step

* cache node_modules and cargo related files/folders in the release step

* always use the default CLI

* drop oxide specific implementation

* ensure we test `--postcss` in the CLI

Even for the Oxide engine

* always process `@import` rules

* remove `generalizedModifiers` flag

This was already enabled by default. This commits removes some of the
outstanding references to it.

* remove built-in peer dependencies for the CLI

* drop unused esbuild dependency

* fix type for `configBag`

* setup Lightning CSS for the CLI

* drop `cssnano` dependency

We only used this in the CLI and we now use Lighting CSS which has this
built in already. Therefore we can get rid of this as a dependency.

* ensure `imported.css` file exists in integration tests

* passthrough `options` to lightningcss

Ideally we can read this from `result.map` instead. However this doesn't
get filled in for whatever reason even though we use `map: {inline:true}`.

You can run the `tests/cli.test.js`, and more specifically the
`--postcss supports process options with custom config` test.

* Always process CSS with Lightning CSS

Some tests temporarily skipped. Autoprefixer removed from `postcss.config.js` stubs since vendor prefixing handled by Lightning.

* Remove code for normalizing `@import "tailwindcss/*"` statements

* ensure tailwind doesn't crash when a `tailwind.config.js` file is not present

* add `log.group` to group multiple messages together with different types

* remove engine specific checks in integration tests

* remove unused imports/variables

Make linting check happy

* support `content: ['auto']`

This will allow us to still use auto content detection, but since this
is part of the `content` array, it also allows you to add custom paths
if you want.

E.g.:
```js
content: ['auto', './node_modules/my-library/*.{jsx,tsx}']
```

* ensure `content.files` is always an array

This allows us to simplify some checks because 'auto' will now be part
of the array instead of checking if `content.files` is auto or if it is
an array containing 'auto'.

* fix tests, ensure default config is not injected

* simplify `auto` normalization

* always use the defaultFullConfig

No need to override the defaultFullConfig with `{content: 'auto'}`
because this will be included in the default config already.

* drop condition which ensured `files` was an empty array

This is not needed anymore because when `content` is omitted it behaves
as if it was set to `auto`.

* drop removal of `content`

We used to remove the `content` from the actual configuration files when
using `tailwindcss init` for the oxide engine. This was to ensure that
`auto content detection` was used instead (by default).

But now it is always enabled by default therefore this is not needed
anymore.

* ensure setting `content: 'auto'` works

* improve file cache handling

We have to make sure that we get into the previous state whenver a test
is done.
We were using some `!fileCache[filePath]` checks, however we also used
`null` as a sentinel value when something wasn't found. But, `null` is
falsey as well so some checks where incorrect.

Using a dedicated value and a `Map` makes this safer and more correct
because we can now use `.has()`.

* drop `cleanupFile`, `removeFile` will already take care of it

* drop oxide check in `resolvedChangedContent`

At this point the `context.tailwindConfig.content.files` is already
fully resolved regardless of the engine we are in.

* refactor `parseCandidateStringsFromFiles` strategy, to make use of a proper feature flag

* use feature flag for sorting classes

Once the Oxide engine is the default default, then we can drop this
entirely because the result from the Rust parser will already be sorted.

* drop `crosscheck` from tests where it is safe

First pass of deleting `crosscheck`. These are all the places where we
didn't have any differences between the Oxide and Stable engine.

* replace `__OXIDE__` in corePlugins with feature flag

* use `globalThis.__OXIDE__ ?? false`

This will ensure that in places where we don't have `__OXIDE__` that we
can still properly fallback to `false`.

* use `flex` as the go-to utility when testing features

* prefer `space-utilities` tests instead of `oxide` test

* drop crosscheck check

Since the `oxideParser` is disabled by default, all the tests can use
the `stable` output.

* use simple `false` default values for feature flag defaults

* drop `__OXIDE__` injections in build scripts

* use stable `flex` and `z-{...}` utilities instead of color utilities

flex and z-index related utilities are more stable than the color
utilities right now because the color utilities will use a raw color
value or a combination with a css variable depending on a feature flag.

* drop unused `ENGINE` environment variable

* drop stable engine manifest files

* drop `swap-engines` tooling

---------

Co-authored-by: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
2023-05-24 22:10:00 -04:00
depfu[bot]
8af8e0d1e6
Update cssnano to version 6.0.1 2023-05-12 18:49:35 +02:00
depfu[bot]
3e015818d6
Update postcss-selector-parser to version 6.0.12 2023-05-12 18:49:34 +02:00
depfu[bot]
9799e88244
Update @swc/core to version 1.3.56 2023-05-12 18:48:57 +02:00
depfu[bot]
225a3fa3c6
Update resolve to version 1.22.3 2023-05-12 18:47:38 +02:00
Jordan Pittman
960cb40c6b
Fix parsing of theme() inside calc() when there are no spaces around operators (#11157)
* Refactor

* Don’t resolve functions for anything not using theme or screen

* Normalize math operators inside calc when handling functions

* Inline postcss-value-parser

* Treat all functions the same as calc

* Remove workaround for calc + operators without spaces

* Remove `postcss-value-parser` dependency

* Update lockfile

* Update sourcemaps

* Update changelog

* Update `value-parser` formatting

* Stop prettier from complaining
2023-05-04 10:20:01 -04:00
Jordan Pittman
1867744706 3.3.2 2023-04-25 18:09:57 -04:00
Robin Malfait
bd0497fc5d
Drop support for Node.js v12 (#11089)
* bump `postcss-load-config` in the oxide engine

* bump `postcss-load-config` in the stable engine

* update changelog

* Switch to stable

* Update Node to v14

* Update to latest dependency versions

* Update test helper for new version of `rimraf`

Co-Authored-By: Jordan Pittman <jordan@cryptica.me>

* Downgrade `lightningcss` to `v1.18.0`

Co-Authored-By: Jordan Pittman <jordan@cryptica.me>

* Switch back to oxide

* Update Github actions from Node 12 to Node 14

* Update oxide dependencies

* Update stable dependencies

* Update `content-resolution` integration test dependencies

* Update `postcss-cli` integration test dependencies

* Update `rollup` integration test dependencies

* Update `rollup-sass` integration test dependencies

* Update `vite` integration test dependencies

* Update `webpack-5` integration test dependencies

* Update changelog

* Remove `color-name` dependency

* Replace `quick-lru` dependency with `@alloc/quick-lru`

* Replace `quick-lru` dependency with `@alloc/quick-lru` in stable

* Fix standalone CLI test

---------

Co-authored-by: Jonathan Reinink <jonathan@reinink.ca>
Co-authored-by: Jordan Pittman <jordan@cryptica.me>
2023-04-25 16:28:20 -04:00