Skip to content

Commit

Permalink
remove date from copyright header
Browse files Browse the repository at this point in the history
Signed-off-by: Kashish Mittal <[email protected]>
  • Loading branch information
04kash committed Jan 6, 2025
1 parent 13a7609 commit eb870b1
Show file tree
Hide file tree
Showing 490 changed files with 553 additions and 542 deletions.
4 changes: 2 additions & 2 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2024 The Backstage Authors
* Copyright The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -24,7 +24,7 @@ module.exports = {
'notice/notice': [
'error',
{
mustMatch: /Copyright \d{4} (The Backstage Authors|The RHDH Authors)/,
mustMatch: /Copyright (The Backstage Authors|Red Hat, Inc.)/,
templateFile: path.resolve(
// eslint-disable-next-line no-restricted-syntax
__dirname,
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/check-if-release.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env node
/* eslint-disable @backstage/no-undeclared-imports */
/*
* Copyright 2020 The Backstage Authors
* Copyright The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/create-tag.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2024 The Backstage Authors
* Copyright The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/generate-bump-changesets.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2024 The Backstage Authors
* Copyright The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/generate-knip-report.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2024 The Backstage Authors
* Copyright The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/generate-version-bump-changeset.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env node
/* eslint-disable @backstage/no-undeclared-imports */
/*
* Copyright 2025 The Backstage Authors
* Copyright The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/list-workspaces-with-changes.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2024 The Backstage Authors
* Copyright The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/set-release-name.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env node
/* eslint-disable @backstage/no-undeclared-imports */
/*
* Copyright 2020 The Backstage Authors
* Copyright The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
54 changes: 27 additions & 27 deletions scripts/ci/verify-changesets.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env node
/*
* Copyright 2020 The Backstage Authors
* Copyright The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -15,16 +15,16 @@
* limitations under the License.
*/

import { join } from "path";
import fs from "fs/promises";
import { default as parseChangeset } from "@changesets/parse";
import { join } from 'path';
import fs from 'fs/promises';
import { default as parseChangeset } from '@changesets/parse';

const privatePackages = new Set([
"app",
"backend",
"e2e-test",
"storybook",
"techdocs-cli-embedded-app",
'app',
'backend',
'e2e-test',
'storybook',
'techdocs-cli-embedded-app',
]);

/**
Expand All @@ -34,42 +34,42 @@ const privatePackages = new Set([
*/
async function main() {
if (process.argv.length < 3) {
throw new Error("Usage: node verify-changesets.js name-of-the-workspace");
throw new Error('Usage: node verify-changesets.js name-of-the-workspace');
}
const workspace = process.argv[2];

const changesetsFolderPath = join(
import.meta.dirname,
"..",
"..",
"workspaces",
'..',
'..',
'workspaces',
workspace,
".changeset"
'.changeset',
);
const fileNames = await fs.readdir(changesetsFolderPath);
const changesetNames = fileNames.filter(
(name) => name.endsWith(".md") && name !== "README.md"
name => name.endsWith('.md') && name !== 'README.md',
);

const changesets = await Promise.all(
changesetNames.map(async (name) => {
changesetNames.map(async name => {
const content = await fs.readFile(
join(changesetsFolderPath, name),
"utf8"
'utf8',
);
return { name, ...parseChangeset(content) };
})
}),
);

const errors = [];
for (const changeset of changesets) {
const privateReleases = changeset.releases.filter((release) =>
privatePackages.has(release.name)
const privateReleases = changeset.releases.filter(release =>
privatePackages.has(release.name),
);
if (privateReleases.length > 0) {
const names = privateReleases
.map((release) => `'${release.name}'`)
.join(", ");
.map(release => `'${release.name}'`)
.join(', ');
errors.push({
name: changeset.name,
messages: [
Expand All @@ -81,9 +81,9 @@ async function main() {

if (errors.length) {
console.log();
console.log("***********************************************************");
console.log("* Changeset verification failed! *");
console.log("***********************************************************");
console.log('***********************************************************');
console.log('* Changeset verification failed! *');
console.log('***********************************************************');
console.log();
for (const error of errors) {
console.error(`Changeset '${error.name}' is invalid:`);
Expand All @@ -93,13 +93,13 @@ async function main() {
}
}
console.log();
console.log("***********************************************************");
console.log('***********************************************************');
console.log();
process.exit(1);
}
}

main().catch((error) => {
main().catch(error => {
console.error(error.stack);
process.exit(1);
});
52 changes: 26 additions & 26 deletions scripts/ci/verify-lockfile-duplicates.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env node
/*
* Copyright 2020 The Backstage Authors
* Copyright The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -17,17 +17,17 @@

/* eslint-disable @backstage/no-undeclared-imports */

import { execFile as execFileCb } from "child_process";
import { resolve as resolvePath, dirname as dirnamePath } from "path";
import { promisify } from "util";
import { execFile as execFileCb } from 'child_process';
import { resolve as resolvePath, dirname as dirnamePath } from 'path';
import { promisify } from 'util';

const execFile = promisify(execFileCb);

async function findLockFiles() {
// Not using relative paths as this should be run inside a workspace folder
const projectRoot = resolvePath(".");
const projectRoot = resolvePath('.');

let files = process.argv.slice(2).filter((arg) => !arg.startsWith("--"));
let files = process.argv.slice(2).filter(arg => !arg.startsWith('--'));

for (const argumentFile of files) {
if (!argumentFile.match(/(?:^|[\/\\])yarn.lock$/)) {
Expand All @@ -37,10 +37,10 @@ async function findLockFiles() {

if (!files.length) {
// List all lock files that are in the root or in an immediate subdirectory
files = ["yarn.lock"];
files = ['yarn.lock'];
}

return files.map((file) => ({
return files.map(file => ({
fileRelativeToProjectRoot: file,
directoryRelativeToProjectRoot: dirnamePath(file),
directoryAbsolute: resolvePath(projectRoot, dirnamePath(file)),
Expand All @@ -52,8 +52,8 @@ async function main() {

let fix = false;
for (const arg of process.argv) {
if (arg.startsWith("--")) {
if (arg === "--fix") {
if (arg.startsWith('--')) {
if (arg === '--fix') {
fix = true;
} else {
throw new Error(`Unknown argument ${arg}`);
Expand All @@ -62,20 +62,20 @@ async function main() {
}

for (const lockFile of lockFiles) {
console.log("Checking lock file", lockFile.fileRelativeToProjectRoot);
console.log('Checking lock file', lockFile.fileRelativeToProjectRoot);

let stdout;
let stderr;
let failed;

try {
const result = await execFile(
"yarn",
["dedupe", ...(fix ? [] : ["--check"])],
'yarn',
['dedupe', ...(fix ? [] : ['--check'])],
{
shell: true,
cwd: lockFile.directoryAbsolute,
}
},
);
stdout = result.stdout?.trim();
stderr = result.stderr?.trim();
Expand All @@ -97,40 +97,40 @@ async function main() {
if (failed) {
if (!fix) {
const command = `yarn${
lockFile.directoryRelativeToProjectRoot === "."
? ""
lockFile.directoryRelativeToProjectRoot === '.'
? ''
: ` --cwd ${lockFile.directoryRelativeToProjectRoot}`
} dedupe`;
const padding = " ".repeat(Math.max(0, 85 - 6 - command.length));
console.error("");
const padding = ' '.repeat(Math.max(0, 85 - 6 - command.length));
console.error('');
console.error(
"*************************************************************************************"
'*************************************************************************************',
);
console.error(
"* You have duplicate versions of some packages in a yarn.lock file. *"
'* You have duplicate versions of some packages in a yarn.lock file. *',
);
console.error(
"* To solve this, run the following command from the project root and commit all *"
'* To solve this, run the following command from the project root and commit all *',
);
console.log(
"* yarn.lock changes. *"
'* yarn.lock changes. *',
);
console.log(
"* *"
'* *',
);
console.log(`* ${command}${padding} *`);
console.error(
"*************************************************************************************"
'*************************************************************************************',
);
console.error("");
console.error('');
}

process.exit(1);
}
}
}

main().catch((error) => {
main().catch(error => {
console.error(error.stack);
process.exit(1);
});
2 changes: 1 addition & 1 deletion scripts/list-backend-feature.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env node
/*
* Copyright 2024 The Backstage Authors
* Copyright The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion scripts/list-compatibility.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env node
/*
* Copyright 2024 The Backstage Authors
* Copyright The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion scripts/list-frontend-feature.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env node
/*
* Copyright 2024 The Backstage Authors
* Copyright The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion scripts/list-workspaces-for-docs.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env node
/*
* Copyright 2024 The Backstage Authors
* Copyright The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion scripts/templates/copyright-header.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright <%= YEAR %> The RHDH Authors
* Copyright Red Hat, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion workspaces/bulk-import/examples/template/content/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2025 The RHDH Authors
* Copyright Red Hat, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion workspaces/bulk-import/packages/app/e2e-tests/app.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2025 The RHDH Authors
* Copyright Red Hat, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion workspaces/bulk-import/packages/app/src/App.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2025 The RHDH Authors
* Copyright Red Hat, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion workspaces/bulk-import/packages/app/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2025 The RHDH Authors
* Copyright Red Hat, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion workspaces/bulk-import/packages/app/src/apis.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2025 The RHDH Authors
* Copyright Red Hat, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Loading

0 comments on commit eb870b1

Please sign in to comment.