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

Bump dependencies #888

Merged
merged 4 commits into from
Dec 3, 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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 0 additions & 46 deletions web/.eslintrc.cjs

This file was deleted.

50 changes: 50 additions & 0 deletions web/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import js from "@eslint/js";
import reactHooks from "eslint-plugin-react-hooks";
import reactRefresh from "eslint-plugin-react-refresh";
import tssUnusedClasses from "eslint-plugin-tss-unused-classes";
import storybook from "eslint-plugin-storybook";
import tseslint from "typescript-eslint";
import globals from "globals";
import eslintConfigPrettier from "eslint-config-prettier";

export default tseslint.config(
{
ignores: ["dist", "!.storybook"]
},
{
extends: [js.configs.recommended, ...tseslint.configs.recommended],
files: ["**/*.{ts,tsx}"],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser
},
plugins: {
"react-hooks": reactHooks,
"react-refresh": reactRefresh,
"tss-unused-classes": tssUnusedClasses
},
rules: {
"react-refresh/only-export-components": [
"warn",
{ allowConstantExport: true }
],
"react-hooks/exhaustive-deps": "off",
"@typescript-eslint/no-redeclare": "off",
"no-labels": "off",
"react-hooks/rules-of-hooks": "warn",
"prefer-const": "off",
"no-sequences": "off",
"tss-unused-classes/unused-classes": "warn",
"no-lone-blocks": "off",
"@typescript-eslint/no-explicit-any": "off",
"no-constant-condition": "off",
"@typescript-eslint/no-namespace": "off",
"no-empty": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/ban-types": "off"
}
},
...storybook.configs["flat/recommended"],
eslintConfigPrettier
);
93 changes: 48 additions & 45 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,42 +19,42 @@
"prestorybook": "tsx scripts/unyamlify-env-local.ts"
},
"dependencies": {
"@aws-sdk/client-s3": "^3.693.0",
"@aws-sdk/client-s3": "^3.701.0",
"@aws-sdk/lib-storage": "^3.693.0",
"@aws-sdk/s3-request-presigner": "^3.693.0",
"@aws-sdk/s3-request-presigner": "^3.701.0",
"@babel/runtime": "7.26.0",
"@codemirror/autocomplete": "6.18.1",
"@codemirror/autocomplete": "6.18.3",
"@codemirror/lang-yaml": "6.1.1",
"@codemirror/language": "6.10.3",
"@codemirror/legacy-modes": "^6.4.2",
"@codemirror/lint": "6.8.1",
"@codemirror/search": "6.5.6",
"@codemirror/lint": "6.8.4",
"@codemirror/search": "6.5.8",
"@codemirror/state": "6.4.1",
"@codemirror/theme-one-dark": "6.1.2",
"@codemirror/view": "6.34.1",
"@duckdb/duckdb-wasm": "^1.29.0",
"@duckdb/duckdb-wasm-shell": "^1.29.0",
"@emotion/cache": "^11.13.1",
"@emotion/react": "^11.13.3",
"@emotion/styled": "^11.13.0",
"@lezer/common": "1.2.1",
"@emotion/cache": "^11.13.5",
"@emotion/react": "^11.13.5",
"@emotion/styled": "^11.13.5",
"@lezer/common": "1.2.3",
"@lezer/highlight": "1.2.1",
"@mui/icons-material": "^6.1.7",
"@mui/material": "^6.1.7",
"@mui/system": "^6.1.7",
"@mui/x-data-grid": "^7.22.2",
"@uiw/codemirror-themes": "4.23.2",
"@mui/icons-material": "^6.1.9",
"@mui/material": "^6.1.9",
"@mui/system": "^6.1.9",
"@mui/x-data-grid": "^7.22.3",
"@uiw/codemirror-themes": "4.23.6",
"@uiw/react-codemirror": "^4.23.6",
"@ungap/structured-clone": "^1.2.0",
"async-mutex": "^0.4.1",
"axios": "^0.26.1",
"async-mutex": "^0.5.0",
"axios": "^1.7.8",
"bytes": "^3.1.2",
"clean-architecture": "^4.3.9",
"codemirror": "6.0.1",
"compare-versions": "^5.0.3",
"compare-versions": "^6.1.1",
"evt": "^2.5.8",
"file-saver": "^2.0.5",
"flexsearch": "0.7.21",
"flexsearch": "0.7.43",
"i18nifty": "^3.2.3",
"json5": "2.2.3",
"keycloakify": "^11.3.29",
Expand All @@ -77,58 +77,61 @@
"xterm-addon-fit": "^0.8.0",
"xterm-addon-web-links": "^0.9.0",
"xterm-addon-webgl": "^0.16.0",
"yaml": "^2.6.0",
"yaml": "^2.6.1",
"zod": "^3.23.8"
},
"resolutions": {
"@codemirror/view": "6.34.1"
},
"devDependencies": {
"@chromatic-com/storybook": "^1.9.0",
"@storybook/addon-a11y": "^8.4.4",
"@storybook/addon-essentials": "^8.4.4",
"@storybook/addon-interactions": "^8.4.4",
"@storybook/addon-links": "^8.4.4",
"@storybook/addon-onboarding": "^8.4.4",
"@storybook/addon-themes": "^8.4.4",
"@storybook/blocks": "^8.4.4",
"@storybook/react": "^8.4.4",
"@storybook/react-vite": "^8.4.4",
"@storybook/test": "^8.4.4",
"@eslint/js": "^9.15.0",
"@storybook/addon-a11y": "^8.4.5",
"@storybook/addon-essentials": "^8.4.5",
"@storybook/addon-interactions": "^8.4.5",
"@storybook/addon-links": "^8.4.5",
"@storybook/addon-onboarding": "^8.4.5",
"@storybook/addon-themes": "^8.4.5",
"@storybook/blocks": "^8.4.5",
"@storybook/react": "^8.4.5",
"@storybook/react-vite": "^8.4.5",
"@storybook/test": "^8.4.5",
"@types/bytes": "^3.1.4",
"@types/file-saver": "^2.0.7",
"@types/flexsearch": "^0.7.6",
"@types/memoizee": "^0.4.11",
"@types/mustache": "^4.2.5",
"@types/node": "^22.9.0",
"@types/node": "^22.10.1",
"@types/path-browserify": "^1.0.3",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@types/ungap__structured-clone": "0.3.0",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
"@vitejs/plugin-react": "^4.3.3",
"eslint": "^8.57.1",
"@types/ungap__structured-clone": "1.2.0",
"@vitejs/plugin-react": "^4.3.4",
"eslint": "^9.15.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-react-hooks": "^5.0.0",
"eslint-plugin-react-refresh": "^0.4.14",
"eslint-plugin-storybook": "^0.8.0",
"eslint-plugin-storybook": "^0.11.1",
"eslint-plugin-tss-unused-classes": "^1.0.3",
"globals": "^15.12.0",
"husky": "^9.1.7",
"lint-staged": "^15.2.10",
"patch-package": "^8.0.0",
"prettier": "^3.3.3",
"storybook": "^8.4.4",
"prettier": "^3.4.1",
"storybook": "^8.4.5",
"storybook-dark-mode": "^4.0.2",
"tsx": "^4.19.2",
"typescript": "^5.6.3",
"vite": "^5.4.11",
"typescript": "^5.7.2",
"typescript-eslint": "^8.16.0",
"vite": "^6.0.1",
"vite-envs": "^4.4.6",
"vite-plugin-commonjs": "^0.10.3",
"vite-tsconfig-paths": "^5.1.2",
"vitest": "^2.1.5"
"vite-plugin-commonjs": "^0.10.4",
"vite-tsconfig-paths": "^5.1.3",
"vitest": "^2.1.6"
},
"lint-staged": {
"*.{ts,tsx}": [
"eslint --fix"
],
"*.{ts,tsx,json,md}": [
"prettier --write"
]
Expand Down
1 change: 0 additions & 1 deletion web/src/core/adapters/onyxiaApi/ApiTypes.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable no-template-curly-in-string */
import type { LocalizedString, JSONSchema } from "core/ports/OnyxiaApi";
import type { ArrayOrNot } from "core/tools/ArrayOrNot";

Expand Down
19 changes: 10 additions & 9 deletions web/src/core/adapters/onyxiaApi/onyxiaApi.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable no-template-curly-in-string */
import "minimal-polyfills/Object.fromEntries";
import {
type OnyxiaApi,
Expand All @@ -10,7 +9,7 @@ import {
type Project,
zJSONSchema
} from "core/ports/OnyxiaApi";
import axios from "axios";
import axios, { AxiosHeaders } from "axios";
import type { AxiosResponse, AxiosRequestConfig } from "axios";
import memoize from "memoizee";
import { assert, is } from "tsafe/assert";
Expand Down Expand Up @@ -68,13 +67,15 @@ export function createOnyxiaApi(params: {
const { axiosInstance } = (() => {
const axiosInstance = axios.create({ baseURL: url, timeout: 120_000 });

axiosInstance.interceptors.request.use(config => ({
...config,
headers: {
...config?.headers,
...getHeaders()
}
}));
axiosInstance.interceptors.request.use(config => {
const headers = AxiosHeaders.from(config.headers);
headers.set(getHeaders());

return {
...config,
headers
};
});

return { axiosInstance };
})();
Expand Down
22 changes: 13 additions & 9 deletions web/src/core/adapters/secretManager/secretManager.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import axios from "axios";
import axios, { AxiosHeaders } from "axios";
import { join as pathJoin } from "pathe";
import { partition } from "evt/tools/reducers";
import type {
Expand Down Expand Up @@ -76,14 +76,18 @@ export async function createSecretManager(params: Params): Promise<SecretsManage
const { axiosInstance } = (() => {
const axiosInstance = createAxiosInstance();

axiosInstance.interceptors.request.use(async axiosRequestConfig => ({
...axiosRequestConfig,
headers: {
"X-Vault-Token": (await getNewlyRequestedOrCachedToken()).token
},
"Content-Type": "application/json;charset=utf-8",
Accept: "application/json;charset=utf-8"
}));
axiosInstance.interceptors.request.use(async axiosRequestConfig => {
const headers = AxiosHeaders.from(axiosRequestConfig.headers);

headers.set("X-Vault-Token", (await getNewlyRequestedOrCachedToken()).token);
headers.set("Content-Type", "application/json;charset=utf-8");
headers.set("Accept", "application/json;charset=utf-8");

return {
...axiosRequestConfig,
headers
};
});

return { axiosInstance };
})();
Expand Down
1 change: 0 additions & 1 deletion web/src/core/bootstrap.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-unused-expressions */
import {
createCore,
createObjectThatThrowsIfAccessed,
Expand Down
1 change: 1 addition & 0 deletions web/src/core/tools/Stringifyable/Stringifyable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ interface StringifyableObject {
}

// NOTE: Use Stringifyable[]
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
interface StringifyableArray extends Array<Stringifyable> {}

export const zStringifyableAtomic = (() => {
Expand Down
5 changes: 3 additions & 2 deletions web/src/core/usecases/fileExplorer/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,9 @@ export const { reducer, actions } = createUsecaseActions({
state.directoryPath = directoryPath;
state.objects = objects;
state.isNavigationOngoing = false;
bucketPolicy && (state.bucketPolicy = bucketPolicy);

if (bucketPolicy) {
state.bucketPolicy = bucketPolicy;
}
// Properly restore state when navigating back to
// a directory with ongoing operations.
state.ongoingOperations
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export type JSONSchemaLike = JSONSchemaLike_getJSONSchemaType &
assert<keyof JSONSchemaLike extends keyof JSONSchema ? true : false>();
assert<JSONSchema extends JSONSchemaLike ? true : false>();

// eslint-disable-next-line @typescript-eslint/no-empty-object-type
export type XOnyxiaContextLike = {};

assert<XOnyxiaContext extends XOnyxiaContextLike ? true : false>();
Expand Down Expand Up @@ -474,5 +475,5 @@ function computeRootFormFieldGroup_rec(params: {
});
}

assert<Equals<typeof helmValuesSchemaType, never>>;
assert<Equals<typeof helmValuesSchemaType, never>>();
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { assert } from "tsafe/assert";
import { exclude } from "tsafe/exclude";
import type { XOnyxiaContext } from "core/ports/OnyxiaApi";

// eslint-disable-next-line @typescript-eslint/no-empty-object-type
export type XOnyxiaContextLike = {};

assert<XOnyxiaContext extends XOnyxiaContextLike ? true : false>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ namespace v1 {
}
}

assert<Equals<v1.ProjectConfigs, ProjectConfigs>>;
assert<Equals<v1.ProjectConfigs, ProjectConfigs>>();

export async function v0ToV1(params: {
projectVaultTopDirPath_reserved: string;
Expand Down Expand Up @@ -184,7 +184,7 @@ export async function v0ToV1(params: {

(function callee(
path: (string | number)[],
o: Object
o: object
) {
Object.entries(o).forEach(
([segment, value]) => {
Expand Down
Loading