From ad09027c161f1ce5d9b07bfcfb4ee4fb92444655 Mon Sep 17 00:00:00 2001 From: lauren Date: Wed, 23 Apr 2025 22:04:44 -0400 Subject: [PATCH] [compiler] Add missing copyrights (#33004) `yarn copyright` --- .../src/Entrypoint/Reanimated.ts | 7 +++++++ .../src/Entrypoint/ValidateNoUntransformedReferences.ts | 7 +++++++ .../src/HIR/AssertValidBlockNesting.ts | 7 +++++++ .../src/HIR/BuildReactiveScopeTerminalsHIR.ts | 7 +++++++ .../src/HIR/CollectHoistablePropertyLoads.ts | 7 +++++++ .../src/HIR/CollectOptionalChainDependencies.ts | 7 +++++++ .../src/HIR/MergeOverlappingReactiveScopesHIR.ts | 7 +++++++ .../src/HIR/PropagateScopeDependenciesHIR.ts | 7 +++++++ .../src/HIR/PruneUnusedLabelsHIR.ts | 7 +++++++ .../src/ReactiveScopes/StabilizeBlockIds.ts | 7 +++++++ .../babel-plugin-react-compiler/src/Transform/index.ts | 1 + .../src/Validation/ValidateNoCapitalizedCalls.ts | 1 + .../packages/babel-plugin-react-compiler/tsup.config.ts | 7 +++++++ .../packages/eslint-plugin-react-compiler/tsup.config.ts | 7 +++++++ compiler/packages/make-read-only-util/tsup.config.ts | 7 +++++++ compiler/packages/react-compiler-healthcheck/src/config.ts | 7 +++++++ .../packages/react-compiler-healthcheck/tsup.config.ts | 7 +++++++ compiler/packages/react-compiler-runtime/tsup.config.ts | 7 +++++++ compiler/packages/react-forgive/client/src/autodeps.ts | 7 +++++++ compiler/packages/react-forgive/client/src/colors.ts | 7 +++++++ compiler/packages/react-forgive/client/src/extension.ts | 7 +++++++ compiler/packages/react-forgive/client/src/mapping.ts | 7 +++++++ .../packages/react-forgive/server/src/compiler/compat.ts | 7 +++++++ .../server/src/requests/autodepsdecorations.ts | 7 +++++++ compiler/packages/react-forgive/server/src/utils/range.ts | 7 +++++++ compiler/packages/react-mcp-server/src/types/algolia.ts | 7 +++++++ compiler/packages/react-mcp-server/tsup.config.ts | 7 +++++++ compiler/scripts/release/prompt-for-otp.js | 6 ++++++ compiler/scripts/release/publish.js | 6 ++++++ compiler/scripts/release/shared/build-packages.js | 7 +++++++ compiler/scripts/release/shared/packages.js | 7 +++++++ compiler/scripts/release/shared/utils.js | 7 +++++++ 32 files changed, 210 insertions(+) diff --git a/compiler/packages/babel-plugin-react-compiler/src/Entrypoint/Reanimated.ts b/compiler/packages/babel-plugin-react-compiler/src/Entrypoint/Reanimated.ts index e946d7aab8..4f8a3e709d 100644 --- a/compiler/packages/babel-plugin-react-compiler/src/Entrypoint/Reanimated.ts +++ b/compiler/packages/babel-plugin-react-compiler/src/Entrypoint/Reanimated.ts @@ -1,3 +1,10 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + import type * as BabelCore from '@babel/core'; import {hasOwnProperty} from '../Utils/utils'; import {PluginOptions} from './Options'; diff --git a/compiler/packages/babel-plugin-react-compiler/src/Entrypoint/ValidateNoUntransformedReferences.ts b/compiler/packages/babel-plugin-react-compiler/src/Entrypoint/ValidateNoUntransformedReferences.ts index a221b0485c..5f6c6986e0 100644 --- a/compiler/packages/babel-plugin-react-compiler/src/Entrypoint/ValidateNoUntransformedReferences.ts +++ b/compiler/packages/babel-plugin-react-compiler/src/Entrypoint/ValidateNoUntransformedReferences.ts @@ -1,3 +1,10 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + import {NodePath} from '@babel/core'; import * as t from '@babel/types'; diff --git a/compiler/packages/babel-plugin-react-compiler/src/HIR/AssertValidBlockNesting.ts b/compiler/packages/babel-plugin-react-compiler/src/HIR/AssertValidBlockNesting.ts index cd2024e1e1..adfb051058 100644 --- a/compiler/packages/babel-plugin-react-compiler/src/HIR/AssertValidBlockNesting.ts +++ b/compiler/packages/babel-plugin-react-compiler/src/HIR/AssertValidBlockNesting.ts @@ -1,3 +1,10 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + import {CompilerError} from '..'; import { BlockId, diff --git a/compiler/packages/babel-plugin-react-compiler/src/HIR/BuildReactiveScopeTerminalsHIR.ts b/compiler/packages/babel-plugin-react-compiler/src/HIR/BuildReactiveScopeTerminalsHIR.ts index 7c1fb54ea8..6f69af4b4f 100644 --- a/compiler/packages/babel-plugin-react-compiler/src/HIR/BuildReactiveScopeTerminalsHIR.ts +++ b/compiler/packages/babel-plugin-react-compiler/src/HIR/BuildReactiveScopeTerminalsHIR.ts @@ -1,3 +1,10 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + import {CompilerError} from '../CompilerError'; import {getScopes, recursivelyTraverseItems} from './AssertValidBlockNesting'; import {Environment} from './Environment'; diff --git a/compiler/packages/babel-plugin-react-compiler/src/HIR/CollectHoistablePropertyLoads.ts b/compiler/packages/babel-plugin-react-compiler/src/HIR/CollectHoistablePropertyLoads.ts index cb6854d1b3..e29ef51ce0 100644 --- a/compiler/packages/babel-plugin-react-compiler/src/HIR/CollectHoistablePropertyLoads.ts +++ b/compiler/packages/babel-plugin-react-compiler/src/HIR/CollectHoistablePropertyLoads.ts @@ -1,3 +1,10 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + import {CompilerError} from '../CompilerError'; import {inRange} from '../ReactiveScopes/InferReactiveScopeVariables'; import {printDependency} from '../ReactiveScopes/PrintReactiveFunction'; diff --git a/compiler/packages/babel-plugin-react-compiler/src/HIR/CollectOptionalChainDependencies.ts b/compiler/packages/babel-plugin-react-compiler/src/HIR/CollectOptionalChainDependencies.ts index 02a28b9f35..cb787d04d0 100644 --- a/compiler/packages/babel-plugin-react-compiler/src/HIR/CollectOptionalChainDependencies.ts +++ b/compiler/packages/babel-plugin-react-compiler/src/HIR/CollectOptionalChainDependencies.ts @@ -1,3 +1,10 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + import {CompilerError} from '..'; import {assertNonNull} from './CollectHoistablePropertyLoads'; import { diff --git a/compiler/packages/babel-plugin-react-compiler/src/HIR/MergeOverlappingReactiveScopesHIR.ts b/compiler/packages/babel-plugin-react-compiler/src/HIR/MergeOverlappingReactiveScopesHIR.ts index 5b286e917d..96d20ea644 100644 --- a/compiler/packages/babel-plugin-react-compiler/src/HIR/MergeOverlappingReactiveScopesHIR.ts +++ b/compiler/packages/babel-plugin-react-compiler/src/HIR/MergeOverlappingReactiveScopesHIR.ts @@ -1,3 +1,10 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + import { HIRFunction, InstructionId, diff --git a/compiler/packages/babel-plugin-react-compiler/src/HIR/PropagateScopeDependenciesHIR.ts b/compiler/packages/babel-plugin-react-compiler/src/HIR/PropagateScopeDependenciesHIR.ts index e12d10b406..934fd98f73 100644 --- a/compiler/packages/babel-plugin-react-compiler/src/HIR/PropagateScopeDependenciesHIR.ts +++ b/compiler/packages/babel-plugin-react-compiler/src/HIR/PropagateScopeDependenciesHIR.ts @@ -1,3 +1,10 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + import { ScopeId, HIRFunction, diff --git a/compiler/packages/babel-plugin-react-compiler/src/HIR/PruneUnusedLabelsHIR.ts b/compiler/packages/babel-plugin-react-compiler/src/HIR/PruneUnusedLabelsHIR.ts index bf10e9f1f3..f0c488c3e1 100644 --- a/compiler/packages/babel-plugin-react-compiler/src/HIR/PruneUnusedLabelsHIR.ts +++ b/compiler/packages/babel-plugin-react-compiler/src/HIR/PruneUnusedLabelsHIR.ts @@ -1,3 +1,10 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + import {CompilerError} from '..'; import {BlockId, GotoVariant, HIRFunction} from './HIR'; diff --git a/compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/StabilizeBlockIds.ts b/compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/StabilizeBlockIds.ts index 26d83f9906..9ad1815474 100644 --- a/compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/StabilizeBlockIds.ts +++ b/compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/StabilizeBlockIds.ts @@ -1,3 +1,10 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + import { BlockId, ReactiveFunction, diff --git a/compiler/packages/babel-plugin-react-compiler/src/Transform/index.ts b/compiler/packages/babel-plugin-react-compiler/src/Transform/index.ts index 8665ead0b1..4f142104f2 100644 --- a/compiler/packages/babel-plugin-react-compiler/src/Transform/index.ts +++ b/compiler/packages/babel-plugin-react-compiler/src/Transform/index.ts @@ -4,4 +4,5 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ + export {transformFire} from './TransformFire'; diff --git a/compiler/packages/babel-plugin-react-compiler/src/Validation/ValidateNoCapitalizedCalls.ts b/compiler/packages/babel-plugin-react-compiler/src/Validation/ValidateNoCapitalizedCalls.ts index 4ba70b64a8..8989cb1ac2 100644 --- a/compiler/packages/babel-plugin-react-compiler/src/Validation/ValidateNoCapitalizedCalls.ts +++ b/compiler/packages/babel-plugin-react-compiler/src/Validation/ValidateNoCapitalizedCalls.ts @@ -4,6 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ + import {CompilerError, EnvironmentConfig, ErrorSeverity} from '..'; import {HIRFunction, IdentifierId} from '../HIR'; import {DEFAULT_GLOBALS} from '../HIR/Globals'; diff --git a/compiler/packages/babel-plugin-react-compiler/tsup.config.ts b/compiler/packages/babel-plugin-react-compiler/tsup.config.ts index 12c04ec8a2..dde9525256 100644 --- a/compiler/packages/babel-plugin-react-compiler/tsup.config.ts +++ b/compiler/packages/babel-plugin-react-compiler/tsup.config.ts @@ -1,3 +1,10 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + import {defineConfig} from 'tsup'; export default defineConfig({ diff --git a/compiler/packages/eslint-plugin-react-compiler/tsup.config.ts b/compiler/packages/eslint-plugin-react-compiler/tsup.config.ts index ac13d33bba..3e3b1b1313 100644 --- a/compiler/packages/eslint-plugin-react-compiler/tsup.config.ts +++ b/compiler/packages/eslint-plugin-react-compiler/tsup.config.ts @@ -1,3 +1,10 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + import {defineConfig} from 'tsup'; export default defineConfig({ diff --git a/compiler/packages/make-read-only-util/tsup.config.ts b/compiler/packages/make-read-only-util/tsup.config.ts index cb65a61aaa..ffef80abba 100644 --- a/compiler/packages/make-read-only-util/tsup.config.ts +++ b/compiler/packages/make-read-only-util/tsup.config.ts @@ -1,3 +1,10 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + import {defineConfig} from 'tsup'; export default defineConfig({ diff --git a/compiler/packages/react-compiler-healthcheck/src/config.ts b/compiler/packages/react-compiler-healthcheck/src/config.ts index 9655d2654b..f279bc5d22 100644 --- a/compiler/packages/react-compiler-healthcheck/src/config.ts +++ b/compiler/packages/react-compiler-healthcheck/src/config.ts @@ -1,3 +1,10 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + export const config = { knownIncompatibleLibraries: [ 'mobx-react', diff --git a/compiler/packages/react-compiler-healthcheck/tsup.config.ts b/compiler/packages/react-compiler-healthcheck/tsup.config.ts index 9fe1e493db..7addc79bf9 100644 --- a/compiler/packages/react-compiler-healthcheck/tsup.config.ts +++ b/compiler/packages/react-compiler-healthcheck/tsup.config.ts @@ -1,3 +1,10 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + import {defineConfig} from 'tsup'; export default defineConfig({ diff --git a/compiler/packages/react-compiler-runtime/tsup.config.ts b/compiler/packages/react-compiler-runtime/tsup.config.ts index ebc8df6f14..30a7f9da96 100644 --- a/compiler/packages/react-compiler-runtime/tsup.config.ts +++ b/compiler/packages/react-compiler-runtime/tsup.config.ts @@ -1,3 +1,10 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + import {defineConfig} from 'tsup'; export default defineConfig({ diff --git a/compiler/packages/react-forgive/client/src/autodeps.ts b/compiler/packages/react-forgive/client/src/autodeps.ts index 62cfc92a47..ed41b34dcb 100644 --- a/compiler/packages/react-forgive/client/src/autodeps.ts +++ b/compiler/packages/react-forgive/client/src/autodeps.ts @@ -1,3 +1,10 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + import * as vscode from 'vscode'; import { LanguageClient, diff --git a/compiler/packages/react-forgive/client/src/colors.ts b/compiler/packages/react-forgive/client/src/colors.ts index 5d98b07808..8989aa1c62 100644 --- a/compiler/packages/react-forgive/client/src/colors.ts +++ b/compiler/packages/react-forgive/client/src/colors.ts @@ -1,3 +1,10 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + type RGB = [number, number, number]; const int = Math.floor; diff --git a/compiler/packages/react-forgive/client/src/extension.ts b/compiler/packages/react-forgive/client/src/extension.ts index 74ad541483..e9938c388a 100644 --- a/compiler/packages/react-forgive/client/src/extension.ts +++ b/compiler/packages/react-forgive/client/src/extension.ts @@ -1,3 +1,10 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + import * as path from 'path'; import * as vscode from 'vscode'; diff --git a/compiler/packages/react-forgive/client/src/mapping.ts b/compiler/packages/react-forgive/client/src/mapping.ts index 0505011711..3ec01ef8f6 100644 --- a/compiler/packages/react-forgive/client/src/mapping.ts +++ b/compiler/packages/react-forgive/client/src/mapping.ts @@ -1,3 +1,10 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + import * as vscode from 'vscode'; import {Position} from 'vscode-languageclient/node'; diff --git a/compiler/packages/react-forgive/server/src/compiler/compat.ts b/compiler/packages/react-forgive/server/src/compiler/compat.ts index 8b13f1df88..10271cbdcd 100644 --- a/compiler/packages/react-forgive/server/src/compiler/compat.ts +++ b/compiler/packages/react-forgive/server/src/compiler/compat.ts @@ -1,3 +1,10 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + import {SourceLocation} from 'babel-plugin-react-compiler/src'; import {type Range} from 'vscode-languageserver'; diff --git a/compiler/packages/react-forgive/server/src/requests/autodepsdecorations.ts b/compiler/packages/react-forgive/server/src/requests/autodepsdecorations.ts index 1738bbcd8c..77a568662e 100644 --- a/compiler/packages/react-forgive/server/src/requests/autodepsdecorations.ts +++ b/compiler/packages/react-forgive/server/src/requests/autodepsdecorations.ts @@ -1,3 +1,10 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + import {type AutoDepsDecorationsEvent} from 'babel-plugin-react-compiler/src/Entrypoint'; import {type Position} from 'vscode-languageserver-textdocument'; import {RequestType} from 'vscode-languageserver/node'; diff --git a/compiler/packages/react-forgive/server/src/utils/range.ts b/compiler/packages/react-forgive/server/src/utils/range.ts index 8a16f1bc09..5c164667c4 100644 --- a/compiler/packages/react-forgive/server/src/utils/range.ts +++ b/compiler/packages/react-forgive/server/src/utils/range.ts @@ -1,3 +1,10 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + import * as t from '@babel/types'; import {type Position} from 'vscode-languageserver/node'; diff --git a/compiler/packages/react-mcp-server/src/types/algolia.ts b/compiler/packages/react-mcp-server/src/types/algolia.ts index 68914076a3..1921dd3f71 100644 --- a/compiler/packages/react-mcp-server/src/types/algolia.ts +++ b/compiler/packages/react-mcp-server/src/types/algolia.ts @@ -1,3 +1,10 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + // https://github.com/algolia/docsearch/blob/15ebcba606b281aa0dddc4ccb8feb19d396bf79e/packages/docsearch-react/src/types/DocSearchHit.ts type ContentType = | 'content' diff --git a/compiler/packages/react-mcp-server/tsup.config.ts b/compiler/packages/react-mcp-server/tsup.config.ts index eefc6ee0ce..820410e20f 100644 --- a/compiler/packages/react-mcp-server/tsup.config.ts +++ b/compiler/packages/react-mcp-server/tsup.config.ts @@ -1,3 +1,10 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + import {defineConfig} from 'tsup'; export default defineConfig({ diff --git a/compiler/scripts/release/prompt-for-otp.js b/compiler/scripts/release/prompt-for-otp.js index e69e4f1604..3cb1e419c7 100644 --- a/compiler/scripts/release/prompt-for-otp.js +++ b/compiler/scripts/release/prompt-for-otp.js @@ -1,4 +1,10 @@ #!/usr/bin/env node +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ const prompt = require('prompt-promise'); diff --git a/compiler/scripts/release/publish.js b/compiler/scripts/release/publish.js index d367e331e3..99c4738425 100755 --- a/compiler/scripts/release/publish.js +++ b/compiler/scripts/release/publish.js @@ -1,4 +1,10 @@ #!/usr/bin/env node +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ 'use strict'; diff --git a/compiler/scripts/release/shared/build-packages.js b/compiler/scripts/release/shared/build-packages.js index 21c88e3aae..0a5ac1f5c2 100644 --- a/compiler/scripts/release/shared/build-packages.js +++ b/compiler/scripts/release/shared/build-packages.js @@ -1,3 +1,10 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + const ora = require('ora'); const {execHelper} = require('./utils'); diff --git a/compiler/scripts/release/shared/packages.js b/compiler/scripts/release/shared/packages.js index 533041d119..39970bdde6 100644 --- a/compiler/scripts/release/shared/packages.js +++ b/compiler/scripts/release/shared/packages.js @@ -1,3 +1,10 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + const PUBLISHABLE_PACKAGES = [ 'babel-plugin-react-compiler', 'eslint-plugin-react-compiler', diff --git a/compiler/scripts/release/shared/utils.js b/compiler/scripts/release/shared/utils.js index 8406e56330..bda2d28c03 100644 --- a/compiler/scripts/release/shared/utils.js +++ b/compiler/scripts/release/shared/utils.js @@ -1,3 +1,10 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + const cp = require('child_process'); const util = require('util');