From 76ed3dca844eb50a0e76a4419444d81aeba55a11 Mon Sep 17 00:00:00 2001 From: Robin Malfait Date: Tue, 28 Mar 2023 11:32:00 +0200 Subject: [PATCH 01/25] Revert prepare of v3.3 --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e73dc309a188..6f6afccb83c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,12 +7,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added + +- [Oxide] Use `lightningcss` for nesting and vendor prefixes in PostCSS plugin ([#10399](https://github.com/tailwindlabs/tailwindcss/pull/10399)) + ### Fixed - Try resolving `config.default` before `config` to ensure the config file is resolved correctly ([#10898](https://github.com/tailwindlabs/tailwindcss/pull/10898)) - Pull pseudo elements outside of `:is` and `:has` when using `@apply` ([#10903](https://github.com/tailwindlabs/tailwindcss/pull/10903)) - Update the types for the `safelist` config ([#10901](https://github.com/tailwindlabs/tailwindcss/pull/10901)) +### Changed + +- [Oxide] Disable color opacity plugins by default in the `oxide` engine ([#10618](https://github.com/tailwindlabs/tailwindcss/pull/10618)) +- [Oxide] Enable relative content paths for the `oxide` engine ([#10621](https://github.com/tailwindlabs/tailwindcss/pull/10621)) + ## [3.3.0] - 2023-03-27 ### Added From fbbba6f67f73c3a4f9571649c3fc27006446d8f4 Mon Sep 17 00:00:00 2001 From: Robin Malfait Date: Tue, 28 Mar 2023 11:32:00 +0200 Subject: [PATCH 02/25] Revert prepare of v3.3 --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index dea972556ff4..620cd0de692b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,10 +7,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added + +- [Oxide] Use `lightningcss` for nesting and vendor prefixes in PostCSS plugin ([#10399](https://github.com/tailwindlabs/tailwindcss/pull/10399)) + ### Fixed - Don’t move unknown pseudo-elements to the end of selectors ([#10943](https://github.com/tailwindlabs/tailwindcss/pull/10943), [#10962](https://github.com/tailwindlabs/tailwindcss/pull/10962)) +### Changed + +- [Oxide] Disable color opacity plugins by default in the `oxide` engine ([#10618](https://github.com/tailwindlabs/tailwindcss/pull/10618)) +- [Oxide] Enable relative content paths for the `oxide` engine ([#10621](https://github.com/tailwindlabs/tailwindcss/pull/10621)) + ## [3.3.1] - 2023-03-30 ### Fixed From 910345f429c0090c76545cf41b13d5ef7a5f6eee Mon Sep 17 00:00:00 2001 From: Robin Malfait Date: Tue, 28 Mar 2023 11:32:00 +0200 Subject: [PATCH 03/25] Revert prepare of v3.3 --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e8bf3541ef61..ff86f842b275 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added + +- [Oxide] Use `lightningcss` for nesting and vendor prefixes in PostCSS plugin ([#10399](https://github.com/tailwindlabs/tailwindcss/pull/10399)) + ### Fixed - Don’t move unknown pseudo-elements to the end of selectors ([#10943](https://github.com/tailwindlabs/tailwindcss/pull/10943), [#10962](https://github.com/tailwindlabs/tailwindcss/pull/10962)) @@ -14,6 +18,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Honor default `to` position of gradient when using implicit transparent colors ([#11002](https://github.com/tailwindlabs/tailwindcss/pull/11002)) - Ensure `@tailwindcss/oxide` doesn't leak in the stable engine ([#10988](https://github.com/tailwindlabs/tailwindcss/pull/10988)) +### Changed + +- [Oxide] Disable color opacity plugins by default in the `oxide` engine ([#10618](https://github.com/tailwindlabs/tailwindcss/pull/10618)) +- [Oxide] Enable relative content paths for the `oxide` engine ([#10621](https://github.com/tailwindlabs/tailwindcss/pull/10621)) + ## [3.3.1] - 2023-03-30 ### Fixed From 88e4f4cd90f57d21f7f0ddaa315d83a069186cc3 Mon Sep 17 00:00:00 2001 From: vjdevra <14150705+vjdevra@users.noreply.github.com> Date: Thu, 13 Apr 2023 16:19:06 +0530 Subject: [PATCH 04/25] Update CODE_OF_CONDUCT.md (#10999) --- .github/CODE_OF_CONDUCT.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md index 7ce9543c5173..7dba70ee8e3c 100644 --- a/.github/CODE_OF_CONDUCT.md +++ b/.github/CODE_OF_CONDUCT.md @@ -2,7 +2,7 @@ The following community guidelines are based on [The Ruby Community Conduct Guidelines](https://www.ruby-lang.org/en/conduct/). -This document provides community guidelines for a respectful, productive, and collaborative place for any person who is willing to contribute to the Tailwind CSS project. It applies to all “collaborative space”, which is defined as community communications channels (such as mailing lists, submitted patches, commit comments, etc.). +This document provides community guidelines for a respectful, productive and collaborative place for any person who is willing to contribute to the Tailwind CSS project. It applies to all “collaborative space”, which is defined as community communications channels (such as mailing lists, submitted patches, commit comments, etc.). - Participants will be tolerant of opposing views. - Participants must ensure that their language and actions are free of personal attacks and disparaging personal remarks. From dae5fbc46504f6971429440953b74796e2ad9bf7 Mon Sep 17 00:00:00 2001 From: Jordan Pittman Date: Fri, 14 Apr 2023 15:11:03 -0400 Subject: [PATCH 05/25] Revert "Update CODE_OF_CONDUCT.md (#10999)" This reverts commit ba5454543e74a6d702ce11b410d27672c2ee4b3f. --- .github/CODE_OF_CONDUCT.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md index 7dba70ee8e3c..7ce9543c5173 100644 --- a/.github/CODE_OF_CONDUCT.md +++ b/.github/CODE_OF_CONDUCT.md @@ -2,7 +2,7 @@ The following community guidelines are based on [The Ruby Community Conduct Guidelines](https://www.ruby-lang.org/en/conduct/). -This document provides community guidelines for a respectful, productive and collaborative place for any person who is willing to contribute to the Tailwind CSS project. It applies to all “collaborative space”, which is defined as community communications channels (such as mailing lists, submitted patches, commit comments, etc.). +This document provides community guidelines for a respectful, productive, and collaborative place for any person who is willing to contribute to the Tailwind CSS project. It applies to all “collaborative space”, which is defined as community communications channels (such as mailing lists, submitted patches, commit comments, etc.). - Participants will be tolerant of opposing views. - Participants must ensure that their language and actions are free of personal attacks and disparaging personal remarks. From cd29de96f678b3adbb850667287a67e0e76d81ac Mon Sep 17 00:00:00 2001 From: Robin Malfait Date: Tue, 28 Mar 2023 11:32:00 +0200 Subject: [PATCH 06/25] Revert prepare of v3.3 --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a8b0e891476..f2880825e7d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fix issue where some pseudo-element variants generated the wrong selector ([#10943](https://github.com/tailwindlabs/tailwindcss/pull/10943), [#10962](https://github.com/tailwindlabs/tailwindcss/pull/10962)) +### Added + +- [Oxide] Use `lightningcss` for nesting and vendor prefixes in PostCSS plugin ([#10399](https://github.com/tailwindlabs/tailwindcss/pull/10399)) + +### Changed + +- [Oxide] Disable color opacity plugins by default in the `oxide` engine ([#10618](https://github.com/tailwindlabs/tailwindcss/pull/10618)) +- [Oxide] Enable relative content paths for the `oxide` engine ([#10621](https://github.com/tailwindlabs/tailwindcss/pull/10621)) + ## [3.3.2] - 2023-04-25 ### Fixed From 076555aa55c5af5f6b20309d9007368ce77895ff Mon Sep 17 00:00:00 2001 From: vjdevra <14150705+vjdevra@users.noreply.github.com> Date: Thu, 13 Apr 2023 16:19:06 +0530 Subject: [PATCH 07/25] Update CODE_OF_CONDUCT.md (#10999) --- .github/CODE_OF_CONDUCT.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md index 7ce9543c5173..7dba70ee8e3c 100644 --- a/.github/CODE_OF_CONDUCT.md +++ b/.github/CODE_OF_CONDUCT.md @@ -2,7 +2,7 @@ The following community guidelines are based on [The Ruby Community Conduct Guidelines](https://www.ruby-lang.org/en/conduct/). -This document provides community guidelines for a respectful, productive, and collaborative place for any person who is willing to contribute to the Tailwind CSS project. It applies to all “collaborative space”, which is defined as community communications channels (such as mailing lists, submitted patches, commit comments, etc.). +This document provides community guidelines for a respectful, productive and collaborative place for any person who is willing to contribute to the Tailwind CSS project. It applies to all “collaborative space”, which is defined as community communications channels (such as mailing lists, submitted patches, commit comments, etc.). - Participants will be tolerant of opposing views. - Participants must ensure that their language and actions are free of personal attacks and disparaging personal remarks. From 4c94cd460712cf8845b1a0f64910739ce993ef7c Mon Sep 17 00:00:00 2001 From: Jordan Pittman Date: Fri, 14 Apr 2023 15:11:03 -0400 Subject: [PATCH 08/25] Revert "Update CODE_OF_CONDUCT.md (#10999)" This reverts commit ba5454543e74a6d702ce11b410d27672c2ee4b3f. --- .github/CODE_OF_CONDUCT.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md index 7dba70ee8e3c..7ce9543c5173 100644 --- a/.github/CODE_OF_CONDUCT.md +++ b/.github/CODE_OF_CONDUCT.md @@ -2,7 +2,7 @@ The following community guidelines are based on [The Ruby Community Conduct Guidelines](https://www.ruby-lang.org/en/conduct/). -This document provides community guidelines for a respectful, productive and collaborative place for any person who is willing to contribute to the Tailwind CSS project. It applies to all “collaborative space”, which is defined as community communications channels (such as mailing lists, submitted patches, commit comments, etc.). +This document provides community guidelines for a respectful, productive, and collaborative place for any person who is willing to contribute to the Tailwind CSS project. It applies to all “collaborative space”, which is defined as community communications channels (such as mailing lists, submitted patches, commit comments, etc.). - Participants will be tolerant of opposing views. - Participants must ensure that their language and actions are free of personal attacks and disparaging personal remarks. From ea4e1cd02d1057be55b36558125bfea593da7950 Mon Sep 17 00:00:00 2001 From: "depfu[bot]" <23717796+depfu[bot]@users.noreply.github.com> Date: Fri, 21 Apr 2023 17:55:48 +0000 Subject: [PATCH 09/25] Update resolve to version 1.22.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e91533f0b0af..f5d2591f1a3b 100644 --- a/package.json +++ b/package.json @@ -91,7 +91,7 @@ "postcss-nested": "^6.0.1", "postcss-selector-parser": "^6.0.11", "postcss-value-parser": "^4.2.0", - "resolve": "^1.22.2", + "resolve": "^1.22.3", "sucrase": "^3.32.0" }, "browserslist": [ From e4a37ce45706e4f62a3ccf7b63b25f35a32208aa Mon Sep 17 00:00:00 2001 From: Robin Malfait Date: Thu, 27 Apr 2023 23:34:08 +0200 Subject: [PATCH 10/25] [oxide] Expose experimental Rust parser setup (#11116) * make `sequential` and `parallel` version of a new (tmp) `parse_candidate_strings` * use bitmasks for the strategy Only sending a number over the wire instead of a serialized objects. * use cleaner match syntax --- oxide/crates/core/src/lib.rs | 105 ++++++++++++++++++++++++++++++++--- oxide/crates/node/src/lib.rs | 39 ++++++++++--- 2 files changed, 128 insertions(+), 16 deletions(-) diff --git a/oxide/crates/core/src/lib.rs b/oxide/crates/core/src/lib.rs index 84713e61bc58..9dd88437dfdd 100644 --- a/oxide/crates/core/src/lib.rs +++ b/oxide/crates/core/src/lib.rs @@ -1,4 +1,5 @@ use crate::parser::Extractor; +use fxhash::FxHashSet; use rayon::prelude::*; use std::path::PathBuf; use tracing::event; @@ -11,14 +12,7 @@ pub mod parser; pub mod utility; pub mod variant; -#[derive(Debug, Clone)] -pub struct ChangedContent { - pub file: Option, - pub content: Option, - pub extension: String, -} - -pub fn parse_candidate_strings_from_files(changed_content: Vec) -> Vec { +fn init_tracing() { if matches!(std::env::var("DEBUG"), Ok(value) if value.eq("*") || value.eq("1") || value.eq("true") || value.contains("tailwind")) { tracing_subscriber::fmt() @@ -27,10 +21,63 @@ pub fn parse_candidate_strings_from_files(changed_content: Vec) .compact() .init(); } +} + +#[derive(Debug, Clone)] +pub struct ChangedContent { + pub file: Option, + pub content: Option, + pub extension: String, +} + +#[derive(Debug)] +pub enum IO { + Sequential = 0b0001, + Parallel = 0b0010, +} +impl From for IO { + fn from(item: u8) -> Self { + match item & 0b0011 { + 0b0001 => IO::Sequential, + 0b0010 => IO::Parallel, + _ => unimplemented!("Unknown 'IO' strategy"), + } + } +} + +#[derive(Debug)] +pub enum Parsing { + Sequential = 0b0100, + Parallel = 0b1000, +} + +impl From for Parsing { + fn from(item: u8) -> Self { + match item & 0b1100 { + 0b0100 => Parsing::Sequential, + 0b1000 => Parsing::Parallel, + _ => unimplemented!("Unknown 'Parsing' strategy"), + } + } +} + +pub fn parse_candidate_strings_from_files(changed_content: Vec) -> Vec { + init_tracing(); parse_all_blobs(read_all_files(changed_content)) } +pub fn parse_candidate_strings(input: Vec, options: u8) -> Vec { + init_tracing(); + + match (IO::from(options), Parsing::from(options)) { + (IO::Sequential, Parsing::Sequential) => parse_all_blobs_sync(read_all_files_sync(input)), + (IO::Sequential, Parsing::Parallel) => parse_all_blobs_sync(read_all_files(input)), + (IO::Parallel, Parsing::Sequential) => parse_all_blobs(read_all_files_sync(input)), + (IO::Parallel, Parsing::Parallel) => parse_all_blobs(read_all_files(input)), + } +} + #[tracing::instrument(skip(changed_content))] fn read_all_files(changed_content: Vec) -> Vec> { event!( @@ -49,6 +96,24 @@ fn read_all_files(changed_content: Vec) -> Vec> { .collect() } +#[tracing::instrument(skip(changed_content))] +fn read_all_files_sync(changed_content: Vec) -> Vec> { + event!( + tracing::Level::INFO, + "Reading {:?} file(s)", + changed_content.len() + ); + + changed_content + .into_iter() + .map(|c| match (c.file, c.content) { + (Some(file), None) => std::fs::read(file).unwrap(), + (None, Some(content)) => content.into_bytes(), + _ => Default::default(), + }) + .collect() +} + #[tracing::instrument(skip(blobs))] fn parse_all_blobs(blobs: Vec>) -> Vec { let input: Vec<_> = blobs.iter().map(|blob| &blob[..]).collect(); @@ -72,3 +137,27 @@ fn parse_all_blobs(blobs: Vec>) -> Vec { result.sort(); result } + +#[tracing::instrument(skip(blobs))] +fn parse_all_blobs_sync(blobs: Vec>) -> Vec { + let input: Vec<_> = blobs.iter().map(|blob| &blob[..]).collect(); + let input = &input[..]; + + let mut result: Vec = input + .iter() + .map(|input| Extractor::unique(input, Default::default())) + .fold(FxHashSet::default(), |mut a, b| { + a.extend(b); + a + }) + .into_iter() + .map(|s| { + // SAFETY: When we parsed the candidates, we already guaranteed that the byte slices + // are valid, therefore we don't have to re-check here when we want to convert it back + // to a string. + unsafe { String::from_utf8_unchecked(s.to_vec()) } + }) + .collect(); + result.sort(); + result +} diff --git a/oxide/crates/node/src/lib.rs b/oxide/crates/node/src/lib.rs index 20961adcb60f..f8b927db5a60 100644 --- a/oxide/crates/node/src/lib.rs +++ b/oxide/crates/node/src/lib.rs @@ -1,3 +1,4 @@ +use napi::bindgen_prelude::ToNapiValue; use std::path::PathBuf; #[macro_use] @@ -11,16 +12,38 @@ pub struct ChangedContent { pub extension: String, } +impl From for tailwindcss_core::ChangedContent { + fn from(changed_content: ChangedContent) -> Self { + tailwindcss_core::ChangedContent { + file: changed_content.file.map(PathBuf::from), + content: changed_content.content, + extension: changed_content.extension, + } + } +} + #[napi] pub fn parse_candidate_strings_from_files(changed_content: Vec) -> Vec { tailwindcss_core::parse_candidate_strings_from_files( - changed_content - .into_iter() - .map(|changed_content| tailwindcss_core::ChangedContent { - file: changed_content.file.map(PathBuf::from), - content: changed_content.content, - extension: changed_content.extension, - }) - .collect(), + changed_content.into_iter().map(Into::into).collect(), ) } + +#[derive(Debug)] +#[napi] +pub enum IO { + Sequential = 0b0001, + Parallel = 0b0010, +} + +#[derive(Debug)] +#[napi] +pub enum Parsing { + Sequential = 0b0100, + Parallel = 0b1000, +} + +#[napi] +pub fn parse_candidate_strings(input: Vec, strategy: u8) -> Vec { + tailwindcss_core::parse_candidate_strings(input.into_iter().map(Into::into).collect(), strategy) +} From 7f555c432d7f801fcac82fbf1331a5ed8986c4c1 Mon Sep 17 00:00:00 2001 From: Robin Malfait Date: Thu, 27 Apr 2023 23:45:10 +0200 Subject: [PATCH 11/25] use older version of centos/nodejs-12 --- .github/workflows/release-insiders-oxide.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-insiders-oxide.yml b/.github/workflows/release-insiders-oxide.yml index 4130349ba190..e074d064d0ae 100644 --- a/.github/workflows/release-insiders-oxide.yml +++ b/.github/workflows/release-insiders-oxide.yml @@ -170,7 +170,7 @@ jobs: include: - target: x86_64-unknown-linux-gnu strip: strip - image: docker.io/centos/nodejs-14-centos7 + image: docker.io/centos/nodejs-12-centos7 - target: aarch64-unknown-linux-gnu strip: aarch64-linux-gnu-strip image: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian From 759a8c2061fbb9aabd0ec9c5f534652e7a2c9717 Mon Sep 17 00:00:00 2001 From: "depfu[bot]" <23717796+depfu[bot]@users.noreply.github.com> Date: Tue, 2 May 2023 12:55:43 +0000 Subject: [PATCH 12/25] Update @swc/core to version 1.3.56 --- package-lock.json | 28 ++++++++++++++-------------- package.json | 2 +- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/package-lock.json b/package-lock.json index ecdc2141e39c..39227b2f4d42 100644 --- a/package-lock.json +++ b/package-lock.json @@ -37,7 +37,7 @@ "postcss-nested": "^6.0.1", "postcss-selector-parser": "^6.0.11", "postcss-value-parser": "^4.2.0", - "resolve": "^1.22.2", + "resolve": "^1.22.3", "sucrase": "^3.32.0" }, "bin": { @@ -13102,11 +13102,11 @@ } }, "node_modules/resolve": { - "version": "1.22.2", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", - "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==", + "version": "1.22.3", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.3.tgz", + "integrity": "sha512-P8ur/gp/AmbEzjr729bZnLjXK5Z+4P0zhIJgBgzqRih7hL7BOukHGtSTA3ACMY467GRFz3duQsi0bDZdR7DKdw==", "dependencies": { - "is-core-module": "^2.11.0", + "is-core-module": "^2.12.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, @@ -25811,11 +25811,11 @@ "dev": true }, "resolve": { - "version": "1.22.2", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", - "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==", + "version": "1.22.3", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.3.tgz", + "integrity": "sha512-P8ur/gp/AmbEzjr729bZnLjXK5Z+4P0zhIJgBgzqRih7hL7BOukHGtSTA3ACMY467GRFz3duQsi0bDZdR7DKdw==", "requires": { - "is-core-module": "^2.11.0", + "is-core-module": "^2.12.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" } @@ -27117,7 +27117,7 @@ "postcss-selector-parser": "^6.0.11", "postcss-value-parser": "^4.2.0", "prettier": "^2.8.8", - "resolve": "^1.22.2", + "resolve": "^1.22.3", "rimraf": "^5.0.0", "source-map-js": "^1.0.2", "sucrase": "^3.32.0", @@ -36461,11 +36461,11 @@ "dev": true }, "resolve": { - "version": "1.22.2", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", - "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==", + "version": "1.22.3", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.3.tgz", + "integrity": "sha512-P8ur/gp/AmbEzjr729bZnLjXK5Z+4P0zhIJgBgzqRih7hL7BOukHGtSTA3ACMY467GRFz3duQsi0bDZdR7DKdw==", "requires": { - "is-core-module": "^2.11.0", + "is-core-module": "^2.12.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" } diff --git a/package.json b/package.json index f5d2591f1a3b..2a68dd423732 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ ], "devDependencies": { "@swc/cli": "^0.1.62", - "@swc/core": "^1.3.55", + "@swc/core": "^1.3.56", "@swc/jest": "^0.2.26", "@swc/register": "^0.1.10", "autoprefixer": "^10.4.14", From 4893cad29c581d5e557f75ebad999d8f343d61b4 Mon Sep 17 00:00:00 2001 From: "depfu[bot]" <23717796+depfu[bot]@users.noreply.github.com> Date: Wed, 3 May 2023 15:56:11 +0000 Subject: [PATCH 13/25] Update vite to version 4.3.4 --- integrations/vite/package.json | 2 +- package-lock.json | 292 ++++++++++++++++----------------- 2 files changed, 147 insertions(+), 147 deletions(-) diff --git a/integrations/vite/package.json b/integrations/vite/package.json index 4b9649cab430..8a76f10fee2d 100644 --- a/integrations/vite/package.json +++ b/integrations/vite/package.json @@ -21,6 +21,6 @@ }, "devDependencies": { "isomorphic-fetch": "^3.0.0", - "vite": "^4.3.2" + "vite": "^4.3.4" } } diff --git a/package-lock.json b/package-lock.json index 39227b2f4d42..15ea0e6a00dc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -46,7 +46,7 @@ }, "devDependencies": { "@swc/cli": "^0.1.62", - "@swc/core": "^1.3.55", + "@swc/core": "^1.3.56", "@swc/jest": "^0.2.26", "@swc/register": "^0.1.10", "autoprefixer": "^10.4.14", @@ -119,7 +119,7 @@ "version": "0.0.0", "devDependencies": { "isomorphic-fetch": "^3.0.0", - "vite": "^4.3.2" + "vite": "4.3.4" } }, "integrations/webpack-4": { @@ -3940,9 +3940,9 @@ } }, "node_modules/@swc/core": { - "version": "1.3.55", - "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.3.55.tgz", - "integrity": "sha512-w/lN3OuJsuy868yJZKop+voZLVzI5pVSoopQVtgDNkEzejnPuRp9XaeAValvuMaWqKoTMtOjLzEPyv/xiAGYQQ==", + "version": "1.3.56", + "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.3.56.tgz", + "integrity": "sha512-yz/EeXT+PMZucUNrYceRUaTfuNS4IIu5EDZSOlvCEvm4jAmZi7CYH1B/kvzEzoAOzr7zkQiDPNJftcQXLkjbjA==", "dev": true, "hasInstallScript": true, "engines": { @@ -3953,16 +3953,16 @@ "url": "https://opencollective.com/swc" }, "optionalDependencies": { - "@swc/core-darwin-arm64": "1.3.55", - "@swc/core-darwin-x64": "1.3.55", - "@swc/core-linux-arm-gnueabihf": "1.3.55", - "@swc/core-linux-arm64-gnu": "1.3.55", - "@swc/core-linux-arm64-musl": "1.3.55", - "@swc/core-linux-x64-gnu": "1.3.55", - "@swc/core-linux-x64-musl": "1.3.55", - "@swc/core-win32-arm64-msvc": "1.3.55", - "@swc/core-win32-ia32-msvc": "1.3.55", - "@swc/core-win32-x64-msvc": "1.3.55" + "@swc/core-darwin-arm64": "1.3.56", + "@swc/core-darwin-x64": "1.3.56", + "@swc/core-linux-arm-gnueabihf": "1.3.56", + "@swc/core-linux-arm64-gnu": "1.3.56", + "@swc/core-linux-arm64-musl": "1.3.56", + "@swc/core-linux-x64-gnu": "1.3.56", + "@swc/core-linux-x64-musl": "1.3.56", + "@swc/core-win32-arm64-msvc": "1.3.56", + "@swc/core-win32-ia32-msvc": "1.3.56", + "@swc/core-win32-x64-msvc": "1.3.56" }, "peerDependencies": { "@swc/helpers": "^0.5.0" @@ -3974,9 +3974,9 @@ } }, "node_modules/@swc/core-darwin-arm64": { - "version": "1.3.55", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.3.55.tgz", - "integrity": "sha512-UnHC8aPg/JvHhgXxTU6EhTtfnYNS7nhq8EKB8laNPxlHbwEyMBVQ2QuJHlNCtFtvSfX/uH5l04Ld1iGXnBTfdQ==", + "version": "1.3.56", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.3.56.tgz", + "integrity": "sha512-DZcu7BzDaLEdWHabz9DRTP0yEBLqkrWmskFcD5BX0lGAvoIvE4duMnAqi5F2B3X7630QioHRCYFoRw2WkeE3Cw==", "cpu": [ "arm64" ], @@ -3990,9 +3990,9 @@ } }, "node_modules/@swc/core-darwin-x64": { - "version": "1.3.55", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.3.55.tgz", - "integrity": "sha512-VNJkFVARrktIqtaLrD1NFA54gqekH7eAUcUY2U2SdHwO67HYjfMXMxlugLP5PDasSKpTkrVooUdhkffoA5W50g==", + "version": "1.3.56", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.3.56.tgz", + "integrity": "sha512-VH5saqYFasdRXJy6RAT+MXm0+IjkMZvOkohJwUei+oA65cKJofQwrJ1jZro8yOJFYvUSI3jgNRGsdBkmo/4hMw==", "cpu": [ "x64" ], @@ -4006,9 +4006,9 @@ } }, "node_modules/@swc/core-linux-arm-gnueabihf": { - "version": "1.3.55", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.3.55.tgz", - "integrity": "sha512-6OcohhIFKKNW/TpJt26Tpul8zyL7dmp1Lnyj2BX9ycsZZ5UnsNiGqn37mrqJgVTx/ansEmbyOmKu2mzm/Ct6cQ==", + "version": "1.3.56", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.3.56.tgz", + "integrity": "sha512-LWwPo6NnJkH01+ukqvkoNIOpMdw+Zundm4vBeicwyVrkP+mC3kwVfi03TUFpQUz3kRKdw/QEnxGTj+MouCPbtw==", "cpu": [ "arm" ], @@ -4022,9 +4022,9 @@ } }, "node_modules/@swc/core-linux-arm64-gnu": { - "version": "1.3.55", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.3.55.tgz", - "integrity": "sha512-MfZtXGBv21XWwvrSMP0CMxScDolT/iv5PRl9UBprYUehwWr7BNjA3V9W7QQ+kKoPyORWk7LX7OpJZF3FnO618Q==", + "version": "1.3.56", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.3.56.tgz", + "integrity": "sha512-GzsUy/4egJ4cMlxbM+Ub7AMi5CKAc+pxBxrh8MUPQbyStW8jGgnQsJouTnGy0LHawtdEnsCOl6PcO6OgvktXuQ==", "cpu": [ "arm64" ], @@ -4038,9 +4038,9 @@ } }, "node_modules/@swc/core-linux-arm64-musl": { - "version": "1.3.55", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.3.55.tgz", - "integrity": "sha512-iZJo+7L5lv10W0f0C6SlyteAyMJt5Tp+aH3+nlAwKdtc+VjyL1sGhR8DJMXp2/buBRZJ9tjEtpXKDaWUdSdF7Q==", + "version": "1.3.56", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.3.56.tgz", + "integrity": "sha512-9gxL09BIiAv8zY0DjfnFf19bo8+P4T9tdhzPwcm+1yPJcY5yr1+YFWLNFzz01agtOj6VlZ2/wUJTaOfdjjtc+A==", "cpu": [ "arm64" ], @@ -4054,9 +4054,9 @@ } }, "node_modules/@swc/core-linux-x64-gnu": { - "version": "1.3.55", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.3.55.tgz", - "integrity": "sha512-Rmc8ny/mslzzz0+wNK9/mLdyAWVbMZHRSvljhpzASmq48NBkmZ5vk9/WID6MnUz2e9cQ0JxJQs8t39KlFJtW3g==", + "version": "1.3.56", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.3.56.tgz", + "integrity": "sha512-n0ORNknl50vMRkll3BDO1E4WOqY6iISlPV1ZQCRLWQ6YQ2q8/WAryBxc2OAybcGHBUFkxyACpJukeU1QZ/9tNw==", "cpu": [ "x64" ], @@ -4070,9 +4070,9 @@ } }, "node_modules/@swc/core-linux-x64-musl": { - "version": "1.3.55", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.3.55.tgz", - "integrity": "sha512-Ymoc4xxINzS93ZjVd2UZfLZk1jF6wHjdCbC1JF+0zK3IrNrxCIDoWoaAj0+Bbvyo3hD1Xg/cneSTsqX8amnnuQ==", + "version": "1.3.56", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.3.56.tgz", + "integrity": "sha512-r+D34WLAOAlJtfw1gaVWpHRwCncU9nzW9i7w9kSw4HpWYnHJOz54jLGSEmNsrhdTCz1VK2ar+V2ktFUsrlGlDA==", "cpu": [ "x64" ], @@ -4086,9 +4086,9 @@ } }, "node_modules/@swc/core-win32-arm64-msvc": { - "version": "1.3.55", - "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.3.55.tgz", - "integrity": "sha512-OhnmFstq2qRU2GI5I0G/8L+vc2rx8+w+IOA6EZBrY4FuMCbPIZKKzlnAIxYn2W+yD4gvBzYP3tgEcaDfQk6EkA==", + "version": "1.3.56", + "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.3.56.tgz", + "integrity": "sha512-29Yt75Is6X24z3x8h/xZC1HnDPkPpyLH9mDQiM6Cuc0I9mVr1XSriPEUB2N/awf5IE4SA8c+3IVq1DtKWbkJIw==", "cpu": [ "arm64" ], @@ -4102,9 +4102,9 @@ } }, "node_modules/@swc/core-win32-ia32-msvc": { - "version": "1.3.55", - "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.3.55.tgz", - "integrity": "sha512-3VR5rHZ6uoL/Vo3djV30GgX2oyDwWWsk+Yp+nyvYyBaKYiH2zeHfxdYRLSQV3W7kSlCAH3oDYpSljrWZ0t5XEQ==", + "version": "1.3.56", + "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.3.56.tgz", + "integrity": "sha512-mplp0zbYDrcHtfvkniXlXdB04e2qIjz2Gq/XHKr4Rnc6xVORJjjXF91IemXKpavx2oZYJws+LNJL7UFQ8jyCdQ==", "cpu": [ "ia32" ], @@ -4118,9 +4118,9 @@ } }, "node_modules/@swc/core-win32-x64-msvc": { - "version": "1.3.55", - "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.3.55.tgz", - "integrity": "sha512-KBtMFtRwnbxBugYf6i2ePqEGdxsk715KcqGMjGhxNg7BTACnXnhj37irHu2e7A7wZffbkUVUYuj/JEgVkEjSxg==", + "version": "1.3.56", + "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.3.56.tgz", + "integrity": "sha512-zp8MBnrw/bjdLenO/ifYzHrImSjKunqL0C2IF4LXYNRfcbYFh2NwobsVQMZ20IT0474lKRdlP8Oxdt+bHuXrzA==", "cpu": [ "x64" ], @@ -15619,13 +15619,13 @@ "dev": true }, "node_modules/vite": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/vite/-/vite-4.3.2.tgz", - "integrity": "sha512-9R53Mf+TBoXCYejcL+qFbZde+eZveQLDYd9XgULILLC1a5ZwPaqgmdVpL8/uvw2BM/1TzetWjglwm+3RO+xTyw==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.3.4.tgz", + "integrity": "sha512-f90aqGBoxSFxWph2b39ae2uHAxm5jFBBdnfueNxZAT1FTpM13ccFQExCaKbR2xFW5atowjleRniQ7onjJ22QEg==", "dev": true, "dependencies": { "esbuild": "^0.17.5", - "postcss": "^8.4.21", + "postcss": "^8.4.23", "rollup": "^3.21.0" }, "bin": { @@ -18759,90 +18759,90 @@ } }, "@swc/core": { - "version": "1.3.55", - "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.3.55.tgz", - "integrity": "sha512-w/lN3OuJsuy868yJZKop+voZLVzI5pVSoopQVtgDNkEzejnPuRp9XaeAValvuMaWqKoTMtOjLzEPyv/xiAGYQQ==", + "version": "1.3.56", + "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.3.56.tgz", + "integrity": "sha512-yz/EeXT+PMZucUNrYceRUaTfuNS4IIu5EDZSOlvCEvm4jAmZi7CYH1B/kvzEzoAOzr7zkQiDPNJftcQXLkjbjA==", "dev": true, "requires": { - "@swc/core-darwin-arm64": "1.3.55", - "@swc/core-darwin-x64": "1.3.55", - "@swc/core-linux-arm-gnueabihf": "1.3.55", - "@swc/core-linux-arm64-gnu": "1.3.55", - "@swc/core-linux-arm64-musl": "1.3.55", - "@swc/core-linux-x64-gnu": "1.3.55", - "@swc/core-linux-x64-musl": "1.3.55", - "@swc/core-win32-arm64-msvc": "1.3.55", - "@swc/core-win32-ia32-msvc": "1.3.55", - "@swc/core-win32-x64-msvc": "1.3.55" + "@swc/core-darwin-arm64": "1.3.56", + "@swc/core-darwin-x64": "1.3.56", + "@swc/core-linux-arm-gnueabihf": "1.3.56", + "@swc/core-linux-arm64-gnu": "1.3.56", + "@swc/core-linux-arm64-musl": "1.3.56", + "@swc/core-linux-x64-gnu": "1.3.56", + "@swc/core-linux-x64-musl": "1.3.56", + "@swc/core-win32-arm64-msvc": "1.3.56", + "@swc/core-win32-ia32-msvc": "1.3.56", + "@swc/core-win32-x64-msvc": "1.3.56" } }, "@swc/core-darwin-arm64": { - "version": "1.3.55", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.3.55.tgz", - "integrity": "sha512-UnHC8aPg/JvHhgXxTU6EhTtfnYNS7nhq8EKB8laNPxlHbwEyMBVQ2QuJHlNCtFtvSfX/uH5l04Ld1iGXnBTfdQ==", + "version": "1.3.56", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.3.56.tgz", + "integrity": "sha512-DZcu7BzDaLEdWHabz9DRTP0yEBLqkrWmskFcD5BX0lGAvoIvE4duMnAqi5F2B3X7630QioHRCYFoRw2WkeE3Cw==", "dev": true, "optional": true }, "@swc/core-darwin-x64": { - "version": "1.3.55", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.3.55.tgz", - "integrity": "sha512-VNJkFVARrktIqtaLrD1NFA54gqekH7eAUcUY2U2SdHwO67HYjfMXMxlugLP5PDasSKpTkrVooUdhkffoA5W50g==", + "version": "1.3.56", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.3.56.tgz", + "integrity": "sha512-VH5saqYFasdRXJy6RAT+MXm0+IjkMZvOkohJwUei+oA65cKJofQwrJ1jZro8yOJFYvUSI3jgNRGsdBkmo/4hMw==", "dev": true, "optional": true }, "@swc/core-linux-arm-gnueabihf": { - "version": "1.3.55", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.3.55.tgz", - "integrity": "sha512-6OcohhIFKKNW/TpJt26Tpul8zyL7dmp1Lnyj2BX9ycsZZ5UnsNiGqn37mrqJgVTx/ansEmbyOmKu2mzm/Ct6cQ==", + "version": "1.3.56", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.3.56.tgz", + "integrity": "sha512-LWwPo6NnJkH01+ukqvkoNIOpMdw+Zundm4vBeicwyVrkP+mC3kwVfi03TUFpQUz3kRKdw/QEnxGTj+MouCPbtw==", "dev": true, "optional": true }, "@swc/core-linux-arm64-gnu": { - "version": "1.3.55", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.3.55.tgz", - "integrity": "sha512-MfZtXGBv21XWwvrSMP0CMxScDolT/iv5PRl9UBprYUehwWr7BNjA3V9W7QQ+kKoPyORWk7LX7OpJZF3FnO618Q==", + "version": "1.3.56", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.3.56.tgz", + "integrity": "sha512-GzsUy/4egJ4cMlxbM+Ub7AMi5CKAc+pxBxrh8MUPQbyStW8jGgnQsJouTnGy0LHawtdEnsCOl6PcO6OgvktXuQ==", "dev": true, "optional": true }, "@swc/core-linux-arm64-musl": { - "version": "1.3.55", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.3.55.tgz", - "integrity": "sha512-iZJo+7L5lv10W0f0C6SlyteAyMJt5Tp+aH3+nlAwKdtc+VjyL1sGhR8DJMXp2/buBRZJ9tjEtpXKDaWUdSdF7Q==", + "version": "1.3.56", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.3.56.tgz", + "integrity": "sha512-9gxL09BIiAv8zY0DjfnFf19bo8+P4T9tdhzPwcm+1yPJcY5yr1+YFWLNFzz01agtOj6VlZ2/wUJTaOfdjjtc+A==", "dev": true, "optional": true }, "@swc/core-linux-x64-gnu": { - "version": "1.3.55", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.3.55.tgz", - "integrity": "sha512-Rmc8ny/mslzzz0+wNK9/mLdyAWVbMZHRSvljhpzASmq48NBkmZ5vk9/WID6MnUz2e9cQ0JxJQs8t39KlFJtW3g==", + "version": "1.3.56", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.3.56.tgz", + "integrity": "sha512-n0ORNknl50vMRkll3BDO1E4WOqY6iISlPV1ZQCRLWQ6YQ2q8/WAryBxc2OAybcGHBUFkxyACpJukeU1QZ/9tNw==", "dev": true, "optional": true }, "@swc/core-linux-x64-musl": { - "version": "1.3.55", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.3.55.tgz", - "integrity": "sha512-Ymoc4xxINzS93ZjVd2UZfLZk1jF6wHjdCbC1JF+0zK3IrNrxCIDoWoaAj0+Bbvyo3hD1Xg/cneSTsqX8amnnuQ==", + "version": "1.3.56", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.3.56.tgz", + "integrity": "sha512-r+D34WLAOAlJtfw1gaVWpHRwCncU9nzW9i7w9kSw4HpWYnHJOz54jLGSEmNsrhdTCz1VK2ar+V2ktFUsrlGlDA==", "dev": true, "optional": true }, "@swc/core-win32-arm64-msvc": { - "version": "1.3.55", - "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.3.55.tgz", - "integrity": "sha512-OhnmFstq2qRU2GI5I0G/8L+vc2rx8+w+IOA6EZBrY4FuMCbPIZKKzlnAIxYn2W+yD4gvBzYP3tgEcaDfQk6EkA==", + "version": "1.3.56", + "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.3.56.tgz", + "integrity": "sha512-29Yt75Is6X24z3x8h/xZC1HnDPkPpyLH9mDQiM6Cuc0I9mVr1XSriPEUB2N/awf5IE4SA8c+3IVq1DtKWbkJIw==", "dev": true, "optional": true }, "@swc/core-win32-ia32-msvc": { - "version": "1.3.55", - "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.3.55.tgz", - "integrity": "sha512-3VR5rHZ6uoL/Vo3djV30GgX2oyDwWWsk+Yp+nyvYyBaKYiH2zeHfxdYRLSQV3W7kSlCAH3oDYpSljrWZ0t5XEQ==", + "version": "1.3.56", + "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.3.56.tgz", + "integrity": "sha512-mplp0zbYDrcHtfvkniXlXdB04e2qIjz2Gq/XHKr4Rnc6xVORJjjXF91IemXKpavx2oZYJws+LNJL7UFQ8jyCdQ==", "dev": true, "optional": true }, "@swc/core-win32-x64-msvc": { - "version": "1.3.55", - "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.3.55.tgz", - "integrity": "sha512-KBtMFtRwnbxBugYf6i2ePqEGdxsk715KcqGMjGhxNg7BTACnXnhj37irHu2e7A7wZffbkUVUYuj/JEgVkEjSxg==", + "version": "1.3.56", + "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.3.56.tgz", + "integrity": "sha512-zp8MBnrw/bjdLenO/ifYzHrImSjKunqL0C2IF4LXYNRfcbYFh2NwobsVQMZ20IT0474lKRdlP8Oxdt+bHuXrzA==", "dev": true, "optional": true }, @@ -18932,7 +18932,7 @@ "version": "file:integrations/vite", "requires": { "isomorphic-fetch": "^3.0.0", - "vite": "^4.3.2" + "vite": "4.3.4" } }, "@tailwindcss/integrations-webpack-4": { @@ -27072,7 +27072,7 @@ "requires": { "@alloc/quick-lru": "^5.2.0", "@swc/cli": "^0.1.62", - "@swc/core": "^1.3.55", + "@swc/core": "^1.3.56", "@swc/jest": "^0.2.26", "@swc/register": "^0.1.10", "@tailwindcss/integrations-content-resolution": "file:integrations/content-resolution", @@ -29409,90 +29409,90 @@ } }, "@swc/core": { - "version": "1.3.55", - "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.3.55.tgz", - "integrity": "sha512-w/lN3OuJsuy868yJZKop+voZLVzI5pVSoopQVtgDNkEzejnPuRp9XaeAValvuMaWqKoTMtOjLzEPyv/xiAGYQQ==", + "version": "1.3.56", + "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.3.56.tgz", + "integrity": "sha512-yz/EeXT+PMZucUNrYceRUaTfuNS4IIu5EDZSOlvCEvm4jAmZi7CYH1B/kvzEzoAOzr7zkQiDPNJftcQXLkjbjA==", "dev": true, "requires": { - "@swc/core-darwin-arm64": "1.3.55", - "@swc/core-darwin-x64": "1.3.55", - "@swc/core-linux-arm-gnueabihf": "1.3.55", - "@swc/core-linux-arm64-gnu": "1.3.55", - "@swc/core-linux-arm64-musl": "1.3.55", - "@swc/core-linux-x64-gnu": "1.3.55", - "@swc/core-linux-x64-musl": "1.3.55", - "@swc/core-win32-arm64-msvc": "1.3.55", - "@swc/core-win32-ia32-msvc": "1.3.55", - "@swc/core-win32-x64-msvc": "1.3.55" + "@swc/core-darwin-arm64": "1.3.56", + "@swc/core-darwin-x64": "1.3.56", + "@swc/core-linux-arm-gnueabihf": "1.3.56", + "@swc/core-linux-arm64-gnu": "1.3.56", + "@swc/core-linux-arm64-musl": "1.3.56", + "@swc/core-linux-x64-gnu": "1.3.56", + "@swc/core-linux-x64-musl": "1.3.56", + "@swc/core-win32-arm64-msvc": "1.3.56", + "@swc/core-win32-ia32-msvc": "1.3.56", + "@swc/core-win32-x64-msvc": "1.3.56" } }, "@swc/core-darwin-arm64": { - "version": "1.3.55", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.3.55.tgz", - "integrity": "sha512-UnHC8aPg/JvHhgXxTU6EhTtfnYNS7nhq8EKB8laNPxlHbwEyMBVQ2QuJHlNCtFtvSfX/uH5l04Ld1iGXnBTfdQ==", + "version": "1.3.56", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.3.56.tgz", + "integrity": "sha512-DZcu7BzDaLEdWHabz9DRTP0yEBLqkrWmskFcD5BX0lGAvoIvE4duMnAqi5F2B3X7630QioHRCYFoRw2WkeE3Cw==", "dev": true, "optional": true }, "@swc/core-darwin-x64": { - "version": "1.3.55", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.3.55.tgz", - "integrity": "sha512-VNJkFVARrktIqtaLrD1NFA54gqekH7eAUcUY2U2SdHwO67HYjfMXMxlugLP5PDasSKpTkrVooUdhkffoA5W50g==", + "version": "1.3.56", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.3.56.tgz", + "integrity": "sha512-VH5saqYFasdRXJy6RAT+MXm0+IjkMZvOkohJwUei+oA65cKJofQwrJ1jZro8yOJFYvUSI3jgNRGsdBkmo/4hMw==", "dev": true, "optional": true }, "@swc/core-linux-arm-gnueabihf": { - "version": "1.3.55", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.3.55.tgz", - "integrity": "sha512-6OcohhIFKKNW/TpJt26Tpul8zyL7dmp1Lnyj2BX9ycsZZ5UnsNiGqn37mrqJgVTx/ansEmbyOmKu2mzm/Ct6cQ==", + "version": "1.3.56", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.3.56.tgz", + "integrity": "sha512-LWwPo6NnJkH01+ukqvkoNIOpMdw+Zundm4vBeicwyVrkP+mC3kwVfi03TUFpQUz3kRKdw/QEnxGTj+MouCPbtw==", "dev": true, "optional": true }, "@swc/core-linux-arm64-gnu": { - "version": "1.3.55", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.3.55.tgz", - "integrity": "sha512-MfZtXGBv21XWwvrSMP0CMxScDolT/iv5PRl9UBprYUehwWr7BNjA3V9W7QQ+kKoPyORWk7LX7OpJZF3FnO618Q==", + "version": "1.3.56", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.3.56.tgz", + "integrity": "sha512-GzsUy/4egJ4cMlxbM+Ub7AMi5CKAc+pxBxrh8MUPQbyStW8jGgnQsJouTnGy0LHawtdEnsCOl6PcO6OgvktXuQ==", "dev": true, "optional": true }, "@swc/core-linux-arm64-musl": { - "version": "1.3.55", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.3.55.tgz", - "integrity": "sha512-iZJo+7L5lv10W0f0C6SlyteAyMJt5Tp+aH3+nlAwKdtc+VjyL1sGhR8DJMXp2/buBRZJ9tjEtpXKDaWUdSdF7Q==", + "version": "1.3.56", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.3.56.tgz", + "integrity": "sha512-9gxL09BIiAv8zY0DjfnFf19bo8+P4T9tdhzPwcm+1yPJcY5yr1+YFWLNFzz01agtOj6VlZ2/wUJTaOfdjjtc+A==", "dev": true, "optional": true }, "@swc/core-linux-x64-gnu": { - "version": "1.3.55", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.3.55.tgz", - "integrity": "sha512-Rmc8ny/mslzzz0+wNK9/mLdyAWVbMZHRSvljhpzASmq48NBkmZ5vk9/WID6MnUz2e9cQ0JxJQs8t39KlFJtW3g==", + "version": "1.3.56", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.3.56.tgz", + "integrity": "sha512-n0ORNknl50vMRkll3BDO1E4WOqY6iISlPV1ZQCRLWQ6YQ2q8/WAryBxc2OAybcGHBUFkxyACpJukeU1QZ/9tNw==", "dev": true, "optional": true }, "@swc/core-linux-x64-musl": { - "version": "1.3.55", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.3.55.tgz", - "integrity": "sha512-Ymoc4xxINzS93ZjVd2UZfLZk1jF6wHjdCbC1JF+0zK3IrNrxCIDoWoaAj0+Bbvyo3hD1Xg/cneSTsqX8amnnuQ==", + "version": "1.3.56", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.3.56.tgz", + "integrity": "sha512-r+D34WLAOAlJtfw1gaVWpHRwCncU9nzW9i7w9kSw4HpWYnHJOz54jLGSEmNsrhdTCz1VK2ar+V2ktFUsrlGlDA==", "dev": true, "optional": true }, "@swc/core-win32-arm64-msvc": { - "version": "1.3.55", - "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.3.55.tgz", - "integrity": "sha512-OhnmFstq2qRU2GI5I0G/8L+vc2rx8+w+IOA6EZBrY4FuMCbPIZKKzlnAIxYn2W+yD4gvBzYP3tgEcaDfQk6EkA==", + "version": "1.3.56", + "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.3.56.tgz", + "integrity": "sha512-29Yt75Is6X24z3x8h/xZC1HnDPkPpyLH9mDQiM6Cuc0I9mVr1XSriPEUB2N/awf5IE4SA8c+3IVq1DtKWbkJIw==", "dev": true, "optional": true }, "@swc/core-win32-ia32-msvc": { - "version": "1.3.55", - "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.3.55.tgz", - "integrity": "sha512-3VR5rHZ6uoL/Vo3djV30GgX2oyDwWWsk+Yp+nyvYyBaKYiH2zeHfxdYRLSQV3W7kSlCAH3oDYpSljrWZ0t5XEQ==", + "version": "1.3.56", + "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.3.56.tgz", + "integrity": "sha512-mplp0zbYDrcHtfvkniXlXdB04e2qIjz2Gq/XHKr4Rnc6xVORJjjXF91IemXKpavx2oZYJws+LNJL7UFQ8jyCdQ==", "dev": true, "optional": true }, "@swc/core-win32-x64-msvc": { - "version": "1.3.55", - "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.3.55.tgz", - "integrity": "sha512-KBtMFtRwnbxBugYf6i2ePqEGdxsk715KcqGMjGhxNg7BTACnXnhj37irHu2e7A7wZffbkUVUYuj/JEgVkEjSxg==", + "version": "1.3.56", + "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.3.56.tgz", + "integrity": "sha512-zp8MBnrw/bjdLenO/ifYzHrImSjKunqL0C2IF4LXYNRfcbYFh2NwobsVQMZ20IT0474lKRdlP8Oxdt+bHuXrzA==", "dev": true, "optional": true }, @@ -29582,7 +29582,7 @@ "version": "file:integrations/vite", "requires": { "isomorphic-fetch": "^3.0.0", - "vite": "^4.3.2" + "vite": "4.3.4" } }, "@tailwindcss/integrations-webpack-4": { @@ -38282,14 +38282,14 @@ } }, "vite": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/vite/-/vite-4.3.2.tgz", - "integrity": "sha512-9R53Mf+TBoXCYejcL+qFbZde+eZveQLDYd9XgULILLC1a5ZwPaqgmdVpL8/uvw2BM/1TzetWjglwm+3RO+xTyw==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.3.4.tgz", + "integrity": "sha512-f90aqGBoxSFxWph2b39ae2uHAxm5jFBBdnfueNxZAT1FTpM13ccFQExCaKbR2xFW5atowjleRniQ7onjJ22QEg==", "dev": true, "requires": { "esbuild": "^0.17.5", "fsevents": "~2.3.2", - "postcss": "^8.4.21", + "postcss": "^8.4.23", "rollup": "^3.21.0" } }, @@ -39478,14 +39478,14 @@ } }, "vite": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/vite/-/vite-4.3.2.tgz", - "integrity": "sha512-9R53Mf+TBoXCYejcL+qFbZde+eZveQLDYd9XgULILLC1a5ZwPaqgmdVpL8/uvw2BM/1TzetWjglwm+3RO+xTyw==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.3.4.tgz", + "integrity": "sha512-f90aqGBoxSFxWph2b39ae2uHAxm5jFBBdnfueNxZAT1FTpM13ccFQExCaKbR2xFW5atowjleRniQ7onjJ22QEg==", "dev": true, "requires": { "esbuild": "^0.17.5", "fsevents": "~2.3.2", - "postcss": "^8.4.21", + "postcss": "^8.4.23", "rollup": "^3.21.0" } }, From e4ddda6273b64b2362b9a70e3f2a216a0eb0a291 Mon Sep 17 00:00:00 2001 From: "depfu[bot]" <23717796+depfu[bot]@users.noreply.github.com> Date: Sat, 6 May 2023 13:56:05 +0000 Subject: [PATCH 14/25] Update postcss-selector-parser to version 6.0.12 --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 15ea0e6a00dc..d2cce2de66c7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -119,7 +119,7 @@ "version": "0.0.0", "devDependencies": { "isomorphic-fetch": "^3.0.0", - "vite": "4.3.4" + "vite": "^4.3.4" } }, "integrations/webpack-4": { @@ -18932,7 +18932,7 @@ "version": "file:integrations/vite", "requires": { "isomorphic-fetch": "^3.0.0", - "vite": "4.3.4" + "vite": "^4.3.4" } }, "@tailwindcss/integrations-webpack-4": { @@ -29582,7 +29582,7 @@ "version": "file:integrations/vite", "requires": { "isomorphic-fetch": "^3.0.0", - "vite": "4.3.4" + "vite": "^4.3.4" } }, "@tailwindcss/integrations-webpack-4": { diff --git a/package.json b/package.json index 2a68dd423732..476615caffb0 100644 --- a/package.json +++ b/package.json @@ -89,7 +89,7 @@ "postcss-js": "^4.0.1", "postcss-load-config": "^4.0.1", "postcss-nested": "^6.0.1", - "postcss-selector-parser": "^6.0.11", + "postcss-selector-parser": "^6.0.12", "postcss-value-parser": "^4.2.0", "resolve": "^1.22.3", "sucrase": "^3.32.0" From cdbcefc232987c69141450951599169631332dde Mon Sep 17 00:00:00 2001 From: "depfu[bot]" <23717796+depfu[bot]@users.noreply.github.com> Date: Sun, 7 May 2023 09:41:05 +0000 Subject: [PATCH 15/25] Update cssnano to version 6.0.1 --- package-lock.json | 17 +++++++++++------ package.json | 2 +- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index d2cce2de66c7..0aac135a24f8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -35,7 +35,7 @@ "postcss-js": "^4.0.1", "postcss-load-config": "^4.0.1", "postcss-nested": "^6.0.1", - "postcss-selector-parser": "^6.0.11", + "postcss-selector-parser": "^6.0.12", "postcss-value-parser": "^4.2.0", "resolve": "^1.22.3", "sucrase": "^3.32.0" @@ -12596,8 +12596,9 @@ } }, "node_modules/postcss-selector-parser": { - "version": "6.0.11", - "license": "MIT", + "version": "6.0.12", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.12.tgz", + "integrity": "sha512-NdxGCAZdRrwVI1sy59+Wzrh+pMMHxapGnpfenDVlMEXoOcvt4pGE0JLK9YY2F5dLxcFYA/YbVQKhcGU+FtSYQg==", "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" @@ -25441,7 +25442,9 @@ } }, "postcss-selector-parser": { - "version": "6.0.11", + "version": "6.0.12", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.12.tgz", + "integrity": "sha512-NdxGCAZdRrwVI1sy59+Wzrh+pMMHxapGnpfenDVlMEXoOcvt4pGE0JLK9YY2F5dLxcFYA/YbVQKhcGU+FtSYQg==", "requires": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" @@ -27114,7 +27117,7 @@ "postcss-js": "^4.0.1", "postcss-load-config": "^4.0.1", "postcss-nested": "^6.0.1", - "postcss-selector-parser": "^6.0.11", + "postcss-selector-parser": "^6.0.12", "postcss-value-parser": "^4.2.0", "prettier": "^2.8.8", "resolve": "^1.22.3", @@ -36091,7 +36094,9 @@ } }, "postcss-selector-parser": { - "version": "6.0.11", + "version": "6.0.12", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.12.tgz", + "integrity": "sha512-NdxGCAZdRrwVI1sy59+Wzrh+pMMHxapGnpfenDVlMEXoOcvt4pGE0JLK9YY2F5dLxcFYA/YbVQKhcGU+FtSYQg==", "requires": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" diff --git a/package.json b/package.json index 476615caffb0..d74c2dcae103 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ "@swc/register": "^0.1.10", "autoprefixer": "^10.4.14", "concurrently": "^8.0.1", - "cssnano": "^6.0.0", + "cssnano": "^6.0.1", "esbuild": "^0.17.18", "eslint": "^8.39.0", "eslint-config-prettier": "^8.8.0", From 3e1d1fba99b531f2fd9c9bb94414e0131c157855 Mon Sep 17 00:00:00 2001 From: Robin Malfait Date: Wed, 10 May 2023 19:44:03 +0200 Subject: [PATCH 16/25] Support `@import "tailwindcss"` using top-level `index.css` file (#11205) * make `@import "tailwindcss"` work out of the box * update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 621f41c1e3f7..c8783d7745ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - [Oxide] Use `lightningcss` for nesting and vendor prefixes in PostCSS plugin ([#10399](https://github.com/tailwindlabs/tailwindcss/pull/10399)) +- Support `@import "tailwindcss"` using top-level `index.css` file ([#11205](https://github.com/tailwindlabs/tailwindcss/pull/11205)) ### Changed From f2494851881399fb29e0ab9c7b3df7a68eae7eb2 Mon Sep 17 00:00:00 2001 From: Brandon McConnell Date: Thu, 11 May 2023 13:59:43 -0700 Subject: [PATCH 17/25] Add support for dimension prefix when using dynamic `min-*` and `max-*` --- src/util/buildMediaQuery.js | 27 ++++++- tests/min-max-screen-variants.test.js | 102 ++++++++++++++++++++++++++ 2 files changed, 127 insertions(+), 2 deletions(-) diff --git a/src/util/buildMediaQuery.js b/src/util/buildMediaQuery.js index 8489dd4bc9f4..8b07ae95a59d 100644 --- a/src/util/buildMediaQuery.js +++ b/src/util/buildMediaQuery.js @@ -1,3 +1,23 @@ +/** + * @param {string} value + * @returns {[string, string]} + */ +export function splitVariantPrefix(value) { + if (typeof value !== 'string') return ['', value] + let parts = value.split(':') + return ['', ...parts].slice(-2) +} + +/** + * @param {string} value + * @returns {[string, string]} + */ +function splitDimensionPrefix(value) { + const [prefix, extractedValue] = splitVariantPrefix(value) + const dimension = prefix === 'h' ? 'height' : 'width' + return [dimension, extractedValue] +} + export default function buildMediaQuery(screens) { screens = Array.isArray(screens) ? screens : [screens] @@ -8,9 +28,12 @@ export default function buildMediaQuery(screens) { return screen.raw } + let [minDimension, minValue] = splitDimensionPrefix(screen.min) + let [maxDimension, maxValue] = splitDimensionPrefix(screen.max) + return [ - screen.min && `(min-width: ${screen.min})`, - screen.max && `(max-width: ${screen.max})`, + minValue && `(min-${minDimension}: ${minValue})`, + maxValue && `(max-${maxDimension}: ${maxValue})`, ] .filter(Boolean) .join(' and ') diff --git a/tests/min-max-screen-variants.test.js b/tests/min-max-screen-variants.test.js index a86c6f6cd201..dbd8ec621f7a 100644 --- a/tests/min-max-screen-variants.test.js +++ b/tests/min-max-screen-variants.test.js @@ -261,6 +261,108 @@ crosscheck(() => { }) }) + it('supports min-* and max-* variants with or without arbitrary dimension prefixes', () => { + let config = { + content: [ + { + raw: html` +
+ `, + }, + ], + corePlugins: { preflight: false }, + theme: { + screens: defaultScreens, + }, + } + + let input = css` + @tailwind utilities; + ` + + return run(input, config).then((result) => { + expect(result.css).toMatchFormattedCss(css` + .font-bold { + font-weight: 700; + } + @media (max-width: 100px) { + .max-\[100px\]\:font-bold { + font-weight: 700; + } + } + @media (max-height: 100px) { + .max-\[h\:100px\]\:font-bold { + font-weight: 700; + } + } + @media (max-width: 100px) { + .max-\[w\:100px\]\:font-bold { + font-weight: 700; + } + } + @media (min-width: 100px) { + .min-\[100px\]\:font-bold { + font-weight: 700; + } + } + @media (min-height: 100px) { + .min-\[h\:100px\]\:font-bold { + font-weight: 700; + } + } + @media (min-width: 100px) { + .min-\[w\:100px\]\:font-bold { + font-weight: 700; + } + } + `) + }) + }) + + it('supports min-* and max-* variants being used together with or without arbitrary dimension prefixes', () => { + let config = { + content: [ + { + raw: html` +
+ `, + }, + ], + corePlugins: { preflight: false }, + theme: { + screens: defaultScreens, + }, + } + + let input = css` + @tailwind utilities; + ` + + return run(input, config).then((result) => { + expect(result.css).toMatchFormattedCss(css` + @media (min-width: 100px) { + @media (min-width: 100px) { + @media (min-height: 100px) { + @media (max-width: 100px) { + @media (max-width: 100px) { + @media (max-height: 100px) { + .min-\[100px\]\:min-\[w\:100px\]\:min-\[h\:100px\]\:max-\[100px\]\:max-\[w\:100px\]\:max-\[h\:100px\]\:font-bold { + font-weight: 700; + } + } + } + } + } + } + } + `) + }) + }) + it('warns when using min variants with complex screen configs', async () => { let config = { content: [ From cf32d978d6451e5b04f88e3f98102daf9bb33049 Mon Sep 17 00:00:00 2001 From: Brandon McConnell Date: Thu, 11 May 2023 14:47:12 -0700 Subject: [PATCH 18/25] Reset changelog --- CHANGELOG.md | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c8783d7745ce..8b34d89e718d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,10 +7,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] -### Added - -- [Oxide] Use `lightningcss` for nesting and vendor prefixes in PostCSS plugin ([#10399](https://github.com/tailwindlabs/tailwindcss/pull/10399)) - ### Fixed - Fix issue where some pseudo-element variants generated the wrong selector ([#10943](https://github.com/tailwindlabs/tailwindcss/pull/10943), [#10962](https://github.com/tailwindlabs/tailwindcss/pull/10962)) @@ -56,16 +52,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Drop support for Node.js v12 ([#11089](https://github.com/tailwindlabs/tailwindcss/pull/11089)) -### Changed - -- [Oxide] Disable color opacity plugins by default in the `oxide` engine ([#10618](https://github.com/tailwindlabs/tailwindcss/pull/10618)) -- [Oxide] Enable relative content paths for the `oxide` engine ([#10621](https://github.com/tailwindlabs/tailwindcss/pull/10621)) - -### Changed - -- [Oxide] Disable color opacity plugins by default in the `oxide` engine ([#10618](https://github.com/tailwindlabs/tailwindcss/pull/10618)) -- [Oxide] Enable relative content paths for the `oxide` engine ([#10621](https://github.com/tailwindlabs/tailwindcss/pull/10621)) - ## [3.3.1] - 2023-03-30 ### Fixed @@ -76,11 +62,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fix build errors caused by `@tailwindcss/line-clamp` warning ([#10915](https://github.com/tailwindlabs/tailwindcss/pull/10915), [#10919](https://github.com/tailwindlabs/tailwindcss/pull/10919)) - Fix "process is not defined" error ([#10919](https://github.com/tailwindlabs/tailwindcss/pull/10919)) -### Changed - -- [Oxide] Disable color opacity plugins by default in the `oxide` engine ([#10618](https://github.com/tailwindlabs/tailwindcss/pull/10618)) -- [Oxide] Enable relative content paths for the `oxide` engine ([#10621](https://github.com/tailwindlabs/tailwindcss/pull/10621)) - ## [3.3.0] - 2023-03-27 ### Added From 265b48435b31936869b474e62c7fbf1cbcd099cb Mon Sep 17 00:00:00 2001 From: Brandon McConnell Date: Sat, 13 May 2023 08:30:39 -0700 Subject: [PATCH 19/25] Account for dimension prefix in sorting --- src/util/buildMediaQuery.js | 20 +----------- src/util/normalizeScreens.js | 10 +++--- src/util/splitDimensionPrefix.js | 11 +++++++ src/util/splitVariantPrefix.js | 9 ++++++ tests/min-max-screen-variants.test.js | 44 ++++++++++++++++++++++++++- 5 files changed, 70 insertions(+), 24 deletions(-) create mode 100644 src/util/splitDimensionPrefix.js create mode 100644 src/util/splitVariantPrefix.js diff --git a/src/util/buildMediaQuery.js b/src/util/buildMediaQuery.js index 8b07ae95a59d..e14f558d0fbd 100644 --- a/src/util/buildMediaQuery.js +++ b/src/util/buildMediaQuery.js @@ -1,22 +1,4 @@ -/** - * @param {string} value - * @returns {[string, string]} - */ -export function splitVariantPrefix(value) { - if (typeof value !== 'string') return ['', value] - let parts = value.split(':') - return ['', ...parts].slice(-2) -} - -/** - * @param {string} value - * @returns {[string, string]} - */ -function splitDimensionPrefix(value) { - const [prefix, extractedValue] = splitVariantPrefix(value) - const dimension = prefix === 'h' ? 'height' : 'width' - return [dimension, extractedValue] -} +import { splitDimensionPrefix } from './splitDimensionPrefix' export default function buildMediaQuery(screens) { screens = Array.isArray(screens) ? screens : [screens] diff --git a/src/util/normalizeScreens.js b/src/util/normalizeScreens.js index 559f7ccb6913..dc32feb318b0 100644 --- a/src/util/normalizeScreens.js +++ b/src/util/normalizeScreens.js @@ -1,3 +1,5 @@ +import { splitDimensionPrefix } from './splitDimensionPrefix' + /** * @typedef {object} ScreenValue * @property {number|undefined} min @@ -108,10 +110,10 @@ export function compareScreens(type, a, z) { if (a.not) [aMin, aMax] = [aMax, aMin] if (z.not) [zMin, zMax] = [zMax, zMin] - aMin = aMin === undefined ? aMin : parseFloat(aMin) - aMax = aMax === undefined ? aMax : parseFloat(aMax) - zMin = zMin === undefined ? zMin : parseFloat(zMin) - zMax = zMax === undefined ? zMax : parseFloat(zMax) + aMin = aMin === undefined ? aMin : parseFloat(splitDimensionPrefix(aMin)[1]) + aMax = aMax === undefined ? aMax : parseFloat(splitDimensionPrefix(aMax)[1]) + zMin = zMin === undefined ? zMin : parseFloat(splitDimensionPrefix(zMin)[1]) + zMax = zMax === undefined ? zMax : parseFloat(splitDimensionPrefix(zMax)[1]) let [aValue, zValue] = type === 'min' ? [aMin, zMin] : [zMax, aMax] diff --git a/src/util/splitDimensionPrefix.js b/src/util/splitDimensionPrefix.js new file mode 100644 index 000000000000..b2b1039f2f27 --- /dev/null +++ b/src/util/splitDimensionPrefix.js @@ -0,0 +1,11 @@ +import { splitVariantPrefix } from './splitVariantPrefix' + +/** + * @param {string} value + * @returns {[string, string]} + */ +export function splitDimensionPrefix(value) { + const [prefix, extractedValue] = splitVariantPrefix(value) + const dimension = prefix === 'h' ? 'height' : 'width' + return [dimension, extractedValue] +} diff --git a/src/util/splitVariantPrefix.js b/src/util/splitVariantPrefix.js new file mode 100644 index 000000000000..1b9b478a8c40 --- /dev/null +++ b/src/util/splitVariantPrefix.js @@ -0,0 +1,9 @@ +/** + * @param {string} value + * @returns {[string, string]} + */ +export function splitVariantPrefix(value) { + if (typeof value !== 'string') return ['', value] + let parts = value.split(':') + return ['', ...parts].slice(-2) +} diff --git a/tests/min-max-screen-variants.test.js b/tests/min-max-screen-variants.test.js index dbd8ec621f7a..3939958de9b6 100644 --- a/tests/min-max-screen-variants.test.js +++ b/tests/min-max-screen-variants.test.js @@ -321,7 +321,7 @@ crosscheck(() => { }) }) - it('supports min-* and max-* variants being used together with or without arbitrary dimension prefixes', () => { + it('supports min-* and max-* variants being chained together with or without arbitrary dimension prefixes', () => { let config = { content: [ { @@ -363,6 +363,48 @@ crosscheck(() => { }) }) + it('supports proper sorting of min-* and max-* variants with arbitrary dimension prefixes', () => { + let config = { + content: [ + { + raw: html` +
+ `, + }, + ], + corePlugins: { preflight: false }, + theme: { + screens: defaultScreens, + }, + } + + let input = css` + @tailwind utilities; + ` + + return run(input, config).then((result) => { + expect(result.css).toMatchFormattedCss(css` + @media (min-height: 50px) { + .min-\[h\:50px\]\:font-bold { + font-weight: 700; + } + } + @media (min-height: 100px) { + .min-\[h\:100px\]\:font-bold { + font-weight: 700; + } + } + @media (min-height: 200px) { + .min-\[h\:200px\]\:font-bold { + font-weight: 700; + } + } + `) + }) + }) + it('warns when using min variants with complex screen configs', async () => { let config = { content: [ From abca6afca8da96aa7363f970432010b0ef978868 Mon Sep 17 00:00:00 2001 From: Brandon McConnell Date: Sat, 13 May 2023 09:08:37 -0700 Subject: [PATCH 20/25] Reset diffed files to origin state --- CHANGELOG.md | 10 ---------- oxide/crates/core/src/lib.rs | 19 ------------------- 2 files changed, 29 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b34d89e718d..69a7e2cb9a58 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,16 +27,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [Oxide] Disable color opacity plugins by default in the `oxide` engine ([#10618](https://github.com/tailwindlabs/tailwindcss/pull/10618)) - [Oxide] Enable relative content paths for the `oxide` engine ([#10621](https://github.com/tailwindlabs/tailwindcss/pull/10621)) -### Added - -- [Oxide] Use `lightningcss` for nesting and vendor prefixes in PostCSS plugin ([#10399](https://github.com/tailwindlabs/tailwindcss/pull/10399)) -- Support `@import "tailwindcss"` using top-level `index.css` file ([#11205](https://github.com/tailwindlabs/tailwindcss/pull/11205)) - -### Changed - -- [Oxide] Disable color opacity plugins by default in the `oxide` engine ([#10618](https://github.com/tailwindlabs/tailwindcss/pull/10618)) -- [Oxide] Enable relative content paths for the `oxide` engine ([#10621](https://github.com/tailwindlabs/tailwindcss/pull/10621)) - ## [3.3.2] - 2023-04-25 ### Fixed diff --git a/oxide/crates/core/src/lib.rs b/oxide/crates/core/src/lib.rs index e87a37345df9..6601267fd27c 100644 --- a/oxide/crates/core/src/lib.rs +++ b/oxide/crates/core/src/lib.rs @@ -294,7 +294,6 @@ pub fn is_allowed_content_path(path: &Path) -> bool { { return false; } -} // Skip known ignored extensions return path @@ -394,24 +393,6 @@ fn read_all_files_sync(changed_content: Vec) -> Vec> { .collect() } -#[tracing::instrument(skip(changed_content))] -fn read_all_files_sync(changed_content: Vec) -> Vec> { - event!( - tracing::Level::INFO, - "Reading {:?} file(s)", - changed_content.len() - ); - - changed_content - .into_iter() - .map(|c| match (c.file, c.content) { - (Some(file), None) => std::fs::read(file).unwrap(), - (None, Some(content)) => content.into_bytes(), - _ => Default::default(), - }) - .collect() -} - #[tracing::instrument(skip(blobs))] fn parse_all_blobs(blobs: Vec>) -> Vec { let input: Vec<_> = blobs.iter().map(|blob| &blob[..]).collect(); From f183490d8a366bf728493d497636b0467fab5350 Mon Sep 17 00:00:00 2001 From: Brandon McConnell Date: Sat, 13 May 2023 12:55:00 -0700 Subject: [PATCH 21/25] Sort by dimension before numeric value --- src/util/normalizeScreens.js | 19 ++++++++++------ tests/min-max-screen-variants.test.js | 31 ++++++++++++++++----------- 2 files changed, 31 insertions(+), 19 deletions(-) diff --git a/src/util/normalizeScreens.js b/src/util/normalizeScreens.js index dc32feb318b0..0d5d7960c0b4 100644 --- a/src/util/normalizeScreens.js +++ b/src/util/normalizeScreens.js @@ -110,14 +110,19 @@ export function compareScreens(type, a, z) { if (a.not) [aMin, aMax] = [aMax, aMin] if (z.not) [zMin, zMax] = [zMax, zMin] - aMin = aMin === undefined ? aMin : parseFloat(splitDimensionPrefix(aMin)[1]) - aMax = aMax === undefined ? aMax : parseFloat(splitDimensionPrefix(aMax)[1]) - zMin = zMin === undefined ? zMin : parseFloat(splitDimensionPrefix(zMin)[1]) - zMax = zMax === undefined ? zMax : parseFloat(splitDimensionPrefix(zMax)[1]) - - let [aValue, zValue] = type === 'min' ? [aMin, zMin] : [zMax, aMax] + // We compare the values associated with the current type (`min` or `max`) + let [[aDimension, aValue], [zDimension, zValue]] = ( + type === 'min' ? [aMin, zMin] : [zMax, aMax] + ).map((value) => splitDimensionPrefix(value)) + + // Sort by dimension first (e.g. width vs height) + let dimensionComparison = aDimension.localeCompare(zDimension) + if (dimensionComparison !== 0) { + return dimensionComparison + } - return aValue - zValue + // Sort by value second (e.g. "100px" -> `100` vs "200px" -> `200`) + return parseFloat(aValue) - parseFloat(zValue) } /** diff --git a/tests/min-max-screen-variants.test.js b/tests/min-max-screen-variants.test.js index 3939958de9b6..67b0dbdc188b 100644 --- a/tests/min-max-screen-variants.test.js +++ b/tests/min-max-screen-variants.test.js @@ -288,7 +288,8 @@ crosscheck(() => { font-weight: 700; } @media (max-width: 100px) { - .max-\[100px\]\:font-bold { + .max-\[100px\]\:font-bold, + .max-\[w\:100px\]\:font-bold { font-weight: 700; } } @@ -297,22 +298,13 @@ crosscheck(() => { font-weight: 700; } } - @media (max-width: 100px) { - .max-\[w\:100px\]\:font-bold { - font-weight: 700; - } - } - @media (min-width: 100px) { - .min-\[100px\]\:font-bold { - font-weight: 700; - } - } @media (min-height: 100px) { .min-\[h\:100px\]\:font-bold { font-weight: 700; } } @media (min-width: 100px) { + .min-\[100px\]\:font-bold, .min-\[w\:100px\]\:font-bold { font-weight: 700; } @@ -369,7 +361,7 @@ crosscheck(() => { { raw: html`
`, }, @@ -386,6 +378,16 @@ crosscheck(() => { return run(input, config).then((result) => { expect(result.css).toMatchFormattedCss(css` + @media (max-width: 150px) { + .max-\[150px\]\:font-bold { + font-weight: 700; + } + } + @media (max-height: 125px) { + .max-\[h\:125px\]\:font-bold { + font-weight: 700; + } + } @media (min-height: 50px) { .min-\[h\:50px\]\:font-bold { font-weight: 700; @@ -401,6 +403,11 @@ crosscheck(() => { font-weight: 700; } } + @media (min-width: 75px) { + .min-\[75px\]\:font-bold { + font-weight: 700; + } + } `) }) }) From bf49fdd96ee7c716462cd6e48a1655c38e1cf20a Mon Sep 17 00:00:00 2001 From: Brandon McConnell Date: Sat, 13 May 2023 13:03:12 -0700 Subject: [PATCH 22/25] Simplify and consolidate the `compareScreens` return statements --- src/util/normalizeScreens.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/util/normalizeScreens.js b/src/util/normalizeScreens.js index 0d5d7960c0b4..87569325958e 100644 --- a/src/util/normalizeScreens.js +++ b/src/util/normalizeScreens.js @@ -115,14 +115,14 @@ export function compareScreens(type, a, z) { type === 'min' ? [aMin, zMin] : [zMax, aMax] ).map((value) => splitDimensionPrefix(value)) - // Sort by dimension first (e.g. width vs height) - let dimensionComparison = aDimension.localeCompare(zDimension) - if (dimensionComparison !== 0) { - return dimensionComparison - } + // Compare dimensions (e.g. "height" or "width" alphabetically) + const dimensionComparison = aDimension.localeCompare(zDimension) + + // Compare dimensions (e.g. "100px" and "200px" -> `100 - 200`) + const valueComparison = parseFloat(aValue) - parseFloat(zValue) - // Sort by value second (e.g. "100px" -> `100` vs "200px" -> `200`) - return parseFloat(aValue) - parseFloat(zValue) + // Sort by dimension first, then by value (if dimensions are the same) + return dimensionComparison || valueComparison } /** From c196aea98890a5ec4541aa3af3a404f2b6e51bb7 Mon Sep 17 00:00:00 2001 From: Brandon McConnell Date: Sat, 13 May 2023 14:00:15 -0700 Subject: [PATCH 23/25] Fix sorting bug by destructuring dimensions separately from values --- src/util/normalizeScreens.js | 15 +++-- src/util/splitDimensionPrefix.js | 2 +- tests/min-max-screen-variants.test.js | 79 +++++++++++++++++++++------ 3 files changed, 73 insertions(+), 23 deletions(-) diff --git a/src/util/normalizeScreens.js b/src/util/normalizeScreens.js index 87569325958e..2427f0aabd2d 100644 --- a/src/util/normalizeScreens.js +++ b/src/util/normalizeScreens.js @@ -110,10 +110,17 @@ export function compareScreens(type, a, z) { if (a.not) [aMin, aMax] = [aMax, aMin] if (z.not) [zMin, zMax] = [zMax, zMin] - // We compare the values associated with the current type (`min` or `max`) - let [[aDimension, aValue], [zDimension, zValue]] = ( - type === 'min' ? [aMin, zMin] : [zMax, aMax] - ).map((value) => splitDimensionPrefix(value)) + // We store the dimension/value set for media query (e.g. `width` and `100px`) + let [ + [aMinDimension, aMinValue], + [aMaxDimension, aMaxValue], + [zMinDimension, zMinValue], + [zMaxDimension, zMaxValue], + ] = [aMin, aMax, zMin, zMax].map((value) => splitDimensionPrefix(value)) + + let [aDimension, zDimension] = + type === 'min' ? [aMinDimension, zMinDimension] : [aMaxDimension, zMaxDimension] + let [aValue, zValue] = type === 'min' ? [aMinValue, zMinValue] : [zMaxValue, aMaxValue] // Compare dimensions (e.g. "height" or "width" alphabetically) const dimensionComparison = aDimension.localeCompare(zDimension) diff --git a/src/util/splitDimensionPrefix.js b/src/util/splitDimensionPrefix.js index b2b1039f2f27..4d8f0e2acfc3 100644 --- a/src/util/splitDimensionPrefix.js +++ b/src/util/splitDimensionPrefix.js @@ -2,7 +2,7 @@ import { splitVariantPrefix } from './splitVariantPrefix' /** * @param {string} value - * @returns {[string, string]} + * @returns {['height' | 'width', string]} */ export function splitDimensionPrefix(value) { const [prefix, extractedValue] = splitVariantPrefix(value) diff --git a/tests/min-max-screen-variants.test.js b/tests/min-max-screen-variants.test.js index 67b0dbdc188b..c8747e2210c6 100644 --- a/tests/min-max-screen-variants.test.js +++ b/tests/min-max-screen-variants.test.js @@ -287,14 +287,14 @@ crosscheck(() => { .font-bold { font-weight: 700; } - @media (max-width: 100px) { - .max-\[100px\]\:font-bold, - .max-\[w\:100px\]\:font-bold { + @media (max-height: 100px) { + .max-\[h\:100px\]\:font-bold { font-weight: 700; } } - @media (max-height: 100px) { - .max-\[h\:100px\]\:font-bold { + @media (max-width: 100px) { + .max-\[100px\]\:font-bold, + .max-\[w\:100px\]\:font-bold { font-weight: 700; } } @@ -361,7 +361,14 @@ crosscheck(() => { { raw: html`
`, }, @@ -378,33 +385,69 @@ crosscheck(() => { return run(input, config).then((result) => { expect(result.css).toMatchFormattedCss(css` - @media (max-width: 150px) { - .max-\[150px\]\:font-bold { + @media (max-height: 3px) { + .max-\[h\:3px\]\:font-bold { font-weight: 700; } } - @media (max-height: 125px) { - .max-\[h\:125px\]\:font-bold { + @media (max-height: 2px) { + .max-\[h\:2px\]\:font-bold { font-weight: 700; } } - @media (min-height: 50px) { - .min-\[h\:50px\]\:font-bold { + @media (max-height: 1px) { + .max-\[h\:1px\]\:font-bold { font-weight: 700; } } - @media (min-height: 100px) { - .min-\[h\:100px\]\:font-bold { + @media (max-width: 3px) { + .max-\[3px\]\:font-bold, + .max-\[w\:3px\]\:font-bold { + font-weight: 700; + } + } + @media (max-width: 2px) { + .max-\[2px\]\:font-bold, + .max-\[w\:2px\]\:font-bold { + font-weight: 700; + } + } + @media (max-width: 1px) { + .max-\[1px\]\:font-bold, + .max-\[w\:1px\]\:font-bold { + font-weight: 700; + } + } + @media (min-height: 1px) { + .min-\[h\:1px\]\:font-bold { + font-weight: 700; + } + } + @media (min-height: 2px) { + .min-\[h\:2px\]\:font-bold { + font-weight: 700; + } + } + @media (min-height: 3px) { + .min-\[h\:3px\]\:font-bold { + font-weight: 700; + } + } + @media (min-width: 1px) { + .min-\[1px\]\:font-bold, + .min-\[w\:1px\]\:font-bold { font-weight: 700; } } - @media (min-height: 200px) { - .min-\[h\:200px\]\:font-bold { + @media (min-width: 2px) { + .min-\[2px\]\:font-bold, + .min-\[w\:2px\]\:font-bold { font-weight: 700; } } - @media (min-width: 75px) { - .min-\[75px\]\:font-bold { + @media (min-width: 3px) { + .min-\[3px\]\:font-bold, + .min-\[w\:3px\]\:font-bold { font-weight: 700; } } From 39d59b7f08197fd60fdcf56ccc89e936d21a2133 Mon Sep 17 00:00:00 2001 From: Brandon McConnell Date: Sat, 13 May 2023 14:28:46 -0700 Subject: [PATCH 24/25] Clean up and add comments --- src/util/normalizeScreens.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/util/normalizeScreens.js b/src/util/normalizeScreens.js index 2427f0aabd2d..386760deda41 100644 --- a/src/util/normalizeScreens.js +++ b/src/util/normalizeScreens.js @@ -110,16 +110,17 @@ export function compareScreens(type, a, z) { if (a.not) [aMin, aMax] = [aMax, aMin] if (z.not) [zMin, zMax] = [zMax, zMin] - // We store the dimension/value set for media query (e.g. `width` and `100px`) - let [ - [aMinDimension, aMinValue], - [aMaxDimension, aMaxValue], - [zMinDimension, zMinValue], - [zMaxDimension, zMaxValue], - ] = [aMin, aMax, zMin, zMax].map((value) => splitDimensionPrefix(value)) + // Split each mediq query value into its respective dimension and value (e.g. `width` and `100px`) + let [aMinDimension, aMinValue] = splitDimensionPrefix(aMin) + let [aMaxDimension, aMaxValue] = splitDimensionPrefix(aMax) + let [zMinDimension, zMinValue] = splitDimensionPrefix(zMin) + let [zMaxDimension, zMaxValue] = splitDimensionPrefix(zMax) + // Determine which dimension to compare (e.g. `min-width/height` vs. `max-width/height`) let [aDimension, zDimension] = type === 'min' ? [aMinDimension, zMinDimension] : [aMaxDimension, zMaxDimension] + + // Invert the values if we're comparing max values to use descending order let [aValue, zValue] = type === 'min' ? [aMinValue, zMinValue] : [zMaxValue, aMaxValue] // Compare dimensions (e.g. "height" or "width" alphabetically) From f388378021839171f29d251dabcd9ae82e58b36f Mon Sep 17 00:00:00 2001 From: Brandon McConnell Date: Sat, 13 May 2023 14:29:01 -0700 Subject: [PATCH 25/25] Shuffle the test string order --- tests/min-max-screen-variants.test.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/min-max-screen-variants.test.js b/tests/min-max-screen-variants.test.js index c8747e2210c6..81b9fbc8fe5e 100644 --- a/tests/min-max-screen-variants.test.js +++ b/tests/min-max-screen-variants.test.js @@ -362,12 +362,12 @@ crosscheck(() => { raw: html`
`,