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

[types/factory_girl] Make factory can be used named import / Add override definitions for seq and sequence #50420

Merged
merged 4 commits into from Jan 9, 2021

Conversation

ishikawa
Copy link
Contributor

@ishikawa ishikawa commented Jan 6, 2021

Please fill in this template.

Select one of these and delete the others:

If changing an existing definition:

@typescript-bot typescript-bot added the Check Config Changes a module config files label Jan 6, 2021
@typescript-bot typescript-bot added this to Waiting for Code Reviews in New Pull Request Status Board Jan 6, 2021
@typescript-bot
Copy link
Contributor

typescript-bot commented Jan 6, 2021

@ishikawa Thank you for submitting this PR!

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.

Status

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

All of the items on the list are green. To merge, you need to post a comment including the string "Ready to merge" to bring in your changes.


Diagnostic Information: What the bot saw about this PR
{
  "type": "info",
  "now": "-",
  "pr_number": 50420,
  "author": "ishikawa",
  "headCommitOid": "e8881a982e991fabc88a8299f8d1026b4908db21",
  "lastPushDate": "2021-01-09T01:08:10.000Z",
  "lastActivityDate": "2021-01-09T01:15:38.000Z",
  "maintainerBlessed": false,
  "mergeOfferDate": "2021-01-09T01:12:56.000Z",
  "mergeRequestDate": "2021-01-09T01:15:38.000Z",
  "mergeRequestUser": "ishikawa",
  "hasMergeConflict": false,
  "isFirstContribution": false,
  "popularityLevel": "Well-liked by everyone",
  "pkgInfo": [
    {
      "name": "factory-girl",
      "kind": "edit",
      "files": [
        {
          "path": "types/factory-girl/factory-girl-tests.ts",
          "kind": "test"
        },
        {
          "path": "types/factory-girl/index.d.ts",
          "kind": "definition"
        }
      ],
      "owners": [
        "stackbuilders",
        "sestrella",
        "elcuy",
        "OlivierKamers"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Well-liked by everyone"
    }
  ],
  "reviews": [
    {
      "type": "approved",
      "reviewer": "andrewbranch",
      "date": "2021-01-09T01:10:13.000Z",
      "isMaintainer": true
    }
  ],
  "ciResult": "pass"
}

@typescript-bot
Copy link
Contributor

🔔 @stackbuilders @sestrella @elcuy @OlivierKamers — 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.

{
"extends": "dtslint/dt.json",
"rules": {
"no-duplicate-imports": 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.

I need this suppression for testing import * and import {...} in the same file.

Copy link
Member

Choose a reason for hiding this comment

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

Makes sense, but can you use a comment to disable it only where needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@andrewbranch Thanks for your comment. I fixed it in e8881a9.

@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Maintainer Review in New Pull Request Status Board Jan 6, 2021
@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?

Comparison details 📊
master #50420 diff
Batch compilation
Memory usage (MiB) 38.3 38.5 +0.4%
Type count 2536 2551 +1%
Assignability cache size 164 157 -4%
Language service
Samples taken 230 250 +9%
Identifiers in tests 230 250 +9%
getCompletionsAtPosition
    Mean duration (ms) 62.1 63.7 +2.5%
    Mean CV 20.9% 19.9%
    Worst duration (ms) 95.9 93.6 -2.4%
    Worst identifier boss assocMany
getQuickInfoAtPosition
    Mean duration (ms) 61.8 64.1 +3.7%
    Mean CV 19.3% 19.0%
    Worst duration (ms) 88.5 105.6 +19.3%
    Worst identifier options score

It looks like nothing changed too much. I won’t post performance data again unless it gets worse.

@typescript-bot typescript-bot added the Perf: Same typescript-bot determined that this PR will not significantly impact compilation performance. label Jan 6, 2021
@danger-public
Copy link

danger-public commented Jan 6, 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.

factory-girl (unpkg)

was missing the following properties:

  1. ObjectAdapter
  2. BookshelfAdapter
  3. DefaultAdapter
  4. MongooseAdapter
  5. SequelizeAdapter
as well as these 1 other properties...

ReduxORMAdapter

Generated by 🚫 dangerJS against e8881a9

@andrewbranch andrewbranch moved this from Needs Maintainer Review to Waiting for Code Reviews in New Pull Request Status Board Jan 7, 2021
@typescript-bot typescript-bot removed the Check Config Changes a module config files label Jan 9, 2021
@typescript-bot typescript-bot added Maintainer Approved Self Merge This PR can now be self-merged by the PR author or an owner labels Jan 9, 2021
@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Waiting for Author to Merge in New Pull Request Status Board Jan 9, 2021
@typescript-bot
Copy link
Contributor

@ishikawa Everything looks good here. Great job! I am ready to merge this PR (at e8881a9) on your behalf.

If you'd like that to happen, please post a comment saying:

Ready to merge

and I'll merge this PR almost instantly. Thanks for helping out! ❤️

(@stackbuilders, @sestrella, @elcuy, @OlivierKamers: you can do this too.)

@ishikawa
Copy link
Contributor Author

ishikawa commented Jan 9, 2021

Ready to merge

@typescript-bot typescript-bot moved this from Waiting for Author to Merge to Recently Merged in New Pull Request Status Board Jan 9, 2021
@typescript-bot typescript-bot merged commit 06616fa into DefinitelyTyped:master Jan 9, 2021
@ishikawa ishikawa deleted the factory-girl-seq branch January 9, 2021 01:19
@typescript-bot
Copy link
Contributor

I just published @types/factory-girl@5.0.3 to npm.

@typescript-bot typescript-bot removed this from Recently Merged in New Pull Request Status Board Jan 14, 2021
kaznovac pushed a commit to kaznovac/DefinitelyTyped that referenced this pull request Mar 2, 2021
…can be used named import / Add override definitions for `seq` and `sequence` by @ishikawa

* The `factory` variable can be imported as named import.

https://github.com/simonexmachina/factory-girl/blob/2b71a77af25a5dab18e6849a389955e6d4a2ce72/src/index.js#L13

* Add override definitions for `seq` and `sequence`.

https://github.com/simonexmachina/factory-girl/blob/2b71a77af25a5dab18e6849a389955e6d4a2ce72/src/generators/

* Remove template literal from test

* Disable TSLint no-duplicate-imports rule
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Maintainer Approved Perf: Same typescript-bot determined that this PR will not significantly impact compilation performance. Self Merge This PR can now be self-merged by the PR author or an owner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants