Skip to content

Commit

Permalink
build: update to typescript 5
Browse files Browse the repository at this point in the history
  • Loading branch information
bpowers committed Dec 21, 2024
1 parent 9fcd5a0 commit 57d1dc5
Show file tree
Hide file tree
Showing 13 changed files with 358 additions and 200 deletions.
2 changes: 1 addition & 1 deletion src/app/NewProject.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const readFile = (file: Blob): Promise<string> => {
return new Promise((resolve, reject) => {
reader.onerror = (err) => {
reader.abort();
reject(new DOMException(`Problem parsing input file: ${err}`));
reject(new DOMException(`Problem parsing input file: ${err.type}`));
};

reader.onload = () => {
Expand Down
22 changes: 11 additions & 11 deletions src/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,28 +27,28 @@
"@types/node": "^18.0.0",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"@typescript-eslint/eslint-plugin": "^5.11.0",
"@typescript-eslint/parser": "^5.11.0",
"@typescript-eslint/eslint-plugin": "^8.18.1",
"@typescript-eslint/parser": "^8.18.1",
"babel-loader": "^8.2.2",
"babel-preset-react-app": "^11.0.0-next.104",
"bfj": "^7.0.2",
"browserslist": "^4.16.6",
"case-sensitive-paths-webpack-plugin": "^2.3.0",
"csp-html-webpack-plugin": "^5.0.1",
"eslint": "^8.0.0",
"eslint-config-prettier": "^8.0.0",
"eslint-config-react-app": "^7.0.0",
"eslint": "^9.0.0",
"eslint-config-prettier": "^9.0.0",
"eslint-config-react-app": "^7.0.1",
"eslint-plugin-flowtype": "^8.0.0",
"eslint-plugin-import": "^2.20.1",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-react": "^7.22.0",
"eslint-plugin-react-hooks": "^4.2.0",
"eslint-webpack-plugin": "^3.0.1",
"eslint-plugin-prettier": "^5.0.0",
"eslint-plugin-react": "^7.37.2",
"eslint-plugin-react-hooks": "^5.1.0",
"eslint-webpack-plugin": "^4.2.0",
"file-loader": "^6.2.0",
"firebase": "^11.1.0",
"html-webpack-plugin": "^5.3.2",
"prettier": "^2.0.1",
"prettier": "^3.0.0",
"prompts": "^2.4.1",
"react-app-polyfill": "^3.0.0",
"react-dev-utils": "^12.0.0",
Expand All @@ -58,7 +58,7 @@
"source-map-explorer": "^2.5.2",
"source-map-loader": "^3.0.0",
"terser-webpack-plugin": "^5.1.4",
"typescript": "^4.1.3",
"typescript": "^5.7.2",
"url-loader": "^4.1.1",
"webpack": "^5.49.0",
"webpack-dev-server": "^4.3.0",
Expand Down
14 changes: 7 additions & 7 deletions src/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@
"google-protobuf": "^3.21.4"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^5.11.0",
"@typescript-eslint/parser": "^5.11.0",
"eslint": "^8.0.0",
"eslint-config-prettier": "^8.0.0",
"@typescript-eslint/eslint-plugin": "^8.18.1",
"@typescript-eslint/parser": "^8.18.1",
"eslint": "^9.0.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-import": "^2.20.1",
"eslint-plugin-prettier": "^4.0.0",
"prettier": "^2.0.1",
"typescript": "^4.1.3"
"eslint-plugin-prettier": "^5.0.0",
"prettier": "^3.0.0",
"typescript": "^5.7.2"
},
"scripts": {
"needs-format": "prettier -l '*.ts' 'pb/*.ts'",
Expand Down
2 changes: 1 addition & 1 deletion src/diagram/drawing/Sparkline.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export const Sparkline = styled(
class Sparkline extends React.PureComponent<SparklineProps & { className?: string }> {
// these should all be 'private', but Typescript can't enforce that with the `styled` above
pAxis = '';
sparklines: Array<React.SVGProps<SVGPathElement>> = [];
sparklines: Array<React.ReactNode> = [];
cachedSeries: List<Series> | unknown;

recache() {
Expand Down
20 changes: 9 additions & 11 deletions src/diagram/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
"js-base64": "^3.7.7",
"react": "^18.1.0",
"react-dom": "^18.1.0",
"react-router": "^5.2.1",
"react-router-dom": "^5.3.0",
"react-router": "^7.1.0",
"react-router-dom": "^7.1.0",
"slate": "^0.87.0",
"slate-history": "^0.86.0",
"slate-react": "^0.88.0"
Expand All @@ -49,20 +49,18 @@
"@types/katex": "^0.11.1",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"@types/react-router": "^5.1.1",
"@types/react-router-dom": "^5.1.0",
"@types/recharts": "^1.8.23",
"@types/resize-observer-browser": "^0.1.5",
"@typescript-eslint/eslint-plugin": "^5.11.0",
"@typescript-eslint/parser": "^5.11.0",
"eslint": "^8.0.0",
"eslint-config-prettier": "^8.0.0",
"@typescript-eslint/eslint-plugin": "^8.18.1",
"@typescript-eslint/parser": "^8.18.1",
"eslint": "^9.0.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-import": "^2.20.1",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-prettier": "^5.0.0",
"katex": "^0.13.18",
"prettier": "^2.0.1",
"prettier": "^3.0.0",
"recharts": "2.12.7",
"typescript": "^4.1.3"
"typescript": "^5.7.2"
},
"scripts": {
"needs-format": "prettier -l '**/*.ts' '**/*.tsx'",
Expand Down
14 changes: 7 additions & 7 deletions src/engine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@
"sideEffects": false,
"dependencies": {},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^5.11.0",
"@typescript-eslint/parser": "^5.11.0",
"eslint": "^8.0.0",
"eslint-config-prettier": "^8.0.0",
"@typescript-eslint/eslint-plugin": "^8.18.1",
"@typescript-eslint/parser": "^8.18.1",
"eslint": "^9.0.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-import": "^2.20.1",
"eslint-plugin-prettier": "^4.0.0",
"prettier": "^2.0.1",
"typescript": "^4.1.3"
"eslint-plugin-prettier": "^5.0.0",
"prettier": "^3.0.0",
"typescript": "^5.7.2"
},
"scripts": {
"needs-format": "prettier -l '*.ts'",
Expand Down
14 changes: 7 additions & 7 deletions src/importer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@
"sideEffects": false,
"dependencies": {},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^5.11.0",
"@typescript-eslint/parser": "^5.11.0",
"eslint": "^8.0.0",
"eslint-config-prettier": "^8.0.0",
"@typescript-eslint/eslint-plugin": "^8.18.1",
"@typescript-eslint/parser": "^8.18.1",
"eslint": "^9.0.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-import": "^2.20.1",
"eslint-plugin-prettier": "^4.0.0",
"prettier": "^2.0.1",
"typescript": "^4.1.3"
"eslint-plugin-prettier": "^5.0.0",
"prettier": "^3.0.0",
"typescript": "^5.7.2"
},
"scripts": {
"needs-format": "prettier -l '*.ts'",
Expand Down
4 changes: 2 additions & 2 deletions src/server/models/table-firestore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export class FirestoreTable<T extends Message> implements Table<T> {

private doc(_id: string, pb: T): Schema {
const serializedPb = pb.serializeBinary();
const doc = pb.toObject();
const doc: {[key: string]: any} = pb.toObject();

if (doc.hasOwnProperty('value')) {
throw new Error('we expect document to not have "value" property');
Expand All @@ -113,7 +113,7 @@ export class FirestoreTable<T extends Message> implements Table<T> {

if (key === 'jsonContents') {
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const contents = value as any;
const contents = value;
// if the JSON is too big, don't expose it (as its only for debugging info anyway)
if (contents.length > 100 * 1024) {
doc[key] = null;
Expand Down
14 changes: 7 additions & 7 deletions src/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@
"@types/passport": "^1.0.1",
"@types/passport-strategy": "^0.2.35",
"@types/serve-favicon": "^2.2.31",
"@typescript-eslint/eslint-plugin": "^5.11.0",
"@typescript-eslint/parser": "^5.11.0",
"eslint": "^8.0.0",
"eslint-config-prettier": "^8.0.0",
"@typescript-eslint/eslint-plugin": "^8.18.1",
"@typescript-eslint/parser": "^8.18.1",
"eslint": "^9.0.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-import": "^2.20.1",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-prettier": "^5.0.0",
"firebase-tools": "^13.29.1",
"prettier": "^2.0.1",
"typescript": "^4.1.3"
"prettier": "^3.0.0",
"typescript": "^5.7.2"
},
"resolutions": {
"immer": "9.0.19"
Expand Down
14 changes: 7 additions & 7 deletions src/xmutil-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
"sideEffects": false,
"dependencies": {},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^5.11.0",
"@typescript-eslint/parser": "^5.11.0",
"eslint": "^8.0.0",
"eslint-config-prettier": "^8.0.0",
"@typescript-eslint/eslint-plugin": "^8.18.1",
"@typescript-eslint/parser": "^8.18.1",
"eslint": "^9.0.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-import": "^2.20.1",
"eslint-plugin-prettier": "^4.0.0",
"prettier": "^2.0.1",
"typescript": "^4.1.3"
"eslint-plugin-prettier": "^5.0.0",
"prettier": "^3.0.0",
"typescript": "^5.7.2"
},
"scripts": {
"needs-format": "prettier -l '*.ts'",
Expand Down
1 change: 0 additions & 1 deletion tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"skipLibCheck": true,
"strict": true,
"strictNullChecks": true,
"suppressImplicitAnyIndexErrors": true,
"noUnusedLocals": true,
"paths": {
"@system-dynamics/*": [
Expand Down
2 changes: 1 addition & 1 deletion website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@types/react-router-dom": "^5.1.7",
"react": "^18.1.0",
"react-dom": "^18.1.0",
"typescript": "^4.1.3"
"typescript": "^5.7.2"
},
"resolutions": {
"immer": "9.0.19"
Expand Down
Loading

0 comments on commit 57d1dc5

Please sign in to comment.