1
0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-11-08 23:25:51 +01:00

feat!: drop Node.js 16 (#4835)

* feat!: drop Node.js 16 support

* restore lru-cache

* Update ci.yml

* Update index.ts

* names

* Update smok-test-module.yml

* Update utils.ts

* Update package.json

* Update e2e-jest-workflow.yml

* Update release-snapshot.yml
This commit is contained in:
Juan Picado 2024-09-14 20:11:12 +02:00 committed by GitHub
parent 2bdca6ac98
commit 78b759ccfb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
27 changed files with 25 additions and 204 deletions

@ -15,7 +15,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node_version: [18, 19, 20, 21, 22]
node_version: [18, 20, 21, 22]
runs-on: ubuntu-latest

@ -14,10 +14,10 @@ jobs:
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: 'Use Node.js 16.x'
- name: 'Use Node.js 18.x'
uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2.5.2
with:
node-version: 16.x
node-version: 18.x
- name: Install Dependencies
run: yarn install
- name: 'Run verdaccio in the background'
@ -79,10 +79,10 @@ jobs:
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: 'Use Node.js 16.x'
- name: 'Use Node.js 18.x'
uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2.5.2
with:
node-version: 16.x
node-version: 18.x
- name: 'install latest npm'
run: npm i -g npm@latest-6
- name: Install Dependencies
@ -112,10 +112,10 @@ jobs:
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: 'Use Node.js 16.x'
- name: 'Use Node.js 18.x'
uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2.5.2
with:
node-version: 16.x
node-version: 18.x
- name: 'install latest npm'
run: npm i -g npm@next-8
- name: Install Dependencies
@ -177,10 +177,10 @@ jobs:
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: 'Use Node.js 16.x'
- name: 'Use Node.js 18.x'
uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2.5.2
with:
node-version: 16.x
node-version: 18.x
- name: 'install latest pnpm'
run: npm i -g pnpm@latest-6
- name: Install Dependencies
@ -210,10 +210,10 @@ jobs:
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: 'Use Node.js 16.x'
- name: 'Use Node.js 18.x'
uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2.5.2
with:
node-version: 16.x
node-version: 18.x
- name: 'install latest pnpm'
run: npm i -g pnpm@latest-7
- name: Install Dependencies

@ -1,4 +1,4 @@
name: Release Canary 6.x
name: Release Canary
on:
workflow_dispatch:
@ -20,7 +20,7 @@ jobs:
- name: Build
run: yarn build
- name: Bump up package
run: npm version prerelease --no-git-tag-version --preid $(date +%s)
run: npm version prerelease --no-git-tag-version --preid ${{ github.head_ref }}.${{ github.sha }}
- name: Publish
run: sh scripts/publish-prerelease.sh
env:

@ -1,4 +1,4 @@
name: Release 6.x
name: Release
on:
push:

@ -1,4 +1,4 @@
name: Docker Smoke Test 6.x
name: Docker Smoke Test
on:
workflow_dispatch:
push:

@ -1,41 +0,0 @@
name: Module Smoke Test Node.js 14
on:
workflow_dispatch:
pull_request:
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: Use Node
uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2.5.2
with:
node-version: 14
- name: Docker test
run: |
docker run -d -it --rm --name verdaccio -p 4873:4873 verdaccio/verdaccio:5
- name: login
run: npx npm-cli-login -u test -p 1234 -e test@domain.test -r http://localhost:4873
- name: Build
run: yarn && yarn build
- name: Types
run: yarn code:types
- name: Bump up package
run: npm version prerelease --no-git-tag-version --preid $(date +%s%N)
- name: publish verdaccio
run: npm publish --registry http://localhost:4873
- name: install verdaccio
run: npm i -g verdaccio --loglevel info --registry http://localhost:4873
- name: verdaccio version
run: verdaccio --version
- name: 'Running the integration test'
run: |
source scripts/e2e-setup-ci.sh
npm init --force
npm install jest@27.5.1 --registry http://localhost:4873
npm install verdaccio --registry http://localhost:4873
echo "test('require module should works', () => { const {runServer} = require('verdaccio') });" | tee module.spec.js
cat module.spec.js
yarn jest

@ -1,18 +1,18 @@
name: Module Smoke Test 6.x
name: Module Smoke Test
on: [push, pull_request]
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
group: ci-${{ github.ref }}-6x
cancel-in-progress: true
jobs:
test:
strategy:
fail-fast: false
matrix:
node_version: [18, 19, 20, 21, 22]
node_version: [18, 20, 21, 22]
runs-on: ubuntu-latest
steps:

141
.pnp.cjs generated

@ -74,7 +74,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
["@verdaccio/config", "npm:8.0.0-next-8.1"],\
["@verdaccio/core", "npm:8.0.0-next-8.1"],\
["@verdaccio/local-storage-legacy", "npm:11.0.2"],\
["@verdaccio/logger-7", "npm:8.0.0-next-8.1"],\
["@verdaccio/logger", "npm:8.0.0-next-8.1"],\
["@verdaccio/middleware", "npm:8.0.0-next-8.1"],\
["@verdaccio/search-indexer", "npm:8.0.0-next-8.0"],\
["@verdaccio/signature", "npm:8.0.0-next-8.0"],\
@ -121,7 +121,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
["lru-cache", "npm:7.18.3"],\
["mime", "npm:3.0.0"],\
["mkdirp", "npm:1.0.4"],\
["mv", "npm:2.1.1"],\
["nock", "npm:13.5.4"],\
["node-mocks-http", "npm:1.15.0"],\
["pinst", "npm:2.1.6"],\
@ -5935,17 +5934,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
"linkType": "HARD"\
}]\
]],\
["@verdaccio/logger-7", [\
["npm:8.0.0-next-8.1", {\
"packageLocation": "./.yarn/cache/@verdaccio-logger-7-npm-8.0.0-next-8.1-97b1d98c7a-b10ec02a57.zip/node_modules/@verdaccio/logger-7/",\
"packageDependencies": [\
["@verdaccio/logger-7", "npm:8.0.0-next-8.1"],\
["@verdaccio/logger-commons", "npm:8.0.0-next-8.1"],\
["pino", "npm:7.11.0"]\
],\
"linkType": "HARD"\
}]\
]],\
["@verdaccio/logger-commons", [\
["npm:8.0.0-next-8.1", {\
"packageLocation": "./.yarn/cache/@verdaccio-logger-commons-npm-8.0.0-next-8.1-d7dc16dc8a-50003c0868.zip/node_modules/@verdaccio/logger-commons/",\
@ -8328,17 +8316,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
["stream-shift", "npm:1.0.1"]\
],\
"linkType": "HARD"\
}],\
["npm:4.1.2", {\
"packageLocation": "./.yarn/cache/duplexify-npm-4.1.2-7f2140a477-964376c61c.zip/node_modules/duplexify/",\
"packageDependencies": [\
["duplexify", "npm:4.1.2"],\
["end-of-stream", "npm:1.4.4"],\
["inherits", "npm:2.0.4"],\
["readable-stream", "npm:3.6.0"],\
["stream-shift", "npm:1.0.1"]\
],\
"linkType": "HARD"\
}]\
]],\
["ecc-jsbn", [\
@ -9749,18 +9726,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
}]\
]],\
["glob", [\
["npm:6.0.4", {\
"packageLocation": "./.yarn/cache/glob-npm-6.0.4-dbb227ba4a-c4946c3d01.zip/node_modules/glob/",\
"packageDependencies": [\
["glob", "npm:6.0.4"],\
["inflight", "npm:1.0.6"],\
["inherits", "npm:2.0.4"],\
["minimatch", "npm:3.1.2"],\
["once", "npm:1.4.0"],\
["path-is-absolute", "npm:1.0.1"]\
],\
"linkType": "HARD"\
}],\
["npm:7.2.3", {\
"packageLocation": "./.yarn/cache/glob-npm-7.2.3-2d866d17a5-29452e97b3.zip/node_modules/glob/",\
"packageDependencies": [\
@ -12167,14 +12132,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
}]\
]],\
["mkdirp", [\
["npm:0.5.6", {\
"packageLocation": "./.yarn/cache/mkdirp-npm-0.5.6-dcd5a6b97b-0c91b721bb.zip/node_modules/mkdirp/",\
"packageDependencies": [\
["mkdirp", "npm:0.5.6"],\
["minimist", "npm:1.2.7"]\
],\
"linkType": "HARD"\
}],\
["npm:1.0.4", {\
"packageLocation": "./.yarn/cache/mkdirp-npm-1.0.4-37f6ef56b9-a96865108c.zip/node_modules/mkdirp/",\
"packageDependencies": [\
@ -12215,18 +12172,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
"linkType": "HARD"\
}]\
]],\
["mv", [\
["npm:2.1.1", {\
"packageLocation": "./.yarn/cache/mv-npm-2.1.1-4c2aca3831-59d4b5ebff.zip/node_modules/mv/",\
"packageDependencies": [\
["mv", "npm:2.1.1"],\
["mkdirp", "npm:0.5.6"],\
["ncp", "npm:2.0.0"],\
["rimraf", "npm:2.4.5"]\
],\
"linkType": "HARD"\
}]\
]],\
["natural-compare", [\
["npm:1.4.0", {\
"packageLocation": "./.yarn/cache/natural-compare-npm-1.4.0-97b75b362d-23ad088b08.zip/node_modules/natural-compare/",\
@ -12245,15 +12190,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
"linkType": "HARD"\
}]\
]],\
["ncp", [\
["npm:2.0.0", {\
"packageLocation": "./.yarn/cache/ncp-npm-2.0.0-2121969339-ea9b19221d.zip/node_modules/ncp/",\
"packageDependencies": [\
["ncp", "npm:2.0.0"]\
],\
"linkType": "HARD"\
}]\
]],\
["negotiator", [\
["npm:0.6.3", {\
"packageLocation": "./.yarn/cache/negotiator-npm-0.6.3-9d50e36171-b8ffeb1e26.zip/node_modules/negotiator/",\
@ -12586,13 +12522,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
}]\
]],\
["on-exit-leak-free", [\
["npm:0.2.0", {\
"packageLocation": "./.yarn/cache/on-exit-leak-free-npm-0.2.0-58bc1e8da0-d22b0f0538.zip/node_modules/on-exit-leak-free/",\
"packageDependencies": [\
["on-exit-leak-free", "npm:0.2.0"]\
],\
"linkType": "HARD"\
}],\
["npm:2.1.0", {\
"packageLocation": "./.yarn/cache/on-exit-leak-free-npm-2.1.0-b522202aa1-7334d98b87.zip/node_modules/on-exit-leak-free/",\
"packageDependencies": [\
@ -12939,24 +12868,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
}]\
]],\
["pino", [\
["npm:7.11.0", {\
"packageLocation": "./.yarn/cache/pino-npm-7.11.0-6ccf4cf5b6-b919e7dbe4.zip/node_modules/pino/",\
"packageDependencies": [\
["pino", "npm:7.11.0"],\
["atomic-sleep", "npm:1.0.0"],\
["fast-redact", "npm:3.1.2"],\
["on-exit-leak-free", "npm:0.2.0"],\
["pino-abstract-transport", "npm:0.5.0"],\
["pino-std-serializers", "npm:4.0.0"],\
["process-warning", "npm:1.0.0"],\
["quick-format-unescaped", "npm:4.0.4"],\
["real-require", "npm:0.1.0"],\
["safe-stable-stringify", "npm:2.4.2"],\
["sonic-boom", "npm:2.8.0"],\
["thread-stream", "npm:0.15.2"]\
],\
"linkType": "HARD"\
}],\
["npm:8.11.0", {\
"packageLocation": "./.yarn/cache/pino-npm-8.11.0-8f5941659a-1bcc2b9b44.zip/node_modules/pino/",\
"packageDependencies": [\
@ -12995,15 +12906,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
}]\
]],\
["pino-abstract-transport", [\
["npm:0.5.0", {\
"packageLocation": "./.yarn/cache/pino-abstract-transport-npm-0.5.0-2cfa907a2a-c503f867de.zip/node_modules/pino-abstract-transport/",\
"packageDependencies": [\
["pino-abstract-transport", "npm:0.5.0"],\
["duplexify", "npm:4.1.2"],\
["split2", "npm:4.1.0"]\
],\
"linkType": "HARD"\
}],\
["npm:1.0.0", {\
"packageLocation": "./.yarn/cache/pino-abstract-transport-npm-1.0.0-a566611547-05dd0eda52.zip/node_modules/pino-abstract-transport/",\
"packageDependencies": [\
@ -13024,13 +12926,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
}]\
]],\
["pino-std-serializers", [\
["npm:4.0.0", {\
"packageLocation": "./.yarn/cache/pino-std-serializers-npm-4.0.0-391192ed8b-89d487729b.zip/node_modules/pino-std-serializers/",\
"packageDependencies": [\
["pino-std-serializers", "npm:4.0.0"]\
],\
"linkType": "HARD"\
}],\
["npm:6.1.0", {\
"packageLocation": "./.yarn/cache/pino-std-serializers-npm-6.1.0-849611aa5b-5e42327c24.zip/node_modules/pino-std-serializers/",\
"packageDependencies": [\
@ -13505,13 +13400,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
}]\
]],\
["real-require", [\
["npm:0.1.0", {\
"packageLocation": "./.yarn/cache/real-require-npm-0.1.0-354945c66f-96745583ed.zip/node_modules/real-require/",\
"packageDependencies": [\
["real-require", "npm:0.1.0"]\
],\
"linkType": "HARD"\
}],\
["npm:0.2.0", {\
"packageLocation": "./.yarn/cache/real-require-npm-0.2.0-7f69dbc7b6-fa060f19f2.zip/node_modules/real-require/",\
"packageDependencies": [\
@ -13706,14 +13594,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
}]\
]],\
["rimraf", [\
["npm:2.4.5", {\
"packageLocation": "./.yarn/cache/rimraf-npm-2.4.5-64bcf0249e-036793b405.zip/node_modules/rimraf/",\
"packageDependencies": [\
["rimraf", "npm:2.4.5"],\
["glob", "npm:6.0.4"]\
],\
"linkType": "HARD"\
}],\
["npm:3.0.2", {\
"packageLocation": "./.yarn/cache/rimraf-npm-3.0.2-2cb7dac69a-87f4164e39.zip/node_modules/rimraf/",\
"packageDependencies": [\
@ -14033,14 +13913,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
}]\
]],\
["sonic-boom", [\
["npm:2.8.0", {\
"packageLocation": "./.yarn/cache/sonic-boom-npm-2.8.0-87a358d51e-c7f9c89f93.zip/node_modules/sonic-boom/",\
"packageDependencies": [\
["sonic-boom", "npm:2.8.0"],\
["atomic-sleep", "npm:1.0.0"]\
],\
"linkType": "HARD"\
}],\
["npm:3.8.0", {\
"packageLocation": "./.yarn/cache/sonic-boom-npm-3.8.0-df4849cf66-c21ece61a0.zip/node_modules/sonic-boom/",\
"packageDependencies": [\
@ -14555,14 +14427,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
}]\
]],\
["thread-stream", [\
["npm:0.15.2", {\
"packageLocation": "./.yarn/cache/thread-stream-npm-0.15.2-7f29c353ba-0547795a8f.zip/node_modules/thread-stream/",\
"packageDependencies": [\
["thread-stream", "npm:0.15.2"],\
["real-require", "npm:0.1.0"]\
],\
"linkType": "HARD"\
}],\
["npm:2.3.0", {\
"packageLocation": "./.yarn/cache/thread-stream-npm-2.3.0-77ee67ae69-e9ea58f9f3.zip/node_modules/thread-stream/",\
"packageDependencies": [\
@ -15295,7 +15159,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
["@verdaccio/config", "npm:8.0.0-next-8.1"],\
["@verdaccio/core", "npm:8.0.0-next-8.1"],\
["@verdaccio/local-storage-legacy", "npm:11.0.2"],\
["@verdaccio/logger-7", "npm:8.0.0-next-8.1"],\
["@verdaccio/logger", "npm:8.0.0-next-8.1"],\
["@verdaccio/middleware", "npm:8.0.0-next-8.1"],\
["@verdaccio/search-indexer", "npm:8.0.0-next-8.0"],\
["@verdaccio/signature", "npm:8.0.0-next-8.0"],\
@ -15342,7 +15206,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
["lru-cache", "npm:7.18.3"],\
["mime", "npm:3.0.0"],\
["mkdirp", "npm:1.0.4"],\
["mv", "npm:2.1.1"],\
["nock", "npm:13.5.4"],\
["node-mocks-http", "npm:1.15.0"],\
["pinst", "npm:2.1.6"],\

Binary file not shown.

@ -24,7 +24,7 @@
"@verdaccio/config": "8.0.0-next-8.1",
"@verdaccio/core": "8.0.0-next-8.1",
"@verdaccio/local-storage-legacy": "11.0.2",
"@verdaccio/logger-7": "8.0.0-next-8.1",
"@verdaccio/logger": "8.0.0-next-8.1",
"@verdaccio/middleware": "8.0.0-next-8.1",
"@verdaccio/search-indexer": "8.0.0-next-8.0",
"@verdaccio/signature": "8.0.0-next-8.0",
@ -38,7 +38,7 @@
"clipanion": "4.0.0-rc.3",
"compression": "1.7.4",
"cors": "2.8.5",
"debug": "^4.3.5",
"debug": "4.3.5",
"envinfo": "7.13.0",
"express": "4.21.0",
"express-rate-limit": "5.5.1",
@ -51,7 +51,6 @@
"lru-cache": "7.18.3",
"mime": "3.0.0",
"mkdirp": "1.0.4",
"mv": "2.1.1",
"pkginfo": "0.4.1",
"semver": "7.6.3",
"validator": "13.12.0",
@ -172,7 +171,7 @@
"docker:run": "docker run -it --rm -p 4873:4873 verdaccio/verdaccio:local"
},
"engines": {
"node": ">=14"
"node": ">=18"
},
"preferGlobal": true,
"license": "MIT",

@ -10,7 +10,7 @@ export const resolveConfigPath = function (storageLocation: string, file: string
return path.resolve(path.dirname(storageLocation), file);
};
export const MIN_NODE_VERSION = '12';
export const MIN_NODE_VERSION = '18';
export function isVersionValid(version) {
return semver.satisfies(version, `>=${MIN_NODE_VERSION}`);

@ -1,4 +1,4 @@
import { setup as setupModule } from '@verdaccio/logger-7';
import { setup as setupModule } from '@verdaccio/logger';
let logger;

BIN
yarn.lock

Binary file not shown.