Skip to content
Snippets Groups Projects
Commit 91301127 authored by Marcus Schiesser's avatar Marcus Schiesser
Browse files

fix[cl]: naming bug and added release changeset

parent 9d69571d
No related branches found
No related tags found
No related merge requests found
...@@ -41,25 +41,22 @@ const addDependencies = async ( ...@@ -41,25 +41,22 @@ const addDependencies = async (
// Modify toml dependencies // Modify toml dependencies
const tool = fileParsed.tool as any; const tool = fileParsed.tool as any;
const dependencies = tool.poetry.dependencies as any; const existingDependencies = tool.poetry.dependencies as any;
for (const dependency of dependencies) { for (const dependency of dependencies) {
dependencies[dependency.name] = dependency.version; existingDependencies[dependency.name] = dependency.version;
} }
// Write toml file // Write toml file
const newFileContent = stringify(fileParsed); const newFileContent = stringify(fileParsed);
await fs.writeFile(file, newFileContent); await fs.writeFile(file, newFileContent);
const dependenciesString = dependencies const dependenciesString = dependencies.map((d) => d.name).join(", ");
.map((d: Dependency) => d.name)
.join(", ");
console.log(`\nAdded ${dependenciesString} to ${cyan(FILENAME)}\n`); console.log(`\nAdded ${dependenciesString} to ${cyan(FILENAME)}\n`);
} catch (error) { } catch (error) {
console.log( console.log(
`Error while updating dependencies for Poetry project file ${FILENAME}\n`, `Error while updating dependencies for Poetry project file ${FILENAME}\n`,
error, error,
); );
console.log(error);
} }
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment