question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

conventional-changelog and its dependencies

See original GitHub issue

General Informaitions

Recently i started investigating and making small pull requests to reduce/simplify dependency graph for packages from this repository

as reference:

https://snyk.io/blog/how-to-maintain-npm-dependencies-in-your-project/


Recommended refactoring:

split cli logic from packages, as consumers of your packages does not require this functionality at all

example: introduce new package git-raw-commits-api and move index.js from git-raw-commits git-raw-commits should depend on git-raw-commits-api and can rexeport all functionality to index for backward compatibility, that should remove requirement of installing cli for packages from within this project or external consumers

  • lerna
  • commitlint
  • git-commits-since
  • autorelease
  • conventional-git-log
  • semantic-release-github

https://www.npmjs.com/browse/depended/git-raw-commits

in case of this package this split changes number of used packages from 78 to 9

This should be applied to all packages that provide cli as other libraries does not require cli at all

note: name is just an example


Progress so far

Some smaller changes that should remove deprecated, not maintained or unnecessary dependencies:

  • #742 - q - it was a great package when promises where not available [not maintained]
  • #750 - pinkie-promise - polyfill for Promise [not maintained]
  • #745 - object-assign - polyfill for Object.assign that is needed for node less than 4 [not maintained]
  • #748 - fs-access - polyfill for fs.access that is needed for node less than 0.12 [not maintained]
  • #749 - sprintf-js - all functionality that we are using from it is natively supported
  • #747 - modify-values - can be replaced by reusing lodash/mapValues
  • #752 - shelljs - unnecessary used as there is single line native alternative
  • #751 - temp, tmp - there is no point in using both of them, as they provide ~same functionality
  • #758 - lodash isFunction - we can safely use native typeof check

there is a lot more dependencies that could be replaced by more popular alternatives or replaced with native alternatives, but before i proceed I’d like to verify that those changes are something what is wanted in this project.

@bcoe what do you think about this?

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
bcoecommented, Jan 27, 2021

are you planning to replace current parser with it? i checked out code and it looks way cleaner than what is in here

The problem is that the parser is written specifically for the conventional commit spec, whereas this codebase is more generic.

1reaction
bcoecommented, Jan 27, 2021

@armano2 I like the idea of trimming down dependencies, and feel like we have good enough coverage to do so.

Separate to this work, I actually rewrote the parser for my team:

https://github.com/conventional-commits/parser

Partially because I wanted a more concise implementation.

Read more comments on GitHub >

github_iconTop Results From Across the Web

conventional-changelog/standard-version
This has the benefit of allowing you to use standard-version on any repo/package without adding a dev dependency to each one. Using npx....
Read more >
conventional-changelog
Generate a changelog from git metadata. Latest version: 3.1.25, last published: a year ago. Start using conventional-changelog in your ...
Read more >
conventional-changelog | Yarn - Package Manager
NPM version Build Status Dependency Status Coverage Status. Generate a changelog ... All notable changes to this project will be documented in this...
Read more >
conventional-changelog-conventionalcommits - npm
Learn more about conventional-changelog-conventionalcommits: package health ... All security vulnerabilities belong to production dependencies of direct and ...
Read more >
Tooling for Conventional Commits
The first draft of this specification has been written in collaboration with some of the folks contributing to: conventional-changelog: a set of tools...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found