@samitouri / QOS-React-2 / commits / 801e4258cf

Add missing copyright headers

Joe Savona committed Apr 5, 2023 at 12:21 UTC 801e4258cf9936ed5e7e2e4afa746e9c4b28885f
212 files changed +1100 -67
compiler/forget/packages/demo-2021Q3/measurement/Demo2.babel.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import React, { createContext, useRef, useReducer, useContext } from "react";
9 import "./styles.css";
10 import { jsx as _jsx } from "react/jsx-runtime";
compiler/forget/packages/demo-2021Q3/measurement/Demo2.forget.babel.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import { useMemoCache } from "./useMemoCache";
9 import React, { createContext, useRef, useReducer, useContext } from "react";
10 import "./styles.css";
compiler/forget/packages/demo-2021Q3/measurement/Demo2.forget.min.js
+7
@@ -1 +1,8 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import{useMemoCache}from"./useMemoCache";import React,{createContext,useRef,useReducer,useContext}from"react";import"./styles.css";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";const initialStore={left:void 0,right:void 0},reducer=(e,t)=>{switch(t.tag){case"left":return{...e,left:t.payload};case"right":return{...e,right:t.payload};default:return e}},BinaryContext=createContext(initialStore);function Input(e){let t=useMemoCache(2);var a=t[0],s=!a||a!==e;s&&(t[0]=e);var r=s&&a.value!==e.value,a=s&&a.onChange!==e.onChange;return r||a?t[1]=_jsx("input",{className:"Search",placeholder:"...",value:e.value,onChange:e.onChange}):t[1]}function Left(){let e=useMemoCache(9);const[{left:t},a]=useContext(BinaryContext);var s=e[2]!==a;s&&(e[2]=a);var r=e[1]!==t;r&&(e[1]=t);const n=useRef(0);return r||s?e[8]=_jsxs("div",{className:"column Demo2",children:[r||s?e[5]=_jsxs("header",{className:"Header row",children:[_jsx("div",{className:"Icon",children:"⚛️"}),r||s?e[4]=_jsx(Input,{value:t,onChange:s?e[3]=e=>a({tag:"left",payload:e.target.value}):e[3]}):e[4]]}):e[5],r?e[7]=_jsxs("div",{className:"Feed",children:[_jsx("h3",{children:n.current++}),r?e[6]=_jsx("div",{className:"FeedItem",children:t}):e[6]]}):e[7]]}):e[8]}function Right(){let e=useMemoCache(9);const[{right:t},a]=useContext(BinaryContext);var s=e[2]!==a;s&&(e[2]=a);var r=e[1]!==t;r&&(e[1]=t);const n=useRef(0);return r||s?e[8]=_jsxs("div",{className:"column Demo2",children:[r||s?e[5]=_jsxs("header",{className:"Header row",children:[_jsx("div",{className:"Icon",children:"⚛️"}),r||s?e[4]=_jsx(Input,{value:t,onChange:s?e[3]=e=>a({tag:"right",payload:e.target.value}):e[3]}):e[4]]}):e[5],r?e[7]=_jsxs("div",{className:"Feed",children:[_jsx("h3",{children:n.current++}),r?e[6]=_jsx("div",{className:"FeedItem",children:t}):e[6]]}):e[7]]}):e[8]}export default function Demo2(){let e=useMemoCache(4);var[t,a]=useReducer(reducer,initialStore),s=e[1]!==t;s&&(e[1]=t);a=s?e[2]=[t,a]:e[2];return s?e[3]=_jsx(BinaryContext.Provider,{value:a,children:_jsxs("div",{className:"App",children:[_jsx("h2",{children:"Demo2 - Context"}),_jsxs("div",{className:"row",children:[_jsx(Left,{}),_jsx(Right,{})]})]})}):e[3]}
compiler/forget/packages/demo-2021Q3/measurement/Demo2.min.js
+7
@@ -1 +1,8 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import React,{createContext,useRef,useReducer,useContext}from"react";import"./styles.css";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";const initialStore={left:void 0,right:void 0},reducer=(e,t)=>{switch(t.tag){case"left":return{...e,left:t.payload};case"right":return{...e,right:t.payload};default:return e}},BinaryContext=createContext(initialStore);function Input({value:e,onChange:t}){return _jsx("input",{className:"Search",placeholder:"...",value:e,onChange:t})}function Left(){const[{left:e},t]=useContext(BinaryContext),s=useRef(0);return _jsxs("div",{className:"column Demo2",children:[_jsxs("header",{className:"Header row",children:[_jsx("div",{className:"Icon",children:"⚛️"}),_jsx(Input,{value:e,onChange:e=>t({tag:"left",payload:e.target.value})})]}),_jsxs("div",{className:"Feed",children:[_jsx("h3",{children:s.current++}),_jsx("div",{className:"FeedItem",children:e})]})]})}function Right(){const[{right:e},t]=useContext(BinaryContext),s=useRef(0);return _jsxs("div",{className:"column Demo2",children:[_jsxs("header",{className:"Header row",children:[_jsx("div",{className:"Icon",children:"⚛️"}),_jsx(Input,{value:e,onChange:e=>t({tag:"right",payload:e.target.value})})]}),_jsxs("div",{className:"Feed",children:[_jsx("h3",{children:s.current++}),_jsx("div",{className:"FeedItem",children:e})]})]})}export default function Demo2(){var[e,t]=useReducer(reducer,initialStore),t=[e,t];return _jsx(BinaryContext.Provider,{value:t,children:_jsxs("div",{className:"App",children:[_jsx("h2",{children:"Demo2 - Context"}),_jsxs("div",{className:"row",children:[_jsx(Left,{}),_jsx(Right,{})]})]})})}
compiler/forget/packages/demo-2021Q3/measurement/Feed.babel.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import React, { useRef } from "react";
9 import { jsx as _jsx } from "react/jsx-runtime";
10 import { jsxs as _jsxs } from "react/jsx-runtime";
compiler/forget/packages/demo-2021Q3/measurement/Feed.forget.babel.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import { useMemoCache } from "./useMemoCache";
9 import React, { useRef } from "react";
10 import { jsx as _jsx } from "react/jsx-runtime";
compiler/forget/packages/demo-2021Q3/measurement/Feed.forget.min.js
+7
@@ -1 +1,8 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import{useMemoCache}from"./useMemoCache";import React,{useRef}from"react";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";function FeedItem(e){let t=useMemoCache(2);var r=t[0],a=!r||r!==e;a&&(t[0]=e);var s=a&&r.data!==e.data,r=a&&r.onClick!==e.onClick;const m=useRef(0);return s||r?t[1]=_jsx("a",{href:`./item/${e.data.value}`,className:"FeedItem",onClick:e.onClick,children:m.current++}):t[1]}function Feed(e){let t=useMemoCache(3);var r=t[0],a=!r||r!==e;a&&(t[0]=e);r=a&&r.items!==e.items;const s=useRef(0),m=t[1]||(t[1]=e=>{e.preventDefault(),alert(e.target.href)});return r?t[2]=_jsxs("div",{className:"Feed",children:[_jsx("h3",{children:s.current++}),e.items.map((e,t)=>_jsx(FeedItem,{data:e,onClick:m},t))]}):t[2]}export{FeedItem,Feed};
compiler/forget/packages/demo-2021Q3/measurement/Feed.hook.babel.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import React, { useRef, useCallback } from "react";
9 import { jsx as _jsx } from "react/jsx-runtime";
10 import { jsxs as _jsxs } from "react/jsx-runtime";
compiler/forget/packages/demo-2021Q3/measurement/Feed.hook.min.js
+7
@@ -1 +1,8 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import React,{useRef,useCallback}from"react";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";function FeedItem({data:e,onClick:t}){const r=useRef(0);return _jsx("a",{href:`./item/${e.value}`,className:"FeedItem",onClick:t,children:r.current++})}const FeedItemMemoized=React.memo(FeedItem),Feed=React.memo(({items:e})=>{const t=useRef(0),r=useCallback(e=>{e.preventDefault(),alert(e.target.href)},[]);return _jsxs("div",{className:"Feed",children:[_jsx("h3",{children:t.current++}),e.map((e,t)=>_jsx(FeedItemMemoized,{data:e,onClick:r},t))]})});export{Feed};
compiler/forget/packages/demo-2021Q3/measurement/Feed.min.js
+7
@@ -1 +1,8 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import React,{useRef}from"react";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";function FeedItem({data:e,onClick:t}){const r=useRef(0);return _jsx("a",{href:`./item/${e.value}`,className:"FeedItem",onClick:t,children:r.current++})}function Feed({items:e}){const t=useRef(0),r=e=>{e.preventDefault(),alert(e.target.href)};return _jsxs("div",{className:"Feed",children:[_jsx("h3",{children:t.current++}),e.map((e,t)=>_jsx(FeedItem,{data:e,onClick:r},t))]})}export{FeedItem,Feed};
compiler/forget/packages/demo-2021Q3/src/App.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import Demo1 from "./Demo1";
9 import Demo1Forget from "./Demo1.forget.js";
10 import Demo2 from "./Demo2";
compiler/forget/packages/demo-2021Q3/src/Demo1.forget.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import { useMemoCache } from "./useMemoCache";
9 import React, { useState } from "react";
10 import "./styles.css";
compiler/forget/packages/demo-2021Q3/src/Demo1.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import React, { useState } from "react";
9 import "./styles.css";
10 import * as Feed from "./Feed";
compiler/forget/packages/demo-2021Q3/src/Demo2.forget.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import { useMemoCache } from "./useMemoCache";
9 import React, { createContext, useRef, useReducer, useContext } from "react";
10 import "./styles.css";
compiler/forget/packages/demo-2021Q3/src/Demo2.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import React, { createContext, useRef, useReducer, useContext } from "react";
9 import "./styles.css";
10
compiler/forget/packages/demo-2021Q3/src/Feed.forget.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import { useMemoCache } from "./useMemoCache";
9 import React, { useRef } from "react";
10
compiler/forget/packages/demo-2021Q3/src/Feed.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import React, { useRef } from "react";
9
10 function FeedItem({ data, onClick }) {
compiler/forget/packages/demo-2021Q3/src/FeedMemoized.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import React, { useRef, useCallback } from "react";
9
10 function FeedItem({ data, onClick }) {
compiler/forget/packages/demo-2021Q3/src/index.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import { StrictMode } from "react";
9 import ReactDOM from "react-dom";
10
compiler/forget/packages/demo-2021Q3/src/useMemoCache.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import { useRef } from "react";
9
10 const placeholder = NaN;
compiler/forget/packages/demo-todolist-live/src/compiled/AddTodo.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import { useMemoCache } from "./useMemoCache";
9 import React, { useState } from "react";
10 export default function AddTodo({
compiler/forget/packages/demo-todolist-live/src/compiled/BlazingTodoList.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import { useMemoCache } from "./useMemoCache";
9 import getUpdated from "../utils/getUpdated";
10 import getFiltered from "../utils/getFiltered";
compiler/forget/packages/demo-todolist-live/src/compiled/Todo.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import { useMemoCache } from "./useMemoCache";
9 import React, { useState, useRef } from "react";
10 import CountBadge from "../utils/CountBadge";
compiler/forget/packages/demo-todolist-live/src/compiled/useMemoCache.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import { useRef } from "react";
9
10 const placeholder = NaN;
compiler/forget/packages/demo-todolist-live/src/createServiceWorker.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 // In production, we register a service worker to serve assets from local cache.
9
10 // This lets the app load faster on subsequent visits in production, and gives
compiler/forget/packages/demo-todolist-live/src/index.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import React, { StrictMode } from "react";
9 import ReactDOM from "react-dom";
10 import "./normalize.css";
compiler/forget/packages/demo-todolist-live/src/source/AddTodo.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import React, { useState } from "react";
9
10 export default function AddTodo({ setTodos, themeColor = "#045975" }) {
compiler/forget/packages/demo-todolist-live/src/source/BlazingTodoList.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import getUpdated from "../utils/getUpdated";
9 import getFiltered from "../utils/getFiltered";
10 import initialTodos from "../utils/InitialTodos";
compiler/forget/packages/demo-todolist-live/src/source/Todo.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import React, { useState, useRef } from "react";
9 import CountBadge from "../utils/CountBadge";
10
compiler/forget/packages/demo-todolist-live/src/utils/ColorPicker.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 export default function ColorPicker({ value, onChange }) {
9 return (
10 <input
compiler/forget/packages/demo-todolist-live/src/utils/CountBadge.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import { forwardRef } from "react";
9
10 // Capped to 3 digits
compiler/forget/packages/demo-todolist-live/src/utils/InitialTodos.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 const initialTodos = [
9 { id: 0, text: "memo", done: true },
10 { id: 1, text: "useCallback", done: false },
compiler/forget/packages/demo-todolist-live/src/utils/Select.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 export default function Select({ value, options, onChange }) {
9 return (
10 <div className="Select">
compiler/forget/packages/demo-todolist-live/src/utils/getFiltered.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 function delay() {
9 let now = performance.now();
10 while (performance.now() - now < 16) {
compiler/forget/packages/demo-todolist-live/src/utils/getUpdated.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 export default function getUpdated(tasks, newTodo) {
9 return tasks
10 .map(t => {
compiler/forget/packages/demo-todolist-next/components/AddTodo.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 "use forget";
9 import React, { useState } from "react";
10
compiler/forget/packages/demo-todolist-next/components/BlazingTodoList.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 "use forget";
9 import getUpdated from "../utils/getUpdated";
10 import getFiltered from "../utils/getFiltered";
compiler/forget/packages/demo-todolist-next/components/Todo.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 "use forget";
9 import React, { useState, useRef } from "react";
10 import CountBadge from "../utils/CountBadge";
compiler/forget/packages/demo-todolist-next/next.config.js
+6 -1
@@ -1,4 +1,9 @@
1 -/** @type {import('next').NextConfig} */
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 const nextConfig = {
8 reactStrictMode: true,
9 }
compiler/forget/packages/demo-todolist-next/pages/_app.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import "../styles/normalize.css";
9 import "../styles/styles.css";
10
compiler/forget/packages/demo-todolist-next/pages/api/hello.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 // Next.js API route support: https://nextjs.org/docs/api-routes/introduction
9
10 export default function handler(req, res) {
compiler/forget/packages/demo-todolist-next/pages/index.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import BlazingTodoList from "../components/BlazingTodoList";
9
10 export default function Home() {
compiler/forget/packages/demo-todolist-next/utils/ColorPicker.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 export default function ColorPicker({ value, onChange }) {
9 return (
10 <input
compiler/forget/packages/demo-todolist-next/utils/CountBadge.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import { forwardRef } from "react";
9
10 // Capped to 3 digits
compiler/forget/packages/demo-todolist-next/utils/InitialTodos.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 const initialTodos = [
9 { id: 0, text: "memo", done: true },
10 { id: 1, text: "useCallback", done: false },
compiler/forget/packages/demo-todolist-next/utils/Select.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 export default function Select({ value, options, onChange }) {
9 return (
10 <div className="Select">
compiler/forget/packages/demo-todolist-next/utils/getFiltered.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 function delay() {
9 let now = performance.now();
10 while (performance.now() - now < 16) {
compiler/forget/packages/demo-todolist-next/utils/getUpdated.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 export default function getUpdated(tasks, newTodo) {
9 return tasks
10 .map(t => {
compiler/forget/packages/demo-todolist-next/utils/useMemoCache.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import { useRef } from "react";
9
10 const REACT_MEMOCACHE_SENTINEL = Symbol.for('react.memocache_sentinel');
compiler/forget/packages/demo-todolist-playground/src/Components/ColorPicker.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 export default function ColorPicker({ value, onChange }) {
9 return (
10 <input
compiler/forget/packages/demo-todolist-playground/src/Components/CountBadge.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import { forwardRef } from "react";
9
10 // Capped to 3 digits
compiler/forget/packages/demo-todolist-playground/src/Components/Select.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 export default function Select({ value, options, onChange }) {
9 return (
10 <div className="Select">
compiler/forget/packages/demo-todolist-playground/src/createServiceWorker.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 // In production, we register a service worker to serve assets from local cache.
9
10 // This lets the app load faster on subsequent visits in production, and gives
compiler/forget/packages/demo-todolist-playground/src/forget/Ch1.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import { useMemoCache } from "./useMemoCache";
9 import React, { useState, useRef } from "react";
10 /**
compiler/forget/packages/demo-todolist-playground/src/forget/Ch2.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import { useMemoCache } from "./useMemoCache";
9 import React, { useState, useRef } from "react";
10 /**
compiler/forget/packages/demo-todolist-playground/src/forget/Ch3.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import { useMemoCache } from "./useMemoCache";
9 import React, { createContext, useState, useRef, useContext } from "react";
10 /**
compiler/forget/packages/demo-todolist-playground/src/forget/Ch4.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import { useMemoCache } from "./useMemoCache";
9 import React, { useState, useRef } from "react";
10 import { TasksProvider, useTasks, useTasksDispatch } from "./TaskBoardContext";
compiler/forget/packages/demo-todolist-playground/src/forget/Ch5.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import { useMemoCache } from "./useMemoCache";
9 import React, { createContext, useContext, useState, useRef } from "react";
10 /**
compiler/forget/packages/demo-todolist-playground/src/forget/InitialTasks.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import { useMemoCache } from "./useMemoCache";
9 const initialTasks = [{
10 id: 0,
compiler/forget/packages/demo-todolist-playground/src/forget/Neo0.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import { useMemoCache } from "./useMemoCache";
9 import React, { useState, useRef } from "react";
10 import getUpdated from "./getUpdated";
compiler/forget/packages/demo-todolist-playground/src/forget/Neo1.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import { useMemoCache } from "./useMemoCache";
9 import React, { useState, useRef } from "react";
10 import getUpdated from "./getUpdated";
compiler/forget/packages/demo-todolist-playground/src/forget/Neo2.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import { useMemoCache } from "./useMemoCache";
9 import React, { useState, useRef } from "react";
10 import getUpdated from "./getUpdated";
compiler/forget/packages/demo-todolist-playground/src/forget/Neo3.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import { useMemoCache } from "./useMemoCache";
9 import React, { useState, useRef, useEffect } from "react";
10 import getUpdated from "./getUpdated";
compiler/forget/packages/demo-todolist-playground/src/forget/NeoAddTask.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import { useMemoCache } from "./useMemoCache";
9 import React, { useState } from "react"; // We need this because Forget has bug when props is passed in `undefined`
10
compiler/forget/packages/demo-todolist-playground/src/forget/NeoAddTaskThemable.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import { useMemoCache } from "./useMemoCache";
9 import React, { useState } from "react";
10 export default function AddTodo(props) {
compiler/forget/packages/demo-todolist-playground/src/forget/NeoAddTodo.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import { useMemoCache } from "./useMemoCache";
9 import React, { useState } from "react"; // We need this because Forget has bug when props is passed in `undefined`
10
compiler/forget/packages/demo-todolist-playground/src/forget/NeoAddTodoThemable.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import { useMemoCache } from "./useMemoCache";
9 import React, { useState } from "react";
10 export default function AddTodo(props) {
compiler/forget/packages/demo-todolist-playground/src/forget/NeoTask.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import { useMemoCache } from "./useMemoCache";
9 import React, { useState, useRef } from "react";
10 import CountBadge from "../Components/CountBadge";
compiler/forget/packages/demo-todolist-playground/src/forget/NeoTaskNoBadge.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import { useMemoCache } from "./useMemoCache";
9 import React, { useState, useRef } from "react";
10 import CountBadge from "../Components/CountBadge";
compiler/forget/packages/demo-todolist-playground/src/forget/NeoTodo.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import { useMemoCache } from "./useMemoCache";
9 import React, { useState, useRef } from "react";
10 import CountBadge from "../Components/CountBadge";
compiler/forget/packages/demo-todolist-playground/src/forget/NeoTodoNoBadge.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import { useMemoCache } from "./useMemoCache";
9 import React, { useState, useRef } from "react";
10 import CountBadge from "../Components/CountBadge";
compiler/forget/packages/demo-todolist-playground/src/forget/TaskBoardContext.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import { useMemoCache } from "./useMemoCache";
9 import { createContext, useContext, useReducer } from "react";
10 const TasksContext = createContext(null);
compiler/forget/packages/demo-todolist-playground/src/forget/getFiltered.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import { useMemoCache } from "./useMemoCache";
9 function delay() {
10 let now = performance.now();
compiler/forget/packages/demo-todolist-playground/src/forget/getUpdated.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import { useMemoCache } from "./useMemoCache";
9 // Update an array in an immutable manner.
10 export default function getUpdated(todos, newTodo) {
compiler/forget/packages/demo-todolist-playground/src/forget/initialTodos.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import { useMemoCache } from "./useMemoCache";
9 const initialTodos = [{
10 id: 0,
compiler/forget/packages/demo-todolist-playground/src/forget/useMemoCache.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import { useRef } from "react";
9
10 const placeholder = NaN;
compiler/forget/packages/demo-todolist-playground/src/index.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import React, { StrictMode, useEffect, useState } from "react";
9 import ReactDOM from "react-dom";
10 import "./normalize.css";
compiler/forget/packages/demo-todolist-playground/src/source/Ch1.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import React, { useState, useRef } from "react";
9
10 /**
compiler/forget/packages/demo-todolist-playground/src/source/Ch1.memo.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import React, { useCallback, useState, useRef } from "react";
9
10 /**
compiler/forget/packages/demo-todolist-playground/src/source/Ch2.half.memo.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import React, { useState, useRef, useCallback } from "react";
9
10 /**
compiler/forget/packages/demo-todolist-playground/src/source/Ch2.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import React, { useState, useRef } from "react";
9
10 /**
compiler/forget/packages/demo-todolist-playground/src/source/Ch2.memo.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import React, { useState, useRef, useCallback, useMemo } from "react";
9
10 /**
compiler/forget/packages/demo-todolist-playground/src/source/Ch3.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import React, { createContext, useState, useRef, useContext } from "react";
9
10 /**
compiler/forget/packages/demo-todolist-playground/src/source/Ch4.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import React, { useState, useRef } from "react";
9 import { TasksProvider, useTasks, useTasksDispatch } from "./TaskBoardContext";
10
compiler/forget/packages/demo-todolist-playground/src/source/Ch5.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import React, { createContext, useContext, useState, useRef } from "react";
9
10 /**
compiler/forget/packages/demo-todolist-playground/src/source/InitialTasks.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 const initialTasks = [
9 { id: 0, text: "memo", done: true },
10 { id: 1, text: "useCallback", done: false },
compiler/forget/packages/demo-todolist-playground/src/source/Neo0.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import React, { useState, useRef } from "react";
9 import getUpdated from "./getUpdated";
10 import initialTodos from "./initialTodos";
compiler/forget/packages/demo-todolist-playground/src/source/Neo1.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import React, { useState, useRef } from "react";
9 import getUpdated from "./getUpdated";
10 import initialTodos from "./initialTodos";
compiler/forget/packages/demo-todolist-playground/src/source/Neo1.memo.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import React, { useState, useCallback } from "react";
9 import getUpdated from "./getUpdated";
10 import initialTodos from "./initialTodos";
compiler/forget/packages/demo-todolist-playground/src/source/Neo2.half.memo.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import React, { useState, useRef, useCallback } from "react";
9 import getUpdated from "./getUpdated";
10 import initialTodos from "./initialTodos";
compiler/forget/packages/demo-todolist-playground/src/source/Neo2.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import React, { useState, useRef } from "react";
9 import getUpdated from "./getUpdated";
10 import initialTodos from "./initialTodos";
compiler/forget/packages/demo-todolist-playground/src/source/Neo3.half.memo.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import React, { useState, useRef, useCallback } from "react";
9 import getUpdated from "./getUpdated";
10 import getFiltered from "./getFiltered";
compiler/forget/packages/demo-todolist-playground/src/source/Neo3.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import React, { useState, useRef, useEffect } from "react";
9 import getUpdated from "./getUpdated";
10 import getFiltered from "./getFiltered";
compiler/forget/packages/demo-todolist-playground/src/source/Neo3.memo.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import React, { useState, useRef, useCallback, useMemo } from "react";
9 import getUpdated from "./getUpdated";
10 import getFiltered from "./getFiltered";
compiler/forget/packages/demo-todolist-playground/src/source/Neo3ForgetPseudo.memo.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 // magic variables + memoCache
9 function TodoList1({ visibility, themeColor }) {
10 const [todos, setTodos] = useState(initialTodos);
compiler/forget/packages/demo-todolist-playground/src/source/NeoAddTask.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import React, { useState } from "react";
9
10 // We need this because Forget has bug when props is passed in `undefined`
compiler/forget/packages/demo-todolist-playground/src/source/NeoAddTaskThemable.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import React, { useState } from "react";
9
10 export default function AddTodo({ setTodos, themeColor = "#045975" }) {
compiler/forget/packages/demo-todolist-playground/src/source/NeoAddTodo.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import React, { useState } from "react";
9
10 // We need this because Forget has bug when props is passed in `undefined`
compiler/forget/packages/demo-todolist-playground/src/source/NeoAddTodoThemable.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import React, { useState } from "react";
9
10 export default function AddTodo({ setTodos, themeColor = "#045975" }) {
compiler/forget/packages/demo-todolist-playground/src/source/NeoTask.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import React, { useState, useRef } from "react";
9 import CountBadge from "../Components/CountBadge";
10
compiler/forget/packages/demo-todolist-playground/src/source/NeoTaskNoBadge.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import React, { useState, useRef } from "react";
9 import CountBadge from "../Components/CountBadge";
10
compiler/forget/packages/demo-todolist-playground/src/source/NeoTodo.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import React, { useState, useRef } from "react";
9 import CountBadge from "../Components/CountBadge";
10
compiler/forget/packages/demo-todolist-playground/src/source/NeoTodoNoBadge.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import React, { useState, useRef } from "react";
9 import CountBadge from "../Components/CountBadge";
10
compiler/forget/packages/demo-todolist-playground/src/source/TaskBoardContext.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import { createContext, useContext, useReducer } from "react";
9
10 const TasksContext = createContext(null);
compiler/forget/packages/demo-todolist-playground/src/source/getFiltered.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 function delay() {
9 let now = performance.now();
10 while (performance.now() - now < 16) {
compiler/forget/packages/demo-todolist-playground/src/source/getUpdated.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 // Update an array in an immutable manner.
9 export default function getUpdated(todos, newTodo) {
10 return todos
compiler/forget/packages/demo-todolist-playground/src/source/initialTodos.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 const initialTodos = [
9 { id: 0, text: "memo", done: true },
10 { id: 1, text: "useCallback", done: false },
compiler/forget/packages/eslint-browser/src/index.js
+1 -1
@@ -1,5 +1,5 @@
1 /**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
compiler/forget/packages/eslint-browser/webpack.config.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 "use strict";
9
10 const path = require("path");
compiler/forget/packages/make-read-only-util/jest.config.js
+6 -1
@@ -1,4 +1,9 @@
1 -/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */dist/types').InitialOptionsTsJest} */
7 module.exports = {
8 preset: "ts-jest",
9 testEnvironment: "node",
compiler/forget/packages/make-read-only-util/src/makeReadOnly.test.ts
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import buildMakeReadOnly from "./makeReadOnly";
9
10 describe("makeReadOnly", () => {
compiler/forget/packages/make-read-only-util/src/makeReadOnly.ts
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 "use strict";
9
10 type ROViolationType =
compiler/forget/packages/playground/app/index.tsx
+1 -1
@@ -1,5 +1,5 @@
1 /**
2 - * (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
compiler/forget/packages/playground/app/layout.tsx
+1 -1
@@ -1,5 +1,5 @@
1 /**
2 - * (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
compiler/forget/packages/playground/app/page.tsx
+1 -1
@@ -1,5 +1,5 @@
1 /**
2 - * (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
compiler/forget/packages/playground/colors.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 /*
9 * Copyright (c) Facebook, Inc. and its affiliates.
10 */
compiler/forget/packages/playground/components/Editor/Input.tsx
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 /*
9 * Copyright (c) Facebook, Inc. and its affiliates.
10 */
compiler/forget/packages/playground/components/Editor/monacoOptions.ts
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 /*
9 * Copyright (c) Facebook, Inc. and its affiliates.
10 */
compiler/forget/packages/playground/components/Header.tsx
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 /*
9 * Copyright (c) Facebook, Inc. and its affiliates.
10 */
compiler/forget/packages/playground/components/Logo.tsx
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 /*
9 * Copyright (c) Facebook, Inc. and its affiliates.
10 */
compiler/forget/packages/playground/components/Message.tsx
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import {
9 BanIcon,
10 ExclamationIcon,
compiler/forget/packages/playground/components/StoreContext.tsx
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 /*
9 * Copyright (c) Facebook, Inc. and its affiliates.
10 */
compiler/forget/packages/playground/components/index.ts
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 /*
9 * Copyright (c) Facebook, Inc. and its affiliates.
10 */
compiler/forget/packages/playground/hooks/index.ts
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 /*
9 * Copyright (c) Facebook, Inc. and its affiliates.
10 */
compiler/forget/packages/playground/hooks/useMountEffect.ts
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 /*
9 * Copyright (c) Facebook, Inc. and its affiliates.
10 */
compiler/forget/packages/playground/lib/createContext.ts
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 /*
9 * Copyright (c) Facebook, Inc. and its affiliates.
10 */
compiler/forget/packages/playground/lib/defaultStore.ts
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 /*
9 * Copyright (c) Facebook, Inc. and its affiliates.
10 */
compiler/forget/packages/playground/lib/forgetMonacoDiagnostics.ts
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 /*
9 * Copyright (c) Facebook, Inc. and its affiliates.
10 */
compiler/forget/packages/playground/lib/stores/index.ts
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 /*
9 * Copyright (c) Facebook, Inc. and its affiliates.
10 */
compiler/forget/packages/playground/lib/stores/messages.ts
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 /*
9 * Copyright (c) Facebook, Inc. and its affiliates.
10 */
compiler/forget/packages/playground/lib/stores/store.ts
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 /*
9 * Copyright (c) Facebook, Inc. and its affiliates.
10 */
compiler/forget/packages/playground/lib/utils.ts
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 /*
9 * Copyright (c) Facebook, Inc. and its affiliates.
10 */
compiler/forget/packages/playground/next-env.d.ts
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 /// <reference types="next" />
9 /// <reference types="next/image-types/global" />
10
compiler/forget/packages/playground/next.config.js
+6 -1
@@ -1,4 +1,9 @@
1 -/** @type {import('next').NextConfig} */
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 const nextConfig = {
8 reactStrictMode: true,
9 webpack: (config) => {
compiler/forget/packages/playground/postcss.config.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 module.exports = {
9 plugins: {
10 tailwindcss: {},
compiler/forget/packages/playground/scripts/downloadFonts.js
+4 -1
@@ -1,5 +1,8 @@
1 /**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 */
7
8 const { execSync } = require("child_process");
compiler/forget/packages/playground/tailwind.config.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 const defaultTheme = require("tailwindcss/defaultTheme");
9 const colors = require("./colors");
10
compiler/forget/packages/react-forget-runtime/index.js
+1 -1
@@ -1,5 +1,5 @@
1 /**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
compiler/forget/scripts/test262-preprocessor.js
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 const runReactForgetBabelPlugin =
9 require("../dist/Babel/RunReactForgetBabelPlugin").default;
10
compiler/forget/src/Babel/BabelPlugin.ts
+1 -1
@@ -1,5 +1,5 @@
1 /**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
compiler/forget/src/Babel/PluginOptions.ts
+1 -1
@@ -1,5 +1,5 @@
1 /**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
compiler/forget/src/Babel/RunReactForgetBabelPlugin.ts
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import type * as BabelCore from "@babel/core";
9 import { transformFromAstSync } from "@babel/core";
10 import * as parser from "@babel/parser";
compiler/forget/src/Babel/plugin-syntax-jsx.d.ts
+7
@@ -1 +1,8 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 declare module "@babel/plugin-syntax-jsx";
compiler/forget/src/CompilerError.ts
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import { Node, NodePath } from "@babel/traverse";
9 import { SourceLocation as BabelSourceLocation } from "@babel/types";
10 import { SourceLocation } from "./HIR";
compiler/forget/src/CompilerPipeline.ts
+1 -1
@@ -1,5 +1,5 @@
1 /**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
compiler/forget/src/HIR/BuildHIR.ts
+1 -1
@@ -1,5 +1,5 @@
1 /**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
compiler/forget/src/HIR/Environment.ts
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import invariant from "invariant";
9 import { log } from "../Utils/logger";
10 import {
compiler/forget/src/HIR/Globals.ts
+1 -1
@@ -1,5 +1,5 @@
1 /**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
compiler/forget/src/HIR/HIR.ts
+1 -1
@@ -1,5 +1,5 @@
1 /**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
compiler/forget/src/HIR/HIRBuilder.ts
+1 -1
@@ -1,5 +1,5 @@
1 /**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
compiler/forget/src/HIR/Hooks.ts
+1 -1
@@ -1,5 +1,5 @@
1 /**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
compiler/forget/src/HIR/MergeConsecutiveBlocks.ts
+1 -1
@@ -1,5 +1,5 @@
1 /**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
compiler/forget/src/HIR/ObjectShape.ts
+1 -1
@@ -1,5 +1,5 @@
1 /**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
compiler/forget/src/HIR/PrintHIR.ts
+1 -1
@@ -1,5 +1,5 @@
1 /**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
compiler/forget/src/HIR/Types.ts
+1 -1
@@ -1,5 +1,5 @@
1 /**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
compiler/forget/src/HIR/ValidateConsistentIdentifiers.ts
+1 -1
@@ -1,5 +1,5 @@
1 /**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
compiler/forget/src/HIR/ValidateTerminalSuccessors.ts
+1 -1
@@ -1,5 +1,5 @@
1 /**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
compiler/forget/src/HIR/index.ts
+1 -1
@@ -1,5 +1,5 @@
1 /**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
compiler/forget/src/Inference/AnalyseFunctions.ts
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import invariant from "invariant";
9 import {
10 Effect,
compiler/forget/src/Inference/DropMemoCalls.ts
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import { Effect, HIRFunction, HookType, isHookType } from "../HIR";
9
10 export default function (func: HIRFunction): void {
compiler/forget/src/Inference/InferAlias.ts
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import {
9 HIRFunction,
10 Identifier,
compiler/forget/src/Inference/InferAliasForPhis.ts
+1 -1
@@ -1,5 +1,5 @@
1 /**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
compiler/forget/src/Inference/InferAliasForStores.ts
+1 -1
@@ -1,5 +1,5 @@
1 /**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
compiler/forget/src/Inference/InferMutableLifetimes.ts
+1 -1
@@ -1,5 +1,5 @@
1 /**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
compiler/forget/src/Inference/InferMutableRanges.ts
+1 -1
@@ -1,5 +1,5 @@
1 /**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
compiler/forget/src/Inference/InferMutableRangesForAlias.ts
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import { HIRFunction, Identifier, InstructionId } from "../HIR/HIR";
9 import DisjointSet from "../Utils/DisjointSet";
10
compiler/forget/src/Inference/InferReferenceEffects.ts
+1 -1
@@ -1,5 +1,5 @@
1 /**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
compiler/forget/src/Inference/index.ts
+1 -1
@@ -1,5 +1,5 @@
1 /**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
compiler/forget/src/Optimization/ConstantPropagation.ts
+1 -1
@@ -1,5 +1,5 @@
1 /**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
compiler/forget/src/Optimization/DeadCodeElimination.ts
+1 -1
@@ -1,5 +1,5 @@
1 /**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
compiler/forget/src/Optimization/index.ts
+1 -1
@@ -1,5 +1,5 @@
1 /**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
compiler/forget/src/ReactiveScopes/AlignReactiveScopesToBlockScopes.ts
+1 -1
@@ -1,5 +1,5 @@
1 /**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
compiler/forget/src/ReactiveScopes/BuildReactiveBlocks.ts
+1 -1
@@ -1,5 +1,5 @@
1 /**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
compiler/forget/src/ReactiveScopes/BuildReactiveFunction.ts
+1 -1
@@ -1,5 +1,5 @@
1 /**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
compiler/forget/src/ReactiveScopes/CodegenReactiveFunction.ts
+1 -1
@@ -1,5 +1,5 @@
1 /**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
compiler/forget/src/ReactiveScopes/DeriveMinimalDependencies.ts
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import invariant from "invariant";
9 import { Identifier, ReactiveScopeDependency } from "../HIR";
10 import { printIdentifier } from "../HIR/PrintHIR";
compiler/forget/src/ReactiveScopes/FlattenReactiveLoops.ts
+1 -1
@@ -1,5 +1,5 @@
1 /**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
compiler/forget/src/ReactiveScopes/FlattenScopesWithHooks.ts
+1 -1
@@ -1,5 +1,5 @@
1 /**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
compiler/forget/src/ReactiveScopes/InferReactiveIdentifiers.ts
+1 -1
@@ -1,5 +1,5 @@
1 /**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
compiler/forget/src/ReactiveScopes/MemoizeFbtOperandsInSameScope.ts
+1 -1
@@ -1,5 +1,5 @@
1 /**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
compiler/forget/src/ReactiveScopes/MergeOverlappingReactiveScopes.ts
+1 -1
@@ -1,5 +1,5 @@
1 /**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
compiler/forget/src/ReactiveScopes/PrintReactiveFunction.ts
+1 -1
@@ -1,5 +1,5 @@
1 /**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
compiler/forget/src/ReactiveScopes/PromoteUsedTemporaries.ts
+1 -1
@@ -1,5 +1,5 @@
1 /**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
compiler/forget/src/ReactiveScopes/PropagateScopeDependencies.ts
+1 -1
@@ -1,5 +1,5 @@
1 /**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
compiler/forget/src/ReactiveScopes/PruneNonEscapingScopes.ts
+1 -1
@@ -1,5 +1,5 @@
1 /**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
compiler/forget/src/ReactiveScopes/PruneNonReactiveDependencies.ts
+1 -1
@@ -1,5 +1,5 @@
1 /**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
compiler/forget/src/ReactiveScopes/PruneTemporaryLValues.ts
+1 -1
@@ -1,5 +1,5 @@
1 /**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
compiler/forget/src/ReactiveScopes/PruneUnusedLabels.ts
+1 -1
@@ -1,5 +1,5 @@
1 /**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
compiler/forget/src/ReactiveScopes/PruneUnusedScopes.ts
+1 -1
@@ -1,5 +1,5 @@
1 /**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
compiler/forget/src/ReactiveScopes/RenameVariables.ts
+1 -1
@@ -1,5 +1,5 @@
1 /**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
compiler/forget/src/ReactiveScopes/index.ts
+1 -1
@@ -1,5 +1,5 @@
1 /**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
compiler/forget/src/ReactiveScopes/visitors.ts
+1 -1
@@ -1,5 +1,5 @@
1 /**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
compiler/forget/src/SSA/EliminateRedundantPhi.ts
+1 -1
@@ -1,5 +1,5 @@
1 /**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
compiler/forget/src/SSA/EnterSSA.ts
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import invariant from "invariant";
9 import { CompilerError } from "../CompilerError";
10 import { Environment } from "../HIR/Environment";
compiler/forget/src/SSA/LeaveSSA.ts
+1 -1
@@ -1,5 +1,5 @@
1 /**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
compiler/forget/src/SSA/index.ts
+1 -1
@@ -1,5 +1,5 @@
1 /**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
compiler/forget/src/TypeInference/InferTypes.ts
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import * as t from "@babel/types";
9 import invariant from "invariant";
10 import { Environment } from "../HIR";
compiler/forget/src/TypeInference/index.ts
+1 -1
@@ -1,5 +1,5 @@
1 /**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
compiler/forget/src/Utils/DisjointSet.ts
+1 -1
@@ -1,5 +1,5 @@
1 /**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
compiler/forget/src/Utils/Result.ts
+1 -1
@@ -1,5 +1,5 @@
1 /**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
compiler/forget/src/Utils/VisualizeHIRMermaid.ts
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import { BasicBlock, BlockId, HIRFunction, Terminal } from "../HIR/HIR";
9 import { printInstruction, printPlace } from "../HIR/PrintHIR";
10 import { assertExhaustive } from "./utils";
compiler/forget/src/Utils/logger.ts
+1 -1
@@ -1,5 +1,5 @@
1 /**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
compiler/forget/src/Utils/types.d.ts
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 export type ExtractClassProperties<C> = {
9 [K in keyof C as C[K] extends Function ? never : K]: C[K];
10 };
compiler/forget/src/Utils/utils.ts
+1 -1
@@ -1,5 +1,5 @@
1 /**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
compiler/forget/src/__tests__/DisjointSet-test.ts
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import DisjointSet from "../Utils/DisjointSet";
9
10 type TestIdentifier = {
compiler/forget/src/__tests__/Result-test.ts
+7
@@ -1,3 +1,10 @@
1 +/**
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 + *
4 + * This source code is licensed under the MIT license found in the
5 + * LICENSE file in the root directory of this source tree.
6 + */
7 +
8 import { CompilerError } from "../CompilerError";
9 import { Err, Ok, Result } from "../Utils/Result";
10
compiler/forget/src/__tests__/compiler-test.ts
+1 -1
@@ -1,5 +1,5 @@
1 /**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
compiler/forget/src/__tests__/disableMemoizeJsxElements-test.ts
+1 -1
@@ -1,5 +1,5 @@
1 /**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
compiler/forget/src/__tests__/hir-test.ts
+1 -1
@@ -1,5 +1,5 @@
1 /**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
compiler/forget/src/__tests__/test-utils/generateTestsFromFixtures.ts
+1 -1
@@ -1,5 +1,5 @@
1 /**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
compiler/forget/src/__tests__/test-utils/validateNoUseBeforeDefine.ts
+1 -1
@@ -1,5 +1,5 @@
1 /**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
compiler/forget/src/index.ts
+1 -1
@@ -1,5 +1,5 @@
1 /**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
2 + * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.