From 3f0901e4d889c31a5c33538dc363c592413f05e2 Mon Sep 17 00:00:00 2001 From: labkey-nicka Date: Thu, 9 Jul 2026 14:56:44 -0700 Subject: [PATCH 1/6] Make LABKEY.Ajax a mutable object --- src/wrapper.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wrapper.ts b/src/wrapper.ts index b6cc2be3..5014338c 100644 --- a/src/wrapper.ts +++ b/src/wrapper.ts @@ -29,7 +29,6 @@ import * as API from './index'; declare let LABKEY: any; LABKEY.ActionURL = API.ActionURL; -LABKEY.Ajax = API.Ajax; LABKEY.App = API.App; LABKEY.Domain = API.Domain; LABKEY.Exp = API.Exp; @@ -49,6 +48,7 @@ LABKEY.Visualization = API.Visualization; // The following namespaces are extended at runtime by legacy DOM overrides. // Since we are now targeting ES2023+, we need to create writable plain objects so the overrides can mutate. +LABKEY.Ajax = Object.assign({}, API.Ajax); LABKEY.Assay = Object.assign({}, API.Assay); LABKEY.Experiment = Object.assign({}, API.Experiment); LABKEY.Query = Object.assign({}, API.Query); From 63045ffb16ea0017aaff5b60247e1c6ae9e5d809 Mon Sep 17 00:00:00 2001 From: labkey-nicka Date: Thu, 9 Jul 2026 15:05:15 -0700 Subject: [PATCH 2/6] Remove target override in UMD build --- webpack.config.js | 1 - 1 file changed, 1 deletion(-) diff --git a/webpack.config.js b/webpack.config.js index fa782998..54aeaf5a 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -57,7 +57,6 @@ const umdPackageConfig = { outDir: path.resolve(__dirname, 'dist'), declaration: true, removeComments: true, - target: 'ES6', }, onlyCompileBundledFiles: true, }, From 10912fa0364192163e76555a69d707bdae15a159 Mon Sep 17 00:00:00 2001 From: labkey-nicka Date: Thu, 9 Jul 2026 15:05:33 -0700 Subject: [PATCH 3/6] 1.52.1-fb-object-assign.0 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index a34f1fe8..901c98eb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@labkey/api", - "version": "1.52.0", + "version": "1.52.1-fb-object-assign.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@labkey/api", - "version": "1.52.0", + "version": "1.52.1-fb-object-assign.0", "license": "Apache-2.0", "devDependencies": { "@babel/core": "8.0.1", diff --git a/package.json b/package.json index 2528d3e9..656fbf1e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@labkey/api", - "version": "1.52.0", + "version": "1.52.1-fb-object-assign.0", "description": "JavaScript client API for LabKey Server", "scripts": { "build": "npm run build:dist && npm run build:docs", From ec2004235088d08515c2b6d48ce0e6ce0d93452c Mon Sep 17 00:00:00 2001 From: labkey-nicka Date: Fri, 10 Jul 2026 12:31:13 -0700 Subject: [PATCH 4/6] Emit CommonJS for global build --- src/wrapper.ts | 15 ++++++--------- webpack.config.js | 11 +++++++++++ 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/src/wrapper.ts b/src/wrapper.ts index 5014338c..8ded3311 100644 --- a/src/wrapper.ts +++ b/src/wrapper.ts @@ -29,9 +29,12 @@ import * as API from './index'; declare let LABKEY: any; LABKEY.ActionURL = API.ActionURL; +LABKEY.Ajax = API.Ajax; LABKEY.App = API.App; +LABKEY.Assay = API.Assay; LABKEY.Domain = API.Domain; LABKEY.Exp = API.Exp; +LABKEY.Experiment = API.Experiment; LABKEY.FieldKey = API.FieldKey; LABKEY.Filter = API.Filter; LABKEY.List = API.List; @@ -39,22 +42,16 @@ LABKEY.Message = API.Message; LABKEY.MultiRequest = API.MultiRequest; LABKEY.ParticipantGroup = API.ParticipantGroup; LABKEY.Pipeline = API.Pipeline; +LABKEY.Query = API.Query; LABKEY.QueryKey = API.QueryKey; LABKEY.Report = API.Report; LABKEY.SchemaKey = API.SchemaKey; +LABKEY.Security = API.Security; LABKEY.Specimen = API.Specimen; LABKEY.Storage = API.Storage; +LABKEY.Utils = API.Utils; LABKEY.Visualization = API.Visualization; -// The following namespaces are extended at runtime by legacy DOM overrides. -// Since we are now targeting ES2023+, we need to create writable plain objects so the overrides can mutate. -LABKEY.Ajax = Object.assign({}, API.Ajax); -LABKEY.Assay = Object.assign({}, API.Assay); -LABKEY.Experiment = Object.assign({}, API.Experiment); -LABKEY.Query = Object.assign({}, API.Query); -LABKEY.Security = Object.assign({}, API.Security); -LABKEY.Utils = Object.assign({}, API.Utils); - LABKEY.__package__ = __package__; // The app registry needs to be initialized after the namespace has been established. diff --git a/webpack.config.js b/webpack.config.js index 54aeaf5a..30375df4 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -24,11 +24,22 @@ const apiGlobalConfig = { loader: 'ts-loader', options: { onlyCompileBundledFiles: true, + // Emit CommonJS ("nodenext", since package.json intentionally has no "type":"module") so LABKEY + // namespaces stay shared, writable exports that legacy runtime overrides can patch. + compilerOptions: { + module: 'nodenext', + moduleResolution: 'nodenext', + }, }, }, ], }, + optimization: { + // Disable scope hoisting so cross-module references resolve through the shared, patchable exports objects. + concatenateModules: false, + }, + output: { filename: 'labkey-api-js-[name].min.js', }, From cf3cbe487168671dc2e39af2bd1b27f9468aeb40 Mon Sep 17 00:00:00 2001 From: labkey-nicka Date: Fri, 10 Jul 2026 12:31:28 -0700 Subject: [PATCH 5/6] 1.52.1-fb-object-assign.1 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 901c98eb..f6464d87 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@labkey/api", - "version": "1.52.1-fb-object-assign.0", + "version": "1.52.1-fb-object-assign.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@labkey/api", - "version": "1.52.1-fb-object-assign.0", + "version": "1.52.1-fb-object-assign.1", "license": "Apache-2.0", "devDependencies": { "@babel/core": "8.0.1", diff --git a/package.json b/package.json index 656fbf1e..3309504c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@labkey/api", - "version": "1.52.1-fb-object-assign.0", + "version": "1.52.1-fb-object-assign.1", "description": "JavaScript client API for LabKey Server", "scripts": { "build": "npm run build:dist && npm run build:docs", From e5ceb1271868c6b5026afd3ac6dd18fe6f67f77c Mon Sep 17 00:00:00 2001 From: labkey-nicka Date: Fri, 10 Jul 2026 13:17:22 -0700 Subject: [PATCH 6/6] 1.52.1 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index f6464d87..bb2edc00 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@labkey/api", - "version": "1.52.1-fb-object-assign.1", + "version": "1.52.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@labkey/api", - "version": "1.52.1-fb-object-assign.1", + "version": "1.52.1", "license": "Apache-2.0", "devDependencies": { "@babel/core": "8.0.1", diff --git a/package.json b/package.json index 3309504c..ab29d5aa 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@labkey/api", - "version": "1.52.1-fb-object-assign.1", + "version": "1.52.1", "description": "JavaScript client API for LabKey Server", "scripts": { "build": "npm run build:dist && npm run build:docs",