Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs about using this library programmatically are out of date #121

Open
kaiyoma opened this issue Sep 23, 2024 · 1 comment
Open

Docs about using this library programmatically are out of date #121

kaiyoma opened this issue Sep 23, 2024 · 1 comment

Comments

@kaiyoma
Copy link

kaiyoma commented Sep 23, 2024

The section "Requiring" (https://github.com/RSeidelsohn/license-checker-rseidelsohn?tab=readme-ov-file#requiring) is now very wrong after recent updates to this library. I think this section should be updated to use import syntax, and to no longer use the default export (which no longer works).

Proposed:

import { init } from 'license-checker-rseidelsohn';

init(
    {
        start: '/path/to/start/looking',
    },
    // eslint-disable-next-line no-unused-vars
    function (err, packages) {
        if (err) {
            //Handle error
        } else {
            //The sorted package data
            //as an Object
        }
    },
);
@jbblanchet
Copy link

I also believe that this version should have been flagged as a major revision, since it was a breaking change to anyone using this as a library. It's too late now, but maybe something to keep in mind for future revisions, library use needs to be considered when deciding on a version number.

Thanks for the hard work, one breaking change is a low price to pay to not have to worry about license checking 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants