Skip to content

[node] Update vm#55418

Merged
typescript-bot merged 4 commits intoDefinitelyTyped:masterfrom
wafuwafu13:node-vm
Sep 7, 2021
Merged

[node] Update vm#55418
typescript-bot merged 4 commits intoDefinitelyTyped:masterfrom
wafuwafu13:node-vm

Conversation

@wafuwafu13
Copy link
Copy Markdown
Contributor

@wafuwafu13 wafuwafu13 commented Aug 27, 2021

Please fill in this template.

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.

If changing an existing definition:

produceCachedData When true and no cachedData is present, V8 will attempt to produce code cache data for code. Upon success, a Buffer with V8's code cache data will be produced and stored in the cachedData property of the returned vm.Script instance. The cachedDataProduced value will be set to either true or false depending on whether code cache data is produced successfully.

Code: https://github.com/nodejs/node/blob/v16.7.0/lib/vm.js#L364-L370
Example: https://github.com/babel/babel/blob/b141c85b17414c864c12e8f65f2e14ee70018d38/packages/babel-helper-transform-fixture-test-runner/src/index.ts#L105-L109

  • 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.

If removing a declaration:

  • If a package was never on Definitely Typed, you don't need to do anything. (If you wrote a package and provided types, you don't need to register it with us.)
  • Delete the package's directory.
  • Add it to notNeededPackages.json.

@typescript-bot
Copy link
Copy Markdown
Contributor

typescript-bot commented Aug 27, 2021

@wafuwafu13 Thank you for submitting this PR!

This is a live comment which I will keep updated.

1 package in this PR

@wafuwafu13: I see that you have added yourself as an owner, are you sure you want to become an owner?

Code Reviews

Because this is a widely-used package, a DT maintainer will need to review it before it can be merged.

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 a DT maintainer

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": 55418,
  "author": "wafuwafu13",
  "headCommitOid": "8643b09bd4051e41a0c50f1e46cdbc1ad74cbcc7",
  "lastPushDate": "2021-08-31T12:45:49.000Z",
  "lastActivityDate": "2021-09-07T03:55:39.000Z",
  "mergeOfferDate": "2021-09-06T22:15:42.000Z",
  "mergeRequestDate": "2021-09-07T03:55:39.000Z",
  "mergeRequestUser": "wafuwafu13",
  "hasMergeConflict": false,
  "isFirstContribution": false,
  "tooManyFiles": false,
  "popularityLevel": "Critical",
  "pkgInfo": [
    {
      "name": "node",
      "kind": "edit",
      "files": [
        {
          "path": "types/node/index.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/test/vm.ts",
          "kind": "test"
        },
        {
          "path": "types/node/vm.d.ts",
          "kind": "definition"
        }
      ],
      "owners": [
        "Microsoft",
        "DefinitelyTyped",
        "jkomyno",
        "alvis",
        "r3nya",
        "btoueg",
        "smac89",
        "touffy",
        "DeividasBakanas",
        "eyqs",
        "Hannes-Magnusson-CK",
        "hoo29",
        "kjin",
        "ajafff",
        "islishude",
        "mwiktorczyk",
        "mohsen1",
        "n-e",
        "galkin",
        "parambirs",
        "eps1lon",
        "SimonSchick",
        "ThomasdenH",
        "WilcoBakker",
        "wwwy3y3",
        "samuela",
        "kuehlein",
        "bhongy",
        "chyzwar",
        "trivikr",
        "nguymin4",
        "yoursunny",
        "qwelias",
        "ExE-Boss",
        "Ryan-Willpower",
        "peterblazejewicz",
        "addaleax",
        "JasonHK",
        "victorperin",
        "ZYSzys",
        "NodeJS",
        "LinusU"
      ],
      "addedOwners": [
        "KSXGitHub",
        "wafuwafu13"
      ],
      "deletedOwners": [],
      "popularityLevel": "Critical"
    }
  ],
  "reviews": [
    {
      "type": "approved",
      "reviewer": "orta",
      "date": "2021-09-06T22:15:07.000Z",
      "isMaintainer": true
    },
    {
      "type": "stale",
      "reviewer": "LinusU",
      "date": "2021-08-31T12:17:33.000Z",
      "abbrOid": "8dbb0db"
    },
    {
      "type": "stale",
      "reviewer": "peterblazejewicz",
      "date": "2021-08-27T09:06:39.000Z",
      "abbrOid": "050232a"
    },
    {
      "type": "stale",
      "reviewer": "SimonSchick",
      "date": "2021-08-27T02:10:21.000Z",
      "abbrOid": "050232a"
    }
  ],
  "mainBotCommentID": 906832941,
  "ciResult": "pass"
}

@typescript-bot typescript-bot added Edits Owners This PR adds or removes owners Critical package labels Aug 27, 2021
@typescript-bot
Copy link
Copy Markdown
Contributor

typescript-bot commented Aug 27, 2021

* @since v10.6.0
*/
createCachedData(): Buffer;
cachedDataProduced?: boolean | undefined;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

  1. Formatting is messed up.
  2. You can skip the 'undefined' here.
  3. Please make these 'readonly'.
  4. Please move them before the constructor.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should it be marked @deprecated as well?

This option is deprecated in favor of script.createCachedData()

Copy link
Copy Markdown
Contributor Author

@wafuwafu13 wafuwafu13 Aug 27, 2021

Choose a reason for hiding this comment

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

@SimonSchick

  1. Formatting is messed up.

Please see at local envirionment :)

  1. You can skip the 'undefined' here.

All Optional Property in this file has undefined so I do this.
(But I also think undefined don't need...)

  1. Please make these 'readonly'.

What is 'these' ? cachedDataRejected is not readonly so I didn't make it readonly.

  1. Please move them before the constructor.

Why? cachedDataRejected is not at before the constructor.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor

@LinusU LinusU Aug 31, 2021

Choose a reason for hiding this comment

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

  1. Formatting is messed up.

Please see at local envirionment :)

It seems like you have used tabs on these rows whilst the rest of the file are using spaces, could you change to spaces?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks for telling me.

@typescript-bot typescript-bot added the Revision needed This PR needs code changes before it can be merged. label Aug 27, 2021
@typescript-bot
Copy link
Copy Markdown
Contributor

@wafuwafu13 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 Aug 27, 2021
@typescript-bot
Copy link
Copy Markdown
Contributor

@peterblazejewicz, @SimonSchick 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?

@wafuwafu13
Copy link
Copy Markdown
Contributor Author

@peterblazejewicz

Can you please approve?

@SimonSchick
Copy link
Copy Markdown
Contributor

The formatting is still messed up.

@wafuwafu13
Copy link
Copy Markdown
Contributor Author

Fixed.

@typescript-bot
Copy link
Copy Markdown
Contributor

@LinusU, @peterblazejewicz, @SimonSchick 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?

Copy link
Copy Markdown
Collaborator

@orta orta left a comment

Choose a reason for hiding this comment

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

Looks good to me node source code 👍🏻

@typescript-bot typescript-bot added Maintainer Approved Self Merge This PR can now be self-merged by the PR author or an owner labels Sep 6, 2021
@typescript-bot
Copy link
Copy Markdown
Contributor

@wafuwafu13: Everything looks good here. I am ready to merge this PR (at 8643b09) on your behalf whenever you think it's ready.

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! ❤️

(@microsoft, @DefinitelyTyped, @jkomyno, @alvis, @r3nya, @btoueg, @smac89, @Touffy, @DeividasBakanas, @eyqs, @Hannes-Magnusson-CK, @hoo29, @kjin, @ajafff, @islishude, @mwiktorczyk, @mohsen1, @n-e, @galkin, @parambirs, @eps1lon, @SimonSchick, @ThomasdenH, @WilcoBakker, @wwwy3y3, @samuela, @kuehlein, @bhongy, @chyzwar, @trivikr, @nguymin4, @yoursunny, @qwelias, @ExE-Boss, @Ryan-Willpower, @peterblazejewicz, @addaleax, @JasonHK, @victorperin, @ZYSzys, @nodejs, @LinusU: you can do this too.)

@wafuwafu13
Copy link
Copy Markdown
Contributor Author

Ready to merge

@typescript-bot typescript-bot merged commit ea859ab into DefinitelyTyped:master Sep 7, 2021
@typescript-bot
Copy link
Copy Markdown
Contributor

I just published @types/node@16.7.12 to npm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Critical package Edits Owners This PR adds or removes owners Maintainer Approved 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.

6 participants