Skip to content

Commit

Permalink
feat(build): #1043 support nodejs 18
Browse files Browse the repository at this point in the history
- update nodejs version to 18

Signed-off-by: Robin Quintero <rohaquinlop301@gmail.com>
  • Loading branch information
rohaquinlop committed Dec 13, 2023
1 parent 9b7cd3a commit ddc7265
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 13 deletions.
19 changes: 9 additions & 10 deletions makes/utils/makeNodeJsLock/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,21 @@
function main {
local node_js_version="${1}"
local package_json="${2}"
local package_lock="${3}"
local npm_install_args=(
--audit false
--ignore-scripts true
)
local dir_package_json

case "${node_js_version}" in
14) npm=__argNode14__/bin/npm ;;
16) npm=__argNode16__/bin/npm ;;
18) npm=__argNode18__/bin/npm ;;
*) critical NodeJs version not supported: "${node_js_version}" ;;
esac \
&& pushd "$(mktemp -d)" \
&& copy "${package_json}" package.json \
: && dir_package_json=$(dirname "${package_json}") \
&& case "${node_js_version}" in
14) npm=__argNode14__/bin/npm ;;
16) npm=__argNode16__/bin/npm ;;
18) npm=__argNode18__/bin/npm ;;
*) critical NodeJs version not supported: "${node_js_version}" ;;
esac \
&& pushd "${dir_package_json}" \
&& "${npm}" install "${npm_install_args[@]}" \
&& copy package-lock.json "${package_lock}" \
&& popd || return 1
}

Expand Down
2 changes: 1 addition & 1 deletion src/args/lint-git-commit-msg/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
}: let
commitlint = makeNodeJsEnvironment {
name = "commitlint";
nodeJsVersion = "14";
nodeJsVersion = "18";
packageJson = ./commitlint/package.json;
packageLockJson = ./commitlint/package-lock.json;
};
Expand Down
2 changes: 1 addition & 1 deletion src/args/lint-with-ajv/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ makeDerivation {
source = [
(makeNodeJsEnvironment {
name = "ajv-cli";
nodeJsVersion = "16";
nodeJsVersion = "18";
packageJson = ./ajv-cli/package.json;
packageLockJson = ./ajv-cli/package-lock.json;
})
Expand Down
2 changes: 1 addition & 1 deletion src/evaluator/modules/format-markdown/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
source = [
(makeNodeJsEnvironment {
name = "doctoc";
nodeJsVersion = "16";
nodeJsVersion = "18";
packageJson = ./doctoc/package.json;
packageLockJson = ./doctoc/package-lock.json;
})
Expand Down

0 comments on commit ddc7265

Please sign in to comment.