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

@sctg/tracespace-fixtures

v5.1.5

Published

Test fixtures for tracespace projects

Readme

tracespace fixtures

latest david

Test fixtures for tracespace projects

This module is a collection of data, including real-world open-source Gerber and drill files, used to drive tests on tracespace projects. It's published to npm so that any tool can use this data.

Part of the tracespace collection of PCB visualization tools.

install

Please note: because this package is a collection of test fixtures, it may not follow semver and changes could be introduced in any version bump that cause your tests to fail. You should install an exact version.

npm install --save-dev --save-exact @sctg/tracespace-fixtures

usage

const fixtures = require('@sctg/tracespace-fixtures')

gerber filenames

gerber-filenames.json is a JSON file with a collection of example Gerber / drill filenames along with what PCB layer type they represent organized by CAD package. This fixture is primarily used to test whats-that-gerber.

const {gerberFilenames} = require('@sctg/tracespace-fixtures')
// or
const gerberFilenames = require('@sctg/tracespace-fixtures/gerber-filenames.json')

Where gerberFilenames looks like:

Array<{
  /** CAD package, e.g. "eagle" */
  cad: string,
  /** collection of example Gerber and/or drill filenames */
  files: Array<{
    /** filename */
    name: string,
    /** expected whats-that-gerber type */
    type: string
  }>
}>

For non-npm projects, this file is also available via the unpkg CDN:

curl https://unpkg.com/@sctg/tracespace-fixtures@${version}/gerber-filenames.json

example boards

@sctg/tracespace-fixtures has a collection of sample open-source PCB files to test rendering full circuit boards. This fixture is primarily used to test pcb-stackup and pcb-stackup-core.

const {getBoards} = require('@sctg/tracespace-fixtures')

// async
getBoards((error, boards) => {
  if (error) return console.error(error)
  console.log(boards)
})

// sync
const boards = getBoards.sync()

Where boards looks like:

Array<{
  /** name of the board */
  name: string,
  /** path to the board's manifest */
  filepath: string,
  /** array of individual board layers */
  layers: Array<{
    /** name of the layer */
    name: string,
    /** path to the layer's gerber / drill file */
    filepath: string,
    /** basename of filepath */
    filename: string,
    /** format of the file */
    format: 'gerber' | 'drill',
    /** whats-that-gerber type of the layer */
    type: string,
    /** file contents (i.e. results of fs.readFile on filepath) */
    source: string
  }>
}>

gerber specs

@sctg/tracespace-fixtures has a collection of simple Gerber and NC drill files to ensure proper rendering of different image primitives and structures. This fixture is primarily used to test @sctg/gerber-to-svg.

const {getGerberSpecs} = require('@sctg/tracespace-fixtures')

// async
getGerberSpecs((error, suites) => {
  if (error) return console.error(error)
  console.log(suites)
})

// sync
const suites = getGerberSpecs.sync()

Where suites looks like:

Array<{
  /** name of the suite */
  name: string,
  /** array of individual specs in the suite */
  specs: Array<{
    /** name of the spec */
    name: string,
    /** category of the spec (matches suite's name) */
    category: string,
    /** path to the spec's gerber / drill file */
    filepath: string,
    /** file contents (i.e. results of fs.readFile on filepath) */
    source: string,
    /** SVG string of the expected render */
    expected: string
  }>
}>

render suite server

Simple server to display the results of a render test. Has a peer dependency on Express, which you must install yourself before usage:

npm install --save-dev @sctg/tracespace-fixtures express

Usage:

const {server, getGerberSpecs} = require('@sctg/tracespace-fixtures')

const app = server('suite name', getGerberSpecs, getSuiteResults)

app.listen(9000, () => console.log('listening on http://localhost:9000'))

function getSuiteResults(suite, done) {
  // get results of a single suite somehow and pass them to done
  done(null, suiteResults)
}

server is a function that takes:

  1. name - A string name of the server
  2. getSuites - One of getGerberSpecs or getBoards
  3. getSuiteResults - An asynchronous function to render the results of one of the suites from getSuites

getSuiteResults should call its done callback with:

{
  /** name of the suite */
  name: string,
  /** array of spec results in the suite */
  specs: Array<{
    /** name of the spec */
    name: string,
    /** spec render to display (SVG) */
    render: string,
    /** optional comparison render (SVG) */
    expected?: string,
    /** optional test source to display */
    source?: string,
  }>
}