Skip to content

Commit b6a37ec

Browse files
authored
Amend debugger-frontend license to MIT AND BSD-3-Clause (#60024)
1 parent 19a9e1e commit b6a37ec

4 files changed

Lines changed: 29 additions & 39 deletions

File tree

‎packages/debugger-frontend/LICENSE‎

Lines changed: 21 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,21 @@
1-
// Copyright (c) Meta Platforms, Inc. and affiliates.
2-
// Copyright 2014 The Chromium Authors. All rights reserved.
3-
//
4-
// Redistribution and use in source and binary forms, with or without
5-
// modification, are permitted provided that the following conditions are
6-
// met:
7-
//
8-
// * Redistributions of source code must retain the above copyright
9-
// notice, this list of conditions and the following disclaimer.
10-
// * Redistributions in binary form must reproduce the above
11-
// copyright notice, this list of conditions and the following disclaimer
12-
// in the documentation and/or other materials provided with the
13-
// distribution.
14-
// * Neither the name of Google Inc., Meta Platforms, Inc., nor the
15-
// names of its contributors may be used to endorse or promote products
16-
// derived from this software without specific prior written permission.
17-
//
18-
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19-
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20-
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21-
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22-
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23-
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24-
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25-
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26-
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27-
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28-
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1+
MIT License
2+
3+
Copyright (c) Meta Platforms, Inc. and affiliates.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

‎packages/debugger-frontend/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"url": "git+https://github.com/react/react-native.git",
1414
"directory": "packages/debugger-frontend"
1515
},
16-
"license": "BSD-3-Clause",
16+
"license": "MIT AND BSD-3-Clause",
1717
"files": [
1818
"index.js",
1919
"dist",

‎scripts/debugger-frontend/sync-and-build.js‎

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ async function buildDebuggerFrontend(
193193
await cleanPackageFiles(destPathInPackage);
194194

195195
await copyFrontendFilesToPackage(buildPath, destPathInPackage);
196-
await copyLicenseToPackage(checkoutPath, [packagePath, destPathInPackage]);
196+
await copyLicenseToPackage(checkoutPath, destPathInPackage);
197197
}
198198
await generateBuildInfo({
199199
checkoutPath,
@@ -334,18 +334,14 @@ async function copyFrontendFilesToPackage(
334334

335335
async function copyLicenseToPackage(
336336
checkoutPath /*: string */,
337-
destDirs /*: ReadonlyArray<string> */,
337+
destPathInPackage /*: string */,
338338
) {
339339
process.stdout.write(
340340
'Copying LICENSE from devtools-frontend to debugger-frontend package\n\n',
341341
);
342-
await Promise.all(
343-
destDirs.map(destDir =>
344-
fs.copyFile(
345-
path.join(checkoutPath, 'LICENSE'),
346-
path.join(destDir, 'LICENSE'),
347-
),
348-
),
342+
await fs.copyFile(
343+
path.join(checkoutPath, 'LICENSE'),
344+
path.join(destPathInPackage, 'LICENSE'),
349345
);
350346
}
351347

‎scripts/monorepo-tests/__tests__/check-packages-test.js‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,12 @@ describe('package file structure', () => {
9797
for (const name of Object.keys(packages)) {
9898
const {packageJson, path: packagePath} = packages[name];
9999
const licensePath = path.join(packagePath, 'LICENSE');
100+
const licenseIds = (packageJson.license ?? '').split(/\s+(?:AND|OR)\s+/);
100101

101102
if (!existsSync(licensePath)) {
102103
violations.push(`${name}: missing LICENSE`);
103104
} else if (
104-
packageJson.license === 'MIT' &&
105+
licenseIds.includes('MIT') &&
105106
readFileSync(licensePath, 'utf8') !== rootLicense
106107
) {
107108
violations.push(`${name}: LICENSE does not match the root LICENSE`);

0 commit comments

Comments
 (0)