From 720a82b03ae093ec5de412e807b907fa3bb07ed3 Mon Sep 17 00:00:00 2001 From: Tine Kondo Date: Thu, 28 Mar 2024 17:36:10 +0000 Subject: [PATCH] chore: disable `npmjs` proxy for local packages (`verdaccio``) `0.0.0-e2e` was accidentally published to NPM, so we must not proxy our local packages to avoid conflicts --- .verdaccio/config.yml | 6 +++++- tools/scripts/start-local-registry.ts | 6 +++--- unpublish | 19 +++++++++++++++++++ 3 files changed, 27 insertions(+), 4 deletions(-) create mode 100755 unpublish diff --git a/.verdaccio/config.yml b/.verdaccio/config.yml index a007fe82..22244f10 100644 --- a/.verdaccio/config.yml +++ b/.verdaccio/config.yml @@ -8,13 +8,17 @@ uplinks: maxage: 60m packages: + '@nxrocks/*': + access: $all + publish: $all + # proxy: npmjs <-- disable this, because version `0.0.0-e2e` of `@nxrocks/*` packages was accidentally published to NPM 🤦🏿‍♂️ (it makes no sense to proxy them anyway) + '**': # give all users (including non-authenticated users) full access # because it is a local registry access: $all publish: $all unpublish: $all - # if package is not available locally, proxy requests to npm registry proxy: npmjs diff --git a/tools/scripts/start-local-registry.ts b/tools/scripts/start-local-registry.ts index 4a42430b..7a5a3b75 100644 --- a/tools/scripts/start-local-registry.ts +++ b/tools/scripts/start-local-registry.ts @@ -33,9 +33,9 @@ export default async () => { gitCommit: false, gitTag: false, firstRelease: true, - //generatorOptionsOverrides: { - // skipLockFileUpdate: true, - //}, + generatorOptionsOverrides: { + skipLockFileUpdate: true, + }, }); await releasePublish({ tag: 'e2e', diff --git a/unpublish b/unpublish new file mode 100755 index 00000000..203b20e2 --- /dev/null +++ b/unpublish @@ -0,0 +1,19 @@ +npm login + +npm unpublish create-nx-spring-boot@"$1" --force --verbose +npm unpublish create-nx-micronaut@"$1" --force --verbose +npm unpublish create-nx-quarkus@"$1" --force --verbose +npm unpublish create-nx-flutter@"$1" --force --verbose +npm unpublish create-nx-ktor@"$1" --force --verbose + +npm unpublish @nxrocks/nx-spring-boot@"$1" --force --verbose +npm unpublish @nxrocks/nx-micronaut@"$1" --force --verbose +npm unpublish @nxrocks/nx-quarkus@"$1" --force --verbose +npm unpublish @nxrocks/nx-ktor@"$1" --force --verbose +npm unpublish @nxrocks/nx-flutter@"$1" --force --verbose +npm unpublish @nxrocks/nx-melos@"$1" --force --verbose + +npm unpublish @nxrocks/common-jvm@"$1" --force --verbose +npm unpublish @nxrocks/common-cli@"$1" --force --verbose + +npm unpublish @nxrocks/common@"$1" --force --verbose