bundles/element-web: only set --openssl-legacy-provider if using nodejs >= 17
This commit is contained in:
parent
dd420c4574
commit
615f6107bc
2 changed files with 10 additions and 3 deletions
|
@ -25,11 +25,15 @@ files = {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extra_install_cmds = []
|
||||||
|
if node.metadata.get('nodejs/version') >= 17:
|
||||||
|
# TODO verify this is still needed when upgrading to 1.12
|
||||||
|
extra_install_cmds.append('export NODE_OPTIONS=--openssl-legacy-provider')
|
||||||
|
|
||||||
actions = {
|
actions = {
|
||||||
'element-web_yarn': {
|
'element-web_yarn': {
|
||||||
'command': ' && '.join([
|
'command': ' && '.join([
|
||||||
# TODO verify this is still needed when upgrading to 1.12
|
*extra_install_cmds,
|
||||||
'export NODE_OPTIONS=--openssl-legacy-provider',
|
|
||||||
'cd /opt/element-web',
|
'cd /opt/element-web',
|
||||||
'yarn install --pure-lockfile --ignore-scripts',
|
'yarn install --pure-lockfile --ignore-scripts',
|
||||||
'yarn build',
|
'yarn build',
|
||||||
|
|
|
@ -9,13 +9,16 @@ defaults = {
|
||||||
'nodejs': {},
|
'nodejs': {},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
'nodejs': {
|
||||||
|
'version': 18,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
@metadata_reactor.provides(
|
@metadata_reactor.provides(
|
||||||
'apt/repos/nodejs/items',
|
'apt/repos/nodejs/items',
|
||||||
)
|
)
|
||||||
def nodejs_from_version(metadata):
|
def nodejs_from_version(metadata):
|
||||||
version = metadata.get('nodejs/version', 18)
|
version = metadata.get('nodejs/version')
|
||||||
return {
|
return {
|
||||||
'apt': {
|
'apt': {
|
||||||
'repos': {
|
'repos': {
|
||||||
|
|
Loading…
Reference in a new issue