Skip to content

feat: Add has‑package‑exports#50572

Merged
weswigham merged 1 commit intoDefinitelyTyped:masterfrom
ExE-Boss:types/has-package-exports/v1.2
Jan 13, 2021
Merged

feat: Add has‑package‑exports#50572
weswigham merged 1 commit intoDefinitelyTyped:masterfrom
ExE-Boss:types/has-package-exports/v1.2

Conversation

@ExE-Boss
Copy link
Copy Markdown
Contributor

Please fill in this template.

If adding a new definition:

  • The package does not already provide its own types, or cannot have its .d.ts files generated via --declaration
  • If this is for an npm package, match the name. If not, do not conflict with the name of an npm package.
  • Create it with dts-gen --dt, not by basing it on an existing project.
  • Represents shape of module/library correctly
  • tslint.json should contain { "extends": "dtslint/dt.json" }, and no additional rules.
  • tsconfig.json should have noImplicitAny, noImplicitThis, strictNullChecks, and strictFunctionTypes set to true.

@danger-public
Copy link
Copy Markdown

Inspecting the JavaScript source for this package found some properties that are not in the .d.ts files.
The check for missing properties isn't always right, so take this list as advice, not a requirement.

has-package-exports (unpkg)

was missing the following properties:

  1. valueOf

Generated by 🚫 dangerJS against af12c12

@typescript-bot
Copy link
Copy Markdown
Contributor

👋 Hi there! I’ve run some quick measurements against master and your PR. These metrics should help the humans reviewing this PR gauge whether it might negatively affect compile times or editor responsiveness for users who install these typings.

Let’s review the numbers, shall we?

These typings are for a package that doesn’t yet exist on master, so I don’t have anything to compare against yet! In the future, I’ll be able to compare PRs to has-package-exports with its source on master.

Comparison details 📊
Batch compilation
Type count 1284
Assignability cache size 84
Language service measurements
Samples taken 10
Identifiers in tests 10
getCompletionsAtPosition
    Mean duration (ms) 63.5
    Mean CV 30.8%
    Worst duration (ms) 88.5
    Worst identifier hasPackageExportsConditionalIllegal
getQuickInfoAtPosition
    Mean duration (ms) 60.7
    Mean CV 19.3%
    Worst duration (ms) 66.6
    Worst identifier hasPackageExportsConditionalIllegal
System information
Node version v14.15.1
CPU count 2
CPU speed 2.394 GHz
CPU model Intel(R) Xeon(R) CPU E5-2673 v3 @ 2.40GHz
CPU Architecture x64
Memory 6.8 GiB
Platform linux
Release 4.15.0-1100-azure

@ExE-Boss
Copy link
Copy Markdown
Contributor Author

@orta The bot should probably not complain about missing common properties like toString or valueOf.

@ExE-Boss
Copy link
Copy Markdown
Contributor Author

🔔 @ljharb – Because the bot seems to be on strike today.

@typescript-bot
Copy link
Copy Markdown
Contributor

typescript-bot commented Jan 13, 2021

@ExE-Boss Thank you for submitting this PR!

This is a live comment which I will keep updated.

1 package in this PR

Code Reviews

This PR adds a new definition, so it needs to be reviewed by a DT maintainer before it can be merged.

Status

  • ✅ No merge conflicts
  • ✅ Continuous integration tests have passed
  • ❌ Only a DT maintainer can approve changes when there are new packages added

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


Diagnostic Information: What the bot saw about this PR
{
  "type": "info",
  "now": "-",
  "pr_number": 50572,
  "author": "ExE-Boss",
  "headCommitOid": "af12c12bc3cb693517b711e1d6efb2bed4799a6d",
  "lastPushDate": "2021-01-13T11:43:23.000Z",
  "lastActivityDate": "2021-01-13T15:08:48.000Z",
  "maintainerBlessed": false,
  "hasMergeConflict": false,
  "isFirstContribution": false,
  "popularityLevel": "Well-liked by everyone",
  "pkgInfo": [
    {
      "name": "has-package-exports",
      "kind": "add",
      "files": [
        {
          "path": "types/has-package-exports/conditional.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/has-package-exports/has-package-exports-tests.ts",
          "kind": "test"
        },
        {
          "path": "types/has-package-exports/index.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/has-package-exports/pattern.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/has-package-exports/tsconfig.json",
          "kind": "package-meta",
          "suspect": "not [the expected form](https://github.com/DefinitelyTyped/DefinitelyTyped#user-content-tsconfigjson)"
        },
        {
          "path": "types/has-package-exports/tslint.json",
          "kind": "package-meta-ok"
        }
      ],
      "owners": [],
      "addedOwners": [
        "ljharb",
        "ExE-Boss"
      ],
      "deletedOwners": [],
      "popularityLevel": "Well-liked by everyone"
    }
  ],
  "reviews": [
    {
      "type": "approved",
      "reviewer": "ljharb",
      "date": "2021-01-13T15:08:48.000Z",
      "isMaintainer": false
    }
  ],
  "ciResult": "pass"
}

@typescript-bot typescript-bot added New Definition This PR creates a new definition package. Check Config Changes a module config files labels Jan 13, 2021
@typescript-bot
Copy link
Copy Markdown
Contributor

🔔 @ExE-Boss — you're the only owner, but it would still be good if you find someone to review this PR in the next few days, otherwise a maintainer will look at it. (And if you do find someone, maybe even recruit them to be a second owner to make future changes easier...)

@typescript-bot typescript-bot added the Other Approved This PR was reviewed and signed-off by a community member. label Jan 13, 2021
@weswigham weswigham merged commit e77e977 into DefinitelyTyped:master Jan 13, 2021
@typescript-bot
Copy link
Copy Markdown
Contributor

I just published @types/has-package-exports@1.2.0 to npm.

@ExE-Boss ExE-Boss deleted the types/has-package-exports/v1.2 branch January 13, 2021 21:13
kaznovac pushed a commit to kaznovac/DefinitelyTyped that referenced this pull request Mar 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Check Config Changes a module config files New Definition This PR creates a new definition package. Other Approved This PR was reviewed and signed-off by a community member.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants