diff options
author | Steve Abrams <sabrams@gitlab.com> | 2019-07-09 15:42:13 +0000 |
---|---|---|
committer | Achilleas Pipinellis <axil@gitlab.com> | 2019-07-09 15:42:13 +0000 |
commit | 00369eba01cb796b2affaf4592de3c439ab1addc (patch) | |
tree | 852c3b13d60aa5d79aa5eee52364f142f6066bf0 | |
parent | 9bcf55747e445702dd07997ac20d52fe3dfa640f (diff) | |
download | gitlab-ce-00369eba01cb796b2affaf4592de3c439ab1addc.tar.gz |
NPM Registry docs new package naming convention
The documentation is updated to include details on the new
limitations and rules to naming NPM packages. A note is included
on how naming collisions are handled.
-rw-r--r-- | doc/user/project/packages/npm_registry.md | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/doc/user/project/packages/npm_registry.md b/doc/user/project/packages/npm_registry.md index b2cfe10836f..481b1ce0337 100644 --- a/doc/user/project/packages/npm_registry.md +++ b/doc/user/project/packages/npm_registry.md @@ -11,11 +11,6 @@ project can have its own space to store NPM packages. NOTE: **Note:** Only [scoped](https://docs.npmjs.com/misc/scope) packages are supported. - -NOTE: **Note:** -As `@group/subgroup/project` is not a valid NPM package name, publishing a package -within a subgroup is not supported yet. - ## Enabling the NPM Registry NOTE: **Note:** @@ -36,12 +31,15 @@ get familiar with the package naming convention. ## Package naming convention -**Only packages that have the same path as the project** are supported. For - example: +**Packages must be scoped in the root namespace of the project**. The package +name may be anything but it is preferred that the project name be used unless +it is not possible due to a naming collision. For example: | Project | Package | Supported | | ---------------------- | ----------------------- | --------- | | `foo/bar` | `@foo/bar` | Yes | +| `foo/bar/baz` | `@foo/baz` | Yes | +| `foo/bar/buz` | `@foo/anything` | Yes | | `gitlab-org/gitlab-ce` | `@gitlab-org/gitlab-ce` | Yes | | `gitlab-org/gitlab-ce` | `@foo/bar` | No | @@ -113,6 +111,9 @@ npm publish You can then navigate to your project's **Packages** page and see the uploaded packages or even delete them. +If you attempt to publish a package with a name that already exists within +a given scope, you will receive a `403 Forbidden!` error. + ## Uploading a package with the same version twice If you upload a package with a same name and version twice, GitLab will show |