nshenderov / strapi-plugin-ckeditor

Integrates CKEditor 5 into your Strapi project as a fully customizable custom field. (Unofficial integration)
https://www.npmjs.com/package/@_sh/strapi-plugin-ckeditor
MIT License
84 stars 53 forks source link

sonatype nexus blocks package due to underscore in package name #109

Open Benman2005 opened 1 year ago

Benman2005 commented 1 year ago

Our Nexus company repository that keeps and supplies all our packages blocks this package because it starts with an underscore.

see error below:


2023-05-24 09:24:53,736+0200 WARN  [qtp926188561-33777]  *UNKNOWN org.sonatype.nexus.repository.httpbridge.internal.ViewServlet - Failure servicing: GET /repository/npmjs-public/@_sh%2fstrapi-plugin-ckeditor
java.lang.IllegalArgumentException: Scope starts with '.' or '_': _sh
        at com.google.common.base.Preconditions.checkArgument(Preconditions.java:219)
        at com.sonatype.nexus.repository.npm.internal.NpmPackageId.<init>(NpmPackageId.java:62)
        at com.sonatype.nexus.repository.npm.internal.NpmPaths.packageId(NpmPaths.java:270)
        at com.sonatype.nexus.repository.npm.internal.orient.OrientNpmGroupDataFacet.getPackageRootAssetFromCache(OrientNpmGroupDataFacet.java:222)
        at org.sonatype.nexus.transaction.TransactionalWrapper.proceedWithTransaction(TransactionalWrapper.java:58)
        at org.sonatype.nexus.transaction.TransactionInterceptor.proceedWithTransaction(TransactionInterceptor.java:66)
        at org.sonatype.nexus.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:55)
        at com.sonatype.nexus.repository.npm.internal.orient.OrientNpmGroupDataFacet.getFromCache(OrientNpmGroupDataFacet.java:200)
        at com.sonatype.nexus.repository.npm.internal.orient.OrientNpmGroupDataFacet$getFromCache$0.call(Unknown Source)
        at com.sonatype.nexus.repository.npm.internal.orient.OrientNpmGroupPackageHandler.buildMergedPackageRoot(OrientNpmGroupPackageHandler.groovy:60)
        at sun.reflect.GeneratedMethodAccessor224.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)

The issue actually stems from npm guidelines: https://docs.npmjs.com/cli/v8/using-npm/scope

A very straightforward solution would be to create a new package that doesn't start with a dot or underscore. This of course would be greatly appreciated 😄 🙏

ghost commented 1 year ago

Sonatype is aware of this issue and working on a fix.

npm's own name validator is OK with the package name, even though it doesn't seem to be in line with the documentation...

https://github.com/npm/validate-npm-package-name