Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BREAKING] Schema: Restrict metadata.name for specVersion >= 3.0 #552

Merged
merged 3 commits into from
Jan 27, 2023

Conversation

RandomByte
Copy link
Member

@RandomByte RandomByte commented Jan 24, 2023

As proposed in chapter 6 of RFC0012(1), restrict the 'name' property for
projects and extensions defining specification version 3.0 and later.

BREAKING CHANGE:

For projects and extensions defining specVersion 3.0 and later, the
metadata.name property must satisfy the following conditions:

  • Must be at least 3 characters long
  • Must be no longer than 50 characters
  • Must only contain lowercase characters
  • Must only contain alphanumeric characters, dash, underscore, dot
    • Exception: @ and / are allowed at certain positions as
      explained below
  • Must start with an alphabetic character or an @-character
  • If a name starts with an @-character, it must contain exactly one
    forward-slash /
    • This is aligned with the npm concept for package scopes
    • e.g. @org/lib.name

For details, please see refer to chapter 6 of RFC0012(1).

@RandomByte RandomByte force-pushed the spec-name-validation branch 2 times, most recently from dc760ae to 44edda5 Compare January 24, 2023 14:49
@RandomByte RandomByte requested a review from a team January 24, 2023 14:49
@coveralls
Copy link

Coverage Status

Coverage: 94.587% (+0.06%) from 94.528% when pulling 44edda5 on spec-name-validation into c35b955 on main.

@coveralls
Copy link

coveralls commented Jan 24, 2023

Coverage Status

Coverage: 94.527%. Remained the same when pulling 45f2871 on spec-name-validation into 2d1ccda on main.

RandomByte added a commit to SAP/ui5-tooling that referenced this pull request Jan 24, 2023
As proposed in chapter 6 of RFC0012([1]), restrict the 'name' property for
projects and extensions defining specification version 3.0 and later.

BREAKING CHANGE:

For projects and extensions defining specVersion 3.0 and later, the
metadata.name property must satisfy the following conditions:

* Must be at least 3 characters long
* Must be no longer than 50 characters
* Must contain lowercase characters only
* Must contain alphanumeric characters, dash, underscore and period only
    - Exception: `@` and `/` are allowed at certain positions as
      explained below
* Must start with an alphabetic character or an `@`-character
* If a name starts with an `@`-character, it must contain exactly one
  forward-slash `/`
    - This is aligned with the npm concept for package scopes
    - e.g. `@org/lib.name`

For details, please see refer to chapter 6 of RFC0012([1]).

[1]: SAP/ui5-tooling#664
Specification Versions <3.0 should allow any names
Also escape forward slash just to be sure
RandomByte added a commit that referenced this pull request Jan 25, 2023
Apply the same rules as for project and extension names.
Also see #552

Also update links to future Workspace configuration page.
RandomByte added a commit to SAP/ui5-tooling that referenced this pull request Jan 25, 2023
@RandomByte RandomByte merged commit d0ea703 into main Jan 27, 2023
@RandomByte RandomByte deleted the spec-name-validation branch January 27, 2023 08:49
RandomByte added a commit that referenced this pull request Jan 27, 2023
Apply the same rules as for project and extension names.
Also see #552

Also update links to future Workspace configuration page.
RandomByte added a commit to SAP/ui5-tooling that referenced this pull request Feb 2, 2023
d3xter666 pushed a commit that referenced this pull request Feb 7, 2023
As proposed in chapter 6 of RFC0012([1]), restrict the 'name' property for
projects and extensions defining specification version 3.0 and later.

BREAKING CHANGE:

For projects and extensions defining specVersion 3.0 and later, the
metadata.name property must satisfy the following conditions:

* Must be at least 3 characters long
* Must be no longer than 50 characters
* Must contain lowercase characters only
* Must contain alphanumeric characters, dash, underscore and period only
    - Exception: `@` and `/` are allowed at certain positions as
      explained below
* Must start with an alphabetic character or an `@`-character
* If a name starts with an `@`-character, it must contain exactly one
  forward-slash `/`
    - This is aligned with the npm concept for package scopes
    - e.g. `@org/lib.name`

For details, please see refer to chapter 6 of RFC0012([1]).

[1]: SAP/ui5-tooling#664
d3xter666 pushed a commit that referenced this pull request Feb 7, 2023
Apply the same rules as for project and extension names.
Also see #552

Also update links to future Workspace configuration page.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants