Upgrade to Yarn v3

This commit is contained in:
Stéphan Kochen
2021-08-15 21:00:54 +02:00
parent 47e5ae1b79
commit 2757cfd115
14 changed files with 1871 additions and 1167 deletions
+4 -5
View File
@@ -1,4 +1,4 @@
import { Command } from "clipanion";
import { Command, Option } from "clipanion";
import { Filename, npath, ppath, xfs } from "@yarnpkg/fslib";
import { getPnpPath } from "@yarnpkg/plugin-pnp";
@@ -18,10 +18,9 @@ const supportedLinkers = [`pnp`, `node-modules`];
// Internal command that creates wrappers for binaries.
// Used inside the Nix install phase.
export default class InstallBinCommand extends Command<CommandContext> {
@Command.String()
binDir: string = ``;
static paths = [[`nixify`, `install-bin`]];
binDir = Option.String();
@Command.Path(`nixify`, `install-bin`)
async execute() {
const configuration = await Configuration.find(
this.context.cwd,
@@ -49,7 +48,7 @@ export default class InstallBinCommand extends Command<CommandContext> {
}
const binDir = npath.toPortablePath(this.binDir);
const pnpPath = getPnpPath(project).main;
const pnpPath = getPnpPath(project).cjs;
for (const [name, scriptInput] of workspace.manifest.bin) {
const binPath = ppath.join(binDir, name as Filename);
const scriptPath = ppath.join(