Home / File/ version-packages.mjs — tailwindcss Source File

version-packages.mjs — tailwindcss Source File

Architecture documentation for version-packages.mjs, a javascript file in the tailwindcss codebase. 7 imports, 0 dependents.

File javascript 7 imports

Entity Profile

Dependency Diagram

graph LR
  5e2c6074_c152_291e_5d54_ba1616bdc4de["version-packages.mjs"]
  8d4c06fc_a152_c497_9c1b_b60c5c91b817["node:child_process"]
  5e2c6074_c152_291e_5d54_ba1616bdc4de --> 8d4c06fc_a152_c497_9c1b_b60c5c91b817
  d67e5d8e_a231_7d87_3db9_694c7a427aac["node:crypto"]
  5e2c6074_c152_291e_5d54_ba1616bdc4de --> d67e5d8e_a231_7d87_3db9_694c7a427aac
  8118fcf2_a51d_d1a1_93d3_c71d3a646692["promises"]
  5e2c6074_c152_291e_5d54_ba1616bdc4de --> 8118fcf2_a51d_d1a1_93d3_c71d3a646692
  6697e014_f05e_326e_fc13_a0cc17f46c5d["node:os"]
  5e2c6074_c152_291e_5d54_ba1616bdc4de --> 6697e014_f05e_326e_fc13_a0cc17f46c5d
  2a7660a5_3e09_bd74_37f0_e4e54bc64ce5["node:path"]
  5e2c6074_c152_291e_5d54_ba1616bdc4de --> 2a7660a5_3e09_bd74_37f0_e4e54bc64ce5
  83f4eb5c_a623_9c4e_b3f7_d95e77d40d82["node:url"]
  5e2c6074_c152_291e_5d54_ba1616bdc4de --> 83f4eb5c_a623_9c4e_b3f7_d95e77d40d82
  314f842b_c991_fa3a_70e2_6e0554f5789b["prettier"]
  5e2c6074_c152_291e_5d54_ba1616bdc4de --> 314f842b_c991_fa3a_70e2_6e0554f5789b
  style 5e2c6074_c152_291e_5d54_ba1616bdc4de fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { exec, spawnSync } from 'node:child_process'
import { randomUUID } from 'node:crypto'
import fs from 'node:fs/promises'
import { tmpdir } from 'node:os'
import path from 'node:path'
import url from 'node:url'
import prettier from 'prettier'

const __dirname = path.dirname(url.fileURLToPath(import.meta.url))
const root = path.resolve(__dirname, '..')
const version = process.argv[2] || null

// The known workspace is: @tailwindcss/oxide
// All the workspaces in `crates/node/npm/*` should always be in sync with
// `@tailwindcss/oxide`. You can think of them as one big package, but they are
// split into multiple packages because they are OS specific.
const syncedWorkspaces = new Map([
  [
    '@tailwindcss/oxide',
    [
      'crates/node/npm/android-arm-eabi',
      'crates/node/npm/android-arm64',
      'crates/node/npm/darwin-arm64',
      'crates/node/npm/darwin-x64',
      'crates/node/npm/freebsd-x64',
      'crates/node/npm/linux-arm-gnueabihf',
      'crates/node/npm/linux-arm64-gnu',
      'crates/node/npm/linux-arm64-musl',
      'crates/node/npm/linux-x64-gnu',
      'crates/node/npm/linux-x64-musl',
      'crates/node/npm/wasm32-wasi',
      'crates/node/npm/win32-arm64-msvc',
      'crates/node/npm/win32-x64-msvc',
    ],
  ],
  ['@tailwindcss/cli', ['packages/@tailwindcss-standalone']],
])

const inverseSyncedWorkspaces = new Map()

for (let [name, paths] of syncedWorkspaces) {
  for (let [idx, filePath] of paths.entries()) {
    // Make sure all the paths are absolute paths
    paths[idx] = path.resolve(root, filePath, 'package.json')

    // Make sure inverse lookup table exists
    inverseSyncedWorkspaces.set(paths[idx], name)
  }
}

exec(
  "pnpm --silent --filter='!./playgrounds/*' --filter='!./integrations' --filter='!./packages/internal-example-plugin' -r exec pwd",
  async (err, stdout) => {
    if (err) {
      console.error(err)
      process.exit(1)
    }

    if (version !== null) {
      for (let pkgPath of stdout
// ... (119 more lines)

Dependencies

  • node:child_process
  • node:crypto
  • node:os
  • node:path
  • node:url
  • prettier
  • promises

Frequently Asked Questions

What does version-packages.mjs do?
version-packages.mjs is a source file in the tailwindcss codebase, written in javascript.
What does version-packages.mjs depend on?
version-packages.mjs imports 7 module(s): node:child_process, node:crypto, node:os, node:path, node:url, prettier, promises.
Where is version-packages.mjs in the architecture?
version-packages.mjs is located at scripts/version-packages.mjs (directory: scripts).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free