Skip to content
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- #992: Implement automatic history purge logic
- #973: Enables CORS and JWT configuration for WebApplications in module.xml
- #1027: Add -bypass-deps flag to skip install the IPM dependencies

### Fixed
- #1001: The `unmap` and `enable` commands will now only activate CPF merge once after all namespaces have been configured instead after every namespace
Expand All @@ -18,6 +19,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [0.10.6] - 2026-02-24

### Added
- #1027: Add -bypass-deps flag to skip install the IPM dependencies

### Added
- #1024: Added flag -export-python-deps to publish command

Expand All @@ -43,6 +47,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- #951: The `unpublish` command will skip user confirmation prompt if the `-force` flag is provided.
- #1018: Require module name for uninstall when not using the -all flag


### Changed
- #316: All parameters, except developer mode, included with a `load`, `install` or `update` command will be propagated to dependencies
- #885: Always synchronously load dependencies and let each module do multi-threading as needed
Expand Down
9 changes: 6 additions & 3 deletions src/cls/IPM/Main.cls
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,8 @@ load C:\module\root\path -env C:\path\to\env1.json;C:\path\to\env2.json
<modifier name="nodev" dataAlias="DeveloperMode" dataValue="0" description="Disables the DeveloperMode flag for the module's lifecycle." />
<modifier name="quiet" aliases="q" dataAlias="Verbose" dataValue="0" description="Produces minimal output from the command." />
<modifier name="verbose" aliases="v" dataAlias="Verbose" dataValue="1" description="Produces verbose output from the command." />
<modifier name="bypass-py-deps" dataAlias="BypassPyDeps" dataValue="1" description="Skip installing python dependencies" />
<modifier name="bypass-py-deps" aliases="bpd" dataAlias="BypassPyDeps" dataValue="1" description="Skip installing python dependencies" />
<modifier name="bypass-deps" aliases="bd" dataAlias="BypassDeps" dataValue="1" description="Skip installing IPM dependencies" />
<modifier name="extra-pip-flags" dataAlias="ExtraPipFlags" value="true" description="Extra flags to pass to pip when installing python dependencies. Surround the flags (and values) with quotes if spaces are present. Default flags are &quot;--target &lt;target&gt; --python-version &lt;pyversion&gt; --only-binary=:all:&quot;." />
<modifier name="synchronous" value="false" deprecated="true" description="DEPRECATED. Dependencies are now always loaded synchronously with independent lifecycle phases doing their own multi-threading as needed." />
<modifier name="force" aliases="f" value="false" description="Allows the user to load a newer version of an existing module without running update steps." />
Expand Down Expand Up @@ -415,7 +416,8 @@ install -env /path/to/env1.json;/path/to/env2.json example-package
<modifier name="quiet" aliases="q" dataAlias="Verbose" dataValue="0" description="Produces minimal output from the command." />
<modifier name="verbose" aliases="v" dataAlias="Verbose" dataValue="1" description="Produces verbose output from the command." />
<modifier name="keywords" aliases="k" value="true" description="Searches for modules matching some set of keywords." />
<modifier name="bypass-py-deps" dataAlias="BypassPyDeps" dataValue="1" description="Skip installing python dependencies" />
<modifier name="bypass-py-deps" aliases="bpd" dataAlias="BypassPyDeps" dataValue="1" description="Skip installing python dependencies" />
<modifier name="bypass-deps" aliases="bd" dataAlias="BypassDeps" dataValue="1" description="Skip installing IPM dependencies" />
<modifier name="extra-pip-flags" dataAlias="ExtraPipFlags" value="true" description="Extra flags to pass to pip when installing python dependencies. Surround the flags (and values) with quotes if spaces are present. Default flags are &quot;--target &lt;target&gt; --python-version &lt;pyversion&gt; --only-binary=:all:&quot;."/>
<modifier name="synchronous" value="false" deprecated="true" description="DEPRECATED. Dependencies are now always loaded synchronously with independent lifecycle phases doing their own multi-threading as needed." />
<modifier name="force" aliases="f" value="false" description="Allows the user to install a newer version of an existing module without running update steps." />
Expand Down Expand Up @@ -453,7 +455,8 @@ reinstall -env /path/to/env1.json;/path/to/env2.json example-package
<modifier name="quiet" aliases="q" dataAlias="Verbose" dataValue="0" description="Produces minimal output from the command." />
<modifier name="verbose" aliases="v" dataAlias="Verbose" dataValue="1" description="Produces verbose output from the command." />
<modifier name="shallow" aliases="s" dataAlias="UpdateSnapshots" dataValue="0" description="Suppresses updating of dependencies with '+snapshot' versions." />
<modifier name="bypass-py-deps" dataAlias="BypassPyDeps" dataValue="1" description="Skip installing python dependencies" />
<modifier name="bypass-py-deps" aliases="bpd" dataAlias="BypassPyDeps" dataValue="1" description="Skip installing python dependencies" />
<modifier name="bypass-deps" aliases="bd" dataAlias="BypassDeps" dataValue="1" description="Skip installing IPM dependencies" />
<modifier name="extra-pip-flags" dataAlias="ExtraPipFlags" value="true" description="Extra flags to pass to pip when installing python dependencies. Surround the flags (and values) with quotes if spaces are present. Default flags are &quot;--target &lt;target&gt; --python-version &lt;pyversion&gt; --only-binary=:all:&quot;."/>

