Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 20
node-version: 22
registry-url: https://registry.npmjs.org/ # Needed for auth

- name: Find changed workspaces
Expand All @@ -49,7 +49,7 @@ jobs:
strategy:
matrix:
workspace: ${{ fromJSON(needs.find-changed-workspaces.outputs.workspaces) }}
node-version: [18.x, 20.x]
node-version: [22.x, 24.x]
fail-fast: false
defaults:
run:
Expand Down Expand Up @@ -136,7 +136,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 20.x
node-version: 22.x
- name: Install root dependencies
run: yarn install --immutable
- name: Verify lockfile duplicates
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 20
node-version: 22
registry-url: https://registry.npmjs.org/ # Needed for auth

- name: Fetch previous commit for check
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release_workspace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 20
node-version: 22
registry-url: https://registry.npmjs.org/ # Needed for auth

- name: Get yarn cache directory path
Expand Down Expand Up @@ -134,7 +134,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 20
node-version: 22
registry-url: https://registry.npmjs.org/ # Needed for auth

- name: Install root dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/version-bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ jobs:
fetch-depth: 1

# Beginning of yarn setup
- name: use node.js 20.x
- name: use node.js 22.x
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4
with:
node-version: 20.x
node-version: 22.x
registry-url: https://registry.npmjs.org/ # Needed for auth
- name: cache all node_modules
id: cache-modules
Expand Down
23 changes: 23 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +1,24 @@
#!/usr/bin/env sh
set -e

yarn lint-staged


# Please keep this section at the bottom of the file.
#
# Run the pre-commit hook in the default the hooks directory if it exits.
#
# Husky overrides 'core.hooksPath' which doesn't allow running
# the user's existing local hooks (like hooks they've configured in
# 'init.templateDir'). This allows them to run both the project's hooks and
# their own local hooks. If they do not have a local hook defined, this is
# ignored.
#
# See https://git-scm.com/docs/githooks for more information.
#
hooks_dir="${GIT_DIR:-"$(git rev-parse --absolute-git-dir)"}/hooks"
pre_commit_path="${hooks_dir}/pre-commit"
if [ -x "${pre_commit_path}" ]
then
exec "${pre_commit_path}"
fi
9 changes: 9 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-backstage.cjs

Large diffs are not rendered by default.

940 changes: 940 additions & 0 deletions .yarn/releases/yarn-4.13.0.cjs

Large diffs are not rendered by default.

948 changes: 0 additions & 948 deletions .yarn/releases/yarn-4.9.1.cjs

This file was deleted.

12 changes: 9 additions & 3 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,15 @@ enableGlobalCache: true

httpTimeout: 300000

nodeLinker: node-modules
nmMode: hardlinks-local

npmRegistryServer: 'https://registry.npmjs.org/'
nodeLinker: node-modules

npmRegistryServer: "https://registry.npmjs.org/"

plugins:
- checksum: 05b51f75814596aa3e15b296af3287240351c8b7f1df1e05c2ceedf7f3820627759605825fd932f1f7c3c3287b61b16f9e8195b0927a0f80345493f81376947a
path: .yarn/plugins/@yarnpkg/plugin-backstage.cjs
spec: "https://versions.backstage.io/v1/tags/main/yarn-plugin"

yarnPath: .yarn/releases/yarn-4.9.1.cjs
yarnPath: .yarn/releases/yarn-4.13.0.cjs
5 changes: 3 additions & 2 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ vars:
- rag-ai
- tech-insights
- time-saver
YARN_VERSION: 4.9.1
YARN_VERSION: 4.13.0

