npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@yamlresume/node

v0.16.1

Published

Node.js runtime support for YAMLResume

Readme

@yamlresume/node

Node.js runtime support for YAMLResume.

This package provides programmatic APIs for reading, validating, building, watching, generating, and translating YAML/JSON resume files. It wraps @yamlresume/core with Node.js-specific capabilities such as filesystem access and LaTeX and Typst PDF compilation.

See the practical integration guide for build options, AI file workflows, error handling, and complete examples.

Installation

Node.js 22 or newer is required.

npm install @yamlresume/node

Usage

import { buildResumeFile, readResumeFile } from '@yamlresume/node'

const { resume, validated } = readResumeFile('resume.yaml')
const { outputs } = await buildResumeFile('resume.yaml')

For command-line usage, see the yamlresume package.

API

readResumeFile

function readResumeFile(
  resumePath: string,
  options?: ReadResumeFileOptions
): ReadResumeResult

Read the resume from the source file (YAML, YML, or JSON) and validate it against the schema on request. The result includes the resume object, the validation status ('success' | 'failed' | 'unknown'), and positional errors with line and column numbers if validation failed.

const { resume, validated, errors } = readResumeFile('resume.yaml')

if (validated === 'failed') {
  for (const error of errors ?? []) {
    console.log(`${error.path.join('.')}: ${error.message} (line ${error.line})`)
  }
}

validateResume

function validateResume(
  yamlStr: string,
  schema: typeof ResumeSchema
): PositionalError[]

Validate a raw YAML string against the resume schema. Returns positional errors sorted by line number, or an empty array if validation succeeds.

buildResumeFile

function buildResumeFile(
  resumePath: string,
  options?: BuildResumeFileOptions
): Promise<BuildResumeResult>

Build a YAML resume into one or more outputs (docx, html, markdown, tex/pdf, or typ/pdf) by iterating through the layouts configured in the resume's layouts field. Options include PDF generation, validation, output directory, LaTeX and Typst compilation timeout, and an optional logger. Returns the list of generated file paths.

const { outputs } = await buildResumeFile('resume.yaml', {
  pdf: true,
  output: 'dist',
})

newResumeFile

function newResumeFile(
  resumePath: string,
  sampleId: string,
  language: LocaleLanguage,
  options?: NewResumeFileOptions
): void

Create a new resume file from a curated sample resume.

newResumeFile('resume.yaml', 'software-engineer', 'en')

generateResumeFile

async function generateResumeFile(
  resumePath: string,
  position: string,
  language: string,
  options?: GenerateResumeFileOptions
): Promise<void>

Generate a new resume file with AI for a given position and language. Supports model selection, retries, streaming chunks via callback, and an optional logger.

translateResumeFile

async function translateResumeFile(
  inputPath: string,
  outputPath: string,
  toLanguage: string,
  options?: TranslateResumeFileOptions
): Promise<void>

Translate an existing resume to another supported locale language. The source language is read from locale.language; model selection, retries, streaming, and logging use the same options as AI generation.

watchResumeFile

function watchResumeFile(
  resumePath: string,
  options?: BuildResumeFileOptions
): chokidar.FSWatcher

Watch a resume source file and rebuild outputs on changes. Uses chokidar for robust watching (handles atomic saves from editors like vim), runs only one build at a time, and coalesces bursts of change events into a single follow-up build.

All functions throw YAMLResumeErrors from @yamlresume/core on failure, so you can catch and inspect them uniformly:

import { YAMLResumeError } from '@yamlresume/core'

try {
  await buildResumeFile('missing.yaml')
} catch (error) {
  if (error instanceof YAMLResumeError) {
    console.error(error.code, error.message)
  }
}