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: Release 9.0.0 #2619

Merged
merged 27 commits into from
Jun 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
a82e0cb
Chore: Update to 8.2.0 (#2520)
Onokaev Apr 19, 2023
d7d8931
Fix: Add retry handler for revoking permissions (#2515)
Onokaev Apr 26, 2023
299c3f3
Fix: Modify permissions tab resize (#2523)
Onokaev Apr 26, 2023
bf9bcd1
Feature: Surface documentation links (#2219)
thewahome Apr 26, 2023
1c26a6d
Task: Add support for persisting collections (#2525)
Onokaev Apr 26, 2023
cfb91a2
Chore: popups manager (#2514)
thewahome May 2, 2023
4e6b7bb
Task: support multiple collections (#2549)
thewahome May 3, 2023
840a8a1
Task: Show feedback - add to collections (#2555)
thewahome May 3, 2023
b0dda64
Chore: change "remove" aria label (#2558)
thewahome May 4, 2023
db86b90
Chore: append unique paths to collection (#2560)
thewahome May 4, 2023
5e47981
Fix: Collections reducer failing test logic (#2573)
thewahome May 15, 2023
0618007
Task: Reorder revoking permission event messages (#2526)
Onokaev May 15, 2023
6282c7d
Fix: Persist sample body (#2550)
Onokaev May 15, 2023
157dd5b
Fix: collection status for nodes with IDs (#2575)
thewahome May 16, 2023
1a6361c
Chore: Update failing snapshots (#2571)
ElinorW May 17, 2023
755ff73
Chore: Uppercase methods (#2578)
thewahome May 17, 2023
ec9044a
Task: Dependabot upgrades for May (#2557)
Onokaev May 18, 2023
c652f08
Task: Add support for uploading postman collections (#2579)
Onokaev May 22, 2023
a244404
Fix: Remove use of external label (#2582)
ElinorW May 22, 2023
3a9f445
Chore: utilise resource paths (#2584)
thewahome May 23, 2023
3fec0e4
Chore: ensure unique paths (#2586)
thewahome May 24, 2023
250c5e0
Chore: Dependabot upgrades - June (#2612)
ElinorW Jun 6, 2023
6c12205
Chore: Clear network error message (#2615)
ElinorW Jun 7, 2023
bb8f192
Task: Add new permissions scopeType (#2585)
Onokaev Jun 12, 2023
0c29e93
Merge branch 'dev' into release/june-2023
ElinorW Jun 12, 2023
4f8ea33
Bump version to 9.0.0
ElinorW Jun 12, 2023
28bca04
Merge branch 'dev' into release/june-2023
ElinorW Jun 12, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,10 @@ module.exports = {
'spaced-comment': 'off',
'use-isnan': 'error',
'valid-typeof': 'off',
'react/react-in-jsx-scope': 'off'
'react/react-in-jsx-scope': 'off',
'react/no-unstable-nested-components': [
'off', { 'allowAsProps': true }
]
},
settings: {
react: {
Expand Down
18 changes: 0 additions & 18 deletions .github/fabricbot.json
Original file line number Diff line number Diff line change
Expand Up @@ -1065,12 +1065,6 @@
"parameters": {
"label": "API: Graph"
}
},
{
"name": "hasLabel",
"parameters": {
"label": "external"
}
}
]
},
Expand Down Expand Up @@ -1325,18 +1319,6 @@
"label": "API: Graph"
}
},
{
"name": "hasLabel",
"parameters": {
"label": "external"
}
},
{
"name": "noLabel",
"parameters": {
"label": "Service issue"
}
},
{
"name": "noActivitySince",
"parameters": {
Expand Down
4 changes: 0 additions & 4 deletions config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ const paths = require('./paths');
const getClientEnvironment = require('./env');
const ModuleNotFoundPlugin = require('react-dev-utils/ModuleNotFoundPlugin');
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin');
const ESLintPlugin = require('eslint-webpack-plugin');

// Source maps are resource heavy and can cause out of memory issue for large source files.
Expand Down Expand Up @@ -416,9 +415,6 @@ module.exports = function (webpackEnv) {
new webpack.optimize.LimitChunkCountPlugin({
maxChunks: 1
}),
new MonacoWebpackPlugin({
languages: ['json', 'javascript', 'java', 'csharp', 'html', 'powershell', 'go']
}),
// Generates an `index.html` file with the <script> injected.
new HtmlWebpackPlugin(
Object.assign(
Expand Down
2,926 changes: 1,312 additions & 1,614 deletions package-lock.json

Large diffs are not rendered by default.

79 changes: 37 additions & 42 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"name": "graph-explorer-v2",
"version": "8.2.0",
"version": "9.0.0",
"private": true,
"dependencies": {
"@augloop/types-core": "file:packages/types-core-2.16.189.tgz",
"@axe-core/webdriverjs": "4.6.0",
"@azure/msal-browser": "2.32.2",
"@babel/core": "7.20.12",
"@babel/runtime": "7.21.0",
"@fluentui/react": "8.107.1",
"@fluentui/react-icons-mdl2": "1.3.31",
"@microsoft/applicationinsights-react-js": "3.4.0",
"@microsoft/applicationinsights-web": "2.8.11",
"@babel/runtime": "7.22.3",
"@fluentui/react": "8.110.0",
"@fluentui/react-icons-mdl2": "1.3.45",
"@microsoft/applicationinsights-react-js": "3.4.2",
"@microsoft/applicationinsights-web": "3.0.2",
"@microsoft/microsoft-graph-client": "3.0.5",
"@monaco-editor/react": "4.4.6",
"@monaco-editor/react": "4.5.0",
"@ms-ofb/officebrowserfeedbacknpm": "file:packages/officebrowserfeedbacknpm-1.6.6.tgz",
"adaptive-expressions": "4.19.3",
"adaptivecards": "2.11.1",
Expand All @@ -23,47 +23,46 @@
"babel-loader": "9.1.2",
"babel-preset-react-app": "10.0.1",
"bfj": "7.0.2",
"bootstrap": "5.2.3",
"bootstrap": "5.3.0",
"case-sensitive-paths-webpack-plugin": "2.4.0",
"css-loader": "6.7.3",
"dotenv": "16.0.3",
"dotenv": "16.1.4",
"dotenv-expand": "10.0.0",
"eslint-config-react-app": "7.0.1",
"eslint-plugin-react": "7.32.2",
"eslint-webpack-plugin": "4.0.0",
"eslint-webpack-plugin": "4.0.1",
"express": "4.18.2",
"file-loader": "6.2.0",
"fork-ts-checker-webpack-plugin": "8.0.0",
"fs-extra": "11.1.1",
"guid-typescript": "1.0.9",
"isomorphic-fetch": "3.0.0",
"localforage": "1.10.0",
"mini-css-extract-plugin": "2.7.5",
"monaco-editor": "0.37.0",
"monaco-editor-webpack-plugin": "7.0.1",
"mini-css-extract-plugin": "2.7.6",
"monaco-editor": "0.38.0",
"office-ui-fabric-core": "11.1.0",
"postcss-flexbugs-fixes": "5.0.2",
"postcss-loader": "7.2.4",
"postcss-preset-env": "8.3.0",
"postcss-loader": "7.3.2",
"postcss-preset-env": "8.3.2",
"re-resizable": "6.9.9",
"react": "18.2.0",
"react-app-polyfill": "3.0.0",
"react-dom": "18.2.0",
"react-intl": "6.2.7",
"react-redux": "8.0.4",
"react-intl": "6.4.2",
"react-redux": "8.0.7",
"redux": "4.2.1",
"redux-thunk": "2.4.2",
"resolve": "1.22.1",
"sass": "1.50.0",
"sass-loader": "13.2.0",
"sass": "1.62.1",
"sass-loader": "13.3.1",
"style-loader": "3.3.1",
"typescript": "5.0.3",
"typescript": "5.0.4",
"url": "0.11.0",
"url-loader": "4.1.1",
"webpack": "5.76.0",
"webpack-dev-server": "4.13.2",
"webpack": "5.81.0",
"webpack-dev-server": "4.13.3",
"webpack-manifest-plugin": "5.0.0",
"workbox-webpack-plugin": "6.5.4"
"workbox-webpack-plugin": "7.0.0"
},
"scripts": {
"start": "node scripts/start.js",
Expand All @@ -73,7 +72,6 @@
"prebuild:prod": "standard-version",
"build:prod": "npm run build",
"bump": "standard-version --skip.tag --skip.changelog",
"preinstall": "npx npm-force-resolutions",
"start-server": "npm start",
"test-playwright": "start-server-and-test start-server http://localhost:3000 test-ui",
"test-ui": "npx playwright test src/tests/ui/",
Expand All @@ -90,50 +88,47 @@
"not op_mini all"
],
"devDependencies": {
"@axe-core/playwright": "4.4.5",
"@playwright/test": "1.29.2",
"@axe-core/playwright": "4.7.0",
"@playwright/test": "1.33.0",
"@types/chromedriver": "81.0.1",
"@types/enzyme": "3.10.12",
"@types/enzyme": "3.10.13",
"@types/enzyme-adapter-react-16": "1.0.6",
"@types/isomorphic-fetch": "0.0.36",
"@types/jest": "27.4.1",
"@types/lodash.debounce": "4.0.7",
"@types/react": "18.0.26",
"@types/react-dom": "18.0.10",
"@types/react-dom": "18.2.4",
"@types/react-intl": "3.0.0",
"@types/react-redux": "7.1.23",
"@types/redux-logger": "3.0.9",
"@types/redux-mock-store": "1.0.3",
"@types/selenium-webdriver": "4.1.10",
"@typescript-eslint/eslint-plugin": "5.57.1",
"@types/selenium-webdriver": "4.1.15",
"@typescript-eslint/eslint-plugin": "5.59.9",
"@typescript-eslint/parser": "5.48.0",
"acorn": "8.8.2",
"babel-jest": "29.5.0",
"chromedriver": "^111.0.0",
"chromedriver": "^114.0.1",
"enzyme": "3.11.0",
"enzyme-adapter-react-16": "1.15.7",
"eslint": "8.33.0",
"html-webpack-plugin": "5.5.0",
"eslint": "8.39.0",
"html-webpack-plugin": "5.5.1",
"jest": "28.1.0",
"jest-canvas-mock": "2.4.0",
"jest-environment-jsdom": "29.4.1",
"jest-canvas-mock": "2.5.1",
"jest-environment-jsdom": "29.5.0",
"jest-fetch-mock": "3.0.3",
"jest-sonar-reporter": "2.0.0",
"jest-watch-typeahead": "2.2.1",
"jest-watch-typeahead": "2.2.2",
"node-notifier": "10.0.1",
"react-dev-utils": "12.0.1",
"redux-logger": "3.0.6",
"redux-mock-store": "1.5.4",
"selenium-webdriver": "4.7.1",
"start-server-and-test": "1.15.3",
"selenium-webdriver": "4.9.2",
"start-server-and-test": "2.0.0",
"ts-jest": "28.0.8"
},
"jestSonar": {
"reportPath": "reports",
"reportFile": "test-report.xml",
"indent": 4
},
"resolutions": {
"@types/react": "17.0.44"
}
}
}
2 changes: 1 addition & 1 deletion playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const config: PlaywrightTestConfig = {
expect: {
toMatchSnapshot: {
threshold: 0.3,
maxDiffPixelRatio: 0.02
maxDiffPixelRatio: 0.05
}
},
use: {
Expand Down
47 changes: 45 additions & 2 deletions src/app/middleware/localStorageMiddleware.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
import { collectionsCache } from '../../modules/cache/collections.cache';
import { resourcesCache } from '../../modules/cache/resources.cache';
import { samplesCache } from '../../modules/cache/samples.cache';
import { saveTheme } from '../../themes/theme-utils';
import { AppAction } from '../../types/action';
import { ResourcePath } from '../../types/resources';
import { addResourcePaths } from '../services/actions/collections-action-creators';
import { getUniquePaths } from '../services/reducers/collections-reducer.util';
import {
CHANGE_THEME_SUCCESS, SAMPLES_FETCH_SUCCESS
CHANGE_THEME_SUCCESS, COLLECTION_CREATE_SUCCESS, FETCH_RESOURCES_ERROR, FETCH_RESOURCES_SUCCESS,
RESOURCEPATHS_ADD_SUCCESS, RESOURCEPATHS_DELETE_SUCCESS, SAMPLES_FETCH_SUCCESS
} from '../services/redux-constants';

const localStorageMiddleware = () => (next: any) => (action: AppAction) => {
const localStorageMiddleware = (store: any) => (next: any) => async (action: AppAction) => {
switch (action.type) {
case CHANGE_THEME_SUCCESS:
saveTheme(action.response);
Expand All @@ -15,6 +21,43 @@ const localStorageMiddleware = () => (next: any) => (action: AppAction) => {
samplesCache.saveSamples(action.response);
break;

case RESOURCEPATHS_ADD_SUCCESS: {
const collections = await collectionsCache.read();
const item = collections.find(k => k.isDefault)!;
item.paths = getUniquePaths(item.paths, action.response);
await collectionsCache.update(item.id, item);
break;
}

case RESOURCEPATHS_DELETE_SUCCESS: {
const paths = action.response;
const collections = await collectionsCache.read();
const collection = collections.find(k => k.isDefault)!;
paths.forEach((path: ResourcePath) => {
const index = collection.paths.findIndex(k => k.key === path.key);
if (index > -1) {
collection.paths.splice(index, 1);
}
})
await collectionsCache.update(collection.id, collection);
break;
}

case COLLECTION_CREATE_SUCCESS: {
await collectionsCache.create(action.response);
break;
}

case FETCH_RESOURCES_SUCCESS:
case FETCH_RESOURCES_ERROR: {
resourcesCache.readCollection().then((data: ResourcePath[]) => {
if (data && data.length > 0) {
store.dispatch(addResourcePaths(data));
}
});
break;
}

default:
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ const mockState: ApplicationState = {
baseUrl: 'https://graph.microsoft.com/v1.0/me',
parameters: '$count=true'
},
permissionsPanelOpen: true,
profile: null,
sampleQuery: {
sampleUrl: 'http://localhost:8080/api/v1/samples/1',
Expand Down Expand Up @@ -105,8 +104,7 @@ const mockState: ApplicationState = {
labels: [],
children: []
},
error: null,
paths: []
error: null
},
policies: {
pending: false,
Expand Down
Loading