Yarn: LicensegenerateDisclaimer-「ジャンク」をstdoutに出力します

作成日 2016年10月18日  ·  3コメント  ·  ソース: yarnpkg/yarn

_feature_をリクエストしますか、それとも_bug_を報告しますか?
バグ

現在の動作は何ですか?
yarn licenses generateDisclaimerを実行し、stdoutをファイルにパイプする場合、この機能をCIなどと簡単に統合するために免責事項のテキストのみを取得することを期待します。代わりに、最初の数行は次のようになります。

yarn licenses v0.15.1
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
THE FOLLOWING SETS FORTH ATTRIBUTION NOTICES FOR THIRD PARTY SOFTWARE THAT MAY BE CONTAINED IN PORTIONS OF THE XXX PRODUCT.

3行目は正しいですが、2つの手順は免責事項とは何の関係もありません。

ドキュメントの最後に、次のような行があります

Done in 5.45s.

これも免責事項の一部ではなく、出力の一部であってはなりません。

考えられる解決策は4つあります。

  • 1つ目は、 yarnに関するすべてのメタデータをstderrに送信することです。
  • 2つ目は、 generateDisclaimerを特別に処理することです。
  • 3つ目は、グローバル-q, --quietフラグを作成することです
  • 最後は、ファイルを書き込むgenerateDisclaimer-o --outputオプションを追加することです

現在の動作がバグである場合は、再現する手順を提供してください。

  1. いくつかの依存関係(できれば互換性のないpeerDependenciesを使用)を使用してpackage.jsonを作成します
  2. yarn licenses generateDisclaimer > DISCLAIMERS.txt実行します
  3. DISCLAIMERS.txt開く
  4. ドキュメントの最初と最後を見てください

期待される動作は何ですか?
免責事項ファイルは、 THE FOLLOWING SETS FORTH ATTRIBUTIONの前の部分がなく、最後にDone in 5.45s.がない状態で生成されます。

node.js、yarn、オペレーティングシステムのバージョンを教えてください。

$ yarn --version
0.15.1
$ node --version
v6.4.0
$ uname -a
Linux thor.osl.manamind.com 4.7.7-200.fc24.x86_64 #1 SMP Sat Oct 8 00:21:59 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
cat-feature

最も参考になるコメント

こんにちはすべて、私はまだこの問題を抱えているようです:

$ yarn --version
0.22.0
$ yarn licenses generate-disclaimer > test.out
warning [email protected]: No license field
warning [email protected]: The platform "darwin" is incompatible with this module.
warning [email protected]: The platform "darwin" is incompatible with this module.
warning package.json: No license field
$ head test.out
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
THE FOLLOWING SETS FORTH ATTRIBUTION NOTICES FOR THIRD PARTY SOFTWARE THAT MAY BE CONTAINED IN PORTIONS OF THE CASTBRIDGE PRODUCT.
...

これを修正する方法はありますか? ありがとう!

NINJA EDIT: yarn licenses generate-disclaimer --ignore-platformを実行でき、それでやりたいことができますが、それが意図された使用パターンではないと思います。 (私は間違っている可能性があります)

全てのコメント3件

貢献を始めたいので、これに取り組んでいきます。

これを修正するために#1586を作成し、承認待ち。

こんにちはすべて、私はまだこの問題を抱えているようです:

$ yarn --version
0.22.0
$ yarn licenses generate-disclaimer > test.out
warning [email protected]: No license field
warning [email protected]: The platform "darwin" is incompatible with this module.
warning [email protected]: The platform "darwin" is incompatible with this module.
warning package.json: No license field
$ head test.out
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
THE FOLLOWING SETS FORTH ATTRIBUTION NOTICES FOR THIRD PARTY SOFTWARE THAT MAY BE CONTAINED IN PORTIONS OF THE CASTBRIDGE PRODUCT.
...

これを修正する方法はありますか? ありがとう!

NINJA EDIT: yarn licenses generate-disclaimer --ignore-platformを実行でき、それでやりたいことができますが、それが意図された使用パターンではないと思います。 (私は間違っている可能性があります)

このページは役に立ちましたか?
0 / 5 - 0 評価