Merge pull request #388 from spotify/rugvip/ns
use npm namespace @backstage and bump to v0.1.1-alpha.0
This commit is contained in:
+3
-3
@@ -1,5 +1,5 @@
|
||||
const path = require('path')
|
||||
const base = require('@spotify-backstage/cli/config/eslint');
|
||||
const path = require('path');
|
||||
const base = require('@backstage/cli/config/eslint');
|
||||
|
||||
module.exports = {
|
||||
...base,
|
||||
@@ -8,7 +8,7 @@ module.exports = {
|
||||
'notice/notice': [
|
||||
'error',
|
||||
{
|
||||
templateFile: path.resolve(__dirname, "scripts/copyright.js"),
|
||||
templateFile: path.resolve(__dirname, 'scripts/copyright.js'),
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
@@ -40,7 +40,7 @@ The app will call the `createPlugin` method on each plugin, passing in a `router
|
||||
of methods on it.
|
||||
|
||||
```typescript
|
||||
import { createPlugin } from '@spotify-backstage/core';
|
||||
import { createPlugin } from '@backstage/core';
|
||||
import ExampleComponent from './components/ExampleComponent';
|
||||
|
||||
export default createPlugin({
|
||||
|
||||
@@ -43,7 +43,7 @@ In the root folder you have some configuration for typescript and jest, the test
|
||||
In the `src` folder we get to the interesting bits. Check out the `plugin.ts`:
|
||||
|
||||
```jsx
|
||||
import { createPlugin } from '@spotify-backstage/core';
|
||||
import { createPlugin } from '@backstage/core';
|
||||
import ExampleComponent from './components/ExampleComponent';
|
||||
|
||||
export default createPlugin({
|
||||
|
||||
@@ -26,7 +26,7 @@ type PluginHooks = {
|
||||
Showcasing adding multiple routes and a redirect.
|
||||
|
||||
```jsx
|
||||
import { createPlugin } from '@spotify-backstage/core';
|
||||
import { createPlugin } from '@backstage/core';
|
||||
import ExampleComponent from './components/ExampleComponent';
|
||||
|
||||
export default createPlugin({
|
||||
|
||||
+5
-2
@@ -1,6 +1,9 @@
|
||||
{
|
||||
"packages": ["packages/*", "plugins/*"],
|
||||
"packages": [
|
||||
"packages/*",
|
||||
"plugins/*"
|
||||
],
|
||||
"npmClient": "yarn",
|
||||
"useWorkspaces": true,
|
||||
"version": "0.1.0"
|
||||
"version": "0.1.1-alpha.0"
|
||||
}
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
"node": ">=12.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "yarn build && yarn workspace @spotify-backstage/app start",
|
||||
"start": "yarn build && yarn workspace @backstage/app start",
|
||||
"build": "lerna run build",
|
||||
"test": "cross-env CI=true lerna run test --since origin/master -- --coverage",
|
||||
"create-plugin": "backstage-cli create-plugin",
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
# @spotify-backstage/app
|
||||
# @backstage/app
|
||||
|
||||
This package is an example of a Backstage application.
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
{
|
||||
"name": "@spotify-backstage/app",
|
||||
"version": "0.0.0",
|
||||
"name": "@backstage/app",
|
||||
"version": "0.1.1-alpha.0",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@backstage/cli": "^0.1.1-alpha.0",
|
||||
"@backstage/core": "^0.1.1-alpha.0",
|
||||
"@backstage/plugin-home-page": "^0.1.1-alpha.0",
|
||||
"@backstage/plugin-welcome": "^0.1.1-alpha.0",
|
||||
"@material-ui/core": "^4.9.1",
|
||||
"@material-ui/icons": "^4.9.1",
|
||||
"@material-ui/lab": "4.0.0-alpha.45",
|
||||
"@spotify-backstage/cli": "^0.1.0",
|
||||
"@spotify-backstage/core": "^0.1.0",
|
||||
"@spotify-backstage/plugin-home-page": "^0.1.0",
|
||||
"@spotify-backstage/plugin-welcome": "^0.1.0",
|
||||
"@testing-library/jest-dom": "^4.2.4",
|
||||
"@testing-library/react": "^9.3.2",
|
||||
"@testing-library/user-event": "^7.1.2",
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import { CssBaseline, makeStyles, ThemeProvider } from '@material-ui/core';
|
||||
import { BackstageTheme, createApp } from '@spotify-backstage/core';
|
||||
import { BackstageTheme, createApp } from '@backstage/core';
|
||||
import React, { FC } from 'react';
|
||||
import { BrowserRouter as Router } from 'react-router-dom';
|
||||
import Root from './components/Root';
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ApiHolder, ApiRegistry, errorApiRef } from '@spotify-backstage/core';
|
||||
import { ApiHolder, ApiRegistry, errorApiRef } from '@backstage/core';
|
||||
import { ErrorDisplayForwarder } from './components/ErrorDisplay/ErrorDisplay';
|
||||
|
||||
const builder = ApiRegistry.builder();
|
||||
|
||||
@@ -18,7 +18,7 @@ import React, { FC, useEffect, useState } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Snackbar } from '@material-ui/core';
|
||||
import { Alert } from '@material-ui/lab';
|
||||
import { ErrorApi, ErrorContext } from '@spotify-backstage/core';
|
||||
import { ErrorApi, ErrorContext } from '@backstage/core';
|
||||
|
||||
type SubscriberFunc = (error: Error) => void;
|
||||
type Unsubscribe = () => void;
|
||||
|
||||
@@ -28,7 +28,7 @@ import {
|
||||
SidebarSpacer,
|
||||
SidebarDivider,
|
||||
SidebarSpace,
|
||||
} from '@spotify-backstage/core';
|
||||
} from '@backstage/core';
|
||||
|
||||
const useSidebarLogoStyles = makeStyles({
|
||||
root: {
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
/* eslint-disable notice/notice */
|
||||
export { default as HomePagePlugin } from '@spotify-backstage/plugin-home-page';
|
||||
export { default as WelcomePlugin } from '@spotify-backstage/plugin-welcome';
|
||||
export { default as HomePagePlugin } from '@backstage/plugin-home-page';
|
||||
export { default as WelcomePlugin } from '@backstage/plugin-welcome';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@spotify-backstage/cli",
|
||||
"name": "@backstage/cli",
|
||||
"description": "CLI for developing Backstage plugins and apps",
|
||||
"version": "0.1.0",
|
||||
"version": "0.1.1-alpha.0",
|
||||
"private": false,
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
@@ -24,9 +24,6 @@
|
||||
"test": "backstage-cli test",
|
||||
"start": "nodemon ."
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/fs-extra": "^8.1.0",
|
||||
"@types/html-webpack-plugin": "^3.2.2",
|
||||
|
||||
@@ -59,9 +59,8 @@ describe('createPlugin', () => {
|
||||
const tempDir = fs.mkdtempSync(path.join(os.tmpdir(), 'test-'));
|
||||
try {
|
||||
const sourceData =
|
||||
'{"name": "@spotify-backstage/{{id}}", "version": "{{version}}"}';
|
||||
const targetData =
|
||||
'{"name": "@spotify-backstage/foo", "version": "0.0.0"}';
|
||||
'{"name": "@backstage/{{id}}", "version": "{{version}}"}';
|
||||
const targetData = '{"name": "@backstage/foo", "version": "0.0.0"}';
|
||||
const sourcePath = path.join(tempDir, 'in.hbs');
|
||||
const targetPath = path.join(tempDir, 'out.json');
|
||||
fs.writeFileSync(sourcePath, sourceData);
|
||||
|
||||
@@ -130,7 +130,7 @@ export const addPluginDependencyToApp = (
|
||||
console.log();
|
||||
console.log(chalk.green(' Adding plugin as dependency in app:'));
|
||||
|
||||
const pluginPackage = `@spotify-backstage/plugin-${pluginName}`;
|
||||
const pluginPackage = `@backstage/plugin-${pluginName}`;
|
||||
const packageFile = path.join(rootDir, 'packages', 'app', 'package.json');
|
||||
|
||||
process.stdout.write(
|
||||
@@ -171,7 +171,7 @@ export const addPluginToApp = (rootDir: string, pluginName: string) => {
|
||||
console.log();
|
||||
console.log(chalk.green(' Import plugin in app:'));
|
||||
|
||||
const pluginPackage = `@spotify-backstage/plugin-${pluginName}`;
|
||||
const pluginPackage = `@backstage/plugin-${pluginName}`;
|
||||
const pluginNameCapitalized = pluginName
|
||||
.split('-')
|
||||
.map(name => capitalize(name))
|
||||
@@ -414,7 +414,7 @@ const createPlugin = async () => {
|
||||
console.log(
|
||||
chalk.green(
|
||||
`🥇 Successfully created ${chalk.cyan(
|
||||
`@spotify-backstage/plugin-${answers.id}`,
|
||||
`@backstage/plugin-${answers.id}`,
|
||||
)}`,
|
||||
),
|
||||
);
|
||||
|
||||
@@ -26,7 +26,7 @@ import { waitForExit } from '../../helpers/run';
|
||||
|
||||
const PACKAGE_BLACKLIST = [
|
||||
// We never want to watch for changes in the cli, but all packages will depend on it.
|
||||
'@spotify-backstage/cli',
|
||||
'@backstage/cli',
|
||||
];
|
||||
|
||||
const WATCH_LOCATIONS = ['package.json', 'src', 'assets'];
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@spotify-backstage/plugin-{{id}}",
|
||||
"name": "@backstage/plugin-{{id}}",
|
||||
"version": "{{version}}",
|
||||
"main": "dist/cjs/index.js",
|
||||
"types": "dist/cjs/index.d.ts",
|
||||
@@ -11,7 +11,7 @@
|
||||
"test": "backstage-cli test"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@spotify-backstage/cli": "^{{version}}",
|
||||
"@backstage/cli": "^{{version}}",
|
||||
"@types/testing-library__jest-dom": "5.0.2",
|
||||
"jest-fetch-mock": "^3.0.3"
|
||||
},
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ import { render } from '@testing-library/react';
|
||||
import mockFetch from 'jest-fetch-mock';
|
||||
import ExampleComponent from './ExampleComponent';
|
||||
import { ThemeProvider } from '@material-ui/core';
|
||||
import { BackstageTheme } from '@spotify-backstage/core';
|
||||
import { BackstageTheme } from '@backstage/core';
|
||||
|
||||
describe('ExampleComponent', () => {
|
||||
it('should render', () => {
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ import {
|
||||
ContentHeader,
|
||||
HeaderLabel,
|
||||
SupportButton,
|
||||
} from '@spotify-backstage/core';
|
||||
} from '@backstage/core';
|
||||
import ExampleFetchComponent from '../ExampleFetchComponent';
|
||||
|
||||
const ExampleComponent: FC<{}> = () => (
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ import TableHead from '@material-ui/core/TableHead';
|
||||
import TableRow from '@material-ui/core/TableRow';
|
||||
import Alert from '@material-ui/lab/Alert';
|
||||
import { useAsync } from 'react-use';
|
||||
import { Progress } from '@spotify-backstage/core';
|
||||
import { Progress } from '@backstage/core';
|
||||
|
||||
const useStyles = makeStyles({
|
||||
table: {
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { createPlugin } from '@spotify-backstage/core';
|
||||
import { createPlugin } from '@backstage/core';
|
||||
import ExampleComponent from './components/ExampleComponent';
|
||||
|
||||
export default createPlugin({
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@spotify-backstage/core",
|
||||
"name": "@backstage/core",
|
||||
"description": "Core API used by Backstage plugins and apps",
|
||||
"version": "0.1.0",
|
||||
"version": "0.1.1-alpha.0",
|
||||
"private": false,
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
@@ -23,9 +23,6 @@
|
||||
"lint": "backstage-cli lint",
|
||||
"test": "backstage-cli test"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"dependencies": {
|
||||
"@material-ui/core": "^4.9.1",
|
||||
"@material-ui/icons": "^4.9.1",
|
||||
@@ -42,7 +39,7 @@
|
||||
"recompose": "0.30.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@spotify-backstage/cli": "^0.1.0",
|
||||
"@backstage/cli": "^0.1.1-alpha.0",
|
||||
"@testing-library/jest-dom": "^4.2.4",
|
||||
"@testing-library/react": "^9.3.2",
|
||||
"@testing-library/user-event": "^7.1.2",
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
{
|
||||
"name": "@spotify-backstage/plugin-home-page",
|
||||
"version": "0.1.0",
|
||||
"name": "@backstage/plugin-home-page",
|
||||
"version": "0.1.1-alpha.0",
|
||||
"main": "dist/cjs/index.js",
|
||||
"types": "dist/cjs/index.d.ts",
|
||||
"private": true,
|
||||
"devDependencies": {
|
||||
"@spotify-backstage/cli": "^0.1.0",
|
||||
"@spotify-backstage/core": "^0.1.0",
|
||||
"@backstage/cli": "^0.1.1-alpha.0",
|
||||
"@backstage/core": "^0.1.1-alpha.0",
|
||||
"@material-ui/core": "^4.9.1",
|
||||
"@material-ui/icons": "^4.9.1",
|
||||
"@testing-library/jest-dom": "^4.2.4",
|
||||
"@testing-library/react": "^9.3.2",
|
||||
"@testing-library/user-event": "^7.1.2",
|
||||
@@ -14,9 +16,7 @@
|
||||
"@types/node": "^12.0.0",
|
||||
"@types/testing-library__jest-dom": "5.0.2",
|
||||
"react": "^16.12.0",
|
||||
"react-dom": "^16.12.0",
|
||||
"@material-ui/core": "^4.9.1",
|
||||
"@material-ui/icons": "^4.9.1"
|
||||
"react-dom": "^16.12.0"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "backstage-cli plugin:build",
|
||||
|
||||
@@ -18,7 +18,7 @@ import React from 'react';
|
||||
import { render } from '@testing-library/react';
|
||||
import HomePage from './HomePage';
|
||||
import { ThemeProvider } from '@material-ui/core';
|
||||
import { BackstageTheme } from '@spotify-backstage/core';
|
||||
import { BackstageTheme } from '@backstage/core';
|
||||
|
||||
describe('HomePage', () => {
|
||||
it('should render', () => {
|
||||
|
||||
@@ -17,13 +17,7 @@
|
||||
import React, { FC } from 'react';
|
||||
import { Typography, Link, Grid } from '@material-ui/core';
|
||||
import HomePageTimer from '../HomepageTimer';
|
||||
import {
|
||||
Content,
|
||||
InfoCard,
|
||||
Header,
|
||||
Page,
|
||||
pageTheme,
|
||||
} from '@spotify-backstage/core';
|
||||
import { Content, InfoCard, Header, Page, pageTheme } from '@backstage/core';
|
||||
import SquadTechHealth from './SquadTechHealth';
|
||||
import Table from '@material-ui/core/Table';
|
||||
import TableBody from '@material-ui/core/TableBody';
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
import React, { FC } from 'react';
|
||||
import { Grid, Typography } from '@material-ui/core';
|
||||
|
||||
import { HorizontalScrollGrid, ProgressCard } from '@spotify-backstage/core';
|
||||
import { HorizontalScrollGrid, ProgressCard } from '@backstage/core';
|
||||
|
||||
const SquadTechHealth: FC<{}> = () => {
|
||||
return (
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import React, { FC } from 'react';
|
||||
import { HeaderLabel } from '@spotify-backstage/core';
|
||||
import { HeaderLabel } from '@backstage/core';
|
||||
|
||||
const timeFormat = { hour: '2-digit', minute: '2-digit' };
|
||||
const utcOptions = { timeZone: 'UTC', ...timeFormat };
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { createPlugin } from '@spotify-backstage/core';
|
||||
import { createPlugin } from '@backstage/core';
|
||||
import HomePage from './components/HomePage';
|
||||
|
||||
export default createPlugin({
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@spotify-backstage/plugin-welcome",
|
||||
"version": "0.1.0",
|
||||
"name": "@backstage/plugin-welcome",
|
||||
"version": "0.1.1-alpha.0",
|
||||
"main": "dist/cjs/index.js",
|
||||
"types": "dist/cjs/index.d.ts",
|
||||
"license": "Apache-2.0",
|
||||
@@ -11,8 +11,8 @@
|
||||
"test": "backstage-cli test"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@spotify-backstage/core": "^0.1.0",
|
||||
"@spotify-backstage/cli": "^0.1.0",
|
||||
"@backstage/cli": "^0.1.1-alpha.0",
|
||||
"@backstage/core": "^0.1.1-alpha.0",
|
||||
"@types/testing-library__jest-dom": "5.0.2"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import React, { FC } from 'react';
|
||||
import { HeaderLabel } from '@spotify-backstage/core';
|
||||
import { HeaderLabel } from '@backstage/core';
|
||||
|
||||
const timeFormat = { hour: '2-digit', minute: '2-digit' };
|
||||
const utcOptions = { timeZone: 'UTC', ...timeFormat };
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
import React from 'react';
|
||||
import { render, fireEvent } from '@testing-library/react';
|
||||
import ErrorButton from './ErrorButton';
|
||||
import { ApiRegistry, errorApiRef, ApiProvider } from '@spotify-backstage/core';
|
||||
import { ApiRegistry, errorApiRef, ApiProvider } from '@backstage/core';
|
||||
|
||||
describe('ErrorButton', () => {
|
||||
it('should trigger an error', () => {
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
import React, { FC } from 'react';
|
||||
import { Button } from '@material-ui/core';
|
||||
import { errorApiRef, useApi } from '@spotify-backstage/core';
|
||||
import { errorApiRef, useApi } from '@backstage/core';
|
||||
|
||||
const ErrorButton: FC<{}> = () => {
|
||||
const errorApi = useApi(errorApiRef);
|
||||
|
||||
@@ -23,7 +23,7 @@ import {
|
||||
ApiProvider,
|
||||
ApiRegistry,
|
||||
errorApiRef,
|
||||
} from '@spotify-backstage/core';
|
||||
} from '@backstage/core';
|
||||
|
||||
describe('WelcomePage', () => {
|
||||
it('should render', () => {
|
||||
|
||||
@@ -33,7 +33,7 @@ import {
|
||||
pageTheme,
|
||||
ContentHeader,
|
||||
SupportButton,
|
||||
} from '@spotify-backstage/core';
|
||||
} from '@backstage/core';
|
||||
import ErrorButton from './ErrorButton';
|
||||
|
||||
const WelcomePage: FC<{}> = () => {
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { createPlugin } from '@spotify-backstage/core';
|
||||
import { createPlugin } from '@backstage/core';
|
||||
import WelcomePage from './components/WelcomePage';
|
||||
|
||||
export default createPlugin({
|
||||
|
||||
Reference in New Issue
Block a user