@samitouri / QOS-React-2 / commits / 1650d8fef2

Ensure blank line after copyright header

Joe Savona committed Apr 5, 2023 at 13:42 UTC 1650d8fef24ebf04c09bf4950db2013986e45648
11 files changed +16 -4
compiler/forget/packages/demo-todolist-next/next.config.js
+1
@@ -4,6 +4,7 @@
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 nextConfig = {
9 reactStrictMode: true,
10 }
compiler/forget/packages/playground/next.config.js
+1
@@ -4,6 +4,7 @@
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 nextConfig = {
9 reactStrictMode: true,
10 webpack: (config) => {
compiler/forget/scripts/copyright.js
+6 -4
@@ -4,17 +4,19 @@
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 fs = require("fs");
11 const glob = require("glob");
12
12 -const META_COPYRIGHT_COMMENT_BLOCK = `/**
13 +const META_COPYRIGHT_COMMENT_BLOCK =
14 + `/**
15 * Copyright (c) Meta Platforms, Inc. and affiliates.
16 *
17 * This source code is licensed under the MIT license found in the
18 * LICENSE file in the root directory of this source tree.
17 - */`;
19 + */`.trim() + "\n\n";
20
21 const files = glob.sync("**/*.{js,ts,tsx,jsx}", {
22 ignore: [
@@ -55,9 +57,9 @@ function processFile(file) {
57 return null;
58 }
59 if (/^\/\*\*/.test(source)) {
58 - source = source.replace(/\/\*\*[^\/]+\//, META_COPYRIGHT_COMMENT_BLOCK);
60 + source = source.replace(/\/\*\*[^\/]+\/\s+/, META_COPYRIGHT_COMMENT_BLOCK);
61 } else {
60 - source = `${META_COPYRIGHT_COMMENT_BLOCK}\n\n${source}`;
62 + source = `${META_COPYRIGHT_COMMENT_BLOCK}${source}`;
63 }
64 return source;
65 }
compiler/forget/scripts/prettier.js
+1
@@ -4,6 +4,7 @@
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 // Based on similar script in React
compiler/forget/scripts/shared/list-changed-files.js
+1
@@ -4,6 +4,7 @@
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 execFileSync = require("child_process").execFileSync;
compiler/forget/src/CompilerPipeline.ts
+1
@@ -4,6 +4,7 @@
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 { NodePath } from "@babel/traverse";
9 import * as t from "@babel/types";
10 import {
compiler/forget/src/HIR/ObjectShape.ts
+1
@@ -4,6 +4,7 @@
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 { Effect } from "./HIR";
10 import {
compiler/forget/src/HIR/Types.ts
+1
@@ -4,6 +4,7 @@
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 { Hook } from "./Hooks";
10
compiler/forget/src/Inference/InferAliasForPhis.ts
+1
@@ -4,6 +4,7 @@
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 } from "../HIR/HIR";
9 import DisjointSet from "../Utils/DisjointSet";
10
compiler/forget/src/Inference/InferAliasForStores.ts
+1
@@ -4,6 +4,7 @@
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 Effect,
10 HIRFunction,
compiler/forget/src/index.ts
+1
@@ -4,6 +4,7 @@
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 as BabelPlugin } from "./Babel/BabelPlugin";
9 export {
10 CompilerError,