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

feat: types for @architect/functions package #50676

Merged

Conversation

activescott
Copy link
Contributor

Types for package https://www.npmjs.com/package/@architect/functions

Select one of these and delete the others:

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.

@activescott activescott changed the title Feat/architect functions feat: types for @architect/functions package Jan 17, 2021
@typescript-bot typescript-bot added the New Definition This PR creates a new definition package. label Jan 17, 2021
@typescript-bot typescript-bot added this to Waiting for Code Reviews in New Pull Request Status Board Jan 17, 2021
@typescript-bot
Copy link
Contributor

typescript-bot commented Jan 17, 2021

@activescott 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": 50676,
  "author": "activescott",
  "headCommitOid": "e722c020eba24fd8d6949ec7a7d862a09271b789",
  "lastPushDate": "2021-01-17T22:10:55.000Z",
  "lastActivityDate": "2021-01-17T22:32:32.000Z",
  "maintainerBlessed": false,
  "hasMergeConflict": false,
  "isFirstContribution": false,
  "popularityLevel": "Well-liked by everyone",
  "pkgInfo": [
    {
      "name": "architect__functions",
      "kind": "add",
      "files": [
        {
          "path": "types/architect__functions/http.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/architect__functions/index.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/architect__functions/package.json",
          "kind": "package-meta-ok"
        },
        {
          "path": "types/architect__functions/tables.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/architect__functions/test/http-tests.ts",
          "kind": "test"
        },
        {
          "path": "types/architect__functions/test/tables-tests.ts",
          "kind": "test"
        },
        {
          "path": "types/architect__functions/tsconfig.json",
          "kind": "package-meta-ok"
        },
        {
          "path": "types/architect__functions/tslint.json",
          "kind": "package-meta-ok"
        }
      ],
      "owners": [],
      "addedOwners": [
        "activescott",
        "ryanblock"
      ],
      "deletedOwners": [],
      "popularityLevel": "Well-liked by everyone"
    }
  ],
  "reviews": [],
  "ciResult": "pass"
}

@typescript-bot
Copy link
Contributor

🔔 @activescott — 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 moved this from Waiting for Code Reviews to Needs Maintainer Action in New Pull Request Status Board Jan 17, 2021
@typescript-bot typescript-bot added the The CI failed When GH Actions fails label Jan 17, 2021
@typescript-bot typescript-bot moved this from Needs Maintainer Action to Needs Author Action in New Pull Request Status Board Jan 17, 2021
@typescript-bot
Copy link
Contributor

@activescott The CI build failed! Please review the logs for more information.

Once you've pushed the fixes, the build will automatically re-run. Thanks!

@typescript-bot
Copy link
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 architect__functions with its source on master.

Comparison details 📊
Batch compilation
Type count 14399
Assignability cache size 2727
Language service measurements
Samples taken 113
Identifiers in tests 113
getCompletionsAtPosition
    Mean duration (ms) 516.2
    Mean CV 8.6%
    Worst duration (ms) 929.1
    Worst identifier res
getQuickInfoAtPosition
    Mean duration (ms) 536.1
    Mean CV 8.7%
    Worst duration (ms) 846.1
    Worst identifier res
System information
Node version v14.15.4
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-1103-azure

@danger-public
Copy link

danger-public commented Jan 17, 2021

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.

architect__functions (unpkg)

was missing the following properties:

  1. proxy
  2. middleware

Generated by 🚫 dangerJS against e722c02

activescott added a commit to activescott/web-app-stack that referenced this pull request Jan 17, 2021
@typescript-bot typescript-bot removed the The CI failed When GH Actions fails label Jan 17, 2021
@typescript-bot typescript-bot moved this from Needs Author Action to Needs Maintainer Action in New Pull Request Status Board Jan 17, 2021
@activescott
Copy link
Contributor Author

@ryanblock You might want to 👍 this comment/PR so that the DT maintainers are comfortable merging with you listed as a definition owner per e722c02

@weswigham weswigham merged commit e6062bc into DefinitelyTyped:master Jan 18, 2021
@typescript-bot typescript-bot removed this from Needs Maintainer Action in New Pull Request Status Board Jan 18, 2021
@typescript-bot
Copy link
Contributor

I just published @types/architect__functions@3.13.0 to npm.

kaznovac pushed a commit to kaznovac/DefinitelyTyped that referenced this pull request Mar 2, 2021
* feat: types for @architect/functions package

* build: remove fields from package.json (although this makes it harder to test locally :(

* build: cleanup for test-all 🤦‍♂️

* chore: adding @ryanblock as a definition owner per his request in slack.

* Ryan's request in slack https://architecture-as-text.slack.com/archives/C6BGT0D08/p1610920330030000?thread_ts=1593229503.429300&cid=C6BGT0D08
* Ryan is also an active contributor to the package: https://github.com/architect/functions/commits?author=ryanblock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
New Definition This PR creates a new definition package.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants