I am using tooling which analyses application dependencies, utilising the likes of normalize-package-data.
This has uncovered that the "generated" names used for sub-modules of the @builder.io/partytown module, e.g. for React, have seemingly "invalid" package names such as @builder.io/partytown/react owing to them including an additional / beyond that to delimit the scope from the package name.
Given these sub-modules aren't actually published to NPM the restrictions on the name(s) is somewhat moot as Partytown functions as intended in isolation. It would be grand if changes could be considered nevertheless to aid it's integration with the wider userland ecosystem.
For example, if it is workable(!) it seems the package name as defined in the repo is valid so this could perhaps be used - haven't dug into it yet but presume somewhere in the build process the package name is being overwritten with a generated value matching the directory structure.
To Reproduce
Steps to reproduce the behavior:
Create a new project:
mkdir repro
cd repro
npm init
npm install @builder.io/partytown
Read the contents of the Partytown sub-dependencies, e.g.
Package names (generated or static) for all Partytown modules (top level or sub) adhere to NPM package name requirements.
E.g. using the names currently in the repo's source code rather than the generated directory path names when published: @builder.io/partytown/react -> @builder.io/partytown-react.
Describe the bug
I am using tooling which analyses application dependencies, utilising the likes of
normalize-package-data
.This has uncovered that the "generated" names used for sub-modules of the
@builder.io/partytown
module, e.g. for React, have seemingly "invalid" package names such as@builder.io/partytown/react
owing to them including an additional/
beyond that to delimit the scope from the package name.This violates the restriction on package names needing to be "URL safe" and thus tooling in userland will reject this name as invalid - see https://github.com/npm/normalize-package-data/issues/163.
Given these sub-modules aren't actually published to NPM the restrictions on the name(s) is somewhat moot as Partytown functions as intended in isolation. It would be grand if changes could be considered nevertheless to aid it's integration with the wider userland ecosystem.
For example, if it is workable(!) it seems the package name as defined in the repo is valid so this could perhaps be used - haven't dug into it yet but presume somewhere in the build process the package name is being overwritten with a generated value matching the directory structure.
To Reproduce
Steps to reproduce the behavior:
Create a new project:
Read the contents of the Partytown sub-dependencies, e.g.
Observe that the package name(s) violate the "URL safe" NPM restrictions on package names in including a
/
other than for delimiting the scope.Reproduction link
https://codesandbox.io/s/partytown-sub-module-name-issue-j7kjy8
Expected behavior
Package names (generated or static) for all Partytown modules (top level or sub) adhere to NPM package name requirements.
E.g. using the names currently in the repo's source code rather than the generated directory path names when published:
@builder.io/partytown/react
->@builder.io/partytown-react
.Partytown version
0.7.1
Screenshots
Additional context
Raising off back of https://github.com/npm/normalize-package-data/issues/163.