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

fix(docs): split paragraphs by both Unix and Windows newlines (backport #1103) #1131

Merged

Conversation

aws-cdk-automation
Copy link
Collaborator

Backport

This will backport the following commits from main to maintenance/v5.3:

Questions ?

Please refer to the Backport tool documentation

Similar to #1058, the Windows
newline character wasn't matched and handled accordingly.

I found the problem in [this Github
run](https://github.com/projen/projen/actions/runs/9536528729/job/26283592671?pr=3582#step:6:2043)
which gives errors in snapshots, like the one below

```json
{
              "default": "- No minimum version is being enforced",
    -         "docs": "Minimal Major version to release.",
    +         "docs": "Minimal Major version to release   This can be useful to set to 1, as breaking changes before the 1.x major release are not incrementing the major version number.  Can not be set together with `majorVersion`.",
              "featured": false,
              "fullType": {
                "primitive": "number",
 },
```

I tested that the changed works OK by packaging and installing jsii
locally, getting the following correct output in the local projen
`.jsii` file.
```json
{
          "abstract": true,
          "docs": {
            "default": "- No minimum version is being enforced",
            "remarks": "This can be useful to set to 1, as breaking changes before the 1.x major\nrelease are not incrementing the major version number.\n\nCan not be set together with `majorVersion`.",
            "stability": "experimental",
            "summary": "Minimal Major version to release."
          },
          "immutable": true,
          "locationInModule": {
            "filename": "src/release/release.ts",
            "line": 123
          },
          "name": "minMajorVersion",
          "optional": true,
          "type": {
            "primitive": "number"
          }
},
```

`.jsii` inventory file before the change :
[before_change_jsii.json](https://github.com/user-attachments/files/15935939/before_change_jsii.json)

`.jsii` inventory file after the change:
[after_change_jsii.json](https://github.com/user-attachments/files/15935940/after_change_jsii.json)

---

By submitting this pull request, I confirm that my contribution is made
under the terms of the [Apache 2.0 license].

[Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0

Co-authored-by: Momo Kornher <[email protected]>
(cherry picked from commit edcbaed)
@aws-cdk-automation aws-cdk-automation added this pull request to the merge queue Jun 26, 2024
Merged via the queue into maintenance/v5.3 with commit 58bc54e Jun 26, 2024
77 checks passed
@aws-cdk-automation aws-cdk-automation deleted the backport/maintenance/v5.3-pr-1103 branch June 26, 2024 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-approve Automatically approve this PR backport
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants