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

Remove unused ts-loader #7312

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#### next release (8.7.10)

- Remove unused ts-loader dependency.
- [The next improvement]

#### 8.7.9 - 2024-11-22
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