Skip to content

Commit

Permalink
feat(ZMS-2184): remove node engine from package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasAFink committed Nov 5, 2024
1 parent c29e204 commit 189238c
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 12 deletions.
7 changes: 1 addition & 6 deletions cli
Original file line number Diff line number Diff line change
Expand Up @@ -159,35 +159,30 @@ def cli_modules_loop(commands):
"""Loops through repositories and executes a given command. Adds --legacy-peer-deps for npm install commands."""
specific_modules = ["zmsadmin", "zmscalldisplay", "zmsstatistic", "zmsticketprinter"]

# Determine if this is an npm command
is_npm_command = commands[0] == "npm"

# Define specific build commands for each module
build_commands = {
"zmsadmin": ["npm run build"],
"zmscalldisplay": ["npm run build"],
"zmsstatistic": ["npm run build"],
"zmsticketprinter": ["npm run build"]
}

# Select the appropriate list of modules based on command type
target_modules = specific_modules if is_npm_command else modules

for module in target_modules:
print_info(f"Repository: {module}")
module_dir = os.path.join(repo_dir, module)
os.chdir(module_dir)

# Append --legacy-peer-deps if running npm install
if is_npm_command and commands[1] == "install":
modified_commands = list(commands) + [""]
modified_commands = list(commands) + ["--legacy-peer-deps"]
os.system(" ".join(modified_commands))
elif is_npm_command and len(commands) > 1 and commands[1] == "build":
print_info(f"Running custom npm build commands for {module}")
for build_command in build_commands.get(module, []):
os.system(build_command)
else:
# Execute the command as is for other cases
os.system(" ".join(commands))


Expand Down
3 changes: 0 additions & 3 deletions zmscalldisplay/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@
],
"author": "BerlinOnline GmbH & Co. KG",
"license": "EUPL-1.2",
"engines": {
"node": ">=18.20.4"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"lint": "eslint js/",
Expand Down
3 changes: 0 additions & 3 deletions zmsticketprinter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@
],
"author": "BerlinOnline GmbH & Co. KG",
"license": "EUPL-1.2",
"engines": {
"node": ">=18.20.4"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"lint": "eslint js/",
Expand Down

0 comments on commit 189238c

Please sign in to comment.