Reference
3 min read

Glossary

Learn about the terms and concepts used in Vercel's products and documentation.
Table of Contents

Recognizing that terminology can vary across different organizations and contexts, we've created this glossary to provide clear and consistent definitions for the terms and concepts we use in our products and documentation at Vercel.

A directory, also known as a folder in some operating systems, is a file system structure used to organize and store files on a computer. It helps to manage files by grouping them into a hierarchical structure of directories and subdirectories.

In programming and scripting, "directory" is often abbreviated to "dir".

In version control systems like Git, a repository is a location where files, including source code, are stored and managed. It not only houses the current version of every file but also maintains a history of all changes made to these files over time. This history is crucial for tracking modifications, collaborating on code, and reverting to previous versions if necessary.

A monorepo, short for "monolithic repository", is a version control strategy in which many packages or modules are stored in a single repository. This approach stands in contrast to a multi-repo approach, where each package or module has its own separate repository.

Monorepos facilitate easier code sharing and collaboration across the different parts of a codebase, and are not limited to a specific package manager or programming language.

A multi-repo, short for "multi-repository" and also known as "polyrepo", is a version control strategy where each package or module has its own separate repository. This approach stands in contrast to a monorepo approach, where multiple packages or modules are stored in a single repository.

In JavaScript, a workspace refers to a specific entity in a repository that can be either be a single package or a collection of packages.

The package manager's root lockfile (i.e. pnpm-lock.yaml) is located at the workspace root, along with any additional configuration, such as the paths where packages are located when working in a multi-package workspace.

A workspace is often located at the root of a repository, but this is not a requirement. For example, some monorepos may have multiple workspaces, each located in a subdirectory of the repository.

A workspace that represents a standalone package with a single package.json file at the workspace root.

A workspace that contains multiple packages.

A multi-package workspace contains multiple package.json files, including one at the workspace root for global configuration, and one in each package directory.

The configuration for these packages is stored at the root of the workspace. For pnpm, this configuration is in pnpm-workspace.yaml. npm and Yarn use the workspaces key in package.json.

This type of workspace is often associated with a monorepo.

A package is a collection of files and directories that are grouped together based on a common purpose. Types of packages include libraries, applications, services, and development tools.

Packages enable complex code bases to be decomposed into smaller, manageable, and independent components. This modular approach is essential to monorepos, a repository structure that houses multiple interconnected packages, facilitating streamlined management and development of large-scale projects.

In JavaScript, each package has a package.json file at its root, which contains metadata about the package, including its name, version, and any dependencies. Versioning of JavaScript packages generally follows semantic versioning, and JavaScript packages are often managed and distributed through npm.

Some package managers, including npm, refer to packages as "workspaces" in the context of a multi-package workspace.

Last updated on February 22, 2024