# TypeScript ESLint Documentation
# Source: https://raw.githubusercontent.com/typescript-eslint/typescript-eslint/main/docs/users/Releases.mdx
# Path: docs/users/Releases.mdx

---
id: releases
sidebar_label: Releases
title: Releases
---

import useIsBrowser from '@docusaurus/useIsBrowser';

export function LocalTimeOfRelease() {
  const isBrowser = useIsBrowser();
  if (!isBrowser) {
    // An arbitrary Monday at 17:00 UTC.
    const arbitraryMonday = new Date('1970-01-05T17:00Z');
    return arbitraryMonday.toLocaleTimeString('en-US', {
      hour: 'numeric',
      minute: '2-digit',
      timeZoneName: 'short',
      timeZone: 'UTC',
    });
  }
  const now = new Date();
  const daysAgoToMonday = (now.getUTCDay() + 6) % 7;
  // Calculate the previous Monday at 17:00 UTC.
  const previousReleaseDate = new Date(
    Date.UTC(
      now.getUTCFullYear(),
      now.getUTCMonth(),
      now.getUTCDate() - daysAgoToMonday,
      17,
    ),
  );
  // This will happen if the current time is before 17:00 UTC on Monday.
  if (previousReleaseDate > now) {
    previousReleaseDate.setUTCDate(previousReleaseDate.getUTCDate() - 7);
  }
  // Next release is 7 days later.
  const nextReleaseDate = new Date(previousReleaseDate.getTime());
  nextReleaseDate.setUTCDate(previousReleaseDate.getUTCDate() + 7);
  // If we're near a DST time change, we want to display the time of the release that has the same UTC offset as now.
  // If, for some reason, neither does, just display the local time of the next release.
  const releaseWithSameUtcOffset =
    [nextReleaseDate, previousReleaseDate].find(
      date => date.getTimezoneOffset() === now.getTimezoneOffset(),
    ) ?? nextReleaseDate;
  const formatted = releaseWithSameUtcOffset.toLocaleTimeString('en-US', {
    hour: 'numeric',
    minute: '2-digit',
    timeZoneName: 'short',
  });
  // Specify the day of week if it's not a Monday.
  const dayNames = [
    'Sunday',
    'Monday',
    'Tuesday',
    'Wednesday',
    'Thursday',
    'Friday',
    'Saturday',
  ];
  if (
    releaseWithSameUtcOffset.getDay() !== releaseWithSameUtcOffset.getUTCDay()
  ) {
    return `${dayNames[releaseWithSameUtcOffset.getDay()]}s at ${formatted}`;
  }
  return formatted;
}

## Latest

<a href="https://www.npmjs.com/package/@typescript-eslint/parser">
  <img
    src="https://img.shields.io/npm/v/@typescript-eslint/parser/latest.svg?style=flat-square"
    alt="NPM Version"
  />
</a>

We release a latest version every Monday at 17:00 UTC (<LocalTimeOfRelease />) using the latest commit to `main` at that time. This release is performed automatically by a Github action located in a private repository. This release goes to the standard `latest` tag on npm.

See [Versioning](./Versioning.mdx) for how the version number is calculated.

If there have been no commits that impact public-facing packages then a patch-level release shall be released.

Latest releases shall only ever be "minor" or "patch" releases.

### Release Notes

Every release is documented on the [Github Release page](https://github.com/typescript-eslint/typescript-eslint/releases).

These release notes will list the PRs included in the release.

## Canary

<a href="https://www.npmjs.com/package/@typescript-eslint/parser">
  <img
    src="https://img.shields.io/npm/v/@typescript-eslint/parser/canary.svg?style=flat-square"
    alt="NPM Version"
  />
</a>

We release a canary version for each commit to `main` that passes all required checks. This release is performed automatically by the [`publish_canary_version` step](https://github.com/typescript-eslint/typescript-eslint/blob/5feb2dba9da2bd5e233451b7b0f1c99414b5aef9/.github/workflows/ci.yml#L234-L263). So **you never need to wait for a new stable version to make use of any updates**.

This release goes to the `canary` tag on npm and it is versioned as an incremental canary patch release on top of the current `latest` version. I.e. if the current version is `5.6.1`, then the first canary version will be `5.6.2-alpha.0`, the second `5.6.2-alpha.1`, and so on.

:::note
The only exception to the automated publishes described above is when we are in the final phases of creating the next major version of the libraries - e.g. going from `1.x.x` to `2.x.x`.
During these periods, we manually publish `canary` releases until we are happy with the release and promote it to `latest`.
:::

### Installing Canary Versions

To try out the latest canary versions of typescript-eslint, install `@typescript-eslint/eslint-plugin@canary` and `@typescript-eslint/parser@canary`.
Note that npm may need a `--force` to override version requirements.

```bash npm2yarn
npm i @typescript-eslint/eslint-plugin@canary @typescript-eslint/parser@canary --save-dev --force
```

## Major Releases

We currently do not have a set schedule around when major releases shall be performed; instead they are done as the need arises.

We keep a backlog of breaking issues as a milestone on GitHub that is named in the form `${major}.0.0`.
When we do do a major release, we release a release candidate version to the `rc-v${major}` tag on npm for each commit to the major branch.

See [Maintenance > Releases](../maintenance/Releases.mdx#major-releases) for steps to perform a major release.

## Out-of-Band Releases

We will do releases "out-of-band" (outside the [latest](#latest) schedule) for rare emergencies.
We assess need on a case-by-case basis though generally an emergency is defined as a critical regression specifically introduced in the latest release.

These releases are done manually by a maintainer with the required access privileges.

## Older Versions

Older major versions of typescript-eslint are never maintained or supported.
They may crash with the latest versions of TypeScript.
Using the latest version of typescript-eslint is strongly recommended for getting the latest rule features and fixes, supporting the latest TypeScript features and syntax, and continuous performance and stability improvements.

### Back-Porting Releases

We **_do not_** back port releases to previously released major/minor versions.
We only ever release forward.

### Old Release Documentation

You can find the last version of some older major versions under their dedicated branch deploys:

- v7: [v7--typescript-eslint.netlify.app](https://v7--typescript-eslint.netlify.app)
- v6: [v6--typescript-eslint.netlify.app](https://v6--typescript-eslint.netlify.app)

Note that older documentation pages may contain outdated information and links.
We strongly recommend using the latest version of typescript-eslint and its documentation.