</command>
Expand Down
10 changes: 8 additions & 2 deletions src/cls/IPM/Utils/Module.cls
Original file line number Diff line number Diff line change
Expand Up @@ -948,7 +948,7 @@ ClassMethod GetModuleNameFromXML(
/// <Parameter Name="NoLock">1</Parameter>
/// </Defaults>
/// ```
///
///
/// Returns results as multidimensional array
ClassMethod GetModuleDefaultsFromXML(
pDirectory As %String,
Expand Down Expand Up @@ -1205,7 +1205,13 @@ ClassMethod LoadNewModule(
if $get(params("CreateLockFile"), 0) && '$data(params("LockFileModule")){
set params("LockFileModule") = tModule.Name
}
do ..LoadDependencies(tModule,, .params)
if $get(params("BypassDeps")) {
if tVerbose {
write !, $$$FormattedLine($$$Yellow,"Skipping installation of IPM dependencies because -bypass-deps is set.")
}
} else {
do ..LoadDependencies(tModule, .params)
}

set tSC = $system.OBJ.Load(pDirectory_"module.xml",$select(tVerbose:"d",1:"-d"),,.tLoadedList)
$$$ThrowOnError(tSC)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
Class Test.PM.Integration.BypassDependencies Extends Test.PM.Integration.Base
{

/// Validates the functionality of the '-bypass-deps' (or '-bd') flag during module installation.
/// This test ensures that the target module is installed successfully while its
/// defined dependencies are explicitly skipped.
Method TestBypassDependencies()
{
set moduleDir = ##class(%File).NormalizeDirectory($get(^UnitTestRoot)_"/_data/bypass-dependencymods-flag/")
set dependencyModules = $listbuild("test-dependency-1","test-dependency-2")

do $$$LogMessage("Loading the module wit -bypass-deps to verify dependencies not installed...")
set status = ##class(%IPM.Main).Shell("load " _ moduleDir_" -bypass-deps")
do $$$AssertStatusOK(status,"Loaded SimpleApp demo-module1 with -bypass-deps successfully."_moduleDir)

do $$$LogMessage("Verifying that dependencies were not installed...")
set ptr = 0
while $listnext(dependencyModules, ptr, module) {
set exists = ##class(%IPM.Storage.Module).NameExists(module)
do $$$AssertNotTrue(exists, "Dependency module '"_module_"' not installed when loading with -bypass-deps.")
}

// Now load again without -bypass-deps to verify dependencies get installed
do $$$LogMessage("Now loading the module without -bypass-deps to verify dependencies get installed...")
set status = ##class(%IPM.Main).Shell("load "_moduleDir)
do $$$AssertStatusOK(status,"Module demo-module1 is loaded without -bypass-deps")

set ptr = 0
while $listnext(dependencyModules, ptr, module) {
set exists = ##class(%IPM.Storage.Module).NameExists(module)
do $$$AssertTrue(exists, "Dependency module '"_module_"' should be installed when loading without -bypass-deps.")
}

do $$$LogMessage("uninstalling the demo-module1 and its dependencies...")
set status = ##class(%IPM.Main).Shell("uninstall demo-module1 -r")
do $$$AssertStatusOK(status,"Uninstalled demo-module1 and its dependencies successfully.")
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<Export generator="Cache" version="25">
<Document name="test-dependency-1.ZPM">
<Module>
<Name>test-dependency-1</Name>
<Version>0.0.1</Version>
<Packaging>module</Packaging>
</Module>
</Document>
</Export>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<Export generator="Cache" version="25">
<Document name="test-dependency-2.ZPM">
<Module>
<Name>test-dependency-2</Name>
<Version>1.0.0</Version>
<Packaging>module</Packaging>
</Module>
</Document>
</Export>
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<Export generator="Cache" version="25">
<Document name="demo-module1.ZPM">
<Module>
<Name>demo-module1</Name>
<Version>1.0.0</Version>
<Description>description</Description>
<Dependencies>
<ModuleReference>
<Name>test-dependency-1</Name>
<Version>0.0.1</Version>
</ModuleReference>
<ModuleReference>
<Name>test-dependency-2</Name>
<Version>1.0.0</Version>
</ModuleReference>
</Dependencies>
<Packaging>module</Packaging>
<SourcesRoot>src</SourcesRoot>
</Module>
</Document>
</Export>