tasks:
default:
Expand All @@ -26,12 +26,13 @@ tasks:
YARN_VERSION="{{.YARN_VERSION}}"
WORKING_DIRECTORY="$(pwd)"
yarn set version "${YARN_VERSION}"
yarn plugin import https://versions.backstage.io/v1/tags/main/yarn-plugin
yarn install
yarn dedupe
{{range $index, $workspace := .WORKSPACES}}
echo "Updating yarn in \"{{$workspace}}\""
cd "${WORKING_DIRECTORY}/workspaces/{{$workspace}}/"
yarn set version "${YARN_VERSION}"
yarn plugin import https://versions.backstage.io/v1/tags/main/yarn-plugin
yarn install
yarn dedupe
{{end}}
Expand Down
15 changes: 9 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,21 @@
"version": "0.0.0",
"repository": "git@github.com:alithya-oss/backstage-plugins.git",
"engines": {
"node": "20 || 22"
"node": "22 || 24"
},
"scripts": {
"changeset": "echo 'Error: Please run yarn changeset from a workspace directory, not the root.' && exit 1",
"create-workspace": "community-cli workspace create",
"mui-to-bui": "node scripts/mui-to-bui.js",
"postinstall": "husky",
"prettier:check": "prettier --check .",
"prettier:fix": "prettier --write ."
},
"type": "module",
"packageManager": "yarn@4.9.1",
"packageManager": "yarn@4.13.0",
"devDependencies": {
"@backstage-community/cli": "portal:./workspaces/repo-tools/packages/cli",
"@backstage/cli": "^0.32.0",
"@backstage/cli-node": "^0.2.13",
"@changesets/parse": "^0.4.0",
"@manypkg/get-packages": "^2.2.2",
"@octokit/rest": "^20.1.1",
Expand All @@ -28,13 +29,15 @@
"eslint-plugin-notice": "^0.9.10",
"eslint-plugin-react": "^7.28.0",
"eslint-plugin-testing-library": "^6.0.0",
"fs-extra": "11.3.0",
"fs-extra": "11.3.3",
"husky": "^9.0.11",
"js-yaml": "^4.1.0",
"lint-staged": "^15.2.2",
"lint-staged": "^16.0.0",
"lodash.escaperegexp": "^4.1.2",
"node-fetch": "^2.6.7",
"prettier": "^2.3.2"
"prettier": "^2.3.2",
"semver": "^7.7.2",
"ts-morph": "^21.0.1"
},
"prettier": "@backstage/cli/config/prettier",
"lint-staged": {
Expand Down
37 changes: 36 additions & 1 deletion scripts/ci/list-workspaces-with-changes.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ async function main() {
if (!process.env.GITHUB_OUTPUT) {
throw new Error('GITHUB_OUTPUT environment variable not set');
}

const repoRoot = resolvePath(__dirname, '..', '..');
process.chdir(repoRoot);

Expand Down Expand Up @@ -81,10 +80,46 @@ async function main() {

console.log('workspaces that exist:', Array.from(workspaces));

// Automatically detect the supported Node versions from package.json
const workspaceNodeMatrix = [];
for (const workspace of workspaces) {
const packageJson = JSON.parse(
await fs.readFile(`workspaces/${workspace}/package.json`),
);
const nodeString = packageJson.engines.node;
if (!nodeString) {
throw new Error(
`No node engine specified in workspaces/${workspace}/package.json`,
);
}
const nodeVersions = nodeString.split('||').map(v => v.trim());
console.log(
`Detected node versions for workspace ${workspace}:`,
nodeVersions,
);
// Convert versions like "18" to "18.x" for GitHub matrix usage
nodeVersions.forEach(nodeVersion => {
if (nodeVersion.match(/^\d\d$/)) {
workspaceNodeMatrix.push({
workspace,
nodeVersion: `${nodeVersion}.x`,
});
} else {
workspaceNodeMatrix.push({ workspace, nodeVersion });
}
});
}

await fs.appendFile(
process.env.GITHUB_OUTPUT,
`workspaces=${JSON.stringify(Array.from(workspaces))}${EOL}`,
);
await fs.appendFile(
process.env.GITHUB_OUTPUT,
`workspace_node_matrix=${JSON.stringify(
Array.from(workspaceNodeMatrix),
)}${EOL}`,
);
}

main().catch(error => {
Expand Down
43 changes: 38 additions & 5 deletions scripts/ci/set-release-name.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,52 @@ async function getBackstageVersion(workspace) {
return fs.readJson(rootPath).then(_ => _.version);
}

async function fetchWithRetry(url, retries = 1, delayMs = 60000) {
const headers = {
Authorization: `token ${process.env.GITHUB_TOKEN}`,
};

for (let attempt = 0; attempt <= retries; attempt++) {
const response = await fetch(url, { headers });
const json = await response.json();

if (response.ok) {
return json;
}

// If it's a rate limit error, wait and retry
if (
(response.status === 403 || response.status === 429) &&
attempt < retries
) {
console.log(
`Rate limit potentially hit (${response.status}). Waiting ${
delayMs / 1000
}s before retry...`,
);
await new Promise(resolve => setTimeout(resolve, delayMs));
continue;
}

// Otherwise, throw an error
throw new Error(
`Failed to fetch ${url}: ${response.status} ${response.statusText}. ` +
`Response: ${JSON.stringify(json, null, 2)}`,
);
}
return null;
}

async function getLatestRelease() {
const response = await fetch(
return fetchWithRetry(
'https://api.github.com/repos/backstage/backstage/releases/latest',
);
const json = await response.json();
return json;
}

async function getLatestPreRelease() {
const response = await fetch(
const json = await fetchWithRetry(
'https://api.github.com/repos/backstage/backstage/releases',
);
const json = await response.json();

const preReleasesOnly = json.filter(release => {
return release.prerelease === true;
Expand Down
1 change: 0 additions & 1 deletion scripts/list-workspaces-for-docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
* limitations under the License.
*/

// import fs from 'fs-extra';
import { getPackages } from '@manypkg/get-packages';
import { resolve } from 'path';
import arrayToTable from 'array-to-table';
Expand Down
25 changes: 25 additions & 0 deletions workspaces/aws/.changeset/wise-worms-wave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
'@alithya-oss/backstage-plugin-catalog-backend-module-aws-apps-entities-processor': patch
'@alithya-oss/backstage-plugin-scaffolder-backend-module-aws-apps': patch
'@alithya-oss/backstage-plugin-scaffolder-backend-module-aws-core': patch
'@alithya-oss/backstage-plugin-cost-insights-aws-backend': patch
'@alithya-oss/backstage-plugin-aws-codepipeline-backend': patch
'@alithya-oss/backstage-plugin-cost-insights-aws-common': patch
'@alithya-oss/backstage-plugin-aws-codepipeline-common': patch
'@alithya-oss/backstage-plugin-aws-codebuild-backend': patch
'@alithya-oss/backstage-plugin-aws-codebuild-common': patch
'@alithya-oss/backstage-plugin-amazon-ecs-backend': patch
'@alithya-oss/backstage-plugin-amazon-ecs-common': patch
'@alithya-oss/backstage-plugin-cost-insights-aws': patch
'@alithya-oss/backstage-plugin-aws-apps-backend': patch
'@alithya-oss/backstage-plugin-aws-codepipeline': patch
'@alithya-oss/backstage-plugin-aws-apps-common': patch
'@alithya-oss/backstage-plugin-aws-core-common': patch
'@alithya-oss/backstage-plugin-aws-core-react': patch
'@alithya-oss/backstage-plugin-aws-codebuild': patch
'@alithya-oss/backstage-plugin-aws-core-node': patch
'@alithya-oss/backstage-plugin-amazon-ecs': patch
'@alithya-oss/backstage-plugin-aws-apps': patch
---

bump framework version 1.49.3
9 changes: 9 additions & 0 deletions workspaces/aws/.yarn/plugins/@yarnpkg/plugin-backstage.cjs

Large diffs are not rendered by default.

Loading
Loading