Skip to content
This repository has been archived by the owner on Feb 6, 2023. It is now read-only.

Commit

Permalink
Relicense under MIT and remove patents grant (#1967)
Browse files Browse the repository at this point in the history
Summary:
**Summary**

After internal discussion and approval by the legal team, we decided to align Draft.js with other Facebook open source projects [recently re-licensed under MIT](https://code.fb.com/web/relicensing-react-jest-flow-and-immutable-js/).

This PR removes the patents grant and re-licenses all Draft.js source files under the MIT license.

**Test Plan**

`yarn lint`
Manual code inspection
Pull Request resolved: #1967

Differential Revision: D13572529

fbshipit-source-id: f59982148515fdc7a2f697c92e1939e211b6125c
  • Loading branch information
Claudio Procida authored and facebook-github-bot committed Jan 4, 2019
1 parent 642aa11 commit 585af35
Show file tree
Hide file tree
Showing 239 changed files with 1,174 additions and 1,613 deletions.
7 changes: 3 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* 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.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

module.exports = {
Expand Down
44 changes: 17 additions & 27 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,31 +1,21 @@
BSD License
MIT License

For Draft.js software
Copyright (c) Facebook, Inc. and its affiliates.

Copyright (c) 2013-present, Facebook, Inc.
All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

* 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.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
33 changes: 0 additions & 33 deletions PATENTS

This file was deleted.

3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,7 @@ We actively welcome pull requests. Learn how to

## License

Draft.js is [BSD Licensed](https://github.com/facebook/draft-js/blob/master/LICENSE).
We also provide an additional [patent grant](https://github.com/facebook/draft-js/blob/master/PATENTS).
Draft.js is [MIT licensed](https://github.com/facebook/draft-js/blob/master/LICENSE).

Examples provided in this repository and in the documentation are separately
licensed.
14 changes: 6 additions & 8 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* 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.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

'use strict';
Expand Down Expand Up @@ -62,11 +61,10 @@ var babelOptsFlow = {
var COPYRIGHT_HEADER = `/**
* Draft v<%= version %>
*
* Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* 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.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
`;

Expand Down
2 changes: 1 addition & 1 deletion meta/bundle-size-stats/Draft.js.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion meta/bundle-size-stats/Draft.min.js.json

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,12 @@
"files": [
"dist/",
"lib/",
"LICENSE",
"PATENTS"
"LICENSE"
],
"main": "lib/Draft.js",
"style": "dist/Draft.css",
"repository": "facebook/draft-js",
"license": "BSD-3-Clause",
"license": "MIT",
"scripts": {
"prepublish": "npm run build",
"pretest": "node node_modules/fbjs-scripts/node/check-dev-engines.js package.json",
Expand Down
7 changes: 3 additions & 4 deletions prettier.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* 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.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

module.exports = {
Expand Down
7 changes: 3 additions & 4 deletions scripts/jest/hasteImpl.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* 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.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/
Expand Down
7 changes: 3 additions & 4 deletions scripts/jest/preprocessor.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* 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.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

var babel = require('babel-core');
Expand Down
7 changes: 3 additions & 4 deletions scripts/jest/shims.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* 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.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
Expand Down
7 changes: 3 additions & 4 deletions scripts/module-map.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* 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.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

module.exports = Object.assign(
Expand Down
7 changes: 3 additions & 4 deletions src/Draft.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* 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.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow
Expand Down
7 changes: 3 additions & 4 deletions src/__mocks__/generateRandomKey.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* 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.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
Expand Down
7 changes: 3 additions & 4 deletions src/component/base/DraftEditor.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* 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.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @providesModule DraftEditor
*/
Expand Down
7 changes: 3 additions & 4 deletions src/component/base/DraftEditor.react.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* 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.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow
Expand Down
7 changes: 3 additions & 4 deletions src/component/base/DraftEditorPlaceholder.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* 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.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @providesModule DraftEditorPlaceholder
*/
Expand Down
7 changes: 3 additions & 4 deletions src/component/base/DraftEditorPlaceholder.react.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* 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.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow strict-local
Expand Down
7 changes: 3 additions & 4 deletions src/component/base/DraftEditorProps.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* 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.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow
Expand Down
7 changes: 3 additions & 4 deletions src/component/base/DraftScrollPosition.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* 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.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow strict
Expand Down
7 changes: 3 additions & 4 deletions src/component/base/DraftTextAlignment.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* 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.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow strict
Expand Down
7 changes: 3 additions & 4 deletions src/component/base/__tests__/DraftEditor.react-test.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* 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.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @emails oncall+draft_js
* @format
Expand Down
7 changes: 3 additions & 4 deletions src/component/contents/DraftEditorBlock.react.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* 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.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow
Expand Down
7 changes: 3 additions & 4 deletions src/component/contents/DraftEditorContents-core.react.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* 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.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow
Expand Down
7 changes: 3 additions & 4 deletions src/component/contents/DraftEditorLeaf.react.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* 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.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow
Expand Down
7 changes: 3 additions & 4 deletions src/component/contents/DraftEditorTextNode.react.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* 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.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow strict-local
Expand Down
Loading

0 comments on commit 585af35

Please sign in to comment.