Skip to content

PluginVm.getScopedInfo could not get the correct scope if it contains a dot #76

Description

@shiny

manager.require("@builder.io/utils") would fail because the npm org contains a dot .

In src/PluginVm.ts the regex expression is

const SCOPED_REGEX = /^(@[a-zA-Z0-9-_]+\/[a-zA-Z0-9-_]+)(.*)/;

which is too strict

In npm docs, a correct scope has been described as

A scope follows the usual rules for package names (URL-safe characters, no leading dots or underscores).

https://docs.npmjs.com/cli/v9/using-npm/scope

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions