Skip to content

Commit

Permalink
dev: typescript 4.9.5, TS target ES2021, TS module ES2020, typedoc ~0…
Browse files Browse the repository at this point in the history
….25.3

- Upgrade all packages to use  typescript `~4.9.5`
- Update typedoc version to `~0.25.3` and remove custom typedoc theme
- Adapt @mui/icons-material imports in material-renderers to work with
  later typescript versions. The used imports broke starting with 4.2.4
- Fix typescript target from ESNext to ES2021 because
- Fix typescript module from ESNext to ES2020

Remove ESNext from typescript configurations because it leads to changes
in output when updating the typescript version.
For `target` ESNext is explicitly discouraged in the typescript docs.
  • Loading branch information
lucas-koehler committed Jan 9, 2024
1 parent b00754c commit c8d3ecf
Show file tree
Hide file tree
Showing 20 changed files with 171 additions and 397 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"ts-loader": "^6.2.1",
"ts-node": "^10.4.0",
"tslib": "^2.5.0",
"typescript": "4.2.3",
"typescript": "~4.9.5",
"webpack": "^4.41.2",
"webpack-merge": "^4.2.2"
},
Expand Down
6 changes: 3 additions & 3 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"report": "nyc report --reporter=html",
"test": "ava",
"test-cov": "rimraf -rf .nyc_output && nyc ava",
"doc": "typedoc --name 'JSON Forms Core' --excludeExternals --theme ../../typedoc-jsonforms --out docs src"
"doc": "typedoc --name 'JSON Forms Core' --excludeExternals --out docs src"
},
"ava": {
"files": [
Expand Down Expand Up @@ -96,7 +96,7 @@
"source-map-support": "0.5.16",
"ts-node": "^10.4.0",
"tslib": "^2.5.0",
"typedoc": "~0.21.9",
"typescript": "4.2.3"
"typedoc": "~0.25.3",
"typescript": "~4.9.5"
}
}
6 changes: 3 additions & 3 deletions packages/examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"lint": "eslint .",
"lint:fix": "eslint --fix .",
"test": "echo 'Nothing to do for `examples` package'",
"doc": "typedoc --name 'JSON Forms Examples' --excludeExternals --theme ../../typedoc-jsonforms --out docs src"
"doc": "typedoc --name 'JSON Forms Examples' --excludeExternals --out docs src"
},
"dependencies": {
"ajv-i18n": "^3.5.0",
Expand All @@ -65,7 +65,7 @@
"rollup-plugin-typescript2": "^0.34.1",
"rollup-plugin-visualizer": "^5.4.1",
"tslib": "^2.5.0",
"typedoc": "~0.21.9",
"typescript": "4.2.3"
"typedoc": "~0.25.3",
"typescript": "~4.9.5"
}
}
6 changes: 3 additions & 3 deletions packages/material-renderers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"test": "jest --no-cache",
"test-cov": "jest --no-cache --coverage",
"report": "nyc report --reporter=html",
"doc": "typedoc --name 'JSON Forms React Material Renderers' --excludeExternals --theme ../../typedoc-jsonforms --out docs src",
"doc": "typedoc --name 'JSON Forms React Material Renderers' --excludeExternals --out docs src",
"tsc": "tsc --build tsconfig.json"
},
"jest": {
Expand Down Expand Up @@ -135,8 +135,8 @@
"ts-jest": "^27.1.4",
"ts-loader": "^6.2.1",
"tslib": "^2.5.0",
"typedoc": "~0.21.9",
"typescript": "4.2.3",
"typedoc": "~0.25.3",
"typescript": "~4.9.5",
"webpack": "^4.41.2",
"webpack-cli": "^3.2.1",
"webpack-dev-server": "^3.9.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import {
ListItemSecondaryAction,
ListItemText,
} from '@mui/material';
import DeleteIcon from '@mui/icons-material/Delete';
import { Delete as DeleteIcon } from '@mui/icons-material';
import React from 'react';

export const ListWithDetailMasterItem = ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,11 @@ import {
encode,
ArrayTranslations,
} from '@jsonforms/core';
import DeleteIcon from '@mui/icons-material/Delete';
import ArrowDownward from '@mui/icons-material/ArrowDownward';
import ArrowUpward from '@mui/icons-material/ArrowUpward';
import {
Delete as DeleteIcon,
ArrowDownward,
ArrowUpward,
} from '@mui/icons-material';

import { WithDeleteDialogSupport } from './DeleteDialog';
import NoBorderTableCell from './NoBorderTableCell';
Expand Down
2 changes: 1 addition & 1 deletion packages/material-renderers/src/complex/TableToolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import {
ArrayTranslations,
} from '@jsonforms/core';
import { IconButton, TableRow, Tooltip, Grid, Typography } from '@mui/material';
import AddIcon from '@mui/icons-material/Add';
import { Add as AddIcon } from '@mui/icons-material';
import ValidationIcon from './ValidationIcon';
import NoBorderTableCell from './NoBorderTableCell';

