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

Update html-to-text version 8.1.0 #58922

Closed
wants to merge 1 commit into from
Closed

Update html-to-text version 8.1.0 #58922

wants to merge 1 commit into from

Conversation

ekremkenter
Copy link
Contributor

@ekremkenter ekremkenter commented Feb 23, 2022

Please fill in this template.

Select one of these and delete the others:

If changing an existing definition:

  • Provide a URL to documentation or source code which provides context for the suggested changes: changelog
  • If this PR brings the type definitions up to date with a new version of the JS library, update the version number in the header.

@typescript-bot
Copy link
Contributor

typescript-bot commented Feb 23, 2022

@ekremkenter Thank you for submitting this PR! I see this is your first time submitting to DefinitelyTyped 👋 — I'm the local bot who will help you through the process of getting things through.

This is a live comment which I will keep updated.

1 package in this PR

Code Reviews

Because you edited one package and updated the tests (👏), I can help you merge this PR once someone else signs off on it.

You can test the changes of this PR in the Playground.

Status

  • ✅ No merge conflicts
  • ✅ Continuous integration tests have passed
  • 🕐 Most recent commit is approved by type definition owners or DT maintainers

Once every item on this list is checked, I'll ask you for permission to merge and publish the changes.

Inactive

This PR has been inactive for 31 days — it is considered abandoned, and therefore closed!


Diagnostic Information: What the bot saw about this PR
{
  "type": "info",
  "now": "-",
  "pr_number": 58922,
  "author": "ekremkenter",
  "headCommitOid": "99238bb7fb968d8b55d7836d47be11f912128c78",
  "mergeBaseOid": "2faabb0aaad6ccc91b3f3546d7520e324c0f7ea2",
  "lastPushDate": "2022-02-24T07:12:46.000Z",
  "lastActivityDate": "2022-04-07T20:46:55.000Z",
  "hasMergeConflict": false,
  "isFirstContribution": true,
  "tooManyFiles": false,
  "hugeChange": false,
  "popularityLevel": "Popular",
  "pkgInfo": [
    {
      "name": "html-to-text",
      "kind": "edit",
      "files": [
        {
          "path": "types/html-to-text/html-to-text-tests.ts",
          "kind": "test"
        },
        {
          "path": "types/html-to-text/index.d.ts",
          "kind": "definition"
        }
      ],
      "owners": [
        "erykwarren",
        "CarsonF",
        "webstech"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Popular"
    }
  ],
  "reviews": [
    {
      "type": "changereq",
      "reviewer": "webstech",
      "date": "2022-03-10T19:01:03.000Z"
    }
  ],
  "mainBotCommentID": 1048663666,
  "ciResult": "pass"
}

@typescript-bot typescript-bot added the Popular package This PR affects a popular package (as counted by NPM download counts). label Feb 23, 2022
@typescript-bot
Copy link
Contributor

🔔 @erykwarren @CarsonF @webstech — please review this PR in the next few days. Be sure to explicitly select Approve or Request Changes in the GitHub UI so I know what's going on.

@typescript-bot typescript-bot added this to Waiting for Code Reviews in Old Pull Request Status Board Feb 23, 2022
@@ -51,17 +45,18 @@ const htmlOptions: HtmlToTextOptions = {
a: {
options: {
hideLinkHrefIfSameAsText: true,
linkBrackets: ['[', ']'],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a test for false.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added, but couldn't run the tests. Could you explain how am I running those?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added, but couldn't run the tests. Could you explain how am I running those?

Did you follow these instructions?

Copy link
Contributor Author

@ekremkenter ekremkenter Feb 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I did. Tests just do linting, doesn't actually run the package, right?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like I copied the dir to a dummy 'project' with this in the package.json:

  "scripts": {
    "build": "tsc",
    "test": "npm run build && node dist/html-to-text-tests.js -"
  },
  "dependencies": {
    "html-to-text": "*"
  }

Added "outDir": "./dist", to the tsconfig.json to keep things clean.

Ran npm install, and then ran npm test. If you don't have typescript installed globally you will need to install that as well.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I did. Tests just do linting, doesn't actually run the package, right?

Yes it does not run the tests. Must have been thinking about another project. Did you run the tests using a dummy project as suggested in a previous comment?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added "outDir": "./dist", to the tsconfig.json to keep things clean.

Also set "noEmit": false,.

types/html-to-text/index.d.ts Outdated Show resolved Hide resolved
types/html-to-text/html-to-text-tests.ts Outdated Show resolved Hide resolved
@typescript-bot typescript-bot added the Revision needed This PR needs code changes before it can be merged. label Feb 23, 2022
@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Author Action in Old Pull Request Status Board Feb 23, 2022
@typescript-bot
Copy link
Contributor

@ekremkenter One or more reviewers has requested changes. Please address their comments. I'll be back once they sign off or you've pushed new commits. Thank you!

@typescript-bot typescript-bot removed the Revision needed This PR needs code changes before it can be merged. label Feb 24, 2022
@typescript-bot typescript-bot moved this from Needs Author Action to Waiting for Code Reviews in Old Pull Request Status Board Feb 24, 2022
@typescript-bot
Copy link
Contributor

@webstech Thank you for reviewing this PR! The author has pushed new commits since your last review. Could you take another look and submit a fresh review?

@ekremkenter
Copy link
Contributor Author

@webstech Thanks for review, addressed your comments. Can you review it again?

@webstech
Copy link
Contributor

@webstech Thanks for review, addressed your comments. Can you review it again?

Looks good. Just waiting for you to verify the tests run okay. The checks run the tests but do not display the log.

@typescript-bot
Copy link
Contributor

Re-ping @erykwarren, @CarsonF, @webstech:

This PR has been out for over a week, yet I haven't seen any reviews.

Could someone please give it some attention? Thanks!

@typescript-bot typescript-bot added the Unreviewed No one showed up to review this PR, so it'll be reviewed by a DT maintainer. label Mar 7, 2022
@@ -209,3 +210,33 @@ console.log(htmlToText("<h1>Starting foo test</h1><foo>bar</foo>", {
},
]
}));

console.log('Test with linkBrackets false');
console.log(htmlToText("<a href=\"https://github.com/DefinitelyTyped\">Link</a>"), {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ran the tests and they all need to be corrected. The closing ) on this line should be on line 222. The selectors are not being passed to html-to-text.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ekremkenter Any chance you can update the tests so we can close this out?

@webstech
Copy link
Contributor

btw, this issue may be of interest.

Copy link
Contributor

@webstech webstech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comment on test.

@typescript-bot typescript-bot added Revision needed This PR needs code changes before it can be merged. and removed Unreviewed No one showed up to review this PR, so it'll be reviewed by a DT maintainer. labels Mar 10, 2022
@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Author Action in Old Pull Request Status Board Mar 10, 2022
@typescript-bot
Copy link
Contributor

@ekremkenter One or more reviewers has requested changes. Please address their comments. I'll be back once they sign off or you've pushed new commits. Thank you!

@tettoffensive
Copy link

@ekremkenter Am I missing something here? I'm getting Unsafe return of an any typed value. even though it's returning htmlToText is returning a string type

import { htmlToText } from 'html-to-text';

function extractContent(content: string) {
    return htmlToText(content, {
      ignoreHref: true,
      ignoreImage: true,
    });
  }

@webstech
Copy link
Contributor

function extractContent(content: string) {

Should the function declare a return type?

function extractContent(content: string): string {

@webstech
Copy link
Contributor

@tettoffensive fyi, asking an issue type question on a PR request may not get much of a response. The audience is very limited.

@tettoffensive
Copy link

@webstech Yea, I figured it was a bad idea but thought it seemed like an issue with the type, so threw out a hail mary.

@webstech
Copy link
Contributor

@webstech Yea, I figured it was a bad idea but thought it seemed like an issue with the type, so threw out a hail mary.

Did adding the return type resolve your problem?

@tettoffensive
Copy link

@webstech Yea, I figured it was a bad idea but thought it seemed like an issue with the type, so threw out a hail mary.

Did adding the return type resolve your problem?

No, but letting the code sit overnight seemed to fix the problem

@KillyMXI
Copy link

KillyMXI commented Apr 7, 2022

btw, this issue may be of interest.

After getting time to figure out the issue I decided to fix it now.
A bug in versions 8.1.0 and 8.1.1 mostly manifests itself in that deprecated noLinkBrackets option is usually ignored.
Fixed in version 8.2.0.

@typescript-bot typescript-bot added the Abandoned This PR had no activity for a long time, and is considered abandoned label May 1, 2022
@typescript-bot
Copy link
Contributor

@ekremkenter I haven't seen any activity on this PR in more than three weeks, and it still has problems that prevent it from being merged. The PR will be closed on May 7th (in a week) if the issues aren't addressed.

@typescript-bot typescript-bot removed this from Needs Author Action in Old Pull Request Status Board May 9, 2022
@typescript-bot
Copy link
Contributor

@ekremkenter To keep things tidy, we have to close PRs that aren't mergeable and don't have activity in the last month. No worries, though — please open a new PR if you'd like to continue with this change. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Abandoned This PR had no activity for a long time, and is considered abandoned Popular package This PR affects a popular package (as counted by NPM download counts). Revision needed This PR needs code changes before it can be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants