mirror of
https://github.com/tailwindlabs/tailwindcss.git
synced 2025-12-08 21:36:08 +00:00
* 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>
27 lines
569 B
JavaScript
27 lines
569 B
JavaScript
import fs from 'fs/promises'
|
|
import path from 'path'
|
|
import { rimraf } from 'rimraf'
|
|
|
|
let id = 0
|
|
|
|
/**
|
|
* @template T
|
|
* @param {() => Promise<T>} callback
|
|
* @returns {Promise<T>}
|
|
*/
|
|
export default async function (callback) {
|
|
const workerId = `${process.env.JEST_WORKER_ID}-${id++}`
|
|
const tmpPath = path.resolve(__dirname, `../__tmp_${workerId}`)
|
|
const currentPath = process.cwd()
|
|
|
|
await rimraf(tmpPath)
|
|
await fs.mkdir(tmpPath)
|
|
|
|
process.chdir(tmpPath)
|
|
let result = await callback()
|
|
process.chdir(currentPath)
|
|
|
|
await rimraf(tmpPath)
|
|
return result
|
|
}
|