From ac91c6aaae431e8fc20caa6d6f8a954871a2633f Mon Sep 17 00:00:00 2001 From: Ivo Sabev Date: Tue, 7 Jun 2022 12:23:32 +0300 Subject: [PATCH] Remove process dependency from log functions (#8530) * Remove process dependency from log functions * Fix check * update changelog Co-authored-by: Robin Malfait --- CHANGELOG.md | 1 + src/util/log.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ddde401b5..6a4a7acb6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Try using local `postcss` installation first in the CLI ([#8270](https://github.com/tailwindlabs/tailwindcss/pull/8270)) - Allow default ring color to be a function ([#7587](https://github.com/tailwindlabs/tailwindcss/pull/7587)) - Don't inherit `to` value from parent gradients ([#8489](https://github.com/tailwindlabs/tailwindcss/pull/8489)) +- Remove process dependency from log functions ([#8530](https://github.com/tailwindlabs/tailwindcss/pull/8530)) ### Changed diff --git a/src/util/log.js b/src/util/log.js index 5890c60f2..0df5c8719 100644 --- a/src/util/log.js +++ b/src/util/log.js @@ -3,7 +3,7 @@ import colors from 'picocolors' let alreadyShown = new Set() function log(type, messages, key) { - if (process.env.JEST_WORKER_ID !== undefined) return + if (typeof process !== 'undefined' && process.env.JEST_WORKER_ID) return if (key && alreadyShown.has(key)) return if (key) alreadyShown.add(key)