Skip to content

Commit

Permalink
Remove unused ts-loader
Browse files Browse the repository at this point in the history
This has not been used since
commit 4d23d00 in July 2020,
and the version of ts-loader
used does not have webpack 5
support. Rather than upgrading
the version of an unused dependency,
remove it.

Refs #6998
  • Loading branch information
pjonsson committed Nov 21, 2024
1 parent ffc3e61 commit a824bc4
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 59 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- Removed the basemaps - positron, darkmatter and black-marble - from the default settings. The Carto ones are no longer free and requires an [Enterprise or Grantee license](https://carto.com/basemaps). If you have the appropriate license you can add them via your [initialization file](https://docs.terria.io/guide/customizing/initialization-files/#basemaps). [Example configuration](https://gist.github.com/na9da/ef7871afee7cbe3d0a95e5b6351834c9).
- Restrict mobx version to '< 6.13.0' to avoid tsc errors because mobx now uses iterator helper types introduced in TypeScript 5.6.
- Remove unused ts-node dependency.
- Remove unused ts-loader dependency.
- [The next improvement]

#### 8.7.8 - 2024-11-01
Expand Down
23 changes: 1 addition & 22 deletions buildprocess/configureWebpack.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,30 +178,9 @@ function configureWebpack(
path.resolve(terriaJSBasePath, "buildprocess", "generateCatalogIndex.ts"),
path.resolve(terriaJSBasePath, "buildprocess", "patchNetworkRequests.ts")
],
use: [
babelLoader
// Re-enable this if we need to observe any differences in the
// transpilation via ts-loader, & babel's stripping of types,
// or if TypeScript has newer features that babel hasn't
// caught up with
// {
// loader: 'ts-loader',
// options: {
// transpileOnly: true
// }
// }
]
use: [babelLoader]
});

// config.module.loaders.push({
// test: /\.(ts|js)$/,
// include: [
// path.resolve(terriaJSBasePath, 'lib'),
// path.resolve(terriaJSBasePath, 'test')
// ],
// loader: require.resolve('ts-loader')
// });

// Use the raw loader for our view HTML. We don't use the html-loader because it
// will doing things with images that we don't (currently) want.
config.module.rules.push({
Expand Down
23 changes: 0 additions & 23 deletions lib/Models/Definition/CreateModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,29 +42,6 @@ export default function CreateModel<T extends TraitsConstructor<ModelTraits>>(
readonly TraitsClass: TraitsConstructor<InstanceType<T>> = Traits as any;
readonly strata: Map<string, StratumTraits>;

/**
* Babel transpiles this & correctly assigns undefined to this property as
* under `proposal-class-fields` declaring a property without initialising
* it still declares it, thus treated as
*
* `sourceReference = undefined;`
* >This differs a bit from certain transpiler implementations, which would
* >just entirely ignore a field declaration which has no initializer.
*
* instead of what we had expected with TypeScript's treatment of this class
* property being:
* `readonly sourceReference: BaseModel | undefined;`
*
* whereas ts-loader strips the type completely along with the implicit
* undefined assignment getting removed entirely before it hits
* babel-loader, side-stepping this case.
*
* Given we don't actually do anything different to the main constructor
* call in `BaseModel`, it feels more correct to remove this annotation
* rather than declare it here + re-assigning it in the `Model` constructor
*/
// readonly sourceReference: BaseModel | undefined;

/**
* Gets the uniqueIds of models that are known to contain this one.
* This is important because strata sometimes flow from container to
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@
"terriajs-tiff-imagery-provider": "2.13.3",
"thredds-catalog-crawler": "0.0.7",
"ts-essentials": "^5.0.0",
"ts-loader": "^5.3.3",
"typescript": "~5.2.0",
"urijs": "^1.18.12",
"url-loader": "^1.1.2",
Expand Down
15 changes: 2 additions & 13 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5288,7 +5288,7 @@ engine.io@~6.5.2:
engine.io-parser "~5.2.1"
ws "~8.11.0"

enhanced-resolve@^4.0.0, enhanced-resolve@^4.5.0:
enhanced-resolve@^4.5.0:
version "4.5.0"
resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-4.5.0.tgz#2f3cfd84dbe3b487f18f2db2ef1e064a571ca5ec"
integrity sha512-Nv9m36S/vxpsI+Hc4/ZGRs0n9mXqSWGGq49zxb/cJfPAQMbUtttJAlNPS4AQzaBdw/pKskw5bMbekT/Y7W/Wlg==
Expand Down Expand Up @@ -11011,7 +11011,7 @@ semver-greatest-satisfied-range@^1.1.0:
dependencies:
sver-compat "^1.5.0"

"semver@2 || 3 || 4 || 5", semver@^5.0.1, semver@^5.3.0, semver@^5.5.0, semver@^5.6.0:
"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.5.0, semver@^5.6.0:
version "5.7.1"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7"
integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==
Expand Down Expand Up @@ -12210,17 +12210,6 @@ ts-essentials@^5.0.0:
resolved "https://registry.yarnpkg.com/ts-essentials/-/ts-essentials-5.0.0.tgz#531d590c9cd62652c9d96284904cbdb2a1dd5ca8"
integrity sha512-ftKWOm6Jq+/UCBekDfxUjLODEd5XGN2EM/+TIQV9LJ5xSV12je4GqdRyv7pXXGGYmEt/nQa6F00xTWYJ5PMjIQ==

ts-loader@^5.3.3:
version "5.4.5"
resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-5.4.5.tgz#a0c1f034b017a9344cef0961bfd97cc192492b8b"
integrity sha512-XYsjfnRQCBum9AMRZpk2rTYSVpdZBpZK+kDh0TeT3kxmQNBDVIeUjdPjY5RZry4eIAb8XHc4gYSUiUWPYvzSRw==
dependencies:
chalk "^2.3.0"
enhanced-resolve "^4.0.0"
loader-utils "^1.0.2"
micromatch "^3.1.4"
semver "^5.0.1"

ts-toolbelt@^6.4.2:
version "6.15.5"
resolved "https://registry.yarnpkg.com/ts-toolbelt/-/ts-toolbelt-6.15.5.tgz#cb3b43ed725cb63644782c64fbcad7d8f28c0a83"
Expand Down

0 comments on commit a824bc4

Please sign in to comment.