Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async execute() {
const cwd = npath.toPortablePath(npath.resolve(this.cwd));
const configuration = await Configuration.find(cwd, null, {strict: false});
const allManifests = await findFiles(`**/package.json`, cwd);
const allManifestFolders = allManifests.map(p => ppath.dirname(p));
const allFiles = await findFiles(`**/*.{ts,tsx,js,jsx}`, cwd);
const pluginConfiguration = getPluginConfiguration();
const findStandaloneWorkspace = async (manifestCwd: PortablePath) => {
const configuration = await Configuration.find(manifestCwd, pluginConfiguration, {strict: false, lookup: ProjectLookup.NONE});
const {workspace} = await Project.find(configuration, manifestCwd);
return workspace;
};
const findLockfileWorkspace = async (manifestCwd: PortablePath) => {
const configuration = await Configuration.find(manifestCwd, pluginConfiguration, {strict: false});
if (!configuration.projectCwd)
return null;
const {project} = await Project.find(configuration, configuration.projectCwd);
const workspace = project.tryWorkspaceByCwd(manifestCwd);
if (!workspace)