Compare commits

..

6 Commits

Author SHA1 Message Date
Rui Lopes 61d93d4737 upgrade to nexus 3.83.2-01 2025-09-06 05:55:55 +00:00
Rui Lopes c763882833 upgrade dependencies 2025-09-06 05:55:55 +00:00
Rui Lopes 7daad8373d configure node.js to use the system ca trust store 2025-09-05 07:23:12 +00:00
Rui Lopes 6452307d77 modify the example node.js projects to use the es module type 2025-09-05 07:23:12 +00:00
Rui Lopes 92ab9966d5 modify the example node.js package to use chalk
because left-pad is deprecated
2025-09-05 07:23:12 +00:00
Rui Lopes 32b3b58a6b upgrade dependencies 2025-09-05 07:23:12 +00:00
12 changed files with 46 additions and 47 deletions

View File

@ -1,4 +1,4 @@
This is a Vagrant Environment for a [Nexus Repository OSS](https://github.com/sonatype/nexus-public) service.
This is a Vagrant Environment for a [Nexus Repository Community Edition (CE)](https://github.com/sonatype/nexus-public) service.
This will:
@ -155,7 +155,7 @@ You can also access the database cli shell as:
sudo su -l # switch to the root user.
systemctl stop nexus # make sure nexus is not running while you use the database.
su -s /bin/bash nexus # switch to the nexus user.
nexus_home=/opt/nexus/nexus-3.82.0-08 # make sure you have the correct version here.
nexus_home=/opt/nexus/nexus-3.83.2-01 # make sure you have the correct version here.
nexus_data="$(realpath $nexus_home/../sonatype-work/nexus3)"
function h2-shell {
java \

View File

@ -3,7 +3,7 @@ build==1.3.0
certifi==2025.8.3
cffi==1.17.1
charset-normalizer==3.4.3
cryptography==45.0.6
cryptography==45.0.7
docutils==0.22
id==1.5.0
idna==3.10
@ -15,7 +15,7 @@ jeepney==0.9.0
keyring==25.6.0
markdown-it-py==4.0.0
mdurl==0.1.2
more-itertools==10.7.0
more-itertools==10.8.0
nh3==0.3.0
packaging==25.0
pycparser==2.22
@ -28,7 +28,7 @@ rfc3986==2.0.0
rich==14.1.0
SecretStorage==3.3.3
tomli==2.2.1
twine==6.1.0
typing_extensions==4.14.1
twine==6.2.0
typing_extensions==4.15.0
urllib3==2.5.0
zipp==3.23.0

View File

@ -3,7 +3,7 @@ set -euxo pipefail
# see https://github.com/moby/moby/releases
# renovate: datasource=github-releases depName=moby/moby
default_docker_version='28.3.3'
default_docker_version='28.4.0'
# see https://github.com/moby/moby/releases
docker_version="${1:-$default_docker_version}"; shift || true

View File

@ -35,19 +35,20 @@ pushd /opt/nexus
# see https://help.sonatype.com/repomanager3/product-information/download/download-archives---repository-manager-3
# see https://help.sonatype.com/repomanager3/product-information/release-notes
# see https://help.sonatype.com/repomanager3
nexus_version=3.82.0-08
nexus_version=3.83.2-01
nexus_home=/opt/nexus/nexus-$nexus_version
nexus_tarball=nexus-$nexus_version-linux-x86_64.tar.gz
nexus_download_url=https://download.sonatype.com/nexus/3/$nexus_tarball
wget -q $nexus_download_url
tar xf $nexus_tarball # NB this creates the $nexus_home (e.g. nexus-3.82.0-08) and sonatype-work directories.
tar xf $nexus_tarball # NB this creates the $nexus_home (e.g. nexus-3.83.2-01) and sonatype-work directories.
rm $nexus_tarball
sed -i -E 's,#!.+,#!/usr/bin/bash,g' "$nexus_home/bin/nexus"
install -d -o nexus -g nexus -m 700 .java # java preferences are saved here (the default java.util.prefs.userRoot preference).
install -d -o nexus -g nexus -m 700 sonatype-work/nexus3/etc
chown -R nexus:nexus sonatype-work
grep -v -E '\s*##.*' $nexus_home/etc/nexus-default.properties >sonatype-work/nexus3/etc/nexus.properties
sed -i -E 's,(application-host=).+,\1127.0.0.1,g' sonatype-work/nexus3/etc/nexus.properties
sed -i -E 's,nexus-pro-,nexus-oss-,g' sonatype-work/nexus3/etc/nexus.properties
sed -i -E '/^(\s*(nexus-edition=.+|nexus-features=.+|nexus-pro-feature)\s*)/d' sonatype-work/nexus3/etc/nexus.properties
cat >>sonatype-work/nexus3/etc/nexus.properties <<'EOF'
# disable the wizard.

View File

@ -17,7 +17,7 @@ binaries: binaries-download
binaries-download:
mkdir -p binaries
wget -qO- https://download.sonatype.com/nexus/3/nexus-3.82.0-08-unix.tar.gz \
wget -qO- https://download.sonatype.com/nexus/3/nexus-3.83.2-01-unix.tar.gz \
| tar xzf - --strip-components 1 -C binaries
clean:

View File

@ -8,7 +8,7 @@
<version>1.0-SNAPSHOT</version>
<properties>
<nx-version>3.82.0-08</nx-version>
<nx-version>3.83.2-01</nx-version>
</properties>
<dependencies>
<dependency>

View File

@ -24,7 +24,7 @@ mkdir -p tmp/use-docker-repository && cd tmp/use-docker-repository
# see https://github.com/golang/go/tags
# renovate: datasource=github-tags depName=golang/go extractVersion=go(?<version>.+)
go_version='1.25.0'
go_version='1.25.1'
cat >main.go <<'EOF'
package main
@ -68,7 +68,7 @@ module example.com/go-hello
go $go_version
EOF
cat >Dockerfile <<EOF
FROM golang:$go_version-bookworm as builder
FROM golang:$go_version-bookworm AS builder
WORKDIR /app
COPY go.* main.go ./
RUN CGO_ENABLED=0 go build -ldflags="-s"

View File

@ -104,7 +104,7 @@ rootProject.name = 'gradle-greeter-application'
EOF
# see https://mvnrepository.com/artifact/com.gradleup.shadow/shadow-gradle-plugin
# renovate: datasource=maven depName=com.gradleup.shadow:shadow-gradle-plugin
com_gradleup_shadow_version='9.0.2'
com_gradleup_shadow_version='9.1.0'
cat >build.gradle <<EOF
// see https://docs.gradle.org/9.0.0/userguide/java_plugin.html
// see https://docs.gradle.org/9.0.0/userguide/application_plugin.html

View File

@ -20,7 +20,12 @@ npm --version
# configure npm to trust our system trusted CAs.
# NB never turn off ssl verification with npm config set strict-ssl false
npm config set cafile /etc/ssl/certs/ca-certificates.crt
# NB since node.js 22.19.0 we no longer need to use npm config set cafile to use
# a private ca. instead, either set the NODE_USE_SYSTEM_CA environment
# variable or use the --use-system-ca command line option.
# see https://github.com/nodejs/node/pull/59276
# see https://nodejs.org/docs/latest-v22.x/api/cli.html#--use-system-ca
export NODE_USE_SYSTEM_CA='1'
#
# configure npm to use the npm-group repository.
@ -36,6 +41,7 @@ cat >package.json <<'EOF'
"description": "the classic hello world",
"version": "1.0.0",
"license": "MIT",
"type": "module",
"main": "hello-world.js",
"repository": {
"type": "git",
@ -45,10 +51,11 @@ cat >package.json <<'EOF'
}
EOF
cat >hello-world.js <<'EOF'
const leftPad = require('left-pad')
console.log(leftPad('hello world', 40))
import chalk from 'chalk';
console.log(chalk.green('Hello, World!'));
EOF
npm install --save left-pad
npm install --save chalk
node hello-world.js
#
@ -60,7 +67,7 @@ export NPM_PASS=password
export NPM_EMAIL=alice.doe@example.com
export NPM_REGISTRY=https://$nexus_domain/repository/npm-hosted/
npm install npm-registry-client@8.6.0
npm_auth_token=$(NODE_PATH=$PWD/node_modules node --use-openssl-ca /vagrant/provision/npm-login.js 2>/dev/null)
npm_auth_token=$(NODE_PATH=$PWD/node_modules node /vagrant/provision/npm-login.js 2>/dev/null)
npm set //$nexus_domain/repository/npm-hosted/:_authToken $npm_auth_token
# publish.
@ -78,6 +85,7 @@ cat >package.json <<'EOF'
"description": "use the classic hello world",
"version": "1.0.0",
"license": "MIT",
"type": "module",
"repository": {
"type": "git",
"url": "https://git.example.com/use-hello-world.git"

View File

@ -1,16 +0,0 @@
# dump all the windows trusted roots into a ca file.
$pems = New-Object System.Text.StringBuilder
Get-ChildItem Cert:\LocalMachine\Root | ForEach-Object {
# $_ is-a System.Security.Cryptography.X509Certificates.X509Certificate2
Write-Host "Exporting the $($_.Issuer) certificate..."
[void]$pems.AppendLine('-----BEGIN CERTIFICATE-----')
[void]$pems.AppendLine(
[Convert]::ToBase64String(
$_.Export('Cert'),
'InsertLineBreaks'));
[void]$pems.AppendLine("-----END CERTIFICATE-----");
}
Set-Content `
-Encoding Ascii `
C:\ProgramData\ca-certificates.crt `
$pems.ToString()

View File

@ -30,16 +30,20 @@ Set-Location tmp/use-npm-repository
# install node LTS.
# see https://community.chocolatey.org/packages/nodejs-lts
choco install -y nodejs-lts --version 22.18.0
choco install -y nodejs-lts --version 22.19.0
Import-Module C:\ProgramData\chocolatey\helpers\chocolateyInstaller.psm1
Update-SessionEnvironment
node --version
npm --version
# configure npm to trust our system trusted CAs.
# configure node/npm to trust our system trusted CAs.
# NB never turn off ssl verification with npm config set strict-ssl false
c:\vagrant\provision\windows\export-windows-ca-certificates.ps1
npm config set cafile c:/ProgramData/ca-certificates.crt
# NB since node.js 22.19.0 we no longer need to use npm config set cafile to use
# a private ca. instead, either set the NODE_USE_SYSTEM_CA environment
# variable or use the --use-system-ca command line option.
# see https://github.com/nodejs/node/pull/59276
# see https://nodejs.org/docs/latest-v22.x/api/cli.html#--use-system-ca
$env:NODE_USE_SYSTEM_CA='1'
#
# configure npm to use the npm-group repository.
@ -58,6 +62,7 @@ Set-Content `
"description": "the classic hello world",
"version": "1.0.0",
"license": "MIT",
"type": "module",
"main": "hello-world-win.js",
"repository": {
"type": "git",
@ -70,10 +75,11 @@ Set-Content `
-Encoding Ascii `
hello-world-win.js `
@'
const leftPad = require('left-pad')
console.log(leftPad('hello world', 40))
import chalk from 'chalk';
console.log(chalk.green('Hello, World!'));
'@
npm install --save left-pad
npm install --save chalk
node hello-world-win.js
#
@ -86,8 +92,7 @@ $env:NPM_EMAIL='alice.doe@example.com'
$env:NPM_REGISTRY="https://$nexusDomain/repository/npm-hosted/"
npm install npm-registry-client@8.6.0
$env:NODE_PATH="$PWD/node_modules"
$env:NODE_EXTRA_CA_CERTS='C:\ProgramData\ca-certificates.crt'
$npmAuthToken = node --use-openssl-ca /vagrant/provision/npm-login.js 2>$null
$npmAuthToken = node /vagrant/provision/npm-login.js 2>$null
npm set "//$nexusDomain/repository/npm-hosted/:_authToken" $npmAuthToken
# publish.
@ -101,13 +106,14 @@ mkdir use-hello-world-win-npm | Out-Null
Push-Location use-hello-world-win-npm
Set-Content `
-Encoding Ascii `
hello-world-win.js `
package.json `
@'
{
"name": "use-hello-world-win",
"description": "use the classic hello world",
"version": "1.0.0",
"license": "MIT",
"type": "module",
"repository": {
"type": "git",
"url": "https://git.example.com/use-hello-world-win.git"

View File

@ -18,7 +18,7 @@ gitea_version='1.24.5'
# see https://hub.docker.com/r/renovate/renovate/tags
# see https://github.com/renovatebot/renovate/releases
# renovate: datasource=docker depName=renovate/renovate
renovate_version='41.82.8'
renovate_version='41.97.7'
# clean.
echo 'Deleting existing Gitea...'