Expand Down
2 changes: 1 addition & 1 deletion packages/material-renderers/src/complex/ValidationIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
*/
import React from 'react';

import ErrorOutlineIcon from '@mui/icons-material/ErrorOutline';
import { ErrorOutline as ErrorOutlineIcon } from '@mui/icons-material';
import { Badge, Tooltip, styled } from '@mui/material';

const StyledBadge = styled(Badge)(({ theme }: any) => ({
Expand Down
2 changes: 1 addition & 1 deletion packages/material-renderers/src/layouts/ArrayToolbar.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Grid, IconButton, Toolbar, Tooltip, Typography } from '@mui/material';
import AddIcon from '@mui/icons-material/Add';
import { Add as AddIcon } from '@mui/icons-material';
import React from 'react';
import ValidationIcon from '../complex/ValidationIcon';
import { ArrayTranslations } from '@jsonforms/core';
Expand Down
10 changes: 6 additions & 4 deletions packages/material-renderers/src/layouts/ExpandPanelRenderer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,12 @@ import {
Grid,
IconButton,
} from '@mui/material';
import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
import DeleteIcon from '@mui/icons-material/Delete';
import ArrowUpward from '@mui/icons-material/ArrowUpward';
import ArrowDownward from '@mui/icons-material/ArrowDownward';
import {
ExpandMore as ExpandMoreIcon,
Delete as DeleteIcon,
ArrowUpward,
ArrowDownward,
} from '@mui/icons-material';

const iconStyle: any = { float: 'right' };

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import {
useTheme,
} from '@mui/material';
import merge from 'lodash/merge';
import Close from '@mui/icons-material/Close';
import { Close } from '@mui/icons-material';
import {
JsonFormsTheme,
WithInputProps,
Expand Down
4 changes: 2 additions & 2 deletions packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
"rollup-plugin-visualizer": "^5.4.1",
"ts-jest": "^27.1.4",
"tslib": "^2.5.0",
"typedoc": "~0.21.9",
"typescript": "4.2.3"
"typedoc": "~0.25.3",
"typescript": "~4.9.5"
}
}
4 changes: 2 additions & 2 deletions packages/vanilla-renderers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"report": "nyc report --reporter=html",
"test": "jest --no-cache",
"test-cov": "jest --no-cache --coverage",
"doc": "typedoc --name 'JSON Forms Vanilla Renderers' --excludeExternals --theme ../../typedoc-jsonforms --out docs src"
"doc": "typedoc --name 'JSON Forms Vanilla Renderers' --excludeExternals --out docs src"
},
"files": [
"lib",
Expand Down Expand Up @@ -91,7 +91,7 @@
"ts-loader": "^6.2.1",
"ts-node": "^10.4.0",
"tslib": "^2.5.0",
"typedoc": "~0.21.9",
"typedoc": "~0.25.3",
"webpack": "^4.41.2",
"webpack-cli": "^3.2.1",
"webpack-dev-server": "^3.9.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/vue-vanilla/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@
"rollup-plugin-vue": "^6.0.0",
"symlink-dir": "^5.0.0",
"tslib": "^2.5.0",
"typedoc": "~0.21.9",
"typescript": "4.2.3",
"typedoc": "~0.25.3",
"typescript": "~4.9.5",
"vue": "^3.2.26",
"vue-jest": "^5.0.0-0"
},
Expand Down
6 changes: 3 additions & 3 deletions packages/vue-vanilla/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"compilerOptions": {
"target": "esnext",
"module": "esnext",
"target": "ES2021",
"module": "ES2020",
"skipLibCheck": true,
"strict": true,
"declaration": true,
Expand All @@ -14,7 +14,7 @@
"sourceMap": true,
"outDir": "./lib",
"types": ["node", "vue", "mocha", "chai"],
"lib": ["esnext", "dom", "dom.iterable", "scripthost"]
"lib": ["ES2021", "dom", "dom.iterable", "scripthost"]
},
"exclude": ["node_modules", "lib"]
}
4 changes: 2 additions & 2 deletions packages/vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@
"rollup-plugin-vue": "^6.0.0",
"ts-jest": "^27.1.5",
"tslib": "^2.5.0",
"typedoc": "~0.21.9",
"typescript": "4.2.3",
"typedoc": "~0.25.3",
"typescript": "~4.9.5",
"vue": "^3.2.26"
},
"peerDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions packages/vue/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"compilerOptions": {
"target": "esnext",
"module": "esnext",
"target": "ES2021",
"module": "ES2020",
"skipLibCheck": true,
"strict": true,
"declaration": true,
Expand All @@ -14,7 +14,7 @@
"sourceMap": true,
"outDir": "./lib",
"types": ["node", "vue", "jest"],
"lib": ["esnext", "dom", "dom.iterable", "scripthost"]
"lib": ["ES2021", "dom", "dom.iterable", "scripthost"]
},
"exclude": ["node_modules", "lib"]
}
Loading

0 comments on commit c8d3ecf

Please sign in to comment.