release-notes.mjs — tailwindcss Source File
Architecture documentation for release-notes.mjs, a javascript file in the tailwindcss codebase. 3 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR cefab8ae_8e65_962c_faf5_f5caa3ed7158["release-notes.mjs"] 8118fcf2_a51d_d1a1_93d3_c71d3a646692["promises"] cefab8ae_8e65_962c_faf5_f5caa3ed7158 --> 8118fcf2_a51d_d1a1_93d3_c71d3a646692 2a7660a5_3e09_bd74_37f0_e4e54bc64ce5["node:path"] cefab8ae_8e65_962c_faf5_f5caa3ed7158 --> 2a7660a5_3e09_bd74_37f0_e4e54bc64ce5 83f4eb5c_a623_9c4e_b3f7_d95e77d40d82["node:url"] cefab8ae_8e65_962c_faf5_f5caa3ed7158 --> 83f4eb5c_a623_9c4e_b3f7_d95e77d40d82 style cefab8ae_8e65_962c_faf5_f5caa3ed7158 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
// Given a version, figure out what the release notes are so that we can use this to pre-fill the
// release notes on a GitHub release for the current version.
import * as fs from 'node:fs/promises'
import * as path from 'node:path'
import * as url from 'node:url'
const __dirname = path.dirname(url.fileURLToPath(import.meta.url))
let version = process.argv[2] || process.env.npm_package_version
if (!version) {
let pkgPath = path.resolve(__dirname, '../packages/tailwindcss/package.json')
let pkg = await fs.readFile(pkgPath, 'utf8').then(JSON.parse)
version = pkg.version
}
let changelog = await fs.readFile(path.resolve(__dirname, '..', 'CHANGELOG.md'), 'utf8')
let match = new RegExp(
`## \\[${version}\\] - (.*)\\n\\n([\\s\\S]*?)\\n(?:(?:##\\s)|(?:\\[))`,
'g',
).exec(changelog)
if (match) {
let [, , notes] = match
console.log(notes.trim())
} else {
console.log(`Placeholder release notes for version: v${version}`)
}
Dependencies
- node:path
- node:url
- promises
Source
Frequently Asked Questions
What does release-notes.mjs do?
release-notes.mjs is a source file in the tailwindcss codebase, written in javascript.
What does release-notes.mjs depend on?
release-notes.mjs imports 3 module(s): node:path, node:url, promises.
Where is release-notes.mjs in the architecture?
release-notes.mjs is located at scripts/release-notes.mjs (directory: scripts).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free