0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-30 22:34:10 -05:00
verdaccio/test/cli/e2e-yarn4/utils.ts
Juan Picado ccabb4b876
test: e2e audit cmd (#3382)
* test: e2e audit

* Update process.ts

* Update audit.spec.ts

* Update package.json

* chore: test

* test

* test

* chore: add docs
2022-09-17 00:33:55 +02:00

18 lines
602 B
TypeScript

import { join } from 'path';
import { exec } from '@verdaccio/test-cli-commons';
export function getCommand(projectFolder) {
return join(projectFolder, './.yarn/releases/yarn.js');
}
export function getYarnCommand() {
// FUTURE: yarn 4 rc still not available via registry
// tags: https://repo.yarnpkg.com/tags
// download binary: https://repo.yarnpkg.com/4.0.0-rc.14/packages/yarnpkg-cli/bin/yarn.js
return join(__dirname, './bin/yarn-4.0.0-rc.14.cjs');
}
export function yarn(projectFolder, ...args: string[]) {
return exec({ cwd: projectFolder }, getCommand(projectFolder), args);
}