diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 4532b62..26eb653 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -11,7 +11,7 @@ jobs: contents: write steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set git identity @@ -21,15 +21,21 @@ jobs: - name: Check whether it's the latest commit run: if [[ $(git ls-remote origin -h ${{ github.ref }} | cut -f1) != ${{ github.sha }} ]]; then exit 1; fi - name: Setup Node.js - uses: actions/setup-node@v3.8.2 + uses: actions/setup-node@v4.0.2 with: - node-version: 14 + node-version: 20 + registry-url: https://registry.npmjs.org + - name: Install build dependencies + run: npm install -g yarn - name: Install dependencies - run: npm ci + run: | + yarn global add @backstage/cli + yarn clean + yarn install --frozen-lockfile - name: Build - run: npm run build - - name: Run standard-version - run: npm run release + run: | + yarn tsc --jsx react-jsx + yarn build - name: Push new changelog to git run: git push --follow-tags - name: Release to GitHub releases diff --git a/dev/index.tsx b/dev/index.tsx deleted file mode 100644 index 089af08..0000000 --- a/dev/index.tsx +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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 React from 'react'; -import { createDevApp } from '@backstage/dev-utils'; -import { sysdigPlugin, SysdigPage } from '../src/plugin'; - -createDevApp() - .registerPlugin(sysdigPlugin) - .addPage({ - element: , - title: 'Root Page', - path: '/sysdig' - }) - .render(); diff --git a/package.json b/package.json index 1a0aaa0..efe0cfe 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { "name": "@sysdig/backstage-plugin-sysdig", "version": "1.0.0", - "main": "src/index.ts", - "types": "src/index.ts", + "main": "dist/index.esm.js", + "types": "dist/index.d.ts", "license": "Apache-2.0", "publishConfig": { "access": "public", @@ -23,9 +23,9 @@ "postpack": "backstage-cli package postpack" }, "dependencies": { - "@backstage/core-components": "workspace:^", - "@backstage/core-plugin-api": "workspace:^", - "@backstage/theme": "workspace:^", + "@backstage/core-components": "^0.14.0", + "@backstage/core-plugin-api": "^1.9.0", + "@backstage/theme": "^0.5.1", "@material-ui/core": "^4.9.13", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "^4.0.0-alpha.61", @@ -35,10 +35,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "workspace:^", - "@backstage/core-app-api": "workspace:^", - "@backstage/dev-utils": "workspace:^", - "@backstage/test-utils": "workspace:^", + "@backstage/cli": "^0.25.2", + "@backstage/core-app-api": "^1.12.0", + "@backstage/dev-utils": "^1.0.27", + "@backstage/test-utils": "^1.5.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", @@ -48,5 +48,5 @@ "config.d.ts", "dist" ], - "configSchema": "config.d.ts" + "module": "./dist/index.esm.js" } diff --git a/tsconfig.json b/tsconfig.json index fba3cb7..8943259 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,8 +4,8 @@ /* Visit https://aka.ms/tsconfig to read more about this file */ /* Projects */ - // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ - // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ + "incremental": false, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ + "composite": false, /* Enable constraints that allow a TypeScript project to be used with project references. */ // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ @@ -50,15 +50,15 @@ // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ /* Emit */ - // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ - // "declarationMap": true, /* Create sourcemaps for d.ts files. */ + "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + "declarationMap": true, /* Create sourcemaps for d.ts files. */ // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ - // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ + "sourceMap": true, /* Create source map files for emitted JavaScript files. */ // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ - // "outDir": "./", /* Specify an output folder for all emitted files. */ + "outDir": "./dist-types/src", /* Specify an output folder for all emitted files. */ // "removeComments": true, /* Disable emitting comments. */ - // "noEmit": true, /* Disable emitting files from a compilation. */ + "noEmit": false, /* Disable emitting files from a compilation. */ // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */ // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */