Skip to content

Commit a00f5f7

Browse files
authored
Drop support for Bolt (#245)
1 parent 3cf8c4e commit a00f5f7

File tree

13 files changed

+18
-183
lines changed

13 files changed

+18
-183
lines changed

.changeset/slow-vans-repair.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
"@manypkg/get-packages": major
3+
"@manypkg/find-root": major
4+
"@manypkg/tools": major
5+
"@manypkg/cli": minor
6+
---
7+
8+
Drop support for Bolt

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
# Manypkg
2424

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

2727
## Install
2828

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

167167
<details><summary>Incorrect example</summary>
168168

169-
> NOTE: This example uses Yarn Workspaces but this will work the same with Bolt and pnpm
169+
> NOTE: This example uses Yarn Workspaces but this will work the same with npm and pnpm
170170
171171
`package.json`
172172

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

221221
<details><summary>Correct example</summary>
222222

223-
> NOTE: This example uses Yarn Workspaces but this will work the same with Bolt and pnpm
223+
> NOTE: This example uses Yarn Workspaces but this will work the same with npm and pnpm
224224
225225
`package.json`
226226

__fixtures__/bolt-workspace/package.json

-11
This file was deleted.

__fixtures__/bolt-workspace/packages/pkg-a/package.json

-7
This file was deleted.

__fixtures__/bolt-workspace/packages/pkg-b/package.json

-4
This file was deleted.

packages/cli/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Manypkg
22

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

55
## Install
66

packages/cli/src/utils.ts

-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ export async function writePackage(pkg: Package) {
1616

1717
export async function install(toolType: string, cwd: string) {
1818
const cliRunners: Record<string, string> = {
19-
bolt: "bolt",
2019
lerna: "lerna",
2120
npm: "npm",
2221
pnpm: "pnpm",

packages/find-root/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# @manypkg/find-root
22

3-
> Find the root of a monorepo with Yarn workspaces, Bolt, Lerna, pnpm or Rush
3+
> Find the root of a monorepo with Yarn workspaces, npm, Lerna, pnpm or Rush
44
55
## Install
66

packages/find-root/src/index.ts

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
import fs from "node:fs";
2-
import fsp from "node:fs/promises";
3-
import path from "node:path";
41
import {
5-
BoltTool,
62
LernaTool,
73
NpmTool,
84
PnpmTool,
@@ -12,6 +8,9 @@ import {
128
type MonorepoRoot,
139
type Tool,
1410
} from "@manypkg/tools";
11+
import fs from "node:fs";
12+
import fsp from "node:fs/promises";
13+
import path from "node:path";
1514

1615
/**
1716
* A default ordering for monorepo tool checks.
@@ -26,7 +25,6 @@ export const DEFAULT_TOOLS: Tool[] = [
2625
NpmTool,
2726
LernaTool,
2827
RushTool,
29-
BoltTool,
3028
RootTool,
3129
];
3230

packages/get-packages/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# @manypkg/get-packages
22

3-
> A simple utility to get the packages from a monorepo, whether they're using Yarn, Bolt, Lerna, pnpm or Rush
3+
> A simple utility to get the packages from a monorepo, whether they're using Yarn, npm, Lerna, pnpm or Rush
44
5-
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.
5+
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.
66

77
```typescript
88
import { getPackages, getPackagesSync } from "@manypkg/get-packages";

packages/get-packages/src/index.test.ts

-21
Original file line numberDiff line numberDiff line change
@@ -65,27 +65,6 @@ let runTests = (getPackages: GetPackages) => {
6565
expect(allPackages.tool.type).toEqual("yarn");
6666
});
6767

68-
it("should resolve workspaces for bolt", async () => {
69-
const dir = f.copy("bolt-workspace");
70-
71-
// Test for both root and subdirectories
72-
for (const location of [".", "packages", "packages/pkg-b"]) {
73-
const allPackages = await getPackages(path.join(dir, location));
74-
75-
if (allPackages.packages === null) {
76-
return expect(allPackages.packages).not.toBeNull();
77-
}
78-
79-
expect(allPackages.packages[0].packageJson.name).toEqual(
80-
"bolt-workspace-pkg-a"
81-
);
82-
expect(allPackages.packages[1].packageJson.name).toEqual(
83-
"bolt-workspace-pkg-b"
84-
);
85-
expect(allPackages.tool.type).toEqual("bolt");
86-
}
87-
});
88-
8968
it("should resolve workspaces for pnpm", async () => {
9069
const dir = f.copy("pnpm-workspace-base");
9170

packages/tools/src/BoltTool.ts

-126
This file was deleted.

packages/tools/src/index.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
export * from "./Tool.ts";
2-
export { BoltTool } from "./BoltTool.ts";
32
export { LernaTool } from "./LernaTool.ts";
43
export { NpmTool } from "./NpmTool.ts";
54
export { PnpmTool } from "./PnpmTool.ts";

0 commit comments

Comments
 (0)