yarnpkg / yarn

The 1.x line is frozen - features and bugfixes now happen on https://github.com/yarnpkg/berry
https://classic.yarnpkg.com
Other
41.37k stars 2.72k forks source link

PATENTS #4914

Open luisapace opened 6 years ago

luisapace commented 6 years ago

In the files:

and

is written:

*** This source code is licensed under the BSD-style license found in the

But I cannot see any PATENTS file in the root directory of the source tree of yarn-v0.27.5.

Could you please clarify?

Thanks.

Daniel15 commented 6 years ago

Yarn v0.27.5 is old, I suggest updating to the latest version.

Having said that, I still see this comment block in the latest version. It looks like the PATENTS clause in the latest version is coming from the invariant module:

/**
 * Copyright 2013-2015, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 */

/**
 * Use invariant() to assert state which your program assumes to be true.
 *
 * Provide sprintf-style format (only %s is supported) and arguments
 * to provide information about what broke and what you were
 * expecting.
 *
 * The invariant message will be stripped in production, but the invariant
 * will remain to ensure logic does not differ in production.
 */

This was changed in https://github.com/facebook/fbjs/pull/269 so I suspect we're just pulling in an outdated version of fbjs somewhere.

Daniel15 commented 6 years ago

Actually, we're using a separate package (https://yarn.pm/invariant) that contains the PATENTS clause. This should be removed in that project: https://github.com/zertosh/invariant/issues/25

luisapace commented 6 years ago

I'm not sure to have understood: in the package invariant there is still the BSD license (see https://github.com/zertosh/invariant/blob/v2.2.2/LICENSE) and you mentioned https://github.com/facebook/fbjs/pull/269; is fbjs another package? I see that invariant is a yarn dependency, but what is the relation between invariant and fbjs? Could you please clarify? Thanks again.

BYK commented 6 years ago

These are respective dependencies of Yarn and the patent files are managed by those repositories. What exactly is your question here?

Daniel15 commented 6 years ago

fbjs is where the original version of invariant came from. The version of invariant we're using in Yarn comes from a repository that forked it (https://github.com/zertosh/invariant).

fbjs was updated to not have the patents clause, but @zertosh's fork of invariant hasn't been updated yet.