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
commit 4744bf365be370febbc8459d2bab3136ce9605ef Author: Thiago H. de Paula Figueiredo <thi...@arsmachina.com.br> AuthorDate: Fri Apr 18 17:24:53 2025 -0300 TAP5-2804: renaming 'exports' variable in TS sources since it causes a duplicated variable compilation error in generated AMD/Require.js modules --- tapestry-core/src/main/typescript/src/t5/core/alert.ts | 4 ++-- tapestry-core/src/main/typescript/src/t5/core/console.ts | 10 +++++----- tapestry-core/src/main/typescript/src/t5/core/dom-jquery.ts | 4 ++-- tapestry-core/src/main/typescript/src/t5/core/dom-prototype.ts | 4 ++-- tapestry-core/src/main/typescript/src/t5/core/fields.ts | 2 +- tapestry-core/src/main/typescript/src/t5/core/forms.ts | 2 +- tapestry-core/src/main/typescript/src/t5/core/pageinit.ts | 8 ++++---- tapestry-core/src/main/typescript/src/t5/core/utils.ts | 2 +- 8 files changed, 18 insertions(+), 18 deletions(-) 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 ada740b5d..b226f708e 100644 --- a/tapestry-core/src/main/typescript/src/t5/core/alert.ts +++ b/tapestry-core/src/main/typescript/src/t5/core/alert.ts @@ -27,7 +27,7 @@ import _ from "underscore"; import bootstrap from "t5/core/bootstrap.js"; const TRANSIENT_DURATION = 5000; -let exports; +let exports_; const severityToClass: { [key: string]: string } = { info: "alert-info", success: "alert-success", @@ -173,4 +173,4 @@ ${content}\ alert.TRANSIENT_DURATION = TRANSIENT_DURATION; -export default exports; +export default exports_; 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 84bdb3ef0..adade32e6 100644 --- a/tapestry-core/src/main/typescript/src/t5/core/console.ts +++ b/tapestry-core/src/main/typescript/src/t5/core/console.ts @@ -190,7 +190,7 @@ const level = (className: string, consolefn?: (m: string) => any) => (function(m const noop = function() {}; const debugEnabled = ((document.documentElement.getAttribute("data-debug-enabled")) != null); -let exports = { +let exports_ = { info: level("info", nativeConsole!.info), warn: level("warn", nativeConsole!.warn), error: level("error", nativeConsole!.error), @@ -207,14 +207,14 @@ let exports = { declare global { interface Window { - t5console: typeof exports; + t5console: typeof exports_; requirejs: any | null; } } // This is also an aid to debugging; it allows arbitrary scripts to present on the console; when using Geb // and/or Selenium, it is very useful to present debugging data right on the page. -window.t5console = exports; +window.t5console = exports_; if (window.requirejs) { window.requirejs.onError = function(err: any) { @@ -244,8 +244,8 @@ if (window.requirejs) { message += `, line ${err.columnNumber}`; } - return exports.error(message); + return exports_.error(message); }; }; -export default exports; \ No newline at end of file +export default exports_; \ No newline at end of file diff --git a/tapestry-core/src/main/typescript/src/t5/core/dom-jquery.ts b/tapestry-core/src/main/typescript/src/t5/core/dom-jquery.ts index 9c2921a8c..09f3d8f0e 100644 --- a/tapestry-core/src/main/typescript/src/t5/core/dom-jquery.ts +++ b/tapestry-core/src/main/typescript/src/t5/core/dom-jquery.ts @@ -537,6 +537,6 @@ dom.onDocument = onDocument; dom.body = body!; dom.scanner = scanner; -const exports: DOM = dom; +const exports_: DOM = dom; -export default exports; +export default exports_; diff --git a/tapestry-core/src/main/typescript/src/t5/core/dom-prototype.ts b/tapestry-core/src/main/typescript/src/t5/core/dom-prototype.ts index 254301765..9c0b9572e 100644 --- a/tapestry-core/src/main/typescript/src/t5/core/dom-prototype.ts +++ b/tapestry-core/src/main/typescript/src/t5/core/dom-prototype.ts @@ -653,6 +653,6 @@ dom.onDocument = onDocument; dom.body = body!; dom.scanner = scanner; -const exports: DOM = dom; +const exports_: DOM = dom; -export default exports; \ No newline at end of file +export default exports_; \ No newline at end of file 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 60d6739ee..52bca7e48 100644 --- a/tapestry-core/src/main/typescript/src/t5/core/fields.ts +++ b/tapestry-core/src/main/typescript/src/t5/core/fields.ts @@ -27,7 +27,7 @@ import utils from "t5/core/utils.js"; import forms from "t5/core/forms.js"; import { ElementWrapper, EventWrapper } from "./types.js"; -let exports; +let exports_; const ensureFieldId = function(field: ElementWrapper): string { let fieldId = field.attr("id"); 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 b9db93c82..81ee3df62 100644 --- a/tapestry-core/src/main/typescript/src/t5/core/forms.ts +++ b/tapestry-core/src/main/typescript/src/t5/core/forms.ts @@ -25,7 +25,7 @@ import { ElementWrapper } from "./types.js"; // Meta-data name that indicates the next submission should skip validation (typically, because // the form was submitted by a "cancel" button). -let exports; +let exports_; const SKIP_VALIDATION = "t5:skip-validation"; // Data attribute and value added to HTML forms generated by the 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 93b6a9399..1531f4f35 100644 --- a/tapestry-core/src/main/typescript/src/t5/core/pageinit.ts +++ b/tapestry-core/src/main/typescript/src/t5/core/pageinit.ts @@ -27,7 +27,7 @@ import console from "t5/core/console.js"; import dom from "t5/core/dom.js"; import events from "t5/core/events.js"; -let exports: any; +let exports_: any; let pathPrefix: String | null = null; // Borrowed from Prototype: @@ -177,7 +177,7 @@ const loadLibrariesAndInitialize = function(libraries, inits) { })); }; -export default exports = _.extend(loadLibrariesAndInitialize, { +export default exports_ = _.extend(loadLibrariesAndInitialize, { // Passed a list of initializers, executes each initializer in order. Due to asynchronous loading // of modules, the exact order in which initializer functions are invoked is not predictable. // @ts-ignore @@ -282,7 +282,7 @@ export default exports = _.extend(loadLibrariesAndInitialize, { addStylesheets(partial != null ? partial.stylesheets : undefined); // Make sure all libraries are loaded - exports.loadLibraries(partial != null ? partial.libraries : undefined, function() { + exports_.loadLibraries(partial != null ? partial.libraries : undefined, function() { // After libraries are loaded, update each zone: _(partial != null ? partial.content : undefined).each(function(...args) { @@ -300,7 +300,7 @@ export default exports = _.extend(loadLibrariesAndInitialize, { callback && callback(response); // Lastly, perform initializations from the partial page render response. - return exports.initialize(partial != null ? partial.inits : undefined); + return exports_.initialize(partial != null ? partial.inits : undefined); }); } diff --git a/tapestry-core/src/main/typescript/src/t5/core/utils.ts b/tapestry-core/src/main/typescript/src/t5/core/utils.ts index e279038a4..2b536f553 100644 --- a/tapestry-core/src/main/typescript/src/t5/core/utils.ts +++ b/tapestry-core/src/main/typescript/src/t5/core/utils.ts @@ -20,7 +20,7 @@ */ import _ from "underscore"; -let exports; +let exports_; const trim = function(input: string) { // @ts-ignore if (String.prototype.trim) {