Skip to content

Commit

Permalink
Merge pull request #284 from vivid-planet/rename-scope
Browse files Browse the repository at this point in the history
refactor: renamed all packages, scope changed from @vivid-planet/come…
  • Loading branch information
kaufmo authored Jan 13, 2021
2 parents edc9096 + f311c98 commit 98fcbd3
Show file tree
Hide file tree
Showing 278 changed files with 215 additions and 235 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# comet-admin
# @comet/admin

## Developoment

Expand All @@ -14,7 +14,7 @@
### use yarn

docker-compose exec comet-admin bash -c "yarn --help"
docker-compose exec comet-admin bash -c "cd packages/comet-admin && yarn --help"
docker-compose exec comet-admin bash -c "cd packages/admin && yarn --help"

### Develop in an project

Expand All @@ -28,7 +28,6 @@
./wml-add.sh ../example
wml start


### Notes

Please note that this project is released with a [Contributor Code of Conduct](CODE-OF-CONDUCT.md). By participating in this project you agree to abide by its terms.
4 changes: 2 additions & 2 deletions codemods/1.0.0/component-renames.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ const transform: Transform = (file, api, options) => {
for (const candidateElement of Object.keys(renameMap)) {
const touched = {};
root.findJSXElements(candidateElement).forEach((element, i) => {
// Check if we can find an import from comet-admin and rename that as well
// Check if we can find an import from admin and rename that as well
root.find(j.ImportDeclaration).forEach((imp) => {
if (imp.value.source.value === "@vivid-planet/comet-admin") {
if (imp.value.source.value === "@comet/admin") {
imp.value.specifiers.forEach((specifier) => {
if (specifier.local.name === candidateElement) {
specifier.local.name = renameMap[candidateElement];
Expand Down
20 changes: 10 additions & 10 deletions codemods/1.0.0/package-renames.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import { Transform } from "jscodeshift";

const renameMap: { [key: string]: string } = {
"@vivid-planet/react-admin-core": "@vivid-planet/comet-admin",
"@vivid-planet/fetch-provider": "@vivid-planet/comet-admin",
"@vivid-planet/file-icons": "@vivid-planet/comet-admin",
"@vivid-planet/react-admin-final-form-material-ui": "@vivid-planet/comet-admin",
"@vivid-planet/react-admin-form": "@vivid-planet/comet-admin",
"@vivid-planet/react-admin-layout": "@vivid-planet/comet-admin",
"@vivid-planet/react-select": "@vivid-planet/comet-admin-react-select",
"@vivid-planet/react-admin-date-picker": "@vivid-planet/comet-admin-date-picker",
"@vivid-planet/react-admin-color-picker": "@vivid-planet/comet-admin-color-picker",
"@vivid-planet/react-admin-rte": "@vivid-planet/comet-admin-rte",
"@vivid-planet/react-admin-core": "@comet/admin",
"@vivid-planet/fetch-provider": "@comet/admin",
"@vivid-planet/file-icons": "@comet/admin",
"@vivid-planet/react-admin-final-form-material-ui": "@comet/admin",
"@vivid-planet/react-admin-form": "@comet/admin",
"@vivid-planet/react-admin-layout": "@comet/admin",
"@vivid-planet/react-select": "@comet/admin-react-select",
"@vivid-planet/react-admin-date-picker": "@comet/admin-date-picker",
"@vivid-planet/react-admin-color-picker": "@comet/admin-color-picker",
"@vivid-planet/react-admin-rte": "@comet/admin-rte",
};

const transform: Transform = (file, api, options) => {
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ services:
- ./:/opt/app-root/src
ports:
- 8080:8080
command: bash -c "./wait-while-starting.sh && cd packages/comet-admin-stories && yarn start-storybook --port=8080"
command: bash -c "./wait-while-starting.sh && cd packages/admin-stories && yarn start-storybook --port=8080"
depends_on:
- comet-admin
githook:
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
"build": "lerna run build --stream",
"bootstrap": "lerna bootstrap",
"start": "lerna run --stream --no-sort --concurrency 999 start",
"storybook": "yarn --cwd packages/comet-admin-stories storybook",
"storybook": "yarn --cwd packages/admin-stories storybook",
"lint": "npm run lint:eslint && npm run lint:tsc",
"lint:eslint": "eslint --ext .ts,.tsx,.js,.jsx,.json,.md packages/**/src/",
"prelint:tsc": "yarn build",
"lint:tsc": "lerna run lint:tsc --stream",
"prebuild:storybook": "yarn build",
"build:storybook": "yarn workspace @vivid-planet/comet-admin-stories build-storybook",
"intl:extract": "formatjs extract ./packages/**/*.ts* --out-file lang/en.json --ignore ./**.d.ts --ignore ./packages/comet-admin-stories/**/* --format simple"
"build:storybook": "yarn workspace @comet/admin-stories build-storybook",
"intl:extract": "formatjs extract ./packages/**/*.ts* --out-file lang/en.json --ignore ./**.d.ts --ignore ./packages/admin-stories/**/* --format simple"
},
"devDependencies": {
"@apollo/client": "^3.2.5",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@vivid-planet/comet-admin-color-picker",
"name": "@comet/admin-color-picker",
"version": "1.0.1",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand All @@ -13,13 +13,13 @@
"devDependencies": {
"@types/react-color": "^2.17.4",
"@types/tinycolor2": "^1.4.2",
"@vivid-planet/comet-admin": "^1.1.0"
"@comet/admin": "^1.1.0"
},
"peerDependencies": {
"@material-ui/core": "^4.1.3",
"@material-ui/icons": "^4.2.1",
"@material-ui/styles": "^4.1.2",
"@vivid-planet/comet-admin": "^1.0.0",
"@comet/admin": "^1.0.0",
"react": "^16.8",
"react-final-form": "^6.3.1"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { getDefaultVPAdminInputStyles } from "@comet/admin";
import { Theme } from "@material-ui/core";
import { createStyles } from "@material-ui/styles";
import { getDefaultVPAdminInputStyles } from "@vivid-planet/comet-admin";

export type VPAdminColorPickerClassKeys =
| "input"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@vivid-planet/comet-admin-date-picker",
"name": "@comet/admin-date-picker",
"version": "1.0.1",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand All @@ -13,11 +13,11 @@
},
"devDependencies": {
"@types/react-dates": "^17.1.5",
"@vivid-planet/comet-admin": "^1.1.0"
"@comet/admin": "^1.1.0"
},
"peerDependencies": {
"@material-ui/core": "^4.1.3",
"@vivid-planet/comet-admin": "^1.0.0",
"@comet/admin": "^1.0.0",
"react": "^16.8",
"react-final-form": "^6.3.0",
"react-intl": "^5.10.0"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@vivid-planet/comet-admin-react-select",
"name": "@comet/admin-react-select",
"version": "1.0.1",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand All @@ -10,12 +10,12 @@
"classnames": "^2.2.6"
},
"devDependencies": {
"@vivid-planet/comet-admin": "^1.1.0"
"@comet/admin": "^1.1.0"
},
"peerDependencies": {
"@material-ui/core": "^4.1.3",
"@material-ui/icons": "^4.2.1",
"@vivid-planet/comet-admin": "^1.0.0",
"@comet/admin": "^1.0.0",
"final-form": "^4.16.1",
"react": "^16.8",
"react-final-form": "^6.3.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { emphasize } from "@material-ui/core/styles/colorManipulator";
import zIndex from "@material-ui/core/styles/zIndex";
import { createStyles } from "@material-ui/styles";

// TODO: import from "@vivid-planet/comet-admin" after publish.
// TODO: import from "@comet/admin" after publish.
const getDefaultVPAdminInputStyles = (theme: Theme) => {
return {
border: `1px solid ${theme.palette.grey[300]}`,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@vivid-planet/comet-admin-rte",
"name": "@comet/admin-rte",
"version": "1.1.1",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand All @@ -9,12 +9,12 @@
"devDependencies": {
"@types/draft-js": "^0.10.38",
"@types/immutable": "^3.8.7",
"@vivid-planet/comet-admin": "^1.1.0"
"@comet/admin": "^1.1.0"
},
"peerDependencies": {
"@material-ui/core": "^4.1.3",
"@material-ui/icons": "^4.2.1",
"@vivid-planet/comet-admin": "^1.0.0",
"@comet/admin": "^1.0.0",
"draft-js": "^0.11.4",
"final-form": "^4.16.1",
"immutable": "~3.7.4",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { select, withKnobs } from "@storybook/addon-knobs";
import { addDecorator, configure } from "@storybook/react";
import "@vivid-planet/comet-admin-color-picker/src/themeAugmentation";
import "@comet/admin-color-picker/src/themeAugmentation";
import * as React from "react";
import { IntlProvider } from "react-intl";
import { createMuiTheme, MuiThemeProvider as ThemeProvider } from "@vivid-planet/comet-admin";
import { createMuiTheme, MuiThemeProvider as ThemeProvider } from "@comet/admin";

const req = require.context("../src", true, /\.tsx$/);

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
document.addEventListener("DOMContentLoaded", function() {
var badge = document.createElement("div");
badge.style.position = "fixed";
badge.style.left = "5px";
badge.style.right = "5px";
badge.style.bottom = "5px";
badge.style.zIndex = "10";
badge.innerHTML =
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@vivid-planet/comet-admin-stories",
"name": "@comet/admin-stories",
"version": "1.2.0",
"files": [
"src"
Expand All @@ -9,10 +9,10 @@
"@material-ui/core": "^4.1.3",
"@material-ui/icons": "^4.2.1",
"@material-ui/styles": "^4.1.2",
"@vivid-planet/comet-admin": "*",
"@vivid-planet/comet-admin-color-picker": "*",
"@vivid-planet/comet-admin-react-select": "*",
"@vivid-planet/comet-admin-rte": "*",
"@comet/admin": "*",
"@comet/admin-color-picker": "*",
"@comet/admin-react-select": "*",
"@comet/admin-rte": "*",
"final-form": "^4.16.1",
"graphql": "^15.4.0",
"react": "^16.8",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Field } from "@comet/admin";
import { FinalFormColorPicker } from "@comet/admin-color-picker";
import { Button } from "@material-ui/core";
import { storiesOf } from "@storybook/react";
import { Field } from "@vivid-planet/comet-admin";
import { FinalFormColorPicker } from "@vivid-planet/comet-admin-color-picker";
import * as React from "react";
import { Form } from "react-final-form";

Expand Down Expand Up @@ -48,4 +48,4 @@ const Story = () => (
</div>
);

storiesOf("comet-admin-color-picker", module).add("Color Picker", () => <Story />);
storiesOf("@comet/admin-color-picker", module).add("Color Picker", () => <Story />);
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { FinalFormDatePicker } from "@comet/admin-date-picker";
import { storiesOf } from "@storybook/react";
import { FinalFormDatePicker } from "@vivid-planet/comet-admin-date-picker";
import * as React from "react";
import { Field, Form } from "react-final-form";
import { IntlProvider } from "react-intl";
Expand All @@ -21,4 +21,4 @@ const Story = () => {
);
};

storiesOf("comet-admin-date-picker", module).add("Date Picker", () => <Story />);
storiesOf("@comet/admin-date-picker", module).add("Date Picker", () => <Story />);
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { FinalFormDateRangePicker } from "@comet/admin-date-picker";
import { storiesOf } from "@storybook/react";
import { FinalFormDateRangePicker } from "@vivid-planet/comet-admin-date-picker";
import * as React from "react";
import { Field, Form } from "react-final-form";
import { IntlProvider } from "react-intl";
Expand All @@ -23,4 +23,4 @@ const Story = () => {
);
};

storiesOf("comet-admin-date-picker", module).add("Date Range Picker", () => <Story />);
storiesOf("@comet/admin-date-picker", module).add("Date Range Picker", () => <Story />);
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Field, FieldContainerLabelAbove, FinalFormInput } from "@comet/admin";
import { FinalFormReactSelectStaticOptions } from "@comet/admin-react-select";
import { Button, ListItem, Typography } from "@material-ui/core";
import { storiesOf } from "@storybook/react";
import { Field, FieldContainerLabelAbove, FinalFormInput } from "@vivid-planet/comet-admin";
import { FinalFormReactSelectStaticOptions } from "@vivid-planet/comet-admin-react-select";
import * as React from "react";
import { Form } from "react-final-form";

Expand Down Expand Up @@ -49,4 +49,4 @@ function Story() {
);
}

storiesOf("comet-admin-form", module).add("React Select", () => <Story />);
storiesOf("@comet/admin-react-select", module).add("Final Form React Select", () => <Story />);
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Field, FieldContainerLabelAbove } from "@comet/admin";
import { FinalFormReactSelectStaticOptions } from "@comet/admin-react-select";
import { Button, Dialog, DialogActions, DialogContent, DialogTitle } from "@material-ui/core";
import { storiesOf } from "@storybook/react";
import { Field, FieldContainerLabelAbove } from "@vivid-planet/comet-admin";
import { FinalFormReactSelectStaticOptions } from "@vivid-planet/comet-admin-react-select";
import * as React from "react";
import { Form } from "react-final-form";

Expand Down Expand Up @@ -44,4 +44,4 @@ function Story() {
);
}

storiesOf("comet-admin-form", module).add("React Select Dialog", () => <Story />);
storiesOf("@comet/admin-react-select", module).add("Final Form React Select Dialog", () => <Story />);
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Field, FieldContainerLabelAbove } from "@comet/admin";
import { FinalFormReactSelectStaticOptions } from "@comet/admin-react-select";
import { storiesOf } from "@storybook/react";
import { Field, FieldContainerLabelAbove } from "@vivid-planet/comet-admin";
import { FinalFormReactSelectStaticOptions } from "@vivid-planet/comet-admin-react-select";
import * as React from "react";
import { Form } from "react-final-form";

Expand Down Expand Up @@ -36,4 +36,4 @@ function Story() {
);
}

storiesOf("comet-admin-form", module).add("React Select Disabled Option", () => <Story />);
storiesOf("@comet/admin-react-select", module).add("Final Form React Select Disabled Option", () => <Story />);
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ReactSelect } from "@comet/admin-react-select";
import { Button, ListItem, Typography } from "@material-ui/core";
import { storiesOf } from "@storybook/react";
import { ReactSelect } from "@vivid-planet/comet-admin-react-select";
import * as React from "react";

function Story() {
Expand All @@ -22,4 +22,4 @@ function Story() {
);
}

storiesOf("material-ui-react-select", module).add("React Select Disabled Option", () => <Story />);
storiesOf("@comet/admin-react-select", module).add("React Select Disabled Option", () => <Story />);
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Field } from "@comet/admin";
import { createFinalFormRte } from "@comet/admin-rte";
import { Button, Typography } from "@material-ui/core";
import { storiesOf } from "@storybook/react";
import { Field } from "@vivid-planet/comet-admin";
import { createFinalFormRte } from "@vivid-planet/comet-admin-rte";
import * as React from "react";
import { Form } from "react-final-form";

Expand Down Expand Up @@ -36,4 +36,4 @@ function Story() {
);
}

storiesOf("comet-admin-rte/field", module).add("Field", () => <Story />);
storiesOf("@comet/admin-rte/field", module).add("Field", () => <Story />);
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Field } from "@comet/admin";
import { createFinalFormRte } from "@comet/admin-rte";
import { Button, Typography } from "@material-ui/core";
import { storiesOf } from "@storybook/react";
import { Field } from "@vivid-planet/comet-admin";
import { createFinalFormRte } from "@vivid-planet/comet-admin-rte";
import * as React from "react";
import { Form } from "react-final-form";

Expand Down Expand Up @@ -44,4 +44,4 @@ function Story() {
);
}

storiesOf("comet-admin-rte/field", module).add("Field, all options", () => <Story />);
storiesOf("@comet/admin-rte/field", module).add("Field, all options", () => <Story />);
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { IRteRef, makeRteApi, Rte } from "@comet/admin-rte";
import { storiesOf } from "@storybook/react";
import { IRteRef, makeRteApi, Rte } from "@vivid-planet/comet-admin-rte";
import * as React from "react";

import { exampleContent, PrintEditorState, RteLayout, useAutoFocus } from "./helper";
Expand All @@ -23,4 +23,4 @@ function Story() {
);
}

storiesOf("comet-admin-rte", module).add("Rte, minimal configuration", () => <Story />);
storiesOf("@comet/admin-rte", module).add("Rte, minimal configuration", () => <Story />);
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { IMakeRteApiProps, IRteApiProps, IRteOptions, IRteRef, LinkDecorator, makeRteApi, Rte } from "@comet/admin-rte";
import { storiesOf } from "@storybook/react";
import { IMakeRteApiProps, IRteApiProps, IRteOptions, IRteRef, LinkDecorator, makeRteApi, Rte } from "@vivid-planet/comet-admin-rte";
import { convertFromRaw, convertToRaw } from "draft-js";
import * as React from "react";

Expand Down Expand Up @@ -91,4 +91,4 @@ function Story() {
);
}

storiesOf("comet-admin-rte", module).add("Rte, all options", () => <Story />);
storiesOf("@comet/admin-rte", module).add("Rte, all options", () => <Story />);
Loading

0 comments on commit 98fcbd3

Please sign in to comment.