Skip to content

Commit c567681

Browse files
authored
Merge pull request #765 from TerriaJS/upgrade-ts-592
Upgrade TS, cesium, mobx etc.
2 parents 3370f4f + 58cab60 commit c567681

File tree

3 files changed

+2092
-4356
lines changed

3 files changed

+2092
-4356
lines changed

buildprocess/webpack.config.js

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
const configureWebpackForTerriaJS = require("terriajs/buildprocess/configureWebpack");
55
const configureWebpackForPlugins = require("./configureWebpackForPlugins");
6+
const defaultBabelLoader = require("terriajs/buildprocess/defaultBabelLoader");
67
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
78
const path = require("path");
89
const HtmlPlugin = require("html-webpack-plugin");
@@ -37,29 +38,7 @@ module.exports = function ({ devMode, baseHref = "/" }) {
3738
path.resolve(__dirname, "..", "plugins.ts"),
3839
path.resolve(__dirname, "..", "lib")
3940
],
40-
use: [
41-
{
42-
loader: "babel-loader",
43-
options: {
44-
cacheDirectory: true,
45-
presets: [
46-
[
47-
"@babel/preset-env",
48-
{
49-
corejs: 3,
50-
useBuiltIns: "usage"
51-
}
52-
],
53-
["@babel/preset-react", { runtime: "automatic" }],
54-
["@babel/preset-typescript", { allowNamespaces: true }]
55-
],
56-
plugins: [
57-
["@babel/plugin-proposal-decorators", { legacy: true }],
58-
"babel-plugin-styled-components"
59-
]
60-
}
61-
}
62-
]
41+
use: [defaultBabelLoader({ devMode })]
6342
},
6443
// import html file as string
6544
{

package.json

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -34,20 +34,16 @@
3434
}
3535
},
3636
"resolutions": {
37-
"underscore": "^1.12.1",
3837
"@types/react": "^18.3.3",
39-
"@types/react-dom": "^18.3.1",
40-
"@types/lodash": "4.14.182",
41-
"@types/css-font-loading-module": "^0.0.13",
42-
"@types/node": "^22.13.1"
38+
"@types/react-dom": "^18.3.1"
4339
},
4440
"devDependencies": {
45-
"@babel/core": "^7.23.5",
46-
"@babel/preset-env": "^7.23.5",
47-
"@babel/preset-react": "^7.23.3",
41+
"@babel/core": "^7.28.0",
42+
"@babel/preset-env": "^7.28.0",
43+
"@babel/preset-react": "^7.27.1",
4844
"@typescript-eslint/eslint-plugin": "^8.24.0",
4945
"@typescript-eslint/parser": "^8.24.0",
50-
"babel-loader": "^9.2.1",
46+
"babel-loader": "^10.0.0",
5147
"css-loader": "^7.1.2",
5248
"eslint": "^8.57.1",
5349
"eslint-config-prettier": "^9.1.0",
@@ -66,7 +62,7 @@
6662
"minimist": "^1.2.8",
6763
"node-notifier": "^10.0.1",
6864
"plugin-error": "^2.0.1",
69-
"prettier": "2.7.1",
65+
"prettier": "2.8.8",
7066
"pretty-quick": "^4.0.0",
7167
"prop-types": "^15.6.0",
7268
"react": "^18.3.1",
@@ -75,16 +71,15 @@
7571
"sass": "^1.81.0",
7672
"sass-loader": "^16.0.3",
7773
"style-loader": "^4.0.0",
74+
"terriajs": "8.11.0",
75+
"terriajs-cesium": "21.0.0",
7876
"svg-sprite": "^2.0.4",
79-
"terriajs": "8.10.0",
80-
"terriajs-cesium": "8.0.2",
8177
"terriajs-plugin-api": "0.0.1-alpha.17",
8278
"terriajs-plugin-sample": "0.0.1-alpha.7",
83-
"typescript": "^5.7.3",
79+
"typescript": "^5.9.2",
8480
"urijs": "^1.18.12",
8581
"webpack": "^5.96.1",
8682
"webpack-cli": "^5.1.4",
87-
"webpack-dev-server": "^5.1.0",
8883
"yargs": "^17.7.2"
8984
},
9085
"scripts": {
@@ -95,7 +90,6 @@
9590
"start": "terriajs-server --config-file serverconfig.json",
9691
"gulp": "gulp",
9792
"postinstall": "echo 'Installation successful. What to do next:\\n yarn gulp dev # Starts the server on port 3001, builds TerriaMap and dependencies, and rebuilds if files change.'",
98-
"hot": "webpack-dev-server --inline --config buildprocess/webpack.config.hot.js --hot --host 0.0.0.0",
9993
"prettier": "prettier --write .",
10094
"prettier-check": "prettier --check ."
10195
}

0 commit comments

Comments
 (0)