This is an automated email from the ASF dual-hosted git repository.
thiagohp pushed a commit to branch feature/coffeescript-to-typescript
in repository https://gitbox.apache.org/repos/asf/tapestry-5.git
The following commit(s) were added to
refs/heads/feature/coffeescript-to-typescript by this push:
new fc6b151a4 TAP5-2804: bunch of small adjustments
fc6b151a4 is described below
commit fc6b151a49293862707643a2da777f2a7c3a267d
Author: Thiago H. de Paula Figueiredo <[email protected]>
AuthorDate: Sat Apr 26 15:27:46 2025 -0300
TAP5-2804: bunch of small adjustments
---
5_10_RELEASE_NOTES.md | 7 +++++++
.../main/resources/META-INF/assets/es-modules/t5/.gitignore | 2 ++
.../assets/es-modules/t5/core/beanvalidator/.gitignore | 1 -
.../META-INF/assets/es-modules/t5/core/core/.gitignore | 1 -
.../resources/META-INF/assets/es-modules/t5/underscore.js | 5 +++++
.../src/main/resources/META-INF/modules/t5/.gitignore | 2 ++
.../META-INF/modules/t5/core/beanvalidator/.gitignore | 1 -
.../main/resources/META-INF/modules/t5/core/core/.gitignore | 1 -
.../src/main/resources/org/apache/tapestry5/core.properties | 2 +-
tapestry-core/src/main/typescript/package-lock.json | 9 +--------
tapestry-core/src/main/typescript/package.json | 10 ++++++----
.../src/t5/beanvalidator/beanvalidator-validation.ts | 2 +-
tapestry-core/src/main/typescript/src/t5/core/ajax.ts | 8 ++++----
.../src/main/typescript/src/t5/core/ajaxformloop.ts | 8 ++++----
tapestry-core/src/main/typescript/src/t5/core/alert.ts | 12 ++++++------
.../src/main/typescript/src/t5/core/autocomplete.ts | 6 +++---
tapestry-core/src/main/typescript/src/t5/core/console.ts | 6 +++---
tapestry-core/src/main/typescript/src/t5/core/datefield.ts | 12 ++++++------
tapestry-core/src/main/typescript/src/t5/core/dom.ts | 2 +-
.../src/main/typescript/src/t5/core/exception-display.ts | 4 ++--
.../src/main/typescript/src/t5/core/exception-frame.ts | 4 ++--
tapestry-core/src/main/typescript/src/t5/core/fields.ts | 10 +++++-----
.../src/main/typescript/src/t5/core/form-fragment.ts | 8 ++++----
tapestry-core/src/main/typescript/src/t5/core/forms.ts | 6 +++---
tapestry-core/src/main/typescript/src/t5/core/init.ts | 2 +-
tapestry-core/src/main/typescript/src/t5/core/localdate.ts | 2 +-
tapestry-core/src/main/typescript/src/t5/core/messages.ts | 2 +-
tapestry-core/src/main/typescript/src/t5/core/pageinit.ts | 6 +++---
tapestry-core/src/main/typescript/src/t5/core/palette.ts | 6 +++---
tapestry-core/src/main/typescript/src/t5/core/select.ts | 6 +++---
.../src/main/typescript/src/t5/core/t5-core-dom-jquery.ts | 6 +++---
.../src/main/typescript/src/t5/core/t5-core-dom-prototype.ts | 6 +++---
.../src/main/typescript/src/t5/core/time-interval.ts | 4 ++--
tapestry-core/src/main/typescript/src/t5/core/tree.ts | 4 ++--
tapestry-core/src/main/typescript/src/t5/core/validation.ts | 8 ++++----
.../src/main/typescript/src/t5/core/zone-refresh.ts | 6 +++---
tapestry-core/src/main/typescript/src/t5/core/zone.ts | 10 +++++-----
tapestry-core/src/main/typescript/tsconfig.json | 5 ++++-
38 files changed, 106 insertions(+), 96 deletions(-)
diff --git a/5_10_RELEASE_NOTES.md b/5_10_RELEASE_NOTES.md
index e7d1c36da..0bc1af18a 100644
--- a/5_10_RELEASE_NOTES.md
+++ b/5_10_RELEASE_NOTES.md
@@ -20,5 +20,12 @@ Scratch pad for changes destined for the 5.10.0 release
notes page.
# Non-backward-compatible changes (but that probably won't cause problems)
+# Non-backward-compatible changes
+
+Using Require.js and AMD modules, modules that used to return a function
+now return an object with a `default` property with the function.
+This is a consequence we couldn't avoid from the CoffeeScript
+to JavaScript to TypeScript conversion.
+
# Overall notes
diff --git
a/tapestry-core/src/main/resources/META-INF/assets/es-modules/t5/.gitignore
b/tapestry-core/src/main/resources/META-INF/assets/es-modules/t5/.gitignore
new file mode 100644
index 000000000..0c3030243
--- /dev/null
+++ b/tapestry-core/src/main/resources/META-INF/assets/es-modules/t5/.gitignore
@@ -0,0 +1,2 @@
+beanvalidator/*.js
+core/*.js
\ No newline at end of file
diff --git
a/tapestry-core/src/main/resources/META-INF/assets/es-modules/t5/core/beanvalidator/.gitignore
b/tapestry-core/src/main/resources/META-INF/assets/es-modules/t5/core/beanvalidator/.gitignore
deleted file mode 100644
index 343d521e6..000000000
---
a/tapestry-core/src/main/resources/META-INF/assets/es-modules/t5/core/beanvalidator/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/*.js
\ No newline at end of file
diff --git
a/tapestry-core/src/main/resources/META-INF/assets/es-modules/t5/core/core/.gitignore
b/tapestry-core/src/main/resources/META-INF/assets/es-modules/t5/core/core/.gitignore
deleted file mode 100644
index 343d521e6..000000000
---
a/tapestry-core/src/main/resources/META-INF/assets/es-modules/t5/core/core/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/*.js
\ No newline at end of file
diff --git
a/tapestry-core/src/main/resources/META-INF/assets/es-modules/t5/underscore.js
b/tapestry-core/src/main/resources/META-INF/assets/es-modules/t5/underscore.js
new file mode 100644
index 000000000..dd5899219
--- /dev/null
+++
b/tapestry-core/src/main/resources/META-INF/assets/es-modules/t5/underscore.js
@@ -0,0 +1,5 @@
+// Underscore.js 1.13.7
+// https://underscorejs.org
+// (c) 2009-2024 Jeremy Ashkenas, Julian Gonggrijp, and DocumentCloud and
Investigative Reporters & Editors
+// Underscore may be freely distributed under the MIT license.
+var VERSION="1.13.7",root="object"==typeof
self&&self.self===self&&self||"object"==typeof
global&&global.global===global&&global||Function("return
this")()||{},ArrayProto=Array.prototype,ObjProto=Object.prototype,SymbolProto="undefined"!=typeof
Symbol?Symbol.prototype:null,push=ArrayProto.push,slice=ArrayProto.slice,toString=ObjProto.toString,hasOwnProperty=ObjProto.hasOwnProperty,supportsArrayBuffer="undefined"!=typeof
ArrayBuffer,supportsDataView="undefined"!=typeof DataView,nativeIsAr [...]
\ No newline at end of file
diff --git a/tapestry-core/src/main/resources/META-INF/modules/t5/.gitignore
b/tapestry-core/src/main/resources/META-INF/modules/t5/.gitignore
new file mode 100644
index 000000000..0c3030243
--- /dev/null
+++ b/tapestry-core/src/main/resources/META-INF/modules/t5/.gitignore
@@ -0,0 +1,2 @@
+beanvalidator/*.js
+core/*.js
\ No newline at end of file
diff --git
a/tapestry-core/src/main/resources/META-INF/modules/t5/core/beanvalidator/.gitignore
b/tapestry-core/src/main/resources/META-INF/modules/t5/core/beanvalidator/.gitignore
deleted file mode 100644
index 343d521e6..000000000
---
a/tapestry-core/src/main/resources/META-INF/modules/t5/core/beanvalidator/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/*.js
\ No newline at end of file
diff --git
a/tapestry-core/src/main/resources/META-INF/modules/t5/core/core/.gitignore
b/tapestry-core/src/main/resources/META-INF/modules/t5/core/core/.gitignore
deleted file mode 100644
index 343d521e6..000000000
--- a/tapestry-core/src/main/resources/META-INF/modules/t5/core/core/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/*.js
\ No newline at end of file
diff --git
a/tapestry-core/src/main/resources/org/apache/tapestry5/core.properties
b/tapestry-core/src/main/resources/org/apache/tapestry5/core.properties
index bda821d34..b699ea072 100644
--- a/tapestry-core/src/main/resources/org/apache/tapestry5/core.properties
+++ b/tapestry-core/src/main/resources/org/apache/tapestry5/core.properties
@@ -118,7 +118,7 @@ core-datefield-none=None
private-no-validation-for-field=placeholder message
private-core-page-initialization-template=\
-require(["t5/core/pageinit"], function(pi) { pi(%s, %s); });
+require(["t5/core/pageinit"], function(pi) { pi.default(%s, %s); });
# BeanEditForm default className parameter default:
private-core-components.beaneditform.class=well
diff --git a/tapestry-core/src/main/typescript/package-lock.json
b/tapestry-core/src/main/typescript/package-lock.json
index 3b3b44d48..5259a5fbb 100644
--- a/tapestry-core/src/main/typescript/package-lock.json
+++ b/tapestry-core/src/main/typescript/package-lock.json
@@ -12,8 +12,7 @@
"@types/underscore": "^1.13.0",
"moment": "^2.30.1",
"typedoc": "^0.28.1",
- "typescript": "^5.0.0",
- "underscore": "^1.13.7"
+ "typescript": "^5.0.0"
}
},
"node_modules/@gerrit0/mini-shiki": {
@@ -382,12 +381,6 @@
"integrity":
"sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==",
"dev": true
},
- "node_modules/underscore": {
- "version": "1.13.7",
- "resolved":
"https://registry.npmjs.org/underscore/-/underscore-1.13.7.tgz",
- "integrity":
"sha512-GMXzWtsc57XAtguZgaQViUOzs0KTkk8ojr3/xAxXLITqf/3EMwxC0inyETfDFjH/Krbhuep0HNbbjI9i/q3F3g==",
- "dev": true
- },
"node_modules/wrap-ansi": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
diff --git a/tapestry-core/src/main/typescript/package.json
b/tapestry-core/src/main/typescript/package.json
index 265a1a6bd..559028228 100644
--- a/tapestry-core/src/main/typescript/package.json
+++ b/tapestry-core/src/main/typescript/package.json
@@ -3,18 +3,20 @@
"devDependencies": {
"@hpcc-js/wasm": "^2.22.4",
"@types/jquery": "^1.10.45",
- "@types/underscore": "^1.13.0",
"typedoc": "^0.28.1",
"typescript": "^5.0.0",
"moment": "^2.30.1",
- "underscore": "^1.13.7"
+ "@types/underscore": "^1.13.0"
},
"dependencies": {
},
"scripts": {
"build": "npm run build-es-module; npm run build-amd",
- "build-es-module": "npx tsc --outDir
../resources/META-INF/assets/es-modules/t5/core/",
- "build-amd": "npx tsc --module amd --outDir
../resources/META-INF/modules/t5/core/",
+ "build-es-module": "npx tsc --outDir
../resources/META-INF/assets/es-modules/t5/",
+ "build-amd": "npx tsc --module amd --outDir
../resources/META-INF/modules/t5/",
+ "clean-amd": "rm -rf ../resources/META-INF/modules/t5/core/*; rm -rf
../resources/META-INF/modules/t5/beanvalidation/*;",
+ "clean-es-module": "rm -rf
../resources/META-INF/assets/es-modules/t5/core/*;
../resources/META-INF/assets/es-modules/t5/beanvalidation/*",
+ "clean": "npm run clean-amd; npm run clean-es-module",
"docs": "typedoc",
"clean-docs": "rm -rf docs"
},
diff --git
a/tapestry-core/src/main/typescript/src/t5/beanvalidator/beanvalidator-validation.ts
b/tapestry-core/src/main/typescript/src/t5/beanvalidator/beanvalidator-validation.ts
index 5396188d3..3b90ed085 100644
---
a/tapestry-core/src/main/typescript/src/t5/beanvalidator/beanvalidator-validation.ts
+++
b/tapestry-core/src/main/typescript/src/t5/beanvalidator/beanvalidator-validation.ts
@@ -25,7 +25,7 @@ import _ from "underscore";
import dom from "t5/core/dom.js"
import events from "t5/core/events.js"
import utils from "t5/core/utils.js"
-import validation from "t5/core/validation.js";
+import validation from "t5/core/validation";
// @ts-ignore
const rangeValue = function(element, attribute, defaultValue) {
diff --git a/tapestry-core/src/main/typescript/src/t5/core/ajax.ts
b/tapestry-core/src/main/typescript/src/t5/core/ajax.ts
index c1ed666b1..4bc540abb 100644
--- a/tapestry-core/src/main/typescript/src/t5/core/ajax.ts
+++ b/tapestry-core/src/main/typescript/src/t5/core/ajax.ts
@@ -34,10 +34,10 @@
* `t5/core/exception-frame` module to display a server-side processing
exception.
* @packageDocumentation
*/
-import pageinit from "t5/core/pageinit.js";
-import dom from "t5/core/dom.js";
-import exceptionframe from "t5/core/exception-frame.js";
-import console from "t5/core/console.js";
+import pageinit from "t5/core/pageinit";
+import dom from "t5/core/dom";
+import exceptionframe from "t5/core/exception-frame";
+import console from "t5/core/console";
import _ from "underscore";
export default function(url: string, options?: any) {
diff --git a/tapestry-core/src/main/typescript/src/t5/core/ajaxformloop.ts
b/tapestry-core/src/main/typescript/src/t5/core/ajaxformloop.ts
index eb366a568..a4dbef2bc 100644
--- a/tapestry-core/src/main/typescript/src/t5/core/ajaxformloop.ts
+++ b/tapestry-core/src/main/typescript/src/t5/core/ajaxformloop.ts
@@ -19,11 +19,11 @@
* core/RemoveRowLink).
* @packageDocumentation
*/
-import dom from "t5/core/dom.js";
-import events from "t5/core/events.js";
+import dom from "t5/core/dom";
+import events from "t5/core/events";
import console from "t5/core/console.js"
-import ajax from "t5/core/ajax.js";
-import { ElementWrapper, ResponseWrapper } from "t5/core/types.js";
+import ajax from "t5/core/ajax";
+import { ElementWrapper, ResponseWrapper } from "t5/core/types";
// "afl" is short for "AjaxFormLoop".
const AFL_SELECTOR = "[data-container-type='core/AjaxFormLoop']";
diff --git a/tapestry-core/src/main/typescript/src/t5/core/alert.ts
b/tapestry-core/src/main/typescript/src/t5/core/alert.ts
index b226f708e..0ee77c18b 100644
--- a/tapestry-core/src/main/typescript/src/t5/core/alert.ts
+++ b/tapestry-core/src/main/typescript/src/t5/core/alert.ts
@@ -18,13 +18,13 @@
* Support for the core/Alerts components.
* @packageDocumentation
*/
-import dom from "t5/core/dom.js";
-import console from "t5/core/console.js";
-import messages from "t5/core/messages.js";
-import ajax from "t5/core/ajax.js";
-import { ElementWrapper } from "t5/core/types.js";
+import dom from "t5/core/dom";
+import console from "t5/core/console";
+import messages from "t5/core/messages";
+import ajax from "t5/core/ajax";
+import { ElementWrapper } from "t5/core/types";
import _ from "underscore";
-import bootstrap from "t5/core/bootstrap.js";
+import bootstrap from "t5/core/bootstrap";
const TRANSIENT_DURATION = 5000;
let exports_;
diff --git a/tapestry-core/src/main/typescript/src/t5/core/autocomplete.ts
b/tapestry-core/src/main/typescript/src/t5/core/autocomplete.ts
index 0fed1bea0..39fcedf88 100644
--- a/tapestry-core/src/main/typescript/src/t5/core/autocomplete.ts
+++ b/tapestry-core/src/main/typescript/src/t5/core/autocomplete.ts
@@ -19,11 +19,11 @@
* the Twitter autocomplete.js library.
* @packageDocumentation
*/
-import dom from "t5/core/dom.js";
+import dom from "t5/core/dom";
import underscore from "underscore";
import $ from "jquery"
-import utils from "t5/core/utils.js";
-import "t5/core/typeahead.js";
+import utils from "t5/core/utils";
+import "t5/core/typeahead";
export const init = function(spec) {
const $field = $(document.getElementById(spec.id));
diff --git a/tapestry-core/src/main/typescript/src/t5/core/console.ts
b/tapestry-core/src/main/typescript/src/t5/core/console.ts
index adade32e6..cd06c11ad 100644
--- a/tapestry-core/src/main/typescript/src/t5/core/console.ts
+++ b/tapestry-core/src/main/typescript/src/t5/core/console.ts
@@ -16,10 +16,10 @@
* A wrapper around the native console, when it exists.
* @packageDocumentation
*/
-import dom from "t5/core/dom.js";
+import dom from "t5/core/dom";
import _ from "underscore";
-import bootstrap from "t5/core/bootstrap.js";
-import { ElementWrapper } from "t5/core/types.js";
+import bootstrap from "t5/core/bootstrap";
+import { ElementWrapper } from "t5/core/types";
let e;
let nativeConsole = null;
diff --git a/tapestry-core/src/main/typescript/src/t5/core/datefield.ts
b/tapestry-core/src/main/typescript/src/t5/core/datefield.ts
index 8bd01cf58..93b982f7c 100644
--- a/tapestry-core/src/main/typescript/src/t5/core/datefield.ts
+++ b/tapestry-core/src/main/typescript/src/t5/core/datefield.ts
@@ -18,14 +18,14 @@
* Provides support for the `core/DateField` component.
* @packageDocumentation
*/
-import dom from "t5/core/dom.js";
-import events from "t5/core/events.js";
-import messages from "t5/core/messages.js";
-import ajax from "t5/core/ajax.js";
+import dom from "t5/core/dom";
+import events from "t5/core/events";
+import messages from "t5/core/messages";
+import ajax from "t5/core/ajax";
import _ from "underscore";
-import DatePicker from "t5/core/datepicker.js";
+import DatePicker from "t5/core/datepicker";
import "t5/core/fields";
-import { ElementWrapper, EventWrapper, ResponseWrapper } from
"t5/core/types.js";
+import { ElementWrapper, EventWrapper, ResponseWrapper } from "t5/core/types";
// Translate from the provided order (SUNDAY = 0, MONDAY = 1), to
// the order needed by the DatePicker component (MONDAY = 0 ... SUNDAY = 6)
diff --git a/tapestry-core/src/main/typescript/src/t5/core/dom.ts
b/tapestry-core/src/main/typescript/src/t5/core/dom.ts
index 7124e5ada..b954df0eb 100644
--- a/tapestry-core/src/main/typescript/src/t5/core/dom.ts
+++ b/tapestry-core/src/main/typescript/src/t5/core/dom.ts
@@ -16,7 +16,7 @@
* will be chosen by Tapestry at runtime according to configuration.
* @packageDocumentation
*/
-import type { ElementWrapper, EventWrapper, RequestWrapper, ResponseWrapper,
DOM, AjaxRequestOptions, OnEventHandler, AddableContent, ElementOffset } from
"t5/core/types.js";
+import type { ElementWrapper, EventWrapper, RequestWrapper, ResponseWrapper,
DOM, AjaxRequestOptions, OnEventHandler, AddableContent, ElementOffset } from
"t5/core/types";
const f = function(element: HTMLElement | string): ElementWrapper | null {
throw new Error("Function not implemented");
diff --git a/tapestry-core/src/main/typescript/src/t5/core/exception-display.ts
b/tapestry-core/src/main/typescript/src/t5/core/exception-display.ts
index 0a6685e59..2a5ba75b5 100644
--- a/tapestry-core/src/main/typescript/src/t5/core/exception-display.ts
+++ b/tapestry-core/src/main/typescript/src/t5/core/exception-display.ts
@@ -19,8 +19,8 @@
* filtering the stack trace.
* @packageDocumentation
*/
-import dom from "t5/core/dom.js";
-import { ElementWrapper } from "t5/core/types.js";
+import dom from "t5/core/dom";
+import { ElementWrapper } from "t5/core/types";
dom.onDocument("click", "[data-behavior=stack-trace-filter-toggle]",
function(element: ElementWrapper) {
const checked = element.checked();
diff --git a/tapestry-core/src/main/typescript/src/t5/core/exception-frame.ts
b/tapestry-core/src/main/typescript/src/t5/core/exception-frame.ts
index 971dda1ca..eb6e961b3 100644
--- a/tapestry-core/src/main/typescript/src/t5/core/exception-frame.ts
+++ b/tapestry-core/src/main/typescript/src/t5/core/exception-frame.ts
@@ -22,8 +22,8 @@
* was expected, including a partial page render response).
* @packageDocumentation
*/
-import dom from "t5/core/dom.js";
-import { AddableContent, ElementWrapper } from "t5/core/types.js";
+import dom from "t5/core/dom";
+import { AddableContent, ElementWrapper } from "t5/core/types";
const write = function(container: ElementWrapper, content: AddableContent) {
const iframe = (container.findFirst("iframe"))!.element as HTMLIFrameElement;
diff --git a/tapestry-core/src/main/typescript/src/t5/core/fields.ts
b/tapestry-core/src/main/typescript/src/t5/core/fields.ts
index 52bca7e48..e6d33c157 100644
--- a/tapestry-core/src/main/typescript/src/t5/core/fields.ts
+++ b/tapestry-core/src/main/typescript/src/t5/core/fields.ts
@@ -21,11 +21,11 @@
*/
import _ from "underscore"
-import events from "t5/core/events.js";
-import dom from "t5/core/dom.js";
-import utils from "t5/core/utils.js";
-import forms from "t5/core/forms.js";
-import { ElementWrapper, EventWrapper } from "./types.js";
+import events from "t5/core/events";
+import dom from "t5/core/dom";
+import utils from "t5/core/utils";
+import forms from "t5/core/forms";
+import { ElementWrapper, EventWrapper }from "t5/core/types";
let exports_;
const ensureFieldId = function(field: ElementWrapper): string {
diff --git a/tapestry-core/src/main/typescript/src/t5/core/form-fragment.ts
b/tapestry-core/src/main/typescript/src/t5/core/form-fragment.ts
index d8f5249dc..164de1f31 100644
--- a/tapestry-core/src/main/typescript/src/t5/core/form-fragment.ts
+++ b/tapestry-core/src/main/typescript/src/t5/core/form-fragment.ts
@@ -18,10 +18,10 @@
* @packageDocumentation
*/
import _ from "underscore";
-import dom from "t5/core/dom.js";
-import events from "t5/core/events.js";
-import forms from "t5/core/forms.js";
-import { ElementWrapper, EventWrapper } from "./types.js";
+import dom from "t5/core/dom";
+import events from "t5/core/events";
+import forms from "t5/core/forms";
+import { ElementWrapper, EventWrapper }from "t5/core/types";
const SELECTOR = "[data-component-type='core/FormFragment']";
diff --git a/tapestry-core/src/main/typescript/src/t5/core/forms.ts
b/tapestry-core/src/main/typescript/src/t5/core/forms.ts
index 81ee3df62..f9eeb3d1b 100644
--- a/tapestry-core/src/main/typescript/src/t5/core/forms.ts
+++ b/tapestry-core/src/main/typescript/src/t5/core/forms.ts
@@ -18,10 +18,10 @@
* Defines handlers for HTML forms and HTML field elements, specifically to
control input validation.
* @packageDocumentation
*/
-import events from "t5/core/events.js";
-import dom from "t5/core/dom.js";
+import events from "t5/core/events";
+import dom from "t5/core/dom";
import _ from "underscore";
-import { ElementWrapper } from "./types.js";
+import { ElementWrapper }from "t5/core/types";
// Meta-data name that indicates the next submission should skip validation
(typically, because
// the form was submitted by a "cancel" button).
diff --git a/tapestry-core/src/main/typescript/src/t5/core/init.ts
b/tapestry-core/src/main/typescript/src/t5/core/init.ts
index a21ae45af..7ddc685c8 100644
--- a/tapestry-core/src/main/typescript/src/t5/core/init.ts
+++ b/tapestry-core/src/main/typescript/src/t5/core/init.ts
@@ -24,7 +24,7 @@
* Introduced in 5.4, to be removed at some point in the future, when
T5.initializers is itself no more.
* @packageDocumentation
*/
-import console from "t5/core/console.js";
+import console from "t5/core/console";
export default (console: { error: (arg0: string) => any; }) => // Exports a
single function that finds an initializer in `T5.initializers` and invokes it.
function(initName: string | number, ...args: any) {
diff --git a/tapestry-core/src/main/typescript/src/t5/core/localdate.ts
b/tapestry-core/src/main/typescript/src/t5/core/localdate.ts
index 572558737..2dffeafae 100644
--- a/tapestry-core/src/main/typescript/src/t5/core/localdate.ts
+++ b/tapestry-core/src/main/typescript/src/t5/core/localdate.ts
@@ -25,7 +25,7 @@
* @packageDocumentation
*/
import dom from "t5/core/dom.js"
-import moment from "t5/core/moment.js";
+import moment from "t5/core/moment";
const ATTR = "data-localdate-format";
diff --git a/tapestry-core/src/main/typescript/src/t5/core/messages.ts
b/tapestry-core/src/main/typescript/src/t5/core/messages.ts
index acbbe7d64..3662c61fe 100644
--- a/tapestry-core/src/main/typescript/src/t5/core/messages.ts
+++ b/tapestry-core/src/main/typescript/src/t5/core/messages.ts
@@ -35,7 +35,7 @@
*/
import _ from "underscore";
-import console from "t5/core/console.js";
+import console from "t5/core/console";
// In the unexpected case that the data-locale attribute is missing, assume
English
const locale = (document.documentElement.getAttribute("data-locale")) || "en";
diff --git a/tapestry-core/src/main/typescript/src/t5/core/pageinit.ts
b/tapestry-core/src/main/typescript/src/t5/core/pageinit.ts
index 1531f4f35..769545cb0 100644
--- a/tapestry-core/src/main/typescript/src/t5/core/pageinit.ts
+++ b/tapestry-core/src/main/typescript/src/t5/core/pageinit.ts
@@ -23,9 +23,9 @@
*/
import _ from "underscore";
-import console from "t5/core/console.js";
-import dom from "t5/core/dom.js";
-import events from "t5/core/events.js";
+import console from "t5/core/console";
+import dom from "t5/core/dom";
+import events from "t5/core/events";
let exports_: any;
let pathPrefix: String | null = null;
diff --git a/tapestry-core/src/main/typescript/src/t5/core/palette.ts
b/tapestry-core/src/main/typescript/src/t5/core/palette.ts
index ad3a24675..aeccf2c00 100644
--- a/tapestry-core/src/main/typescript/src/t5/core/palette.ts
+++ b/tapestry-core/src/main/typescript/src/t5/core/palette.ts
@@ -18,10 +18,10 @@
* Support for the `core/Palette` component.
* @packageDocumentation
*/
-import dom from "t5/core/dom.js";
+import dom from "t5/core/dom";
import _ from "underscore";
-import events from "t5/core/events.js";
-import { ElementWrapper } from "./types.js";
+import events from "t5/core/events";
+import { ElementWrapper }from "t5/core/types";
const isSelected = (option: any) => option.selected;
diff --git a/tapestry-core/src/main/typescript/src/t5/core/select.ts
b/tapestry-core/src/main/typescript/src/t5/core/select.ts
index 8f3f2e3ec..88eaea104 100644
--- a/tapestry-core/src/main/typescript/src/t5/core/select.ts
+++ b/tapestry-core/src/main/typescript/src/t5/core/select.ts
@@ -18,9 +18,9 @@
* @packageDocumentation
*/
-import events from "t5/core/events.js";
-import dom from "t5/core/dom.js";
-import zone from "t5/core/zone.js";
+import events from "t5/core/events";
+import dom from "t5/core/dom";
+import zone from "t5/core/zone";
dom.onDocument("change", "select[data-update-zone]", function() {
diff --git
a/tapestry-core/src/main/typescript/src/t5/core/t5-core-dom-jquery.ts
b/tapestry-core/src/main/typescript/src/t5/core/t5-core-dom-jquery.ts
index 09f3d8f0e..ed0d721ce 100644
--- a/tapestry-core/src/main/typescript/src/t5/core/t5-core-dom-jquery.ts
+++ b/tapestry-core/src/main/typescript/src/t5/core/t5-core-dom-jquery.ts
@@ -10,10 +10,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-import type { ElementWrapper, EventWrapper, RequestWrapper, ResponseWrapper,
ElementOffset, DOM, AddableContent, OnEventHandler, AjaxRequestOptions } from
"t5/core/types.js";
+import type { ElementWrapper, EventWrapper, RequestWrapper, ResponseWrapper,
ElementOffset, DOM, AddableContent, OnEventHandler, AjaxRequestOptions } from
"t5/core/types";
import _ from "underscore";
-import "t5/core/utils.js";
-import events from "t5/core/events.js";
+import "t5/core/utils";
+import events from "t5/core/events";
import $ from "jquery";
const convertContent = function(content: AddableContent) {
diff --git
a/tapestry-core/src/main/typescript/src/t5/core/t5-core-dom-prototype.ts
b/tapestry-core/src/main/typescript/src/t5/core/t5-core-dom-prototype.ts
index 9c0b9572e..dde6ce2b9 100644
--- a/tapestry-core/src/main/typescript/src/t5/core/t5-core-dom-prototype.ts
+++ b/tapestry-core/src/main/typescript/src/t5/core/t5-core-dom-prototype.ts
@@ -10,10 +10,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-import type { ElementWrapper, EventWrapper, RequestWrapper, ResponseWrapper,
ElementOffset, DOM, AddableContent, OnEventHandler, AjaxRequestOptions } from
"t5/core/types.js";
+import type { ElementWrapper, EventWrapper, RequestWrapper, ResponseWrapper,
ElementOffset, DOM, AddableContent, OnEventHandler, AjaxRequestOptions } from
"t5/core/types";
import _ from "underscore";
-import utils from "t5/core/utils.js";
-import events from "t5/core/events.js";
+import utils from "t5/core/utils";
+import events from "t5/core/events";
// @ts-ignore
const $ = window.$ as (element: string | HTMLElement) => HTMLElement | null;
diff --git a/tapestry-core/src/main/typescript/src/t5/core/time-interval.ts
b/tapestry-core/src/main/typescript/src/t5/core/time-interval.ts
index 059d57b20..205d90d46 100644
--- a/tapestry-core/src/main/typescript/src/t5/core/time-interval.ts
+++ b/tapestry-core/src/main/typescript/src/t5/core/time-interval.ts
@@ -20,8 +20,8 @@
* @packageDocumentation
*/
-import dom from "t5/core/dom.js";
-import moment from "t5/core/moment.js";
+import dom from "t5/core/dom";
+import moment from "t5/core/moment";
const ATTR = "data-timeinterval";
diff --git a/tapestry-core/src/main/typescript/src/t5/core/tree.ts
b/tapestry-core/src/main/typescript/src/t5/core/tree.ts
index 485919e64..07450fdfe 100644
--- a/tapestry-core/src/main/typescript/src/t5/core/tree.ts
+++ b/tapestry-core/src/main/typescript/src/t5/core/tree.ts
@@ -19,8 +19,8 @@
* @packageDocumentation
*/
-import dom from "t5/core/dom.js";
-import ajax from "t5/core/ajax.js";
+import dom from "t5/core/dom";
+import ajax from "t5/core/ajax";
import "t5/core/zone";
const TREE = "[data-component-type='core/Tree']";
diff --git a/tapestry-core/src/main/typescript/src/t5/core/validation.ts
b/tapestry-core/src/main/typescript/src/t5/core/validation.ts
index d2fb73c2b..dd8c71b69 100644
--- a/tapestry-core/src/main/typescript/src/t5/core/validation.ts
+++ b/tapestry-core/src/main/typescript/src/t5/core/validation.ts
@@ -24,11 +24,11 @@
*/
import _ from "underscore";
-import dom from "t5/core/dom.js";
-import events from "t5/core/events.js";
-import utils from "t5/core/utils.js";
+import dom from "t5/core/dom";
+import events from "t5/core/events";
+import utils from "t5/core/utils";
import messages from "t5/core/messages.js"
-import { ElementWrapper } from "./types.js";
+import { ElementWrapper }from "t5/core/types";
const REGEXP_META = "t5:regular-expression";
diff --git a/tapestry-core/src/main/typescript/src/t5/core/zone-refresh.ts
b/tapestry-core/src/main/typescript/src/t5/core/zone-refresh.ts
index d8d458cc3..00a3905d1 100644
--- a/tapestry-core/src/main/typescript/src/t5/core/zone-refresh.ts
+++ b/tapestry-core/src/main/typescript/src/t5/core/zone-refresh.ts
@@ -18,9 +18,9 @@
* @packageDocumentation
*/
-import events from "t5/core/events.js";
-import dom from "t5/core/dom.js";
-import console from "t5/core/console.js";
+import events from "t5/core/events";
+import dom from "t5/core/dom";
+import console from "t5/core/console";
// Initialize a timer for the zone at the specified period (in seconds). The
zone will be
// refreshed with the provided URL.
diff --git a/tapestry-core/src/main/typescript/src/t5/core/zone.ts
b/tapestry-core/src/main/typescript/src/t5/core/zone.ts
index a59f6c9aa..420f97eeb 100644
--- a/tapestry-core/src/main/typescript/src/t5/core/zone.ts
+++ b/tapestry-core/src/main/typescript/src/t5/core/zone.ts
@@ -25,12 +25,12 @@
*/
import dom from "t5/core/dom.js"
-import events from "t5/core/events.js";
-import ajax from "t5/core/ajax.js";
-import console from "t5/core/console.js";
-import forms from "t5/core/forms.js";
+import events from "t5/core/events";
+import ajax from "t5/core/ajax";
+import console from "t5/core/console";
+import forms from "t5/core/forms";
import _ from "underscore";
-import { ElementWrapper, ResponseWrapper } from "./types.js";
+import { ElementWrapper, ResponseWrapper }from "t5/core/types";
if ((typeof ajax) !== "function") {
console.error("ajax variable is not a function, but instead it is " +
JSON.stringify(ajax));
diff --git a/tapestry-core/src/main/typescript/tsconfig.json
b/tapestry-core/src/main/typescript/tsconfig.json
index 4b9f95903..2190f0d3f 100644
--- a/tapestry-core/src/main/typescript/tsconfig.json
+++ b/tapestry-core/src/main/typescript/tsconfig.json
@@ -12,7 +12,10 @@
"baseUrl": "src/",
"paths": {
- "t5/core.*": ["src/t5/core/*"],
+ "t5/core/*": ["t5/core/*", "t5/core/*.js"],
+ "underscore": [
+ "../node_modules/@types/underscore/index.d.mts"
+ ],
"https://cdn.jsdelivr.net/npm/@hpcc-js/wasm/dist/graphviz.js": [
"../node_modules/@hpcc-js/wasm/types/index.d.ts"
],