From 7211ebf5acf02dcfeec723ad28cc2454307c64a2 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Wed, 10 Feb 2016 23:00:56 +0000 Subject: [PATCH] add PATENTS, CODE_OF_CONDUCT, LICENSE files --- CODE_OF_CONDUCT.md | 74 +++++++++++++++++++ CONTRIBUTING.md | 40 ++++++++++ LICENSE | 30 ++++++++ PATENTS | 33 +++++++++ src/analysis/analysers/dynamic-require.js | 11 ++- src/analysis/analysers/require-escape.js | 11 ++- src/analysis/constants.js | 11 ++- src/analysis/index.js | 11 ++- src/analysis/text/diff.js | 11 ++- src/analysis/text/similarity.js | 11 ++- src/analysis/walk.js | 11 ++- src/api.js | 11 ++- src/cli/aliases.js | 11 ++- src/cli/arg-utils.js | 11 ++- src/cli/commands/_execute-lifecycle-script.js | 11 ++- src/cli/commands/_useless.js | 11 ++- src/cli/commands/index.js | 11 ++- src/cli/commands/install.js | 11 ++- src/cli/commands/run-script.js | 11 ++- src/cli/commands/uninstall.js | 11 ++- src/cli/commands/update.js | 11 ++- src/cli/index.js | 11 ++- src/config.js | 11 ++- src/constants.js | 11 ++- src/errors.js | 11 ++- src/fetchers/_base.js | 11 ++- src/fetchers/copy.js | 11 ++- src/fetchers/git.js | 11 ++- src/fetchers/index.js | 11 ++- src/fetchers/tarball.js | 11 ++- src/lockfile/index.js | 11 ++- src/lockfile/parse.js | 11 ++- src/lockfile/stringify.js | 11 ++- src/package-compatibility.js | 11 ++- src/package-constraint-resolver.js | 11 ++- src/package-fetcher.js | 11 ++- src/package-install-scripts.js | 11 ++- src/package-linker.js | 11 ++- src/package-reference.js | 11 ++- src/package-request.js | 11 ++- src/package-resolver.js | 11 ++- src/registries/_base.js | 11 ++- src/registries/bower.js | 11 ++- src/registries/index.js | 11 ++- src/registries/npm.js | 11 ++- src/reporters/_base.js | 11 ++- src/reporters/buffer.js | 11 ++- src/reporters/console/index.js | 11 ++- src/reporters/console/spinner.js | 11 ++- src/reporters/index.js | 11 ++- src/reporters/json.js | 11 ++- src/resolvers/_base.js | 11 ++- src/resolvers/exotics/_base.js | 11 ++- src/resolvers/exotics/_hosted-git.js | 11 ++- src/resolvers/exotics/_registry.js | 11 ++- src/resolvers/exotics/bitbucket.js | 11 ++- src/resolvers/exotics/file.js | 11 ++- src/resolvers/exotics/gist.js | 11 ++- src/resolvers/exotics/git.js | 11 ++- src/resolvers/exotics/github.js | 11 ++- src/resolvers/exotics/gitlab.js | 11 ++- src/resolvers/exotics/tarball.js | 11 ++- src/resolvers/index.js | 11 ++- src/resolvers/registries/_base.js | 11 ++- src/resolvers/registries/bower.js | 11 ++- src/resolvers/registries/npm.js | 11 ++- src/types.js | 11 ++- src/util/blocking-queue.js | 11 ++- src/util/child.js | 11 ++- src/util/crypto.js | 11 ++- src/util/execute-lifecycle-script.js | 11 ++- src/util/fs.js | 11 ++- src/util/git.js | 11 ++- src/util/map.js | 11 ++- src/util/misc.js | 11 ++- src/util/network.js | 11 ++- src/util/normalise-package-info/fix.js | 12 ++- src/util/normalise-package-info/index.js | 11 ++- src/util/normalise-package-info/util.js | 11 ++- src/util/normalise-package-info/validate.js | 11 ++- src/util/promise.js | 11 ++- src/util/request-manager.js | 11 ++- src/util/version.js | 11 ++- test/analysis.js | 13 +++- test/lockfile.js | 11 +++ test/package-resolver.js | 11 +++ 86 files changed, 1002 insertions(+), 80 deletions(-) create mode 100644 CODE_OF_CONDUCT.md create mode 100644 LICENSE create mode 100644 PATENTS diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000000..d05f4bc063 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,74 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of experience, +nationality, personal appearance, race, religion, or sexual identity and +orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or +advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at [INSERT EMAIL ADDRESS]. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index eab50c0944..4d459feb74 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,5 +1,8 @@ # CONTRIBUTING +Contributions are always welcome, no matter how large or small. Before +contributing, please read the [code of conduct](CODE_OF_CONDUCT.md). + ## Building ```sh @@ -19,3 +22,40 @@ $ make test ```sh $ make lint ``` + +## Pull Requests + +We actively welcome your pull requests. + +1. Fork the repo and create your branch from `master`. +2. If you've added code that should be tested, add tests. +3. If you've changed APIs, update the documentation. +4. Ensure the test suite passes. +5. Make sure your code lints. +6. If you haven't already, complete the Contributor License Agreement ("CLA"). + +## Contributor License Agreement ("CLA") + +In order to accept your pull request, we need you to submit a CLA. You only need +to do this once to work on any of Facebook's open source projects. + +Complete your CLA here: + +## Issues + +We use GitHub issues to track public bugs. Please ensure your description is +clear and has sufficient instructions to be able to reproduce the issue. + +Facebook has a [bounty program](https://www.facebook.com/whitehat/) for the safe +disclosure of security bugs. In those cases, please go through the process +outlined on that page and do not file a public issue. + +## Coding Style + +Use the same coding style, spacing and naming scheme as existing code. When in doubt run +`make lint`. + +## License + +By contributing to kpm, you agree that your contributions will be licensed +under its BSD license. diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000000..b9647cd84f --- /dev/null +++ b/LICENSE @@ -0,0 +1,30 @@ +BSD License + +For kpm software + +Copyright (c) 2016-present, Facebook, Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name Facebook nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/PATENTS b/PATENTS new file mode 100644 index 0000000000..c614deb68a --- /dev/null +++ b/PATENTS @@ -0,0 +1,33 @@ +Additional Grant of Patent Rights Version 2 + +"Software" means the kpm software distributed by Facebook, Inc. + +Facebook, Inc. ("Facebook") hereby grants to each recipient of the Software +("you") a perpetual, worldwide, royalty-free, non-exclusive, irrevocable +(subject to the termination provision below) license under any Necessary +Claims, to make, have made, use, sell, offer to sell, import, and otherwise +transfer the Software. For avoidance of doubt, no license is granted under +Facebook’s rights in any patent claims that are infringed by (i) modifications +to the Software made by you or any third party or (ii) the Software in +combination with any software or other technology. + +The license granted hereunder will terminate, automatically and without notice, +if you (or any of your subsidiaries, corporate affiliates or agents) initiate +directly or indirectly, or take a direct financial interest in, any Patent +Assertion: (i) against Facebook or any of its subsidiaries or corporate +affiliates, (ii) against any party if such Patent Assertion arises in whole or +in part from any software, technology, product or service of Facebook or any of +its subsidiaries or corporate affiliates, or (iii) against any party relating +to the Software. Notwithstanding the foregoing, if Facebook or any of its +subsidiaries or corporate affiliates files a lawsuit alleging patent +infringement against you in the first instance, and you respond by filing a +patent infringement counterclaim in that lawsuit against that party that is +unrelated to the Software, the license granted hereunder will not terminate +under section (i) of this paragraph due to such counterclaim. + +A "Necessary Claim" is a claim of a patent owned by Facebook that is +necessarily infringed by the Software standing alone. + +A "Patent Assertion" is any lawsuit or other action alleging direct, indirect, +or contributory infringement or inducement to infringe any patent, including a +cross-claim or counterclaim. diff --git a/src/analysis/analysers/dynamic-require.js b/src/analysis/analysers/dynamic-require.js index 024cdc08b0..85e93a34fe 100644 --- a/src/analysis/analysers/dynamic-require.js +++ b/src/analysis/analysers/dynamic-require.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ // Find potential dynamic requires that could be dangerous. diff --git a/src/analysis/analysers/require-escape.js b/src/analysis/analysers/require-escape.js index ec1d3a0061..9e2f28e370 100644 --- a/src/analysis/analysers/require-escape.js +++ b/src/analysis/analysers/require-escape.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ // Check if the dependencies a module is trying to `require` exist in it's `package.json`. // If they don't then it's a module potentially trying to escape and monkeypatch. diff --git a/src/analysis/constants.js b/src/analysis/constants.js index 8011658a3a..a80ad061ff 100644 --- a/src/analysis/constants.js +++ b/src/analysis/constants.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ export let DANGEROUS_CATEGORY = "DANGEROUS"; export let WARNING_CATEGORY = "WARNING"; diff --git a/src/analysis/index.js b/src/analysis/index.js index 400333ca4a..1d3e3f7036 100644 --- a/src/analysis/index.js +++ b/src/analysis/index.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ import type { AnalysisFileEntry as File } from "../types.js"; import similarity from "./text/similarity.js"; diff --git a/src/analysis/text/diff.js b/src/analysis/text/diff.js index 6cbe1df055..860d6c09c2 100644 --- a/src/analysis/text/diff.js +++ b/src/analysis/text/diff.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ let diff = require("diff"); diff --git a/src/analysis/text/similarity.js b/src/analysis/text/similarity.js index 2d9852d55e..f095c89b8a 100644 --- a/src/analysis/text/similarity.js +++ b/src/analysis/text/similarity.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ type Char = number | string; diff --git a/src/analysis/walk.js b/src/analysis/walk.js index 715f48e5f4..0e0a158e18 100644 --- a/src/analysis/walk.js +++ b/src/analysis/walk.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ import type { AnalysisFileEntry as File } from "../types.js"; import * as utilFs from "../util/fs.js"; diff --git a/src/api.js b/src/api.js index a9b0357659..f7cfc21a9c 100644 --- a/src/api.js +++ b/src/api.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ export { default as PackageConstraintResolver } from "./package-constraint-resolver"; export { default as PackageInstallScripts } from "./package-install-scripts"; diff --git a/src/cli/aliases.js b/src/cli/aliases.js index 85ac250e41..19f28b668f 100644 --- a/src/cli/aliases.js +++ b/src/cli/aliases.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ export default { i: "install", diff --git a/src/cli/arg-utils.js b/src/cli/arg-utils.js index cc7ed664c6..0d80eb9956 100644 --- a/src/cli/arg-utils.js +++ b/src/cli/arg-utils.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ /** * Determines if a given array contains the min number of acceptable arguments. diff --git a/src/cli/commands/_execute-lifecycle-script.js b/src/cli/commands/_execute-lifecycle-script.js index 19f5ea2daf..8cf13cb899 100644 --- a/src/cli/commands/_execute-lifecycle-script.js +++ b/src/cli/commands/_execute-lifecycle-script.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ import type Config from "../../config.js"; import { MessageError } from "../../errors.js"; diff --git a/src/cli/commands/_useless.js b/src/cli/commands/_useless.js index 37b23c829f..d783c9d576 100644 --- a/src/cli/commands/_useless.js +++ b/src/cli/commands/_useless.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ import { MessageError } from "../../errors.js"; diff --git a/src/cli/commands/index.js b/src/cli/commands/index.js index 47c3586b5f..60c62c9e04 100644 --- a/src/cli/commands/index.js +++ b/src/cli/commands/index.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ import * as runScript from "./run-script.js"; export { runScript }; diff --git a/src/cli/commands/install.js b/src/cli/commands/install.js index bf7d8cfc0c..16f584e894 100644 --- a/src/cli/commands/install.js +++ b/src/cli/commands/install.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ import type { RegistryNames } from "../../registries/index.js"; import type Reporter from "../../reporters/_base.js"; diff --git a/src/cli/commands/run-script.js b/src/cli/commands/run-script.js index 8b0c10b46d..72f3e5c9a1 100644 --- a/src/cli/commands/run-script.js +++ b/src/cli/commands/run-script.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ import type Reporter from "../../reporters/_base.js"; import type Config from "../../config.js"; diff --git a/src/cli/commands/uninstall.js b/src/cli/commands/uninstall.js index 8d9f7a442b..6abf8a285b 100644 --- a/src/cli/commands/uninstall.js +++ b/src/cli/commands/uninstall.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ import type Reporter from "../../reporters/_base.js"; import type Config from "../../config.js"; diff --git a/src/cli/commands/update.js b/src/cli/commands/update.js index 03e5dd2724..b9b2bbb034 100644 --- a/src/cli/commands/update.js +++ b/src/cli/commands/update.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ import type Reporter from "../../reporters/_base.js"; import type Config from "../../config.js"; diff --git a/src/cli/index.js b/src/cli/index.js index c9f7c05591..a43a264d0b 100644 --- a/src/cli/index.js +++ b/src/cli/index.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ import ConsoleReporter from "../reporters/console/index.js"; import similarity from "../analysis/text/similarity.js"; diff --git a/src/config.js b/src/config.js index ec89247b14..0c8e20e9db 100644 --- a/src/config.js +++ b/src/config.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ import type { RegistryNames } from "./registries/index.js"; import type Reporter from "./reporters/_base.js"; diff --git a/src/constants.js b/src/constants.js index 1b0368c76a..e9e359cff5 100644 --- a/src/constants.js +++ b/src/constants.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ // max amount of network requests to perform concurrently export const NETWORK_CONCURRENCY = 15; diff --git a/src/errors.js b/src/errors.js index 577d41d66b..7fd37e5ccd 100644 --- a/src/errors.js +++ b/src/errors.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ export class SecurityError extends Error {} export class MessageError extends Error {} diff --git a/src/fetchers/_base.js b/src/fetchers/_base.js index bf104989b3..957e5c5207 100644 --- a/src/fetchers/_base.js +++ b/src/fetchers/_base.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ /* eslint no-unused-vars: 0 */ import type { PackageInfo, PackageRemote, FetchedPackageInfo } from "../types.js"; diff --git a/src/fetchers/copy.js b/src/fetchers/copy.js index 95c423e67d..2df2cc6336 100644 --- a/src/fetchers/copy.js +++ b/src/fetchers/copy.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ import BaseFetcher from "./_base.js"; import * as fs from "../util/fs.js"; diff --git a/src/fetchers/git.js b/src/fetchers/git.js index aa67294e1a..a7e05a606e 100644 --- a/src/fetchers/git.js +++ b/src/fetchers/git.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ import BaseFetcher from "./_base.js"; import Git from "../util/git.js"; diff --git a/src/fetchers/index.js b/src/fetchers/index.js index 33c137c1ea..649c27efbd 100644 --- a/src/fetchers/index.js +++ b/src/fetchers/index.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ export { default as git } from "./git"; export { default as copy } from "./copy"; diff --git a/src/fetchers/tarball.js b/src/fetchers/tarball.js index f71c417fde..df80e3e39d 100644 --- a/src/fetchers/tarball.js +++ b/src/fetchers/tarball.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ import { SecurityError } from "../errors.js"; import * as crypto from "../util/crypto.js"; diff --git a/src/lockfile/index.js b/src/lockfile/index.js index fa172c212f..5abecdea70 100644 --- a/src/lockfile/index.js +++ b/src/lockfile/index.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ import type PackageResolver from "../package-resolver.js"; import type Reporter from "../reporters/_base.js"; diff --git a/src/lockfile/parse.js b/src/lockfile/parse.js index c1bac2dcad..8cc2dee73e 100644 --- a/src/lockfile/parse.js +++ b/src/lockfile/parse.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ import map from "../util/map.js"; diff --git a/src/lockfile/stringify.js b/src/lockfile/stringify.js index 9cde111911..8c2c1b9c74 100644 --- a/src/lockfile/stringify.js +++ b/src/lockfile/stringify.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ function shouldWrapKey(str: string): boolean { return str.indexOf("true") === 0 || str.indexOf("false") === 0 || /[:\s\n\\"]/g.test(str); diff --git a/src/package-compatibility.js b/src/package-compatibility.js index a74bb10202..c7b903b14e 100644 --- a/src/package-compatibility.js +++ b/src/package-compatibility.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ import type PackageResolver from "./package-resolver.js"; import type Reporter from "./reporters/_base.js"; diff --git a/src/package-constraint-resolver.js b/src/package-constraint-resolver.js index 599e4be28f..a7ced50b6c 100644 --- a/src/package-constraint-resolver.js +++ b/src/package-constraint-resolver.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ import type Reporter from "./reporters/_base.js"; import type Config from "./config.js"; diff --git a/src/package-fetcher.js b/src/package-fetcher.js index 560a0a7bfc..17058d36b9 100644 --- a/src/package-fetcher.js +++ b/src/package-fetcher.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ import type { FetchedPackageInfo } from "./types.js"; import type PackageResolver from "./package-resolver.js"; diff --git a/src/package-install-scripts.js b/src/package-install-scripts.js index fa575c7823..8a4af222a3 100644 --- a/src/package-install-scripts.js +++ b/src/package-install-scripts.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ import type { PackageInfo } from "./types.js"; import type PackageResolver from "./package-resolver.js"; diff --git a/src/package-linker.js b/src/package-linker.js index 5cd89ca00a..f1affc4a83 100644 --- a/src/package-linker.js +++ b/src/package-linker.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ import type { PackageInfo } from "./types.js"; import type PackageResolver from "./package-resolver.js"; diff --git a/src/package-reference.js b/src/package-reference.js index ae5295369f..1f797e1634 100644 --- a/src/package-reference.js +++ b/src/package-reference.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ import type Lockfile from "./lockfile/index.js"; import type Config from "./config.js"; diff --git a/src/package-request.js b/src/package-request.js index 6eee805e15..2ef534ad8c 100644 --- a/src/package-request.js +++ b/src/package-request.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ import type { PackageInfo } from "./types.js"; import type { RegistryNames } from "./registries/index.js"; diff --git a/src/package-resolver.js b/src/package-resolver.js index df4f23579d..f8c009ad5a 100644 --- a/src/package-resolver.js +++ b/src/package-resolver.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ import type { PackageInfo, DependencyRequestPatterns } from "./types.js"; import type { RegistryNames } from "./registries/index.js"; diff --git a/src/registries/_base.js b/src/registries/_base.js index d5a0c9a608..1f5e28d6d5 100644 --- a/src/registries/_base.js +++ b/src/registries/_base.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ import { removePrefix } from "../util/misc.js"; import * as fs from "../util/fs.js"; diff --git a/src/registries/bower.js b/src/registries/bower.js index cc9c9a1238..604830620a 100644 --- a/src/registries/bower.js +++ b/src/registries/bower.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ import Registry from "./_base.js"; import * as fs from "../util/fs.js"; diff --git a/src/registries/index.js b/src/registries/index.js index 0a592febc7..7a3b11a5a1 100644 --- a/src/registries/index.js +++ b/src/registries/index.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ import NpmRegistry from "./npm.js"; import BowerRegistry from "./bower.js"; diff --git a/src/registries/npm.js b/src/registries/npm.js index 68e9b64c99..a1bba7df24 100644 --- a/src/registries/npm.js +++ b/src/registries/npm.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ import * as fs from "../util/fs.js"; import Registry from "./_base.js"; diff --git a/src/reporters/_base.js b/src/reporters/_base.js index fe26b57f1f..0de1575d36 100644 --- a/src/reporters/_base.js +++ b/src/reporters/_base.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ /* eslint no-unused-vars: 0 */ export default class BaseReporter { diff --git a/src/reporters/buffer.js b/src/reporters/buffer.js index 5a025ca7fa..132d467527 100644 --- a/src/reporters/buffer.js +++ b/src/reporters/buffer.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ import BaseReporter from "./_base.js"; diff --git a/src/reporters/console/index.js b/src/reporters/console/index.js index 78fae7a957..b36a26252e 100644 --- a/src/reporters/console/index.js +++ b/src/reporters/console/index.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ import BaseReporter from "../_base.js"; import Spinner from "./spinner.js"; diff --git a/src/reporters/console/spinner.js b/src/reporters/console/spinner.js index 033398b3f7..d0f19103be 100644 --- a/src/reporters/console/spinner.js +++ b/src/reporters/console/spinner.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ let readline = require("readline"); diff --git a/src/reporters/index.js b/src/reporters/index.js index 3f9d4526d4..b3529de86b 100644 --- a/src/reporters/index.js +++ b/src/reporters/index.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ export { default as Console } from "./console"; export { default as Buffer } from "./buffer"; diff --git a/src/reporters/json.js b/src/reporters/json.js index d1b7653bc9..d04187c799 100644 --- a/src/reporters/json.js +++ b/src/reporters/json.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ import BaseReporter from "./_base.js"; diff --git a/src/resolvers/_base.js b/src/resolvers/_base.js index cf871b0f65..ed0a5125eb 100644 --- a/src/resolvers/_base.js +++ b/src/resolvers/_base.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ import type PackageRequest from "../package-request.js"; import type PackageResolver from "../package-resolver.js"; diff --git a/src/resolvers/exotics/_base.js b/src/resolvers/exotics/_base.js index ed86af3f5c..96787c69e7 100644 --- a/src/resolvers/exotics/_base.js +++ b/src/resolvers/exotics/_base.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ import BaseResolver from "../_base.js"; diff --git a/src/resolvers/exotics/_hosted-git.js b/src/resolvers/exotics/_hosted-git.js index 960a6b1303..9c086f2f9d 100644 --- a/src/resolvers/exotics/_hosted-git.js +++ b/src/resolvers/exotics/_hosted-git.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ import type { PackageInfo } from "../../types.js"; import type PackageRequest from "../../package-request.js"; diff --git a/src/resolvers/exotics/_registry.js b/src/resolvers/exotics/_registry.js index 2af0d99211..102779a69e 100644 --- a/src/resolvers/exotics/_registry.js +++ b/src/resolvers/exotics/_registry.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ import type { PackageInfo } from "../../types.js"; import type PackageRequest from "../../package-request.js"; diff --git a/src/resolvers/exotics/bitbucket.js b/src/resolvers/exotics/bitbucket.js index cfc027cd0a..f0a9a816a9 100644 --- a/src/resolvers/exotics/bitbucket.js +++ b/src/resolvers/exotics/bitbucket.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ import type { ExplodedFragment } from "./_hosted-git.js"; import HostedGitResolver from "./_hosted-git.js"; diff --git a/src/resolvers/exotics/file.js b/src/resolvers/exotics/file.js index a950da846a..d2876906f2 100644 --- a/src/resolvers/exotics/file.js +++ b/src/resolvers/exotics/file.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ import type { PackageInfo } from "../../types.js"; import type PackageRequest from "../../package-request.js"; diff --git a/src/resolvers/exotics/gist.js b/src/resolvers/exotics/gist.js index c58e6ac056..5ddd252bf5 100644 --- a/src/resolvers/exotics/gist.js +++ b/src/resolvers/exotics/gist.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ import type { PackageInfo } from "../../types.js"; import type PackageRequest from "../../package-request.js"; diff --git a/src/resolvers/exotics/git.js b/src/resolvers/exotics/git.js index f30fd8262f..ef9bb14fa5 100644 --- a/src/resolvers/exotics/git.js +++ b/src/resolvers/exotics/git.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ import type { PackageInfo } from "../../types.js"; import type PackageRequest from "../../package-request.js"; diff --git a/src/resolvers/exotics/github.js b/src/resolvers/exotics/github.js index 0661ddbce3..682e2b3b54 100644 --- a/src/resolvers/exotics/github.js +++ b/src/resolvers/exotics/github.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ import type { ExplodedFragment } from "./_hosted-git.js"; import HostedGitResolver from "./_hosted-git.js"; diff --git a/src/resolvers/exotics/gitlab.js b/src/resolvers/exotics/gitlab.js index 6fa15a712a..d7bffe5ea1 100644 --- a/src/resolvers/exotics/gitlab.js +++ b/src/resolvers/exotics/gitlab.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ import type { ExplodedFragment } from "./_hosted-git.js"; import HostedGitResolver from "./_hosted-git.js"; diff --git a/src/resolvers/exotics/tarball.js b/src/resolvers/exotics/tarball.js index fa832b7dd1..906172b74e 100644 --- a/src/resolvers/exotics/tarball.js +++ b/src/resolvers/exotics/tarball.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ import type { PackageInfo, FetchedPackageInfo } from "../../types.js"; import type PackageRequest from "../../package-request.js"; diff --git a/src/resolvers/index.js b/src/resolvers/index.js index c75ec30d3e..dcbf54c6a4 100644 --- a/src/resolvers/index.js +++ b/src/resolvers/index.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ import RegistryNpm from "./registries/npm.js"; import RegistryBower from "./registries/bower.js"; diff --git a/src/resolvers/registries/_base.js b/src/resolvers/registries/_base.js index c87d33c0f4..a1701af37d 100644 --- a/src/resolvers/registries/_base.js +++ b/src/resolvers/registries/_base.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ import type PackageRequest from "../../package-request.js"; import type { RegistryNames } from "../../registries/index.js"; diff --git a/src/resolvers/registries/bower.js b/src/resolvers/registries/bower.js index 1e31acafff..89464e1964 100644 --- a/src/resolvers/registries/bower.js +++ b/src/resolvers/registries/bower.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ import type { PackageInfo } from "../../types.js"; import { MessageError } from "../../errors.js"; diff --git a/src/resolvers/registries/npm.js b/src/resolvers/registries/npm.js index e0c31cc9f9..cade7b95cd 100644 --- a/src/resolvers/registries/npm.js +++ b/src/resolvers/registries/npm.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ import type { PackageInfo } from "../../types.js"; import { MessageError } from "../../errors.js"; diff --git a/src/types.js b/src/types.js index 58869d4374..f0b9bbc4fc 100644 --- a/src/types.js +++ b/src/types.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ import type { RegistryNames } from "./registries/index.js"; import type PackageReference from "./package-reference.js"; diff --git a/src/util/blocking-queue.js b/src/util/blocking-queue.js index 322f8cef70..31e58d9a7c 100644 --- a/src/util/blocking-queue.js +++ b/src/util/blocking-queue.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ import map from "./map.js"; diff --git a/src/util/child.js b/src/util/child.js index b69d50e598..b6a545ef5c 100644 --- a/src/util/child.js +++ b/src/util/child.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ import * as constants from "../constants.js"; import BlockingQueue from "./blocking-queue.js"; diff --git a/src/util/crypto.js b/src/util/crypto.js index 6441512f9c..c606366086 100644 --- a/src/util/crypto.js +++ b/src/util/crypto.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ let through = require("through2"); let crypto = require("crypto"); diff --git a/src/util/execute-lifecycle-script.js b/src/util/execute-lifecycle-script.js index 3c76b21b69..16d235c144 100644 --- a/src/util/execute-lifecycle-script.js +++ b/src/util/execute-lifecycle-script.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ import * as constants from "../constants.js"; import * as child from "./child.js"; diff --git a/src/util/fs.js b/src/util/fs.js index d77b5ebc0b..e537741206 100644 --- a/src/util/fs.js +++ b/src/util/fs.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ import type { PackageInfo } from "../types.js"; import type { RegistryNames } from "../registries/index.js"; diff --git a/src/util/git.js b/src/util/git.js index c075eac705..84f701fe6d 100644 --- a/src/util/git.js +++ b/src/util/git.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ import type Config from "../config.js"; import { MessageError, SecurityError } from "../errors.js"; diff --git a/src/util/map.js b/src/util/map.js index 65bdf8fa2d..53522f6cff 100644 --- a/src/util/map.js +++ b/src/util/map.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ type Return = T | Object; diff --git a/src/util/misc.js b/src/util/misc.js index 1ffcb4493c..322c4d4498 100644 --- a/src/util/misc.js +++ b/src/util/misc.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ export function removePrefix(pattern: string, prefix: string): string { if (pattern.indexOf(prefix) === 0) { diff --git a/src/util/network.js b/src/util/network.js index 3b4ce8e9a0..17d9fc21f3 100644 --- a/src/util/network.js +++ b/src/util/network.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ let os = require("os"); diff --git a/src/util/normalise-package-info/fix.js b/src/util/normalise-package-info/fix.js index 3a674692fa..c1b8417ec3 100644 --- a/src/util/normalise-package-info/fix.js +++ b/src/util/normalise-package-info/fix.js @@ -1,7 +1,17 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ import { README_NOT_FOUND_MESSAGE, normalisePerson, extractDescription } from "./util.js"; import { hostedGitFragmentToGitUrl } from "../../resolvers/index.js"; +import inferLicense from "./infer-license.js"; import * as fs from "../fs.js"; let semver = require("semver"); diff --git a/src/util/normalise-package-info/index.js b/src/util/normalise-package-info/index.js index 37242082c3..f1bfa0b048 100644 --- a/src/util/normalise-package-info/index.js +++ b/src/util/normalise-package-info/index.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ import type { PackageInfo } from "../../types.js"; import validate from "./validate.js"; diff --git a/src/util/normalise-package-info/util.js b/src/util/normalise-package-info/util.js index ae97261652..196b3199cf 100644 --- a/src/util/normalise-package-info/util.js +++ b/src/util/normalise-package-info/util.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ import type { PersonObject } from "../../types.js"; diff --git a/src/util/normalise-package-info/validate.js b/src/util/normalise-package-info/validate.js index 2f895d5876..8fbfa615b8 100644 --- a/src/util/normalise-package-info/validate.js +++ b/src/util/normalise-package-info/validate.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ import typos from "./typos.js"; diff --git a/src/util/promise.js b/src/util/promise.js index e36a091bae..530c14354f 100644 --- a/src/util/promise.js +++ b/src/util/promise.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ export function promisify(fn: Function, firstData?: boolean): () => Promise { return function (...args) { diff --git a/src/util/request-manager.js b/src/util/request-manager.js index 81ed4f501a..d995a14c0a 100644 --- a/src/util/request-manager.js +++ b/src/util/request-manager.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ import type Reporter from "../reporters/_base.js"; import * as constants from "../constants.js"; diff --git a/src/util/version.js b/src/util/version.js index da44d1176c..a9d92048eb 100644 --- a/src/util/version.js +++ b/src/util/version.js @@ -1,4 +1,13 @@ -/* @flow */ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ export function explodeHashedUrl(url: string): { url: string, hash: string } { let parts = url.split("#"); diff --git a/test/analysis.js b/test/analysis.js index 613817b1fc..7837784f46 100644 --- a/test/analysis.js +++ b/test/analysis.js @@ -1,4 +1,15 @@ -import { analyse } from ".."; +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ + + import { analyse } from ".."; let expect = require("unexpected"); let path = require("path"); diff --git a/test/lockfile.js b/test/lockfile.js index 5063d2078d..d56c9cde8b 100644 --- a/test/lockfile.js +++ b/test/lockfile.js @@ -1,3 +1,14 @@ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ + import parse from "../lib/lockfile/parse"; import stringify from "../lib/lockfile/stringify"; diff --git a/test/package-resolver.js b/test/package-resolver.js index f2ed6034e9..6ef45c43e7 100644 --- a/test/package-resolver.js +++ b/test/package-resolver.js @@ -1,3 +1,14 @@ +/** + * Copyright (c) 2016-present, 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. + * + * @flow + */ + import { reporters, PackageResolver, Lockfile, Config } from ".."; let rimraf = require("rimraf");