Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update dependencies #9713

Merged
merged 25 commits into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Set Node Version
uses: actions/setup-node@v1
with:
node-version: 14.15.5
node-version: 14.21.3
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
Expand Down
12 changes: 9 additions & 3 deletions Composer/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,22 @@ module.exports = {
'plugin:prettier/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/eslint-recommended',
'prettier/@typescript-eslint',
'plugin:@bfc/bfcomposer/recommended',
'plugin:security/recommended',
'plugin:security/recommended-legacy',
],
plugins: ['import', 'notice', 'security', 'lodash', 'security'],
env: {
browser: true,
es6: true,
node: true,
},
parserOptions: {
ecmaVersion: 6,
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
},
rules: {
'notice/notice': [
'error',
Expand All @@ -27,11 +33,11 @@ module.exports = {
],

// typescript
'@typescript-eslint/ban-ts-ignore': 'warn',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-unnecessary-type-assertion': 'off',
'@typescript-eslint/no-var-requires': 0,
'@typescript-eslint/no-use-before-define': 'warn',
'@typescript-eslint/prefer-optional-chain': 'error',

Expand Down
4 changes: 2 additions & 2 deletions Composer/.eslintrc.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT License.

module.exports = {
extends: ['./.eslintrc.js', 'plugin:react/recommended', 'plugin:security/recommended'],
extends: ['./.eslintrc.js', 'plugin:react/recommended', 'plugin:security/recommended-legacy'],
plugins: ['react-hooks', 'format-message', '@emotion', 'jsx-a11y', 'security'],
settings: {
react: {
Expand Down Expand Up @@ -31,7 +31,7 @@ module.exports = {
'react/no-danger': 'error',
'react/no-deprecated': 'warn',
'react/prop-types': 'warn',
'react/no-unknown-property': 'error',
'react/no-unknown-property': ['error', { 'ignore': ['css'] }],
'react/jsx-boolean-value': ['error', 'never'],
'react/jsx-filename-extension': ['error', { extensions: ['.jsx', '.tsx'] }],
// https://github.com/yannickcr/eslint-plugin-react/blob/HEAD/docs/rules/jsx-sort-props.md
Expand Down
17 changes: 17 additions & 0 deletions Composer/.glf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"inputs": ["./package.json"],
"output": "../ThirdPartyNotices.txt",
"overwrite": true,
"eol": "lf",
"no-spinner": true,
"replace": {
"@bcoe/v8-coverage@0.2.3": "./node_modules/@bcoe/v8-coverage/LICENSE.txt",
"through@2.3.8": "./node_modules/through/./LICENSE.MIT",
"rc@1.2.8": "./node_modules/rc/LICENSE.MIT",
"microsoft-cognitiveservices-speech-sdk@1.17.0": "./node_modules/microsoft-cognitiveservices-speech-sdk/LICENSE",
"doctrine@3.0.0": "./node_modules/doctrine/LICENSE",
"sax@0.5.8": "./node_modules/sax/LICENSE",
"atob@2.1.2": "./node_modules/atob/LICENSE",
"JSONStream@1.3.5": "./node_modules/JSONStream/LICENSE.MIT"
}
}
52 changes: 26 additions & 26 deletions Composer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -140,46 +140,46 @@
]
},
"devDependencies": {
"@babel/cli": "7.18.6",
"@babel/core": "7.18.6",
"@babel/cli": "7.23.9",
"@babel/core": "7.24.0",
"@babel/plugin-proposal-class-properties": "7.18.6",
"@babel/plugin-transform-runtime": "7.18.6",
"@babel/preset-env": "7.18.6",
"@babel/preset-react": "7.18.6",
"@babel/preset-typescript": "7.18.6",
"@babel/plugin-transform-runtime": "7.24.0",
"@babel/preset-env": "7.24.0",
"@babel/preset-react": "7.23.3",
"@babel/preset-typescript": "7.23.3",
"@bfc/eslint-plugin-bfcomposer": "workspace:*",
"@emotion/babel-preset-css-prop": "11.2.0",
"@emotion/eslint-plugin": "11.7.0",
"@typescript-eslint/eslint-plugin": "2.34.0",
"@typescript-eslint/parser": "2.34.0",
"concurrently": "7.2.2",
"@emotion/babel-preset-css-prop": "11.11.0",
"@emotion/eslint-plugin": "11.11.0",
"@typescript-eslint/eslint-plugin": "5.62.0",
"@typescript-eslint/parser": "5.62.0",
"concurrently": "8.2.2",
"coveralls": "3.1.1",
"cross-env": "7.0.3",
"eslint": "7.0.0",
"eslint-config-prettier": "6.11.0",
"eslint": "8.57.0",
"eslint-config-prettier": "9.1.0",
"eslint-formatter-github-actions": "1.1.0",
"eslint-plugin-format-message": "6.2.4",
"eslint-plugin-import": "2.26.0",
"eslint-plugin-jsx-a11y": "6.6.0",
"eslint-plugin-import": "2.29.1",
"eslint-plugin-jsx-a11y": "6.8.0",
"eslint-plugin-lodash": "7.4.0",
"eslint-plugin-notice": "0.9.10",
"eslint-plugin-prettier": "3.1.3",
"eslint-plugin-react": "7.30.1",
"eslint-plugin-prettier": "5.1.3",
"eslint-plugin-react": "7.34.0",
"eslint-plugin-react-hooks": "4.6.0",
"eslint-plugin-security": "1.5.0",
"eslint-plugin-security": "2.1.1",
"format-message": "6.2.4",
"format-message-cli": "6.2.4",
"get-port": "6.1.2",
"husky": "8.0.1",
"get-port": "7.0.0",
"husky": "9.0.11",
"jest": "27.4.7",
"jest-cli": "27.4.7",
"lint-staged": "13.0.3",
"prettier": "2.0.5",
"lint-staged": "15.2.2",
"prettier": "3.2.5",
"rimraf": "3.0.2",
"ts-loader": "9.3.1",
"tslib": "2.4.0",
"typescript": "3.9.2",
"wait-on": "6.0.1",
"ts-loader": "9.5.1",
"tslib": "2.6.2",
"typescript": "5.4.2",
"wait-on": "7.2.0",
"wsrun": "5.2.4"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe('<VisualDesigner/>', () => {
}}
>
<AdaptiveFlowEditor />
</EditorExtensionContext.Provider>
</EditorExtensionContext.Provider>,
);
expect(visualDesigner).toBeTruthy();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ describe('KeyboardZone', () => {
const zone = render(
<KeyboardZone onCommand={() => undefined}>
<span data-testid="zone-child">children</span>
</KeyboardZone>
</KeyboardZone>,
);
expect(zone).toBeTruthy();
expect(zone.getByTestId('zone-child')).toBeTruthy();
Expand All @@ -30,7 +30,7 @@ describe('KeyboardZone', () => {
const zone = render(
<KeyboardZone onCommand={mockOnCommand}>
<span data-testid="zone-child">children</span>
</KeyboardZone>
</KeyboardZone>,
).getByTestId('keyboard-zone');

fireEvent.focus(zone);
Expand All @@ -40,7 +40,7 @@ describe('KeyboardZone', () => {
key: 'C',
code: 'C',
ctrlKey: true,
})
}),
);
expect(mockOnCommand).toHaveBeenCalled();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ import { NodeRendererContext } from '../../../src/adaptive-flow-editor/contexts/

describe('NodeRendererContext', () => {
const CtxtConsumer = () => {
const { focusedId, focusedEvent, focusedTab, clipboardActions, dialogFactory, customSchemas } = useContext(
NodeRendererContext
);
const { focusedId, focusedEvent, focusedTab, clipboardActions, dialogFactory, customSchemas } =
useContext(NodeRendererContext);

return (
<div>
Expand All @@ -37,7 +36,7 @@ describe('NodeRendererContext', () => {
}}
>
<CtxtConsumer />
</NodeRendererContext.Provider>
</NodeRendererContext.Provider>,
);

expect(ele.getByTestId('focusedId-value').textContent).toEqual('id1');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ import { SelectionContext } from '../../../src/adaptive-flow-editor/contexts/Sel

describe('SelectionContext', () => {
const ContextConsumer = () => {
const { getNodeIndex, getSelectableIds, selectedIds, setSelectedIds, selectableElements } = useContext(
SelectionContext
);
const { getNodeIndex, getSelectableIds, selectedIds, setSelectedIds, selectableElements } =
useContext(SelectionContext);
return (
<div>
<span data-testid="getNodeIndex-result">{getNodeIndex('')}</span>
Expand All @@ -33,7 +32,7 @@ describe('SelectionContext', () => {
}}
>
<ContextConsumer />
</SelectionContext.Provider>
</SelectionContext.Provider>,
);

expect(ele.getByTestId('getNodeIndex-result').textContent).toEqual('1');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ describe('useEditorEventApi', () => {
nodeContext: { ...defaultRendererContextValue, focusedId: 'a' },
selectionContext: { ...defaultSelectionContextValue, selectedIds: ['a'] },
},
ShellApiStub
)
ShellApiStub,
),
).result.current;

it('returns necessary apis.', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe('createActionMenu()', () => {
label: 'Begin skill',
submenu: [SDKKinds.BeginSkill],
},
}
},
);
const sdkBeginSkill = menuItems.find((item) => item.key === SDKKinds.BeginSkill);

Expand Down Expand Up @@ -61,7 +61,7 @@ describe('createActionMenu()', () => {
{ isSelfHosted: false, enablePaste: false },
[],
{},
[]
[],
);
expect(menuItemsWithoutCustomActions.findIndex((x) => x.key === 'Custom Actions')).toEqual(-1);

Expand All @@ -74,7 +74,7 @@ describe('createActionMenu()', () => {
{ isSelfHosted: false, enablePaste: false },
[],
{},
customActions
customActions,
);
expect(withCustomActions.findIndex((x) => x.key === 'Custom Actions')).toEqual(withCustomActions.length - 1);
expect(withCustomActions[withCustomActions.length - 1].subMenuProps?.items.length).toEqual(3); // 2 action labels + 1 sep line
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ describe('<ElementWrapper>', () => {
const ele = render(
<ElementWrapper nodeId="test" tagId="1">
<span data-testid="wrapped-content">Content</span>
</ElementWrapper>
</ElementWrapper>,
);

expect(ele).toBeTruthy();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe('<ActionNodeWrapper>', () => {
}}
>
<ActionNodeWrapper data={{}} id="test" onEvent={mockOnEvent} />
</EditorExtensionContext.Provider>
</EditorExtensionContext.Provider>,
);
expect(ele.getByTestId('ActionNodeWrapper')).toBeTruthy();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import { ShellApi } from '@bfc/shared';

const fn = () => ({} as any);
const fn = () => ({}) as any;
const fnList = () => [] as any[];
const fnPromise = () => Promise.resolve({} as any);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ describe('moveCursor', () => {
} as any,
],
'test',
KeyboardCommandTypes.Cursor.MoveNext
)
KeyboardCommandTypes.Cursor.MoveNext,
),
).toEqual({ focused: 'test-focused', selected: 'test', tab: '' });
});

Expand All @@ -39,8 +39,8 @@ describe('moveCursor', () => {
} as any,
],
'test',
KeyboardCommandTypes.Cursor.MoveLeft
)
KeyboardCommandTypes.Cursor.MoveLeft,
),
).toEqual({ focused: 'test-focused', selected: 'test', tab: '' });
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ describe('<AdaptiveDialog />', () => {
uischema={uischema}
widgets={widgets}
onEvent={() => null}
/>
/>,
);
expect(renderResult.getAllByText('hello')).toHaveLength(1);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe('<AdaptiveTrigger />', () => {
const renderResult = render(
<SchemaContext.Provider value={{ widgets, schemaProvider: new WidgetSchemaProvider(uischema) }}>
<AdaptiveTrigger triggerData={triggerData} triggerId="triggers[0]" onEvent={() => null} />
</SchemaContext.Provider>
</SchemaContext.Provider>,
);
expect(renderResult.getAllByText('hello')).toHaveLength(1);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ describe('<ElementMeasurer />', () => {
const ele = render(
<ElementMeasurer onResize={() => null}>
<div data-testid="measurer-content" />
</ElementMeasurer>
</ElementMeasurer>,
);

expect(ele.getByTestId('measurer-content')).toBeTruthy();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ describe('<OffsetContainer />', () => {
const offsetContainer = render(
<OffsetContainer offset={{ x: 0, y: 0 }}>
<></>
</OffsetContainer>
</OffsetContainer>,
);

expect(offsetContainer).toBeTruthy();
Expand All @@ -22,7 +22,7 @@ describe('<OffsetContainer />', () => {
const offsetContainer = render(
<OffsetContainer offset={{ x: 0, y: 0 }}>
<div data-testid="offset-content" />
</OffsetContainer>
</OffsetContainer>,
);

expect(offsetContainer.getByTestId('offset-content')).toBeTruthy();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ describe('<SVGContainer />', () => {
const svgContainer = render(
<SVGContainer>
<></>
</SVGContainer>
</SVGContainer>,
);

expect(svgContainer).toBeTruthy();
Expand All @@ -22,7 +22,7 @@ describe('<SVGContainer />', () => {
const svgContainer = render(
<SVGContainer>
<circle data-testid="svg-content" />
</SVGContainer>
</SVGContainer>,
);

expect(svgContainer.getByTestId('svg-content')).toBeTruthy();
Expand Down
Loading
Loading