Skip to content

Commit

Permalink
Merge pull request #4 from cloudquery/feat/upgrade-material-ui-v6
Browse files Browse the repository at this point in the history
Upgrade to material v6
  • Loading branch information
jackcloudquery authored Sep 19, 2024
2 parents 04c757f + 461428b commit 1144be6
Show file tree
Hide file tree
Showing 19 changed files with 3,478 additions and 9,908 deletions.
91 changes: 91 additions & 0 deletions .github/workflows/publish-rc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: Publish release-candidate npm package

on:
pull_request:
types: [opened, reopened, synchronize]

jobs:
publish_rc:
if: contains(github.event.pull_request.labels.*.name, 'release-candidate')
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18.18.0'
registry-url: 'https://registry.npmjs.org'

- name: Get package name and current version from package.json
id: get_package_info
run: |
PACKAGE_NAME=$(jq -r .name < package.json)
PACKAGE_VERSION=$(jq -r .version < package.json)
echo "::set-output name=package_name::$PACKAGE_NAME"
echo "::set-output name=current_version::$PACKAGE_VERSION"
- name: Install dependencies
run: npm install

- name: Run lint
run: npm run lint

- name: Build package
run: npm run build

- name: Ensure no untracked changes after build
run: |
if [ -n "$(git status --porcelain)" ]; then
echo "Untracked changes found after build"
exit 1
else
echo "No untracked changes"
fi
- name: Set Git config
run: |
git config --local user.email "[email protected]"
git config --local user.name "Github Actions"
- name: Check and update release version
id: prepare_and_publish
run: |
set -e # Exit immediately if a command exits with a non-zero status
# Check for matching rc versions
matching_rc_versions=$(npm view ${{ steps.get_package_info.outputs.package_name }} versions --json | jq -c 'map(select(. | contains("'"${{ steps.get_package_info.outputs.current_version }}"'-rc")))')
echo "$matching_rc_versions"
if [ "$(echo "$matching_rc_versions" | jq 'type')" == '"array"' ] && [ "$(echo "$matching_rc_versions" | jq 'length')" -gt 0 ]; then
latest_rc_version=$(echo "$matching_rc_versions" | jq -r '.[-1]')
echo "Catching version up to latest rc: $latest_rc_version"
npm version "$latest_rc_version" --allow-same-version
echo "Iterating over version: $latest_rc_version"
npm version prerelease --preid=rc
else
echo "No matching rc versions found. Initializing version ${{ steps.get_package_info.outputs.current_version }}-rc.0"
npm version "${{ steps.get_package_info.outputs.current_version }}-rc.0"
fi
NEW_PACKAGE_VERSION=$(node -p "require('./package.json').version")
echo "Ready to publish: $NEW_PACKAGE_VERSION"
echo "::set-output name=publishing_rc_version::$NEW_PACKAGE_VERSION"
- name: Publish to npm
run: npm publish --tag rc
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}

- name: Create comment
uses: peter-evans/create-or-update-comment@8da4c50e7142257262c9df90da4e74a59068c038
with:
token: ${{ secrets.GH_CQ_BOT }}
issue-number: ${{ github.event.pull_request.number }}
body: |
### Published rc version:
${{steps.prepare_and_publish.outputs.publishing_rc_version}}
7 changes: 0 additions & 7 deletions config/babel.config.js

This file was deleted.

16 changes: 0 additions & 16 deletions config/jest.config.js

This file was deleted.

27 changes: 3 additions & 24 deletions etc/cloud-ui.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,14 @@
```ts

import { BreakpointOverrides } from '@mui/system/createTheme/createBreakpoints';
import { BreakpointOverrides } from '@mui/system/createBreakpoints/createBreakpoints';
import { Components } from '@mui/material/styles';
import { JSX as JSX_2 } from 'react/jsx-runtime';
import { PaletteColor } from '@mui/material/styles/createPalette';
import { PaletteColor as PaletteColor_2 } from '@mui/material/styles';
import { PaletteOptions } from '@mui/material/styles/createPalette';
import { ReactNode } from 'react';
import { Shadows } from '@mui/material/styles';
import { ThemeOptions } from '@mui/material/styles';
import { TypographyOptions } from '@mui/material/styles/createTypography';
import * as Yup from 'yup';

// @public
export const breakpoints: Record<keyof BreakpointOverrides, number>;
Expand Down Expand Up @@ -102,6 +99,7 @@ export const createThemePaletteOptions: () => {
contrastText: string;
darkest?: string;
lightest?: string;
darkestBg?: string;
};
secondary: {
hovered: string;
Expand All @@ -111,6 +109,7 @@ export const createThemePaletteOptions: () => {
contrastText: string;
darkest?: string;
lightest?: string;
darkestBg?: string;
};
success: PaletteColor_2;
text: {
Expand All @@ -130,23 +129,6 @@ export const createTypographyOptions: () => TypographyOptions;
// @public
const error: PaletteColor;

// @public (undocumented)
export function getFieldHelperText(errorMessage: string | undefined, helperText: string | ReactNode): string | number | boolean | Iterable<ReactNode> | JSX_2.Element;

// @public
export function getYupValidationResolver<FieldValues extends Yup.AnyObject, Schema extends Yup.ObjectSchema<FieldValues>>(validationSchema: Schema): (data: any) => Promise<{
errors: {};
values: Schema["__outputType"];
} | {
errors: {
[k: string]: {
message: string;
type: string;
};
};
values: {};
}>;

// @public
const info: PaletteColor;

Expand All @@ -167,9 +149,6 @@ const neutral: {
// @public
const primary: PaletteColor;

// @public
export function resetYupDefaultErrorMessages(yup: typeof Yup): void;

// @public
const secondary: PaletteColor;

Expand Down
Loading

0 comments on commit 1144be6

Please sign in to comment.