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

Support processing of package.json files in node_modules #15

Open
dfagan2 opened this issue Apr 24, 2020 · 3 comments
Open

Support processing of package.json files in node_modules #15

dfagan2 opened this issue Apr 24, 2020 · 3 comments
Assignees

Comments

@dfagan2
Copy link

dfagan2 commented Apr 24, 2020

Because of nodejs/help#2303, validation trips up when using this tool with packages within node_modules, which happens to be my use case.

The following is thrown:

InvalidNpmPackageException: Package is invalid. Inspection results:
{
    "valid": false,
    "errors": [
        "Type for field bundleDependencies, was expected to be array, not boolean"
    ]
}

So while that is a valid error, and this is an upstream problem, would it be possible to include a configuration override from this package that ignores bundleDependencies, or allows it to be be a boolean?

@Silic0nS0ldier
Copy link
Member

First time I've seen this library being used in the wild for something other than a UserFrosting project. Interesting use case. Relatively sure the package.json file for packages in node_modules adheres to a different spec (its modified by NPM/Yarn to hold meta data), hence this presenting a problem.

Seeing this scenario covered will likely involve a semver major release, https://github.com/RobotsAndPencils/react-robits will need to update once this is addressed.

@Silic0nS0ldier Silic0nS0ldier self-assigned this Apr 25, 2020
@Silic0nS0ldier Silic0nS0ldier changed the title Validation Error Workaround? Support processing of package.json files in node_modules Apr 25, 2020
@dfagan2
Copy link
Author

dfagan2 commented Apr 28, 2020

Thanks for looking into this @Silic0nS0ldier! No issue from our end upgrading to a new release if this gets a workaround.

And this is a cool tool, happy to help get it some "in the wild" exposure! It's been really helpful for our setup.

Another use case, while you're in there, is that it'd be helpful to be able to scope to just the dependency list, for instances where the devDependency items are not needed.

@Silic0nS0ldier
Copy link
Member

I'll keep that in mind. The refactor I'm currently working on should offer the level of control needed for most scenarios.

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