Skip to content

Commit

Permalink
Merge pull request #142 from Staffbase/chore-update-workflows-and-deps
Browse files Browse the repository at this point in the history
chore: update workflows and deps
  • Loading branch information
maximizeIT authored Nov 26, 2024
2 parents 6f63caf + cd3a4db commit ee918ac
Show file tree
Hide file tree
Showing 7 changed files with 1,707 additions and 2,060 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/autodev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
autodev:
uses: Staffbase/gha-workflows/.github/workflows/template_autodev.yml@v6.0.0
uses: Staffbase/gha-workflows/.github/workflows/template_autodev.yml@v7.0.0
with:
comments: true
secrets:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cla.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
steps:
- name: "CLA Assistant"
if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request'
uses: contributor-assistant/github-action@v2.4.0
uses: contributor-assistant/github-action@v2.6.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PERSONAL_ACCESS_TOKEN: ${{ secrets.OSS_CONTRIBUTOR_LICENSE_AGREEMENT }}
Expand Down
14 changes: 7 additions & 7 deletions samples/weather-forecast/dev/bootstrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import WidgetApiMock from "./widget-api-mock";
import { fromDataUri, prepareAttributes } from "./utils/DataUtil";
import { baseAttributes } from "./constants";
import Config from "./config";
import ReactDOM from "react-dom";
import React from "react";
import { createRoot } from "react-dom/client";

/**
* Simulated hosting class to run the widget
Expand Down Expand Up @@ -72,11 +72,11 @@ window.defineBlock = function (externalBlockDefinition) {
WidgetApiMock,
);

ReactDOM.render(
React.createElement(Config, {
blockDefinition: externalBlockDefinition.blockDefinition,
}),
document.getElementById("config"),
);
const container = document.getElementById("config");
const root = createRoot(container!);

Check warning on line 76 in samples/weather-forecast/dev/bootstrap.ts

View workflow job for this annotation

GitHub Actions / executing-tests

Forbidden non-null assertion

Check warning on line 76 in samples/weather-forecast/dev/bootstrap.ts

View workflow job for this annotation

GitHub Actions / executing-tests

Forbidden non-null assertion
root.render(React.createElement(Config, {
blockDefinition: externalBlockDefinition.blockDefinition,
}));

window.customElements.define(customElementName, CustomElementClass);
};
2 changes: 1 addition & 1 deletion samples/weather-forecast/dev/config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import { ExternalBlockDefinition } from "@staffbase/widget-sdk";
import { configurationSchema, uiSchema } from "../src/configuration-schema";
import React, { FC } from "react";
import Form from "@rjsf/material-ui";
import Form from "@rjsf/mui";
import validator from "@rjsf/validator-ajv8";

const updateWidget = (data: Record<string, string>) => {
Expand Down
62 changes: 32 additions & 30 deletions samples/weather-forecast/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,70 +17,72 @@
"author": "",
"license": "ISC",
"dependencies": {
"@staffbase/widget-sdk": "^3.12.8",
"acorn": "^8.12.0",
"axios": "1.7.4",
"@staffbase/widget-sdk": "^3.14.2",
"acorn": "^8.14.0",
"axios": "1.7.7",
"date-fns": "^2.23.0",
"dayjs": "1.11.12",
"openweather-apis": "4.5.0",
"react": "^17.0.2",
"dayjs": "1.11.13",
"react": "^18.3.1",
"react-cool-dimensions": "^2.0.7",
"react-dom": "^17.0.2",
"react-dom": "^18.3.1",
"react-query": "3.39.3",
"regenerator-runtime": "0.14.1"
},
"devDependencies": {
"@babel/core": "^7.25.2",
"@babel/core": "^7.26.0",
"@babel/plugin-proposal-class-properties": "^7.18.6",
"@babel/plugin-proposal-object-rest-spread": "^7.20.7",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/preset-env": "^7.25.3",
"@babel/preset-react": "^7.24.7",
"@babel/preset-typescript": "^7.24.7",
"@material-ui/core": "^4.12.4",
"@material-ui/icons": "^4.11.3",
"@rjsf/core": "5.20.0",
"@rjsf/material-ui": "5.20.0",
"@rjsf/utils": "5.20.0",
"@rjsf/validator-ajv8": "^5.20.0",
"@babel/preset-env": "^7.26.0",
"@babel/preset-react": "^7.25.9",
"@babel/preset-typescript": "^7.26.0",
"@emotion/react": "^11.13.3",
"@emotion/styled": "^11.13.0",
"@mui/icons-material": "^6.1.8",
"@mui/material": "^6.1.8",
"@mui/system": "^6.1.4",
"@rjsf/core": "5.23.1",
"@rjsf/mui": "5.23.1",
"@rjsf/utils": "5.23.1",
"@rjsf/validator-ajv8": "5.23.1",
"@svgr/webpack": "8.1.0",
"@testing-library/dom": "8.11.1",
"@testing-library/jest-dom": "5.15.0",
"@testing-library/react": "12.1.5",
"@testing-library/dom": "^10.4.0",
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "^16.0.1",
"@testing-library/react-hooks": "7.0.2",
"@types/copy-webpack-plugin": "^8.0.1",
"@types/jest": "^29.5.12",
"@types/jest": "^29.5.14",
"@types/json-schema": "^7.0.15",
"@types/node": "16.11.9",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@types/testing-library__jest-dom": "^5.14.9",
"@types/webpack": "5.28.5",
"@types/webpack-dev-server": "4.7.2",
"@typescript-eslint/eslint-plugin": "5.4.0",
"@typescript-eslint/parser": "5.4.0",
"@ungap/custom-elements": "1.3.0",
"babel-eslint": "10.1.0",
"babel-loader": "^9.1.3",
"copy-webpack-plugin": "^9.0.1",
"core-js": "3.38.0",
"babel-loader": "^9.2.1",
"copy-webpack-plugin": "^12.0.2",
"core-js": "3.39.0",
"eslint": "8.3.0",
"eslint-config-prettier": "8.3.0",
"file-loader": "^6.2.0",
"jest": "27.1.0",
"jest-json-schema": "^5.0.0",
"js-base64": "3.7.7",
"minimal-polyfills": "2.2.3",
"prettier": "2.3.2",
"prettier": "3.3.3",
"react-svg-loader": "^3.0.3",
"ts-loader": "^9.5.1",
"ts-node": "10.9.2",
"typescript": "4.5.2",
"url-loader": "^4.1.1",
"webpack": "^5.92.1",
"webpack": "^5.96.1",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^4.5.0",
"webpack-merge": "^5.10.0"
"webpack-dev-server": "^5.0.4",
"webpack-merge": "^6.0.1"
},
"jest": {
"setupFilesAfterEnv": [
Expand Down
6 changes: 4 additions & 2 deletions samples/weather-forecast/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/

import React from "react";
import ReactDOM from "react-dom";
import { createRoot } from "react-dom/client";

import {
BlockFactory,
Expand Down Expand Up @@ -58,7 +58,9 @@ const factory: BlockFactory = (BaseBlockClass, _widgetApi) => {
}

public renderBlock(container: HTMLElement): void {
ReactDOM.render(<WeatherForecast {...this.props} />, container);
createRoot(container).render(
<WeatherForecast {...this.props} />
);
}

/**
Expand Down
Loading

0 comments on commit ee918ac

Please sign in to comment.