Comments (11)
@rotespferd this issue is resolved in roboter version 12.1.0
with the update of the dependency npm-package-json-lint-config-tnw
to version 1.1.0
. If in the future you choose to use a license that is not intended to be used by the config, you need to override that rule yourself.
from roboter.
Hey @rotespferd π
Thanks for bringing this up, we are going to investigate what the problem is and may come back with additional questions to you.
from roboter.
Okay, I've tried this with a simple example, and I was not able to reproduce this behavior. Can you please provide a sample repository?
from roboter.
I created the following package.json, which reproduces the error for me:
https://gist.github.com/rotespferd/f34e703ff67109d225819567c311de91
from roboter.
If I take this package.json
file, run npm install
. and then run npx roboter license
, it works π³
from roboter.
This is strange :-D
I looked into the code of roboter. It seams to me that the license check compare the license field of the package.json against the licenses in the file "licenseCheck.json".
The array "compatibleLicenses" in this file does not contain the AGPL. So in my understanding the license check failed because the AGPL is not in the file.
from roboter.
Basically, what we do is that we compare the license given in the package.json
file against those defined in the licenseCheck.json
file. If there are any incompatibilities, you will get a license error.
However, the error message you provided does not say that there is an incompatible license, but that the package.json
file is broken βΒ and this is what I can not reproduce.
from roboter.
Ok, sorry, that was my fault. I misunderstood the logic of the code.
What happens if you run npx roboter analyze
with the given package.json?
The problem seems to be in the linting part of the "package.json". roboter uses the module "npm-package-json-lint" for this. "npm-package-json-lint" validates the content of the license field against which licenses are configured in ".npmpackagejsonlintrc" in the property "valid-values-license" (see documentation).
Roboter extends the config of the file "npm-package-json-lint-config-tnw/app.json", which basically extends "npm-package-json-lint-config-tnw/base.json". In base.json you only allow the MIT license. So every other license produces an error. For testing purpose I inserted the GPL in the license field, which also produces an error. Only when I put the MIT license in the field everything runs without an error.
(To rule out that the error is due to my environment I tested everything which a freshly installed Linux environment with the latest Node version)
from roboter.
@rotespferd you are entirely correct. The issue here is the npm-package-json-lint configuration which does not allow the license you are using. This is not an issue with the license
command.
This was originally done in the npm-package-json-lint configuration since we use the MIT license for almost everything, but that has since caused other issues and thus other licenses were added (e.g. your ALPG-3.0-or-later).
If you want to use another license that is not present in the npm-package-json-lint configuration, you can overwrite that rule. You found the documentation on that yourself, so I won't elaborate on this :)
The package npm-package-json-lint-config-tnw
unfortunately has not yet been updated in the roboter, since we're having CI issues. I'll notify you here once the new version is contained and this issue will be resolved.
from roboter.
@rotespferd Sorry for not having replied back earlier, I had a few days off.
The mistake was on my side β I actually forgot to add a .npmpackagejsonlintrc
file to the project I have been testing with. If I add one, I get the same error that you got. Sorry for that π
As @yeldiRium already pointed out we updated the underlying package accordingly, but have a few problems releasing a new version of roboter. As soon as this is done the problems should be gone.
from roboter.
Thank you guys for your work!
Now it is working for me.
from roboter.
Related Issues (20)
- Non-strict dependency test crashes when non-strict dependencies are found
- Support mocharc.js in addition to mocharc.json for test types.
- Colorize analyse results HOT 2
- Skipping license check β a good idea? HOT 5
- Validate license strictly if no configuration file exists
- Document roboter context in mocha suites
- Make compatible licenses configuration optional
- Automatically fix the order of properties in `package.json` during `qa`.
- Check of tsconfig.json don't recognised extendes config HOT 1
- Test Watch-Mode crashes on syntax errors
- Bug: roboter test failes without a message on typescript compilation failures
- The typecheck of `roboter analyze` requires an output configuration in `tsconfig.json`. HOT 1
- The analyze task can't find the package.json file if it contains a syntax error
- Not working with npm workspaces? HOT 4
- CC-BY/Artistic licenses and Compatibility HOT 3
- `test` command fails with `typescript >= 4.7`
- pinned peer dependencies create unresolvable dependencie cycle
- Cannot handle comments in json files HOT 1
- Using MIT License sscs-parser is reported to use incaompatible license HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from roboter.