Skip to content

Commit 581cf6a

Browse files
Merge engines (tailwindlabs#11275)
* Simplify CI, make oxide engine the default (tailwindlabs#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>
1 parent 0af64ee commit 581cf6a

File tree

154 files changed

+24897
-47018
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

154 files changed

+24897
-47018
lines changed

.github/workflows/ci-stable.yml

Lines changed: 0 additions & 59 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
name: CI — Oxide
1+
name: CI
22

33
on:
44
push:
5-
branches: [master, 3.3]
5+
branches: [master]
66
pull_request:
7-
branches: [master, 3.3]
7+
branches: [master]
88

99
permissions:
1010
contents: read
@@ -13,7 +13,6 @@ env:
1313
CI: true
1414
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
1515
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
16-
CACHE_PREFIX: oxide
1716

1817
jobs:
1918
build:
@@ -34,7 +33,7 @@ jobs:
3433
uses: actions/cache@v3
3534
with:
3635
path: node_modules
37-
key: ${{ runner.os }}-${{ matrix.node-version }}-${{ env.CACHE_PREFIX }}-node_modules-${{ hashFiles('**/package-lock.json') }}
36+
key: ${{ runner.os }}-${{ matrix.node-version }}-node_modules-${{ hashFiles('**/package-lock.json') }}
3837

3938
# Cargo already skips downloading dependencies if they already exist
4039
- name: Cache cargo

.github/workflows/integration-tests-stable.yml

Lines changed: 0 additions & 83 deletions
This file was deleted.

.github/workflows/integration-tests-oxide.yml renamed to .github/workflows/integration-tests.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
name: Integration Tests — Oxide
1+
name: Integration Tests
22

33
on:
44
push:
5-
branches: [master, 3.3]
5+
branches: [master]
66
pull_request:
7-
branches: [master, 3.3]
7+
branches: [master]
88

99
permissions:
1010
contents: read
@@ -13,7 +13,6 @@ env:
1313
CI: true
1414
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
1515
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
16-
CACHE_PREFIX: oxide
1716

1817
jobs:
1918
test:
@@ -46,7 +45,7 @@ jobs:
4645
uses: actions/cache@v3
4746
with:
4847
path: node_modules
49-
key: ${{ runner.os }}-${{ matrix.node-version }}-${{ env.CACHE_PREFIX }}-node_modules-${{ hashFiles('**/package-lock.json') }}
48+
key: ${{ runner.os }}-${{ matrix.node-version }}-node_modules-${{ hashFiles('**/package-lock.json') }}
5049

5150
# Cargo already skips downloading dependencies if they already exist
5251
- name: Cache cargo

.github/workflows/release-insiders-stable.yml

Lines changed: 0 additions & 78 deletions
This file was deleted.

.github/workflows/release-insiders-oxide.yml renamed to .github/workflows/release-insiders.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Release Insiders — Oxide
1+
name: Release Insiders
22

33
on:
44
push:
@@ -8,7 +8,7 @@ env:
88
APP_NAME: tailwindcss-oxide
99
NODE_VERSION: 16
1010
OXIDE_LOCATION: ./oxide/crates/node
11-
RELEASE_CHANNEL: oxide-insiders
11+
RELEASE_CHANNEL: insiders
1212

1313
jobs:
1414
build:
@@ -353,7 +353,7 @@ jobs:
353353
env:
354354
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
355355

356-
tailwind_oxide_release:
356+
tailwind-release:
357357
runs-on: ubuntu-latest
358358
name: Build and release Tailwind CSS
359359

.github/workflows/release-stable.yml

Lines changed: 0 additions & 68 deletions
This file was deleted.

0 commit comments

Comments
 (0)