Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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",
pnpm: "pnpm",
root: "yarn",
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
2 changes: 0 additions & 2 deletions packages/find-root/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
type Tool,
RootTool,
type MonorepoRoot,
BoltTool,
LernaTool,
PnpmTool,
RushTool,
Expand All @@ -25,7 +24,6 @@ export const DEFAULT_TOOLS: Tool[] = [
PnpmTool,
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
Copy Markdown
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
Copy Markdown
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 @@ -43,27 +43,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 { PnpmTool } from "./PnpmTool.ts";
export { RootTool } from "./RootTool.ts";
Expand Down