From d49eb8b580b535ea234275e10aa166cae461cd74 Mon Sep 17 00:00:00 2001 From: Lauren Tan Date: Thu, 2 Nov 2023 12:43:35 -0400 Subject: [PATCH] [ez] Run copyright script --- compiler/apps/playground/babel.config.js | 7 +++++++ compiler/apps/playground/components/Editor/index.tsx | 7 +++++++ compiler/apps/playground/next-env.d.ts | 7 +++++++ .../packages/babel-plugin-react-forget/rollup.config.js | 7 +++++++ .../babel-plugin-react-forget/src/Entrypoint/Gating.ts | 7 +++++++ .../babel-plugin-react-forget/src/Entrypoint/Imports.ts | 7 +++++++ .../babel-plugin-react-forget/src/Entrypoint/index.ts | 7 +++++++ .../src/HIR/FindContextIdentifiers.ts | 7 +++++++ .../InlineImmediatelyInvokedFunctionExpressions.ts | 2 +- .../src/ReactiveScopes/PruneHoistedContexts.ts | 7 +++++++ .../src/Utils/ComponentDeclaration.ts | 7 +++++++ .../src/Validation/ValidateNoSetStateInRender.ts | 7 +++++++ .../__tests__/ReactForgetDiagnostics-test.ts | 7 +++++++ .../packages/eslint-plugin-react-forget/rollup.config.js | 7 +++++++ .../src/types/hermes-parser.d.ts | 7 +++++++ compiler/packages/fixture-test-utils/src/compiler-utils.ts | 7 +++++++ compiler/packages/fixture-test-utils/src/constants.ts | 7 +++++++ compiler/packages/fixture-test-utils/src/fixture-utils.ts | 7 +++++++ compiler/packages/fixture-test-utils/src/index.ts | 7 +++++++ compiler/packages/sprout/src/SproutTodoFilter.ts | 7 +++++++ compiler/packages/sprout/src/shared-runtime.ts | 1 + 21 files changed, 135 insertions(+), 1 deletion(-) diff --git a/compiler/apps/playground/babel.config.js b/compiler/apps/playground/babel.config.js index 07c3670088..9496ae7189 100644 --- a/compiler/apps/playground/babel.config.js +++ b/compiler/apps/playground/babel.config.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. + */ + module.exports = function (api) { api.cache(true); return { diff --git a/compiler/apps/playground/components/Editor/index.tsx b/compiler/apps/playground/components/Editor/index.tsx index f0614bd50c..8a32f962bc 100644 --- a/compiler/apps/playground/components/Editor/index.tsx +++ b/compiler/apps/playground/components/Editor/index.tsx @@ -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 dynamic from "next/dynamic"; // monaco-editor is currently not compatible with ssr diff --git a/compiler/apps/playground/next-env.d.ts b/compiler/apps/playground/next-env.d.ts index 4f11a03dc6..811cbc51ad 100644 --- a/compiler/apps/playground/next-env.d.ts +++ b/compiler/apps/playground/next-env.d.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. + */ + /// /// diff --git a/compiler/packages/babel-plugin-react-forget/rollup.config.js b/compiler/packages/babel-plugin-react-forget/rollup.config.js index ec6573a751..0e4c2addd7 100644 --- a/compiler/packages/babel-plugin-react-forget/rollup.config.js +++ b/compiler/packages/babel-plugin-react-forget/rollup.config.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. + */ + import typescript from "@rollup/plugin-typescript"; import { nodeResolve } from "@rollup/plugin-node-resolve"; import commonjs from "@rollup/plugin-commonjs"; diff --git a/compiler/packages/babel-plugin-react-forget/src/Entrypoint/Gating.ts b/compiler/packages/babel-plugin-react-forget/src/Entrypoint/Gating.ts index 7c8775f1e3..d596401e05 100644 --- a/compiler/packages/babel-plugin-react-forget/src/Entrypoint/Gating.ts +++ b/compiler/packages/babel-plugin-react-forget/src/Entrypoint/Gating.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"; import { PluginOptions } from "./Options"; diff --git a/compiler/packages/babel-plugin-react-forget/src/Entrypoint/Imports.ts b/compiler/packages/babel-plugin-react-forget/src/Entrypoint/Imports.ts index f039f04db0..d31d450c47 100644 --- a/compiler/packages/babel-plugin-react-forget/src/Entrypoint/Imports.ts +++ b/compiler/packages/babel-plugin-react-forget/src/Entrypoint/Imports.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"; import { CompilerError } from "../CompilerError"; diff --git a/compiler/packages/babel-plugin-react-forget/src/Entrypoint/index.ts b/compiler/packages/babel-plugin-react-forget/src/Entrypoint/index.ts index 398786919f..3a68ab15cd 100644 --- a/compiler/packages/babel-plugin-react-forget/src/Entrypoint/index.ts +++ b/compiler/packages/babel-plugin-react-forget/src/Entrypoint/index.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 * from "./Gating"; export * from "./Imports"; export * from "./Instrumentation"; diff --git a/compiler/packages/babel-plugin-react-forget/src/HIR/FindContextIdentifiers.ts b/compiler/packages/babel-plugin-react-forget/src/HIR/FindContextIdentifiers.ts index cd3304f40c..468c7b8c6d 100644 --- a/compiler/packages/babel-plugin-react-forget/src/HIR/FindContextIdentifiers.ts +++ b/compiler/packages/babel-plugin-react-forget/src/HIR/FindContextIdentifiers.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 { NodePath } from "@babel/traverse"; import type * as t from "@babel/types"; import { CompilerError } from "../CompilerError"; diff --git a/compiler/packages/babel-plugin-react-forget/src/Inference/InlineImmediatelyInvokedFunctionExpressions.ts b/compiler/packages/babel-plugin-react-forget/src/Inference/InlineImmediatelyInvokedFunctionExpressions.ts index 8a42ca8441..fbaddd9a9d 100644 --- a/compiler/packages/babel-plugin-react-forget/src/Inference/InlineImmediatelyInvokedFunctionExpressions.ts +++ b/compiler/packages/babel-plugin-react-forget/src/Inference/InlineImmediatelyInvokedFunctionExpressions.ts @@ -1,5 +1,5 @@ /** - * Copyright (c) Facebook, Inc. and its affiliates. + * 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. diff --git a/compiler/packages/babel-plugin-react-forget/src/ReactiveScopes/PruneHoistedContexts.ts b/compiler/packages/babel-plugin-react-forget/src/ReactiveScopes/PruneHoistedContexts.ts index 451badc528..fdc686cd80 100644 --- a/compiler/packages/babel-plugin-react-forget/src/ReactiveScopes/PruneHoistedContexts.ts +++ b/compiler/packages/babel-plugin-react-forget/src/ReactiveScopes/PruneHoistedContexts.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 { Identifier, InstructionKind, diff --git a/compiler/packages/babel-plugin-react-forget/src/Utils/ComponentDeclaration.ts b/compiler/packages/babel-plugin-react-forget/src/Utils/ComponentDeclaration.ts index b2686e8506..a0dd4aa14b 100644 --- a/compiler/packages/babel-plugin-react-forget/src/Utils/ComponentDeclaration.ts +++ b/compiler/packages/babel-plugin-react-forget/src/Utils/ComponentDeclaration.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"; export type ComponentDeclaration = t.FunctionDeclaration & { diff --git a/compiler/packages/babel-plugin-react-forget/src/Validation/ValidateNoSetStateInRender.ts b/compiler/packages/babel-plugin-react-forget/src/Validation/ValidateNoSetStateInRender.ts index f1d648b9fe..95b47b5f92 100644 --- a/compiler/packages/babel-plugin-react-forget/src/Validation/ValidateNoSetStateInRender.ts +++ b/compiler/packages/babel-plugin-react-forget/src/Validation/ValidateNoSetStateInRender.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, ErrorSeverity } from "../CompilerError"; import { BlockId, diff --git a/compiler/packages/eslint-plugin-react-forget/__tests__/ReactForgetDiagnostics-test.ts b/compiler/packages/eslint-plugin-react-forget/__tests__/ReactForgetDiagnostics-test.ts index c517ffe366..17ae5bdcba 100644 --- a/compiler/packages/eslint-plugin-react-forget/__tests__/ReactForgetDiagnostics-test.ts +++ b/compiler/packages/eslint-plugin-react-forget/__tests__/ReactForgetDiagnostics-test.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 BabelESLintParser from "@babel/eslint-parser"; import { RuleTester as ESLintTester } from "eslint"; import ReactForgetDiagnostics from "../src/rules/ReactForgetDiagnostics"; diff --git a/compiler/packages/eslint-plugin-react-forget/rollup.config.js b/compiler/packages/eslint-plugin-react-forget/rollup.config.js index 47397ab290..4403f1e1e3 100644 --- a/compiler/packages/eslint-plugin-react-forget/rollup.config.js +++ b/compiler/packages/eslint-plugin-react-forget/rollup.config.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. + */ + import typescript from "@rollup/plugin-typescript"; import { nodeResolve } from "@rollup/plugin-node-resolve"; import commonjs from "@rollup/plugin-commonjs"; diff --git a/compiler/packages/eslint-plugin-react-forget/src/types/hermes-parser.d.ts b/compiler/packages/eslint-plugin-react-forget/src/types/hermes-parser.d.ts index 4fb97ce0e0..535c15880e 100644 --- a/compiler/packages/eslint-plugin-react-forget/src/types/hermes-parser.d.ts +++ b/compiler/packages/eslint-plugin-react-forget/src/types/hermes-parser.d.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. + */ + // v0.12.1 declare module "hermes-parser" { type HermesParserOptions = { diff --git a/compiler/packages/fixture-test-utils/src/compiler-utils.ts b/compiler/packages/fixture-test-utils/src/compiler-utils.ts index c956bffbe5..54bb9977f5 100644 --- a/compiler/packages/fixture-test-utils/src/compiler-utils.ts +++ b/compiler/packages/fixture-test-utils/src/compiler-utils.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 assert from "assert"; import type { runReactForgetBabelPlugin as RunReactForgetBabelPlugin } from "babel-plugin-react-forget/src/Babel/RunReactForgetBabelPlugin"; import { CompilationMode } from "babel-plugin-react-forget/src/Entrypoint"; diff --git a/compiler/packages/fixture-test-utils/src/constants.ts b/compiler/packages/fixture-test-utils/src/constants.ts index 36091aee78..1e876b946d 100644 --- a/compiler/packages/fixture-test-utils/src/constants.ts +++ b/compiler/packages/fixture-test-utils/src/constants.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 path from "path"; // We assume this is run from `babel-plugin-react-forget` diff --git a/compiler/packages/fixture-test-utils/src/fixture-utils.ts b/compiler/packages/fixture-test-utils/src/fixture-utils.ts index def72db681..fdba8808c0 100644 --- a/compiler/packages/fixture-test-utils/src/fixture-utils.ts +++ b/compiler/packages/fixture-test-utils/src/fixture-utils.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 fs from "fs/promises"; import glob from "glob"; import path from "path"; diff --git a/compiler/packages/fixture-test-utils/src/index.ts b/compiler/packages/fixture-test-utils/src/index.ts index e3a8824c01..2620fcbad9 100644 --- a/compiler/packages/fixture-test-utils/src/index.ts +++ b/compiler/packages/fixture-test-utils/src/index.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 * from "./constants"; export * from "./fixture-utils"; export * from "./compiler-utils"; diff --git a/compiler/packages/sprout/src/SproutTodoFilter.ts b/compiler/packages/sprout/src/SproutTodoFilter.ts index a1fa6616ac..e885505a7c 100644 --- a/compiler/packages/sprout/src/SproutTodoFilter.ts +++ b/compiler/packages/sprout/src/SproutTodoFilter.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. + */ + const skipFilter = new Set([ /** * Category A: diff --git a/compiler/packages/sprout/src/shared-runtime.ts b/compiler/packages/sprout/src/shared-runtime.ts index e30e72e967..fd386d0366 100644 --- a/compiler/packages/sprout/src/shared-runtime.ts +++ b/compiler/packages/sprout/src/shared-runtime.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 React from "react"; /**