Skip to content
Merged
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
8 changes: 4 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:
shell: nix develop --command bash {0}
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3

- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- uses: DeterminateSystems/flake-checker-action@main
- uses: DeterminateSystems/nix-installer-action@ef8a148080ab6020fd15196c2084a2eea5ff2d25 # v22
- uses: DeterminateSystems/magic-nix-cache-action@908b263ff629f4cc17666315b7fd3ec127c6244d # v14
- uses: DeterminateSystems/flake-checker-action@3164002371bc90729c68af0e24d5aacf20d7c9f6 # v12

- name: Install dependencies
run: yarn install --immutable
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
fetch-depth: 2 # We only need the current and the previous commit

Expand All @@ -34,12 +34,12 @@ jobs:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
fetch-depth: 0
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- uses: DeterminateSystems/flake-checker-action@main
- uses: DeterminateSystems/nix-installer-action@ef8a148080ab6020fd15196c2084a2eea5ff2d25 # v22
- uses: DeterminateSystems/magic-nix-cache-action@908b263ff629f4cc17666315b7fd3ec127c6244d # v14
- uses: DeterminateSystems/flake-checker-action@3164002371bc90729c68af0e24d5aacf20d7c9f6 # v12
- name: Install dependencies
run: |
yarn install --immutable
Expand Down
5 changes: 5 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
approvedGitRepositories:
- "**"

enableScripts: true

nodeLinker: node-modules
2 changes: 1 addition & 1 deletion backstage.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "1.45.3"
"version": "1.51.1"
}
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,12 @@
nodejs
pre-commit
typescript
pinact
yarn-berry
(python3.withPackages (p: with p; [ gyp ]))
]
++ (with nodePackages; [
typescript-language-server
node-gyp
]);
(python3.withPackages (p: with p; [ gyp ]))
];
shellHook = ''
pre-commit install
'';
Expand Down
3 changes: 2 additions & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@ clean: install
yarn clean

# Bumps dependencies
bump:
update:
nix flake update
nix develop --command yarn backstage-cli versions:bump
nix develop --command pinact run -u
nix develop --command pre-commit autoupdate

# Checks for unused dependencies
Expand Down
24 changes: 14 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
"@testing-library/react": "^16.0.0"
},
"dependencies": {
"@backstage/core-components": "^0.18.3",
"@backstage/core-plugin-api": "^1.12.0",
"@backstage/plugin-catalog-react": "^1.21.3",
"@backstage/core-components": "^0.18.10",
"@backstage/core-plugin-api": "^1.12.6",
"@backstage/plugin-catalog-react": "^3.0.0",
"@mui/icons-material": "^5.16.0",
"@mui/material": "^5.16.0",
"react-use": "^17.2.4"
Expand All @@ -40,19 +40,21 @@
"react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0"
},
"devDependencies": {
"@backstage/cli": "^0.34.5",
"@backstage/config": "^1.3.6",
"@backstage/dev-utils": "^1.1.17",
"@backstage/eslint-plugin": "^0.2.0",
"@backstage/test-utils": "^1.7.13",
"@backstage/cli": "^0.36.2",
"@backstage/config": "^1.3.8",
"@backstage/dev-utils": "^1.1.23",
"@backstage/eslint-plugin": "^0.3.0",
"@backstage/test-utils": "^1.7.18",
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.1",
"@jest/environment-jsdom-abstract": "^30.0.0",
"@spotify/eslint-config-base": "^15.0.0",
"@spotify/eslint-config-react": "^15.0.0",
"@spotify/eslint-config-typescript": "^15.0.0",
"@testing-library/dom": "^10.4.1",
"@testing-library/jest-dom": "^6.5.0",
"@testing-library/react": "^16.0.0",
"@types/jest": "^30.0.0",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"@typescript-eslint/eslint-plugin": "8.48.1",
Expand All @@ -67,7 +69,9 @@
"eslint-plugin-unused-imports": "^2.0.0",
"express": "^5.2.1",
"http-proxy-middleware": "^3.0.5",
"msw": "^1.0.0",
"jest": "^30.0.0",
"jsdom": "^27.1.0",
"msw": "^2.0.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.0.0",
Expand All @@ -81,7 +85,7 @@
"module": "./dist/index.esm.js",
"jest": {
"transformIgnorePatterns": [
"node_modules/(?!react-use|@backstage|react-syntax-highlighter|style-loader|css-loader|d3-.*|react-markdown|vfile|vfile-message|unist-.*|unified|bail|is-plain-obj|trough|remark-.*|mdast-.*|micromark.*|decode-named-character-reference|character-entities|property-information|hast-.*|space-separated-tokens|comma-separated-tokens|web-namespaces|zwitch|html-void-elements|ccount|escape-string-regexp|trim-lines|remark-rehype|unist-util-.*|markdown-table|@react-hookz/web|yaml)"
"node_modules/(?!react-use|@backstage|react-syntax-highlighter|style-loader|css-loader|d3-.*|react-markdown|vfile|vfile-message|unist-.*|unified|bail|is-plain-obj|trough|remark-.*|mdast-.*|micromark.*|decode-named-character-reference|character-entities|property-information|hast-.*|space-separated-tokens|comma-separated-tokens|web-namespaces|zwitch|html-void-elements|ccount|escape-string-regexp|trim-lines|remark-rehype|rehype-.*|hastscript|unist-util-.*|markdown-table|@react-hookz/web|yaml|msw|@mswjs/.*|@open-draft/.*|rettime|until-async|@bundled-es-modules/.*|strict-event-emitter|headers-polyfill|outvariant|is-node-process)"
]
}
}
4 changes: 2 additions & 2 deletions src/components/SysdigComponent/SysdigComponent.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/
import { SysdigComponent } from './SysdigComponent';
import { rest } from 'msw';
import { http, HttpResponse } from 'msw';
import { setupServer } from 'msw/node';
import { screen } from '@testing-library/react';
import {
Expand Down Expand Up @@ -61,7 +61,7 @@ describe('SysdigComponent', () => {
// setup mock response
beforeEach(() => {
server.use(
rest.get('/*', (_, res, ctx) => res(ctx.status(200), ctx.json({}))),
http.get('*', () => HttpResponse.json({})),
);
});

Expand Down
13 changes: 7 additions & 6 deletions src/infra/api/SysdigApiClient.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { setupRequestMockHandlers, TestApiProvider } from "@backstage/test-utils";
import { ConfigReader } from "@backstage/config";
import { ConfigApi, FetchApi } from "@backstage/core-plugin-api";
import { rest } from "msw";
import { http, HttpResponse } from "msw";
import { setupServer } from "msw/node";
import { SysdigApiClient } from "./SysdigApiClient";
import { API_PROXY_BASE_PATH, API_VULN_RUNTIME } from "../../lib";
Expand All @@ -23,13 +23,14 @@ describe("SysdigApiClient", () => {
beforeEach(() => {
jest.clearAllMocks();
server.use(
rest.get(
http.get(
`http://localhost:7007${API_PROXY_BASE_PATH}${API_VULN_RUNTIME}`,
(req, res, ctx) => {
if (req.url.searchParams.get("filters") === "test-filter") {
return res(ctx.json({ data: [{ id: "1", name: "test-runtime-vuln" }] }));
({ request }) => {
const url = new URL(request.url);
if (url.searchParams.get("filters") === "test-filter") {
return HttpResponse.json({ data: [{ id: "1", name: "test-runtime-vuln" }] });
}
return res(ctx.json({ data: [] }));
return HttpResponse.json({ data: [] });
},
),
);
Expand Down
Loading
Loading