Skip to content

Drop support for Bolt #245

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .changeset/slow-vans-repair.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@manypkg/get-packages": major
"@manypkg/find-root": major
"@manypkg/tools": major
"@manypkg/cli": minor
---

Drop support for Bolt
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

# Manypkg

Manypkg is a linter for `package.json` files in Yarn, Bolt or pnpm monorepos.
Manypkg is a linter for `package.json` files in Yarn, npm or pnpm monorepos.

## Install

Expand Down Expand Up @@ -166,7 +166,7 @@ The most commonly used range of the dependency is set as the range at every non-

<details><summary>Incorrect example</summary>

> NOTE: This example uses Yarn Workspaces but this will work the same with Bolt and pnpm
> NOTE: This example uses Yarn Workspaces but this will work the same with npm and pnpm

`package.json`

Expand Down Expand Up @@ -220,7 +220,7 @@ This example will cause an error because the range `2.0.0` for `some-external-pa

<details><summary>Correct example</summary>

> NOTE: This example uses Yarn Workspaces but this will work the same with Bolt and pnpm
> NOTE: This example uses Yarn Workspaces but this will work the same with npm and pnpm

`package.json`

Expand Down
11 changes: 0 additions & 11 deletions __fixtures__/bolt-workspace/package.json

This file was deleted.

7 changes: 0 additions & 7 deletions __fixtures__/bolt-workspace/packages/pkg-a/package.json

This file was deleted.

4 changes: 0 additions & 4 deletions __fixtures__/bolt-workspace/packages/pkg-b/package.json

This file was deleted.

2 changes: 1 addition & 1 deletion packages/cli/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Manypkg

Manypkg is a linter for `package.json` files in Yarn, Bolt, Lerna, pnpm or Rush monorepos.
Manypkg is a linter for `package.json` files in Yarn, npm, Lerna, pnpm or Rush monorepos.

## Install

Expand Down
1 change: 0 additions & 1 deletion packages/cli/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ export async function writePackage(pkg: Package) {

export async function install(toolType: string, cwd: string) {
const cliRunners: Record<string, string> = {
bolt: "bolt",
lerna: "lerna",
npm: "npm",
pnpm: "pnpm",
Expand Down
2 changes: 1 addition & 1 deletion packages/find-root/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# @manypkg/find-root

> Find the root of a monorepo with Yarn workspaces, Bolt, Lerna, pnpm or Rush
> Find the root of a monorepo with Yarn workspaces, npm, Lerna, pnpm or Rush

## Install

Expand Down
8 changes: 3 additions & 5 deletions packages/find-root/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
import fs from "node:fs";
import fsp from "node:fs/promises";
import path from "node:path";
import {
BoltTool,
LernaTool,
NpmTool,
PnpmTool,
Expand All @@ -12,6 +8,9 @@ import {
type MonorepoRoot,
type Tool,
} from "@manypkg/tools";
import fs from "node:fs";
import fsp from "node:fs/promises";
import path from "node:path";

/**
* A default ordering for monorepo tool checks.
Expand All @@ -26,7 +25,6 @@ export const DEFAULT_TOOLS: Tool[] = [
NpmTool,
LernaTool,
RushTool,
BoltTool,
RootTool,
];

Expand Down
4 changes: 2 additions & 2 deletions packages/get-packages/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# @manypkg/get-packages

> A simple utility to get the packages from a monorepo, whether they're using Yarn, Bolt, Lerna, pnpm or Rush
> A simple utility to get the packages from a monorepo, whether they're using Yarn, npm, Lerna, pnpm or Rush
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is npm monorepos actually supported in the package? IIUC since it uses package.json#workspaces it may be incorrectly detected as yarn.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch, #250


This library exports `getPackages` and `getPackagesSync`. It is intended mostly for use of developers building tools that want to support different kinds of monorepos as an easy way to write tools without having to write tool-specific code. It supports Yarn, Bolt, Lerna, pnpm, Rush and single-package repos(where the only package is the the same as the root package). This library uses `@manypkg/find-root` to search up from the directory that's passed to `getPackages` or `getPackagesSync` to find the project root.
This library exports `getPackages` and `getPackagesSync`. It is intended mostly for use of developers building tools that want to support different kinds of monorepos as an easy way to write tools without having to write tool-specific code. It supports Yarn, npm, Lerna, pnpm, Rush and single-package repos(where the only package is the the same as the root package). This library uses `@manypkg/find-root` to search up from the directory that's passed to `getPackages` or `getPackagesSync` to find the project root.

```typescript
import { getPackages, getPackagesSync } from "@manypkg/get-packages";
Expand Down
21 changes: 0 additions & 21 deletions packages/get-packages/src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,27 +65,6 @@ let runTests = (getPackages: GetPackages) => {
expect(allPackages.tool.type).toEqual("yarn");
});

it("should resolve workspaces for bolt", async () => {
const dir = f.copy("bolt-workspace");

// Test for both root and subdirectories
for (const location of [".", "packages", "packages/pkg-b"]) {
const allPackages = await getPackages(path.join(dir, location));

if (allPackages.packages === null) {
return expect(allPackages.packages).not.toBeNull();
}

expect(allPackages.packages[0].packageJson.name).toEqual(
"bolt-workspace-pkg-a"
);
expect(allPackages.packages[1].packageJson.name).toEqual(
"bolt-workspace-pkg-b"
);
expect(allPackages.tool.type).toEqual("bolt");
}
});

it("should resolve workspaces for pnpm", async () => {
const dir = f.copy("pnpm-workspace-base");

Expand Down
126 changes: 0 additions & 126 deletions packages/tools/src/BoltTool.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/tools/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export * from "./Tool.ts";
export { BoltTool } from "./BoltTool.ts";
export { LernaTool } from "./LernaTool.ts";
export { NpmTool } from "./NpmTool.ts";
export { PnpmTool } from "./PnpmTool.ts";
Expand Down