diff --git a/.github/workflows/canary.yml b/.github/workflows/canary.yml
deleted file mode 100644
index 9b7fcf1d5..000000000
--- a/.github/workflows/canary.yml
+++ /dev/null
@@ -1,83 +0,0 @@
-name: Canary
-
-on: pull_request
-
-jobs:
- release:
- runs-on: ubuntu-latest
- steps:
- # We store information about used changeset in the comment
- # So we need to find it to check if we need to publish a new canary release
- # Also we will update this comment with new information in case of new canary release
- - name: Find comment about previous canary release
- uses: peter-evans/find-comment@v1
- id: find_comment
- with:
- issue-number: ${{ github.event.pull_request.number }}
- comment-author: 'github-actions[bot]'
- body-includes: Farfetched Canary
- - uses: actions/checkout@v3
- - uses: pnpm/action-setup@v2
- - uses: actions/setup-node@v3
- with:
- node-version-file: '.nvmrc'
- cache: 'pnpm'
- - name: Authenticate with NPM
- run: |
- echo "//registry.npmjs.org/:_authToken="${{secrets.NPM_TOKEN}}"" > ~/.npmrc
- - run: pnpm install --frozen-lockfile
- # Parse latest published version of the canary release and update local package.json for all packages
- - name: Restore canary release version
- run: node ./tools/scripts/canary/canary_version_restore.mjs ${{ github.event.pull_request.number }}
- # Update version in package.json for all packages with changeset and generate pre.json file
- - run: pnpm changeset pre enter ${{ github.event.pull_request.number }}
- - run: pnpm changeset version
- - run: pnpm changeset pre exit
- # Check if we need to publish a new canary release
- # it uses pre.json file and information about previous canary relase from the comment
- - name: Check if new canary release is required
- id: canary_required
- run: node ./tools/scripts/canary/canary_required.mjs """${{ steps.find_comment.outputs.comment-body }}""" >> $GITHUB_OUTPUT && cat $GITHUB_OUTPUT
- - name: Prepare package names
- if: steps.canary_required.outputs.skipCanary == ''
- run: node ./tools/scripts/canary/canary_name_change.mjs
- - name: Publish canary release
- if: steps.canary_required.outputs.skipCanary == ''
- run: pnpm -r publish --no-git-checks
- - name: Retrieve information about latest canary release
- id: canary_info
- run: node ./tools/scripts/canary/canary_info.mjs >> $GITHUB_OUTPUT && cat $GITHUB_OUTPUT
- # In case of absence of the comment we will create it with information about latest canary release
- - name: Create comment
- if: steps.find_comment.outputs.comment-id == ''
- uses: peter-evans/create-or-update-comment@v1
- with:
- issue-number: ${{ github.event.pull_request.number }}
- body: |
- # Farfetched Canary
-
- Latest canary version is ${{ steps.canary_info.outputs.canaryVersion }}
-
- [More information about canary versions](https://ff.effector.dev/releases/canary.html)
-
- ---
-
- Used changeset: ${{ steps.canary_info.outputs.usedChangesets }}
- # Otherwise we will update it with information about latest caanry release,
- # but only if we published a new canary release
- - name: Update comment
- if: steps.find_comment.outputs.comment-id != '' && steps.canary_required.outputs.skipCanary == ''
- uses: peter-evans/create-or-update-comment@v1
- with:
- edit-mode: replace
- comment-id: ${{ steps.find_comment.outputs.comment-id }}
- body: |
- # Farfetched Canary
-
- Latest canary version is ${{ steps.canary_info.outputs.canaryVersion }}
-
- [More information about canary versions](https://ff.effector.dev/releases/canary.html)
-
- ---
-
- Used changeset: ${{ steps.canary_info.outputs.usedChangesets }}
diff --git a/apps/website/docs/releases/canary.md b/apps/website/docs/releases/canary.md
index 27b820e86..a58bf9253 100644
--- a/apps/website/docs/releases/canary.md
+++ b/apps/website/docs/releases/canary.md
@@ -2,90 +2,4 @@
sidebar: false
---
-# Canary versions of Farfetched
-
-:::danger
-Canary versions are not intended for production use. They can contain bugs and breaking changes, some features can be removed or changed in the stable release.
-:::
-
-We release canary versions of Farfetched to allow you to try new features before they are released. Canary versions are published for every PR that contains changesets. You can find the latest canary version of the package for particular PR in the PR comments.
-
-## How to use
-
-1. Replace current versions with the canary versions in `package.json`
-
-```json
-{
- "dependencies": {
- "@farfetched/core": "0.10.4", // [!code --]
- "@farfetched/core": "npm:@farfetched-canary/core@0.10.7-403.0" // [!code ++]
- }
-}
-```
-
-2. Install packages
-
-::: code-group
-
-```bash [pnpm]
-pnpm install
-```
-
-```bash [yarn]
-yarn install
-```
-
-```bash [npm]
-npm install
-```
-
-3. Test your application with the canary version of Farfetched
-
-:::
-
-## Deep-dive
-
-In this section, you can find more details about canary versions publishing process.
-
-### Package names
-
-Canary versions of Farfetched are published to scope `@farfetched-canary` instead of `@farfetched`. To use them, you need to change the package name in `package.json` from `@farfetched/*` to `@farfetched-canary/*`.
-
-::: details Full mapping
-
-
-
-
-
-
- Release package name |
- Canary package name |
-
-
-
-
- {{item.release}} |
- {{item.canary}} |
-
-
-
-
-:::
-
-### Package versions
-
-Package versions for canary versions of Farfetched are generated automatically by the following rules:
-
-1. Generate next version of the package according to [semver](https://semver.org/) rules based on changesets in the branch.
-2. Add PR number to the end of the version.
-3. Add build number to the end of the version.
-
-::: details Examples
-
-- If the latest version of the package is `0.10.4` and branch contains changeset for `minor` change, PR number is `403` and this is the first build for this PR, then the version of the package will be `0.11.0-403.0`.
-
-- If the latest version of the package is `0.10.4` and branch contains changeset for `patch` change, PR number is `406` and this is the second build for this PR, then the version of the package will be `0.10.5-406.1`.
-
-:::
+Canary version is not available anymore.
diff --git a/apps/website/docs/releases/canary_mapping.data.ts b/apps/website/docs/releases/canary_mapping.data.ts
deleted file mode 100644
index d4560200c..000000000
--- a/apps/website/docs/releases/canary_mapping.data.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-import { readdir, readFile, stat } from 'node:fs/promises';
-import * as path from 'node:path';
-
-export default {
- async load() {
- const PACKAGES_PATH = '../../packages';
-
- const inDirList = await readdir(PACKAGES_PATH);
-
- const packageNames: string[] = [];
-
- await Promise.all(
- inDirList.map(async (dir) => {
- const stats = await stat(`${PACKAGES_PATH}/${dir}`);
- if (!stats.isDirectory()) {
- return;
- }
-
- const packageJson = await readFile(
- path.join(PACKAGES_PATH, dir, 'package.json'),
- 'utf-8'
- ).then(JSON.parse);
-
- packageNames.push(packageJson.name);
- })
- );
-
- return packageNames.map((packageName) => ({
- release: packageName,
- canary: packageName.replace('@farfetched', '@farfetched-canary'),
- }));
- },
-};
diff --git a/apps/website/docs/releases/index.md b/apps/website/docs/releases/index.md
index d30a358f5..2df4f5ad7 100644
--- a/apps/website/docs/releases/index.md
+++ b/apps/website/docs/releases/index.md
@@ -6,10 +6,6 @@ sidebar: false
Farfetched is mostly been creating in Thailand, so all releases are named after beautiful places in Thailand.
-:::tip
-To use unreleased version of Farfetched, please refer to [canary](/releases/canary) page.
-:::
-
diff --git a/tools/scripts/canary/canary_info.mjs b/tools/scripts/canary/canary_info.mjs
deleted file mode 100644
index 40ff1cf8d..000000000
--- a/tools/scripts/canary/canary_info.mjs
+++ /dev/null
@@ -1,22 +0,0 @@
-import { join } from 'node:path';
-import { readFile } from 'node:fs/promises';
-
-import { getPackagesInfo } from '../shared/packages.mjs';
-
-const packages = await getPackagesInfo();
-
-const { root } = packages.at(0);
-const packageJsonPath = join(process.cwd(), root, 'package.json');
-
-const { version: canaryVersion } = await readFile(
- packageJsonPath,
- 'utf-8'
-).then(JSON.parse);
-
-const { changesets: usedChangesets } = await readFile(
- join(process.cwd(), '.changeset', 'pre.json'),
- 'utf-8'
-).then(JSON.parse);
-
-console.log(`canaryVersion="${canaryVersion}"`);
-console.log(`usedChangesets="${JSON.stringify(usedChangesets)}"`);
diff --git a/tools/scripts/canary/canary_name_change.mjs b/tools/scripts/canary/canary_name_change.mjs
deleted file mode 100644
index bbb867911..000000000
--- a/tools/scripts/canary/canary_name_change.mjs
+++ /dev/null
@@ -1,41 +0,0 @@
-import { readFile, writeFile } from 'node:fs/promises';
-import * as path from 'node:path';
-
-import { getPackagesInfo } from '../shared/packages.mjs';
-
-const packages = await getPackagesInfo();
-
-for (const pkg of packages) {
- const packageJsonPath = path.join(process.cwd(), pkg.root, 'package.json');
-
- const originalPackageJson = await readFile(packageJsonPath, 'utf-8').then(
- JSON.parse
- );
-
- const nextPackageJson = {
- ...originalPackageJson,
- name: adjustPackageName(originalPackageJson.name),
- peerDependencies: mapValues(
- originalPackageJson.peerDependencies ?? {},
- (version, name) =>
- name.includes('@farfetched')
- ? `npm:${adjustPackageName(name)}@${originalPackageJson.version}`
- : version
- ),
- };
-
- await writeFile(packageJsonPath, JSON.stringify(nextPackageJson));
-}
-
-function adjustPackageName(name) {
- return name.replaceAll('@farfetched/', '@farfetched-canary/');
-}
-
-export function mapValues(val, fn) {
- const mappedEntries = Object.entries(val).map(([key, value]) => [
- key,
- fn(value, key),
- ]);
-
- return Object.fromEntries(mappedEntries);
-}
diff --git a/tools/scripts/canary/canary_required.mjs b/tools/scripts/canary/canary_required.mjs
deleted file mode 100644
index 5444ae84b..000000000
--- a/tools/scripts/canary/canary_required.mjs
+++ /dev/null
@@ -1,42 +0,0 @@
-import { join } from 'node:path';
-import { readFile } from 'node:fs/promises';
-
-const [, , commentBody] = process.argv;
-
-const LINE_START = 'Used changeset: ';
-
-const previousChangesets = (
- commentBody
- .split('\n')
- .find((line) => line.includes(LINE_START))
- ?.replace(LINE_START, '') ?? '[]'
-)
- .split(',')
- .map((changeset) => changeset.replaceAll('[', '').replaceAll(']', ''))
- .filter(Boolean);
-
-const { changesets: usedChangesets } = await readFile(
- join(process.cwd(), '.changeset', 'pre.json'),
- 'utf-8'
-).then(JSON.parse);
-
-previousChangesets.sort();
-usedChangesets.sort();
-
-const skipCanary = isArraysEquals(previousChangesets, usedChangesets)
- ? 'skip'
- : '';
-
-console.log(`previousChangesets="${JSON.stringify(previousChangesets)}"`);
-console.log(`usedChangesets="${JSON.stringify(usedChangesets)}"`);
-console.log(`skipCanary=${skipCanary}`);
-
-// utils
-
-function isArraysEquals(a, b) {
- if (a.length !== b.length) {
- return false;
- }
-
- return a.every((item, index) => item === b[index]);
-}
diff --git a/tools/scripts/canary/canary_version_restore.mjs b/tools/scripts/canary/canary_version_restore.mjs
deleted file mode 100644
index 95f9d7223..000000000
--- a/tools/scripts/canary/canary_version_restore.mjs
+++ /dev/null
@@ -1,71 +0,0 @@
-import { execSync } from 'node:child_process';
-import { readFile, writeFile } from 'node:fs/promises';
-import * as path from 'node:path';
-
-import { getPackagesInfo } from '../shared/packages.mjs';
-
-const [, , branch] = process.argv;
-
-console.log(`Canary name is ${branch}`);
-
-const packages = await getPackagesInfo();
-
-const canaryNames = packages.map(({ name }) => `@farfetched-canary/${name}`);
-
-const canaryVersions = new Set(
- canaryNames
- .flatMap((canaryName) => {
- try {
- const versions = JSON.parse(
- execSync(`npm view ${canaryName} versions --json`).toString().trim()
- );
- return versions;
- } catch (e) {
- return [];
- }
- })
- .filter((version) => version.includes(`-${branch}.`))
-);
-
-console.log(
- `Found canary versions: ${JSON.stringify(Array.from(canaryVersions))}`
-);
-
-let latestCanaryVerisonSuffix = -1;
-let latestCanaryVerison = null;
-
-for (const canaryVersion of canaryVersions.values()) {
- const [_, suffix] = canaryVersion.split(`-${branch}.`);
-
- const suffixNumber = Number(suffix);
-
- if (suffixNumber > latestCanaryVerisonSuffix) {
- latestCanaryVerisonSuffix = suffixNumber;
- latestCanaryVerison = canaryVersion;
- }
-}
-
-if (latestCanaryVerison) {
- console.log(`Latest canary version: ${latestCanaryVerison}`);
-
- for (const { root } of packages) {
- const packageJsonPath = path.join(process.cwd(), root, 'package.json');
-
- const originalPackageJson = await readFile(packageJsonPath, 'utf-8').then(
- JSON.parse
- );
-
- const nextPackageJson = {
- ...originalPackageJson,
- version: latestCanaryVerison,
- };
-
- await writeFile(packageJsonPath, JSON.stringify(nextPackageJson));
-
- console.log(
- `Updated ${packageJsonPath} with version: ${nextPackageJson.version}`
- );
- }
-} else {
- console.log(`No canary versions found`);
-}
diff --git a/tools/scripts/shared/packages.mjs b/tools/scripts/shared/packages.mjs
deleted file mode 100644
index 22134f8c5..000000000
--- a/tools/scripts/shared/packages.mjs
+++ /dev/null
@@ -1,31 +0,0 @@
-import { readFile, readdir, stat } from 'node:fs/promises';
-import * as path from 'node:path';
-
-export async function getPackagesInfo() {
- const PACKAGES_PATH = 'packages';
-
- const inDirList = await readdir(PACKAGES_PATH);
-
- const packages = [];
-
- await Promise.all(
- inDirList.map(async (dir) => {
- const stats = await stat(path.join(PACKAGES_PATH, dir));
- if (!stats.isDirectory()) {
- return;
- }
-
- const packageJson = await readFile(
- path.join(PACKAGES_PATH, dir, 'package.json'),
- 'utf-8'
- ).then(JSON.parse);
-
- packages.push({
- name: packageJson.name.replace('@farfetched/', ''),
- root: path.join(PACKAGES_PATH, dir),
- });
- })
- );
-
- return packages;
-}