Skip to content

Commit

Permalink
Upgrade 1.20.3 (#59)
Browse files Browse the repository at this point in the history
Upgraded to version 1.20.3
  • Loading branch information
MonicaG authored Nov 27, 2023
1 parent 74de069 commit ffcbbf4
Show file tree
Hide file tree
Showing 20 changed files with 2,794 additions and 3,220 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ examples
*.log
*.git
**/.swc
e2e-test-report
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
playwright.config.ts
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ site
# vscode database functionality support files
*.session.sql

# E2E test reports
e2e-test-report/

# vscode workspace
*.code-workspace
.vscode/*
Expand Down
2 changes: 1 addition & 1 deletion backstage.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "1.16.0"
"version": "1.20.3"
}
4 changes: 2 additions & 2 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"packages": ["packages/*", "plugins/*"],
"npmClient": "yarn",
"useWorkspaces": true,
"version": "0.1.0"
"version": "0.1.0",
"$schema": "node_modules/lerna/schemas/lerna-schema.json"
}
14 changes: 9 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "1.0.0",
"private": true,
"engines": {
"node": "16 || 18"
"node": "18 || 20"
},
"scripts": {
"dev": "concurrently \"yarn start\" \"yarn start-backend\"",
Expand All @@ -17,6 +17,8 @@
"clean": "backstage-cli repo clean",
"test": "backstage-cli repo test",
"test:all": "backstage-cli repo test --coverage",
"test:e2e": "playwright test",
"fix": "backstage-cli repo fix",
"lint": "backstage-cli repo lint --since origin/main",
"lint:all": "backstage-cli repo lint",
"prettier:check": "prettier --check .",
Expand All @@ -29,13 +31,15 @@
]
},
"devDependencies": {
"@backstage/cli": "^0.22.9",
"@backstage/cli": "^0.24.0",
"@backstage/e2e-test-utils": "^0.1.0",
"@playwright/test": "^1.32.3",
"@spotify/prettier-config": "^12.0.0",
"concurrently": "^6.0.0",
"lerna": "^4.0.0",
"concurrently": "^8.0.0",
"lerna": "^7.3.0",
"node-gyp": "^9.0.0",
"prettier": "^2.3.2",
"typescript": "~4.6.4"
"typescript": "~5.2.0"
},
"resolutions": {
"@types/react": "^17",
Expand Down
12 changes: 0 additions & 12 deletions packages/app/cypress/.eslintrc.json

This file was deleted.

6 changes: 0 additions & 6 deletions packages/app/cypress/integration/app.js

This file was deleted.

20 changes: 20 additions & 0 deletions packages/app/e2e-tests/app.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* Copyright 2020 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.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { test, expect } from '@playwright/test';
test('App should render the welcome page', async ({ page }) => {
await page.goto('/');
await expect(page.getByText('My Company Catalog')).toBeVisible();
});
68 changes: 31 additions & 37 deletions packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,40 +11,36 @@
"build": "backstage-cli package build",
"clean": "backstage-cli package clean",
"test": "backstage-cli package test",
"lint": "backstage-cli package lint",
"test:e2e": "cross-env PORT=3001 start-server-and-test start http://localhost:3001 cy:dev",
"test:e2e:ci": "cross-env PORT=3001 start-server-and-test start http://localhost:3001 cy:run",
"cy:dev": "cypress open",
"cy:run": "cypress run --browser chrome"
"lint": "backstage-cli package lint"
},
"dependencies": {
"@backstage/app-defaults": "^1.4.1",
"@backstage/catalog-model": "^1.4.1",
"@backstage/cli": "^0.22.9",
"@backstage/core-app-api": "^1.9.0",
"@backstage/core-components": "^0.13.3",
"@backstage/core-plugin-api": "^1.5.3",
"@backstage/integration-react": "^1.1.15",
"@backstage/plugin-api-docs": "^0.9.6",
"@backstage/plugin-catalog": "^1.12.0",
"@backstage/plugin-catalog-common": "^1.0.15",
"@backstage/plugin-catalog-graph": "^0.2.32",
"@backstage/plugin-catalog-import": "^0.9.10",
"@backstage/plugin-catalog-react": "^1.8.0",
"@backstage/plugin-github-actions": "^0.6.1",
"@backstage/plugin-home": "^0.5.4",
"@backstage/plugin-org": "^0.6.10",
"@backstage/plugin-permission-react": "^0.4.14",
"@backstage/plugin-scaffolder": "^1.14.1",
"@backstage/plugin-search": "^1.3.3",
"@backstage/plugin-search-react": "^1.6.3",
"@backstage/plugin-stack-overflow": "^0.1.18",
"@backstage/plugin-tech-radar": "^0.6.6",
"@backstage/plugin-techdocs": "^1.6.5",
"@backstage/plugin-techdocs-module-addons-contrib": "^1.0.18",
"@backstage/plugin-techdocs-react": "^1.1.8",
"@backstage/plugin-user-settings": "^0.7.5",
"@backstage/theme": "^0.4.1",
"@backstage/app-defaults": "^1.4.5",
"@backstage/catalog-model": "^1.4.3",
"@backstage/cli": "^0.24.0",
"@backstage/core-app-api": "^1.11.1",
"@backstage/core-components": "^0.13.8",
"@backstage/core-plugin-api": "^1.8.0",
"@backstage/integration-react": "^1.1.21",
"@backstage/plugin-api-docs": "^0.10.1",
"@backstage/plugin-catalog": "^1.15.1",
"@backstage/plugin-catalog-common": "^1.0.18",
"@backstage/plugin-catalog-graph": "^0.3.1",
"@backstage/plugin-catalog-import": "^0.10.3",
"@backstage/plugin-catalog-react": "^1.9.1",
"@backstage/plugin-github-actions": "^0.6.8",
"@backstage/plugin-home": "^0.5.11",
"@backstage/plugin-org": "^0.6.17",
"@backstage/plugin-permission-react": "^0.4.17",
"@backstage/plugin-scaffolder": "^1.16.1",
"@backstage/plugin-search": "^1.4.3",
"@backstage/plugin-search-react": "^1.7.3",
"@backstage/plugin-stack-overflow": "^0.1.22",
"@backstage/plugin-tech-radar": "^0.6.10",
"@backstage/plugin-techdocs": "^1.9.1",
"@backstage/plugin-techdocs-module-addons-contrib": "^1.1.2",
"@backstage/plugin-techdocs-react": "^1.1.13",
"@backstage/plugin-user-settings": "^0.7.13",
"@backstage/theme": "^0.4.4",
"@bcgov/bc-sans": "^2.0.0",
"@internal/plugin-analytics-module-snowplow": "^0.1.0",
"@app/plugin-toc-fix2": "0.0.0",
Expand All @@ -62,16 +58,14 @@
"styled-components": "^6.0.0-rc.3"
},
"devDependencies": {
"@backstage/test-utils": "^1.4.1",
"@backstage/test-utils": "^1.4.5",
"@playwright/test": "^1.32.3",
"@testing-library/jest-dom": "^5.10.1",
"@testing-library/react": "^12.1.3",
"@testing-library/user-event": "^14.0.0",
"@types/node": "^16.11.26",
"@types/react-dom": "*",
"cross-env": "^7.0.0",
"cypress": "^9.7.0",
"eslint-plugin-cypress": "^2.10.3",
"start-server-and-test": "^1.10.11"
"cross-env": "^7.0.0"
},
"browserslist": {
"production": [
Expand Down
1 change: 0 additions & 1 deletion packages/app/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
content="BC government developer portal"
/>
<meta name="robots" content="noindex">
<link rel="apple-touch-icon" href="<%= publicPath %>/logo192.png"/>
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
Expand Down
1 change: 1 addition & 0 deletions packages/backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,5 @@ COPY --from=cleanup --chown=1001:1001 $CONTAINER_SOURCE/ ./
RUN fix-permissions ./
# Switch to nodejs user
USER 1001
ENV LEGACY_BACKEND_START=true
ENTRYPOINT ["node", "packages/backend", "--config", "app-config.yaml", "--config", "app-config.production.yaml"]
43 changes: 23 additions & 20 deletions packages/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,41 +16,44 @@
"build-image": "docker build ../.. -f Dockerfile --tag backstage"
},
"dependencies": {
"@backstage/backend-common": "^0.19.1",
"@backstage/backend-tasks": "^0.5.4",
"@backstage/catalog-client": "^1.4.3",
"@backstage/catalog-model": "^1.4.1",
"@backstage/config": "^1.0.8",
"@backstage/plugin-app-backend": "^0.3.47",
"@backstage/backend-common": "^0.19.9",
"@backstage/backend-tasks": "^0.5.12",
"@backstage/catalog-client": "^1.4.6",
"@backstage/catalog-model": "^1.4.3",
"@backstage/config": "^1.1.1",
"@backstage/plugin-app-backend": "^0.3.55",
"@backstage/plugin-auth-backend": "^0.20.0",
"@backstage/plugin-auth-node": "^0.2.16",
"@backstage/plugin-catalog-backend": "^1.11.0",
"@backstage/plugin-catalog-backend-module-github": "^0.3.2",
"@backstage/plugin-permission-common": "^0.7.7",
"@backstage/plugin-permission-node": "^0.7.10",
"@backstage/plugin-auth-node": "^0.4.1",
"@backstage/plugin-catalog-backend": "^1.15.0",
"@backstage/plugin-catalog-backend-module-github": "^0.4.5",
"@backstage/plugin-catalog-backend-module-scaffolder-entity-model": "^0.1.4",
"@backstage/plugin-permission-common": "^0.7.10",
"@backstage/plugin-permission-node": "^0.7.18",
"@backstage/plugin-proxy-backend": "^0.4.5",
"@backstage/plugin-scaffolder-backend": "^1.15.1",
"@backstage/plugin-search-backend": "^1.3.3",
"@backstage/plugin-search-backend-module-pg": "^0.5.8",
"@backstage/plugin-search-backend-node": "^1.2.3",
"@backstage/plugin-stack-overflow-backend": "^0.2.6",
"@backstage/plugin-techdocs-backend": "^1.6.4",
"@backstage/plugin-scaffolder-backend": "^1.19.1",
"@backstage/plugin-search-backend": "^1.4.7",
"@backstage/plugin-search-backend-module-catalog": "^0.1.11",
"@backstage/plugin-search-backend-module-pg": "^0.5.16",
"@backstage/plugin-search-backend-module-techdocs": "^0.1.11",
"@backstage/plugin-search-backend-node": "^1.2.11",
"@backstage/plugin-stack-overflow-backend": "^0.2.11",
"@backstage/plugin-techdocs-backend": "^1.9.0",
"app": "link:../app",
"dockerode": "^3.3.1",
"express": "^4.17.1",
"express-promise-router": "^4.1.0",
"pg": "^8.10.0",
"pg": "^8.11.3",
"winston": "^3.2.1",
"node-gyp": "^9.0.0",
"isolated-vm": "4.6.0"
},
"devDependencies": {
"@backstage/cli": "^0.22.9",
"@backstage/cli": "^0.24.0",
"@types/dockerode": "^3.3.0",
"@types/express": "^4.17.6",
"@types/express-serve-static-core": "^4.17.5",
"@types/luxon": "^2.0.4",
"better-sqlite3": "^8.0.0"
"better-sqlite3": "^9.0.0"
},
"files": [
"dist"
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function makeCreateEnv(config: Config) {
const cacheManager = CacheManager.fromConfig(config);
const databaseManager = DatabaseManager.fromConfig(config, { logger: root });
const tokenManager = ServerTokenManager.noop();
const taskScheduler = TaskScheduler.fromConfig(config);
const taskScheduler = TaskScheduler.fromConfig(config, { databaseManager });

const identity = DefaultIdentityClient.create({
discovery,
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/src/plugins/catalog.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {CatalogBuilder} from '@backstage/plugin-catalog-backend';
import {ScaffolderEntitiesProcessor} from '@backstage/plugin-scaffolder-backend';
import {ScaffolderEntitiesProcessor} from '@backstage/plugin-catalog-backend-module-scaffolder-entity-model';
import {Router} from 'express';
import {PluginEnvironment} from '../types';
import {GithubEntityProvider} from '@backstage/plugin-catalog-backend-module-github';
Expand Down
4 changes: 2 additions & 2 deletions packages/backend/src/plugins/search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import {
LunrSearchEngine,
} from '@backstage/plugin-search-backend-node';
import {PluginEnvironment} from '../types';
import {DefaultCatalogCollatorFactory} from '@backstage/plugin-catalog-backend';
import {DefaultTechDocsCollatorFactory} from '@backstage/plugin-techdocs-backend';
import {DefaultCatalogCollatorFactory} from '@backstage/plugin-search-backend-module-catalog';
import {DefaultTechDocsCollatorFactory} from '@backstage/plugin-search-backend-module-techdocs';
import {Router} from 'express';
import {PgSearchEngine} from "@backstage/plugin-search-backend-module-pg";
import {StackOverflowQuestionsCollatorFactory} from '@backstage/plugin-stack-overflow-backend';
Expand Down
50 changes: 50 additions & 0 deletions playwright.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/*
* Copyright 2023 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.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { defineConfig } from '@playwright/test';
import { generateProjects } from '@backstage/e2e-test-utils/playwright';
/**
* See https://playwright.dev/docs/test-configuration.
*/
export default defineConfig({
timeout: 60_000,
expect: {
timeout: 5_000,
},
// Run your local dev server before starting the tests
webServer: process.env.CI
? []
: [
{
command: 'yarn start',
port: 3000,
reuseExistingServer: true,
timeout: 60_000,
},
],
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
reporter: [['html', { open: 'never', outputFolder: 'e2e-test-report' }]],
use: {
actionTimeout: 0,
baseURL:
process.env.PLAYWRIGHT_URL ??
(process.env.CI ? 'http://localhost:7007' : 'http://localhost:3000'),
screenshot: 'only-on-failure',
trace: 'on-first-retry',
},
outputDir: 'node_modules/.cache/e2e-test-results',
projects: generateProjects(), // Find all packages with e2e-test folders
});
17 changes: 9 additions & 8 deletions plugins/analytics-module-snowplow/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"backstage": {
"role": "frontend-plugin"
},
"sideEffects": false,
"scripts": {
"start": "backstage-cli package start",
"build": "backstage-cli package build",
Expand All @@ -23,9 +24,9 @@
"postpack": "backstage-cli package postpack"
},
"dependencies": {
"@backstage/core-components": "^0.13.1",
"@backstage/core-plugin-api": "^1.5.1",
"@backstage/theme": "^0.4.2",
"@backstage/core-components": "^0.13.8",
"@backstage/core-plugin-api": "^1.8.0",
"@backstage/theme": "^0.4.4",
"@material-ui/core": "^4.12.2",
"@material-ui/icons": "^4.9.1",
"@material-ui/lab": "^4.0.0-alpha.61",
Expand All @@ -35,11 +36,11 @@
"react": "^16.13.1 || ^17.0.0"
},
"devDependencies": {
"@backstage/cli": "^0.22.7",
"@backstage/config": "^1.0.8",
"@backstage/core-app-api": "^1.8.0",
"@backstage/dev-utils": "^1.0.15",
"@backstage/test-utils": "^1.4.1",
"@backstage/cli": "^0.24.0",
"@backstage/config": "^1.1.1",
"@backstage/core-app-api": "^1.11.1",
"@backstage/dev-utils": "^1.0.24",
"@backstage/test-utils": "^1.4.5",
"@testing-library/jest-dom": "^5.10.1",
"@testing-library/react": "^12.1.3",
"@testing-library/user-event": "^14.0.0",
Expand Down
Loading

0 comments on commit ffcbbf4

Please sign in to comment.