Skip to content

Conversation

@SimonSchick
Copy link
Contributor

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

Revert of #51107 as discussed we should bring this back once microsoft/TypeScript#42764 has matured.

@typescript-bot typescript-bot added Critical package Author is Owner The author of this PR is a listed owner of the package. Check Config Changes a module config files labels Apr 26, 2021
@typescript-bot
Copy link
Contributor

typescript-bot commented Apr 26, 2021

@SimonSchick Thank you for submitting this PR!

This is a live comment which I will keep updated.

This PR might touch some part of DefinitelyTyped infrastructure, so a DT maintainer will need to review it. This is rare — did you mean to do this?

4 packages in this PR

Note: this PR touches too many files, and I didn't see all of them!

Code Reviews

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

Status

  • ✅ No merge conflicts
  • ✅ Continuous integration tests have passed
  • 🕐 A DT maintainer needs to approve changes which affect more than one package

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


Diagnostic Information: What the bot saw about this PR
{
  "type": "info",
  "now": "-",
  "pr_number": 52595,
  "author": "SimonSchick",
  "headCommitOid": "792e6796526a04a4fb1a9825ffc4176840c466e5",
  "lastPushDate": "2021-04-26T22:58:43.000Z",
  "lastActivityDate": "2021-04-28T05:07:18.000Z",
  "maintainerBlessed": false,
  "hasMergeConflict": false,
  "isFirstContribution": false,
  "tooManyFiles": true,
  "popularityLevel": "Critical",
  "pkgInfo": [
    {
      "name": "aws-lambda-fastify",
      "kind": "edit",
      "files": [
        {
          "path": "types/aws-lambda-fastify/aws-lambda-fastify-tests.ts",
          "kind": "test"
        }
      ],
      "owners": [
        "kentakang"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Well-liked by everyone"
    },
    {
      "name": "body",
      "kind": "edit",
      "files": [
        {
          "path": "types/body/test/body-tests.ts",
          "kind": "test"
        }
      ],
      "owners": [
        "SachinShekhar"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Well-liked by everyone"
    },
    {
      "name": "isomorphic-git__lightning-fs",
      "kind": "edit",
      "files": [
        {
          "path": "types/isomorphic-git__lightning-fs/index.d.ts",
          "kind": "definition"
        }
      ],
      "owners": [
        "Progyan1997"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Well-liked by everyone"
    },
    {
      "name": "node",
      "kind": "edit",
      "files": [
        {
          "path": "types/node/assert.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/async_hooks.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/buffer.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/child_process.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/cluster.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/console.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/constants.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/crypto.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/dgram.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/dns.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/dns/promises.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/domain.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/events.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/fs.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/fs/promises.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/http.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/http2.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/https.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/inspector.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/module.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/net.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/node-tests.ts",
          "kind": "test"
        },
        {
          "path": "types/node/os.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/path.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/perf_hooks.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/process.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/punycode.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/querystring.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/readline.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/repl.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/scripts/generate-inspector/inspector.d.ts.template",
          "kind": "package-meta",
          "suspect": "edited"
        },
        {
          "path": "types/node/stream.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/stream/promises.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/string_decoder.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/test/assert.ts",
          "kind": "test"
        },
        {
          "path": "types/node/test/async_hooks.ts",
          "kind": "test"
        },
        {
          "path": "types/node/test/buffer.ts",
          "kind": "test"
        },
        {
          "path": "types/node/test/child_process.ts",
          "kind": "test"
        },
        {
          "path": "types/node/test/cluster.ts",
          "kind": "test"
        },
        {
          "path": "types/node/test/constants.ts",
          "kind": "test"
        },
        {
          "path": "types/node/test/crypto.ts",
          "kind": "test"
        },
        {
          "path": "types/node/test/dgram.ts",
          "kind": "test"
        },
        {
          "path": "types/node/test/dns.ts",
          "kind": "test"
        },
        {
          "path": "types/node/test/events.ts",
          "kind": "test"
        },
        {
          "path": "types/node/test/fs.ts",
          "kind": "test"
        },
        {
          "path": "types/node/test/global.ts",
          "kind": "test"
        },
        {
          "path": "types/node/test/http.ts",
          "kind": "test"
        },
        {
          "path": "types/node/test/http2.ts",
          "kind": "test"
        },
        {
          "path": "types/node/test/module.ts",
          "kind": "test"
        },
        {
          "path": "types/node/test/net.ts",
          "kind": "test"
        },
        {
          "path": "types/node/test/os.ts",
          "kind": "test"
        },
        {
          "path": "types/node/test/path.ts",
          "kind": "test"
        },
        {
          "path": "types/node/test/perf_hooks.ts",
          "kind": "test"
        },
        {
          "path": "types/node/test/process.ts",
          "kind": "test"
        },
        {
          "path": "types/node/test/querystring.ts",
          "kind": "test"
        },
        {
          "path": "types/node/test/readline.ts",
          "kind": "test"
        },
        {
          "path": "types/node/test/repl.ts",
          "kind": "test"
        },
        {
          "path": "types/node/test/stream.ts",
          "kind": "test"
        },
        {
          "path": "types/node/test/string_decoder.ts",
          "kind": "test"
        },
        {
          "path": "types/node/test/timers.ts",
          "kind": "test"
        },
        {
          "path": "types/node/test/timers_promises.ts",
          "kind": "test"
        },
        {
          "path": "types/node/test/tls.ts",
          "kind": "test"
        },
        {
          "path": "types/node/test/tty.ts",
          "kind": "test"
        },
        {
          "path": "types/node/test/url.ts",
          "kind": "test"
        },
        {
          "path": "types/node/test/util.ts",
          "kind": "test"
        },
        {
          "path": "types/node/test/v8.ts",
          "kind": "test"
        },
        {
          "path": "types/node/test/vm.ts",
          "kind": "test"
        },
        {
          "path": "types/node/test/wasi.ts",
          "kind": "test"
        },
        {
          "path": "types/node/test/worker_threads.ts",
          "kind": "test"
        },
        {
          "path": "types/node/test/zlib.ts",
          "kind": "test"
        },
        {
          "path": "types/node/timers.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/timers/promises.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/tls.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/trace_events.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/ts3.6/assert.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/ts3.6/node-tests.ts",
          "kind": "test"
        },
        {
          "path": "types/node/ts3.6/tslint.json",
          "kind": "package-meta",
          "suspect": "not [the expected form](https://github.com/DefinitelyTyped/DefinitelyTyped#user-content-linter-tslintjson) and not moving towards it"
        },
        {
          "path": "types/node/tty.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/url.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/util.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/v12/assert.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/v12/async_hooks.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/v12/buffer.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/v12/child_process.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/v12/cluster.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/v12/console.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/v12/constants.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/v12/crypto.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/v12/dgram.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/v12/dns.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/v12/domain.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/v12/events.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/v12/fs.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/v12/http.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/v12/http2.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/v12/https.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/v12/inspector.d.ts",
          "kind": "definition"
        }
      ],
      "owners": [
        "Microsoft",
        "DefinitelyTyped",
        "jkomyno",
        "alvis",
        "r3nya",
        "btoueg",
        "smac89",
        "touffy",
        "DeividasBakanas",
        "eyqs",
        "Hannes-Magnusson-CK",
        "KSXGitHub",
        "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"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Critical"
    }
  ],
  "reviews": [
    {
      "type": "approved",
      "reviewer": "SachinShekhar",
      "date": "2021-04-28T05:07:18.000Z",
      "isMaintainer": false
    },
    {
      "type": "approved",
      "reviewer": "G-Rath",
      "date": "2021-04-28T03:14:00.000Z",
      "isMaintainer": false
    },
    {
      "type": "approved",
      "reviewer": "Progyan1997",
      "date": "2021-04-27T11:25:40.000Z",
      "isMaintainer": false
    }
  ],
  "ciResult": "pass"
}

@typescript-bot
Copy link
Contributor

typescript-bot commented Apr 26, 2021

@ExE-Boss
Copy link
Contributor

Note that I’d prefer if we tried moving the node:‑prefixed module names after the unprefixed forms before doing this.

@typescript-bot typescript-bot added the The CI failed When GH Actions fails label Apr 26, 2021
@typescript-bot
Copy link
Contributor

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

node/v15.0

Comparison details for node/15.0 📊
master #52595 diff
Batch compilation
Memory usage (MiB) 131.2 131.2 0.0%
Type count 26341 26454 0%
Assignability cache size 9307 9366 +1%
Language service
Samples taken 46 46 0%
Identifiers in tests 46 46 0%
getCompletionsAtPosition
    Mean duration (ms) 868.7 780.0 -10.2%
    Mean CV 9.7% 11.3%
    Worst duration (ms) 1073.3 986.4 -8.1%
    Worst identifier a a
getQuickInfoAtPosition
    Mean duration (ms) 855.0 757.1 -11.4%
    Mean CV 9.6% 9.0%
    Worst duration (ms) 1021.4 937.1 -8.3%
    Worst identifier a a
System information
Node version v14.16.1 v14.16.1
CPU count 2 2
CPU speed 2.394 GHz 2.095 GHz
CPU model Intel(R) Xeon(R) CPU E5-2673 v3 @ 2.40GHz Intel(R) Xeon(R) Platinum 8171M CPU @ 2.60GHz
CPU Architecture x64 x64
Memory 6.8 GiB 6.8 GiB
Platform linux linux
Release 4.15.0-1113-azure 4.15.0-1113-azure

First off, note that the system varied slightly between these two runs, so you’ll have to take these measurements with a grain of salt.

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

node/v15.0

Comparison details for node/15.0 📊
master #52595 diff
Batch compilation
Memory usage (MiB) 141.2 141.0 -0.1%
Type count 26341 26454 0%
Assignability cache size 9307 9366 +1%
Language service
Samples taken 46 46 0%
Identifiers in tests 46 46 0%
getCompletionsAtPosition
    Mean duration (ms) 766.2 773.2 +0.9%
    Mean CV 10.2% 10.2%
    Worst duration (ms) 870.2 925.2 +6.3%
    Worst identifier a a
getQuickInfoAtPosition
    Mean duration (ms) 756.9 752.2 -0.6%
    Mean CV 9.2% 9.4%
    Worst duration (ms) 947.5 991.2 +4.6%
    Worst identifier a a

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

node/v15.0

These typings are for a version of node that doesn’t yet exist on master, so I’ve compared them with v14.14.

Comparison details for node/15.0 📊
14.14@master 15.0 in #52595 diff
Batch compilation
Memory usage (MiB) 135.3 134.4 -0.7%
Type count 25394 26454 +4%
Assignability cache size 8819 9366 +6%
Language service
Samples taken 46 46 0%
Identifiers in tests 46 46 0%
getCompletionsAtPosition
    Mean duration (ms) 889.1 764.9 -14.0%
    Mean CV 10.4% 10.9%
    Worst duration (ms) 1033.6 901.2 -12.8%
    Worst identifier a assert
getQuickInfoAtPosition
    Mean duration (ms) 877.8 756.7 -13.8%
    Mean CV 10.8% 9.1%
    Worst duration (ms) 1012.4 1024.0 +1.1%
    Worst identifier a b
System information
Node version v14.16.1 v14.16.1
CPU count 2 2
CPU speed 2.294 GHz 2.095 GHz
CPU model Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz Intel(R) Xeon(R) Platinum 8171M CPU @ 2.60GHz
CPU Architecture x64 x64
Memory 6.8 GiB 6.8 GiB
Platform linux linux
Release 4.15.0-1113-azure 4.15.0-1113-azure

First off, note that the system varied slightly between these two runs, so you’ll have to take these measurements with a grain of salt.

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

@typescript-bot typescript-bot added Perf: Same typescript-bot determined that this PR will not significantly impact compilation performance. Edits multiple packages and removed Author is Owner The author of this PR is a listed owner of the package. The CI failed When GH Actions fails labels Apr 26, 2021
@SimonSchick
Copy link
Contributor Author

I tried this previously but saw no change on resolve order based on declaration order but you're welcome to check this yourself.

Furthermore I think it would make more sense to wait for official support for module aliases from the TS team, the node: protocol seems pretty nieche at this point (and appears to be starting to fragment import names as seen in my PR diff, although this is likely due to import resolve order).

@typescript-bot typescript-bot added the The CI failed When GH Actions fails label Apr 26, 2021
@typescript-bot
Copy link
Contributor

@SimonSchick 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 typescript-bot added The CI failed When GH Actions fails and removed The CI failed When GH Actions fails labels Apr 26, 2021
@typescript-bot
Copy link
Contributor

@SimonSchick 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

Updated numbers for you here from 8f728c8.

aws-lambda-fastify/v1.4

Comparison details for aws-lambda-fastify/1.4 📊
master #52595 diff
Batch compilation
Memory usage (MiB) 85.9 79.4 -7.6%
Type count 15011 15016 0%
Assignability cache size 3158 3158 0%
Language service
Samples taken 52 52 0%
Identifiers in tests 52 52 0%
getCompletionsAtPosition
    Mean duration (ms) 414.8 471.2 +13.6%
    Mean CV 11.1% 10.0%
    Worst duration (ms) 563.3 589.8 +4.7%
    Worst identifier Context proxy
getQuickInfoAtPosition
    Mean duration (ms) 416.1 469.9 +12.9%
    Mean CV 13.0% 11.0%
    Worst duration (ms) 512.1 579.2 +13.1%
    Worst identifier proxy proxy
System information
Node version v14.16.1 v14.16.1
CPU count 2 2
CPU speed 2.095 GHz 2.294 GHz
CPU model Intel(R) Xeon(R) Platinum 8171M CPU @ 2.60GHz Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz
CPU Architecture x64 x64
Memory 6.8 GiB 6.8 GiB
Platform linux linux
Release 4.15.0-1113-azure 4.15.0-1113-azure

First off, note that the system varied slightly between these two runs, so you’ll have to take these measurements with a grain of salt.

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

body/v5.1

Comparison details for body/5.1 📊
master #52595 diff
Batch compilation
Memory usage (MiB) 77.5 70.5 -9.0%
Type count 12017 12023 0%
Assignability cache size 2832 2832 0%
Language service
Samples taken 145 145 0%
Identifiers in tests 145 145 0%
getCompletionsAtPosition
    Mean duration (ms) 342.9 387.0 +12.9%
    Mean CV 10.2% 11.2%
    Worst duration (ms) 428.2 488.6 +14.1%
    Worst identifier parse res
getQuickInfoAtPosition
    Mean duration (ms) 350.0 396.7 +13.4%
    Mean CV 9.6% 9.8%
    Worst duration (ms) 448.9 474.7 +5.7%
    Worst identifier queryString res
System information
Node version v14.16.1 v14.16.1
CPU count 2 2
CPU speed 2.095 GHz 2.294 GHz
CPU model Intel(R) Xeon(R) Platinum 8171M CPU @ 2.60GHz Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz
CPU Architecture x64 x64
Memory 6.8 GiB 6.8 GiB
Platform linux linux
Release 4.15.0-1113-azure 4.15.0-1113-azure

First off, note that the system varied slightly between these two runs, so you’ll have to take these measurements with a grain of salt.

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

isomorphic-git__lightning-fs/v4.4

Comparison details for isomorphic-git__lightning-fs/4.4 📊
master #52595 diff
Batch compilation
Memory usage (MiB) 78.6 81.8 +4.1%
Type count 12022 12028 0%
Assignability cache size 2831 2831 0%
Language service
Samples taken 18 18 0%
Identifiers in tests 18 18 0%
getCompletionsAtPosition
    Mean duration (ms) 372.1 416.3 +11.9%
    Mean CV 13.4% 13.5%
    Worst duration (ms) 415.1 504.1 +21.4% 🔸
    Worst identifier originalData originalData
getQuickInfoAtPosition
    Mean duration (ms) 372.7 419.3 +12.5%
    Mean CV 13.9% 11.0%
    Worst duration (ms) 442.0 495.2 +12.0%
    Worst identifier originalData originalData
System information
Node version v14.16.1 v14.16.1
CPU count 2 2
CPU speed 2.095 GHz 2.294 GHz
CPU model Intel(R) Xeon(R) Platinum 8171M CPU @ 2.60GHz Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz
CPU Architecture x64 x64
Memory 6.8 GiB 6.8 GiB
Platform linux linux
Release 4.15.0-1113-azure 4.15.0-1113-azure

First off, note that the system varied slightly between these two runs, so you’ll have to take these measurements with a grain of salt.

Looks like there were a couple significant differences—take a look at worst-case duration for getting completions at a position to make sure everything looks ok.

node/v15.0

Comparison details for node/15.0 📊
master #52595 diff
Batch compilation
Memory usage (MiB) 135.5 132.7 -2.1%
Type count 26341 26454 0%
Assignability cache size 9307 9366 +1%
Language service
Samples taken 46 46 0%
Identifiers in tests 46 46 0%
getCompletionsAtPosition
    Mean duration (ms) 770.6 871.0 +13.0%
    Mean CV 11.4% 9.8%
    Worst duration (ms) 945.2 999.8 +5.8%
    Worst identifier a a
getQuickInfoAtPosition
    Mean duration (ms) 750.8 856.0 +14.0%
    Mean CV 10.1% 9.5%
    Worst duration (ms) 896.9 1005.8 +12.1%
    Worst identifier a a
System information
Node version v14.16.1 v14.16.1
CPU count 2 2
CPU speed 2.095 GHz 2.294 GHz
CPU model Intel(R) Xeon(R) Platinum 8171M CPU @ 2.60GHz Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz
CPU Architecture x64 x64
Memory 6.8 GiB 6.8 GiB
Platform linux linux
Release 4.15.0-1113-azure 4.15.0-1113-azure

First off, note that the system varied slightly between these two runs, so you’ll have to take these measurements with a grain of salt.

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

node/v15.0

Comparison details for node/15.0 📊
master #52595 diff
Batch compilation
Memory usage (MiB) 133.8 131.5 -1.7%
Type count 26341 26454 0%
Assignability cache size 9307 9366 +1%
Language service
Samples taken 46 46 0%
Identifiers in tests 46 46 0%
getCompletionsAtPosition
    Mean duration (ms) 874.3 911.2 +4.2%
    Mean CV 7.8% 10.0%
    Worst duration (ms) 1002.8 1101.1 +9.8%
    Worst identifier assert a
getQuickInfoAtPosition
    Mean duration (ms) 890.1 885.1 -0.6%
    Mean CV 10.4% 8.7%
    Worst duration (ms) 1150.6 1000.7 -13.0%
    Worst identifier a a

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

node/v15.0

These typings are for a version of node that doesn’t yet exist on master, so I’ve compared them with v14.14.

Comparison details for node/15.0 📊
14.14@master 15.0 in #52595 diff
Batch compilation
Memory usage (MiB) 135.3 132.2 -2.3%
Type count 25394 26454 +4%
Assignability cache size 8819 9366 +6%
Language service
Samples taken 46 46 0%
Identifiers in tests 46 46 0%
getCompletionsAtPosition
    Mean duration (ms) 889.1 907.4 +2.1%
    Mean CV 10.4% 9.7%
    Worst duration (ms) 1033.6 1091.5 +5.6%
    Worst identifier a a
getQuickInfoAtPosition
    Mean duration (ms) 877.8 881.0 +0.4%
    Mean CV 10.8% 8.8%
    Worst duration (ms) 1012.4 1017.5 +0.5%
    Worst identifier a a

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

@typescript-bot typescript-bot added Perf: Worse typescript-bot determined that this PR has a negative impact on compilation performance. and removed Perf: Same typescript-bot determined that this PR will not significantly impact compilation performance. labels Apr 26, 2021
@typescript-bot typescript-bot removed the The CI failed When GH Actions fails label Apr 26, 2021
@typescript-bot
Copy link
Contributor

Updated numbers for you here from d217990. Nice job, these numbers look better.

aws-lambda-fastify/v1.4

Comparison details for aws-lambda-fastify/1.4 📊
master #52595 diff
Batch compilation
Memory usage (MiB) 85.9 78.5 -8.6%
Type count 15011 15016 0%
Assignability cache size 3158 3158 0%
Language service
Samples taken 52 52 0%
Identifiers in tests 52 52 0%
getCompletionsAtPosition
    Mean duration (ms) 414.8 410.7 -1.0%
    Mean CV 11.1% 13.1%
    Worst duration (ms) 563.3 524.2 -6.9%
    Worst identifier Context proxy
getQuickInfoAtPosition
    Mean duration (ms) 416.1 405.7 -2.5%
    Mean CV 13.0% 11.6%
    Worst duration (ms) 512.1 476.0 -7.0%
    Worst identifier proxy Server
System information
Node version v14.16.1 v14.16.1
CPU count 2 2
CPU speed 2.095 GHz 2.095 GHz
CPU model Intel(R) Xeon(R) Platinum 8171M CPU @ 2.60GHz Intel(R) Xeon(R) Platinum 8171M CPU @ 2.60GHz
CPU Architecture x64 x64
Memory 6.8 GiB 6.8 GiB
Platform linux linux
Release 4.15.0-1113-azure 4.15.0-1113-azure

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

body/v5.1

Comparison details for body/5.1 📊
master #52595 diff
Batch compilation
Memory usage (MiB) 77.5 82.2 +6.1%
Type count 12017 12023 0%
Assignability cache size 2832 2832 0%
Language service
Samples taken 145 145 0%
Identifiers in tests 145 145 0%
getCompletionsAtPosition
    Mean duration (ms) 342.9 336.1 -2.0%
    Mean CV 10.2% 10.9%
    Worst duration (ms) 428.2 432.5 +1.0%
    Worst identifier parse limit
getQuickInfoAtPosition
    Mean duration (ms) 350.0 347.9 -0.6%
    Mean CV 9.6% 10.0%
    Worst duration (ms) 448.9 433.3 -3.5%
    Worst identifier queryString limit
System information
Node version v14.16.1 v14.16.1
CPU count 2 2
CPU speed 2.095 GHz 2.095 GHz
CPU model Intel(R) Xeon(R) Platinum 8171M CPU @ 2.60GHz Intel(R) Xeon(R) Platinum 8171M CPU @ 2.60GHz
CPU Architecture x64 x64
Memory 6.8 GiB 6.8 GiB
Platform linux linux
Release 4.15.0-1113-azure 4.15.0-1113-azure

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

isomorphic-git__lightning-fs/v4.4

Comparison details for isomorphic-git__lightning-fs/4.4 📊
master #52595 diff
Batch compilation
Memory usage (MiB) 78.6 80.9 +2.9%
Type count 12022 12028 0%
Assignability cache size 2831 2831 0%
Language service
Samples taken 18 18 0%
Identifiers in tests 18 18 0%
getCompletionsAtPosition
    Mean duration (ms) 372.1 366.1 -1.6%
    Mean CV 13.4% 15.9%
    Worst duration (ms) 415.1 472.6 +13.9%
    Worst identifier originalData data
getQuickInfoAtPosition
    Mean duration (ms) 372.7 356.7 -4.3%
    Mean CV 13.9% 10.3%
    Worst duration (ms) 442.0 433.6 -1.9%
    Worst identifier originalData data
System information
Node version v14.16.1 v14.16.1
CPU count 2 2
CPU speed 2.095 GHz 2.095 GHz
CPU model Intel(R) Xeon(R) Platinum 8171M CPU @ 2.60GHz Intel(R) Xeon(R) Platinum 8171M CPU @ 2.60GHz
CPU Architecture x64 x64
Memory 6.8 GiB 6.8 GiB
Platform linux linux
Release 4.15.0-1113-azure 4.15.0-1113-azure

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

node/v15.0

Comparison details for node/15.0 📊
master #52595 diff
Batch compilation
Memory usage (MiB) 133.8 139.9 +4.6%
Type count 26341 26454 0%
Assignability cache size 9307 9366 +1%
Language service
Samples taken 46 46 0%
Identifiers in tests 46 46 0%
getCompletionsAtPosition
    Mean duration (ms) 874.3 769.4 -12.0%
    Mean CV 7.8% 10.0%
    Worst duration (ms) 1002.8 913.3 -8.9%
    Worst identifier assert a
getQuickInfoAtPosition
    Mean duration (ms) 890.1 752.9 -15.4%
    Mean CV 10.4% 9.0%
    Worst duration (ms) 1150.6 899.2 -21.8%
    Worst identifier a a
System information
Node version v14.16.1 v14.16.1
CPU count 2 2
CPU speed 2.294 GHz 2.095 GHz
CPU model Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz Intel(R) Xeon(R) Platinum 8171M CPU @ 2.60GHz
CPU Architecture x64 x64
Memory 6.8 GiB 6.8 GiB
Platform linux linux
Release 4.15.0-1113-azure 4.15.0-1113-azure

First off, note that the system varied slightly between these two runs, so you’ll have to take these measurements with a grain of salt.

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

node/v15.0

Comparison details for node/15.0 📊
master #52595 diff
Batch compilation
Memory usage (MiB) 140.4 141.4 +0.7%
Type count 26341 26454 0%
Assignability cache size 9307 9366 +1%
Language service
Samples taken 46 46 0%
Identifiers in tests 46 46 0%
getCompletionsAtPosition
    Mean duration (ms) 770.3 762.5 -1.0%
    Mean CV 9.9% 8.7%
    Worst duration (ms) 912.7 988.5 +8.3%
    Worst identifier a a
getQuickInfoAtPosition
    Mean duration (ms) 756.5 751.5 -0.7%
    Mean CV 9.9% 9.0%
    Worst duration (ms) 947.9 921.7 -2.8%
    Worst identifier a b

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

node/v15.0

These typings are for a version of node that doesn’t yet exist on master, so I’ve compared them with v14.14.

Comparison details for node/15.0 📊
14.14@master 15.0 in #52595 diff
Batch compilation
Memory usage (MiB) 135.3 141.3 +4.5%
Type count 25394 26454 +4%
Assignability cache size 8819 9366 +6%
Language service
Samples taken 46 46 0%
Identifiers in tests 46 46 0%
getCompletionsAtPosition
    Mean duration (ms) 889.1 770.3 -13.4%
    Mean CV 10.4% 10.6%
    Worst duration (ms) 1033.6 920.4 -10.9%
    Worst identifier a a
getQuickInfoAtPosition
    Mean duration (ms) 877.8 746.6 -14.9%
    Mean CV 10.8% 8.7%
    Worst duration (ms) 1012.4 935.4 -7.6%
    Worst identifier a a
System information
Node version v14.16.1 v14.16.1
CPU count 2 2
CPU speed 2.294 GHz 2.095 GHz
CPU model Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz Intel(R) Xeon(R) Platinum 8171M CPU @ 2.60GHz
CPU Architecture x64 x64
Memory 6.8 GiB 6.8 GiB
Platform linux linux
Release 4.15.0-1113-azure 4.15.0-1113-azure

First off, note that the system varied slightly between these two runs, so you’ll have to take these measurements with a grain of salt.

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

@typescript-bot typescript-bot added Perf: Same typescript-bot determined that this PR will not significantly impact compilation performance. and removed Perf: Worse typescript-bot determined that this PR has a negative impact on compilation performance. labels Apr 26, 2021
Copy link
Contributor

@0xTheProDev 0xTheProDev left a comment

Choose a reason for hiding this comment

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

+1 for Lighting FS changes. 💯

@typescript-bot typescript-bot added Other Approved This PR was reviewed and signed-off by a community member. Possibly Edits Infrastructure Too many files, bot didn't see them all labels Apr 28, 2021
@elibarzilay elibarzilay merged commit ec6522b into DefinitelyTyped:master May 4, 2021
@SimonSchick SimonSchick deleted the revert/node-prefix branch May 4, 2021 22:36
@typescript-bot
Copy link
Contributor

I just published @types/isomorphic-git__lightning-fs@4.4.1 to npm.

@typescript-bot
Copy link
Contributor

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

@typescript-bot
Copy link
Contributor

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

@typescript-bot
Copy link
Contributor

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

@karlhorky
Copy link
Contributor

karlhorky commented May 7, 2021

@SimonSchick @elibarzilay Uh, is this supposed to cause applications using these prefixes to break on a minor upgrade of the types (@types/node 14.14.43 -> 14.14.44)? 😫

This is causing errors:

Error: packages/content-items/index.ts(1,36): error TS2307: Cannot find module 'node:fs/promises' or its corresponding type declarations.
Error: packages/is-html-equal/index.ts(1,31): error TS2307: Cannot find module 'node:module' or its corresponding type declarations.
Error: packages/server/config.ts(1,31): error TS2307: Cannot find module 'node:path' or its corresponding type declarations.
Error: packages/server/config.ts(2,31): error TS2307: Cannot find module 'node:url' or its corresponding type declarations.
Error: packages/server/index.ts(1,18): error TS2307: Cannot find module 'node:path' or its corresponding type declarations.

These were working just fine before.

cc @rbuckton

@karlhorky
Copy link
Contributor

karlhorky commented May 7, 2021

Since the node: prefix will be also backported to Node.js v14, seems like it should not be removed from the types.

Edit: It has been backported: #52595 (comment)

@rbuckton
Copy link
Collaborator

rbuckton commented May 7, 2021

As someone who has used these type definitions in the last week and auto-imports of the node: prefixed-versions causing crashes at runtime, I definitely believe this should be removed until it has been backported to Node.js v14's CommonJS support.

@karlhorky
Copy link
Contributor

karlhorky commented May 7, 2021

@rbuckton is there an approach that would achieve both? Eg. all 3 of:

  1. the node: definitions stay in to not break users who are using them
  2. the non-prefixed versions also stay there
  3. the non-prefixed versions are selected for auto-imports (no user configuration for selecting the node: versions for now)

Or is this microsoft/TypeScript#42764 ?

karlhorky added a commit to karlhorky/renovate-config that referenced this pull request May 8, 2021
@karlhorky
Copy link
Contributor

karlhorky commented May 8, 2021

For those who are looking to ban all new versions of @types/node that are missing the node: prefixes from their Renovate updates, here's a renovate.json that can do this:

https://github.com/karlhorky/test-renovate-config-ban-types-versions/blob/main/renovate.json

See an example of this config autoclosing the upgrade here: karlhorky/test-renovate-config-ban-types-versions#2

@karlhorky
Copy link
Contributor

karlhorky commented May 8, 2021

@rbuckton @SimonSchick What about the following as a temporary solution:

Release @types/node@16.0.0 with the contents of @types/node@15.0.1 + any changes in @types/node@15.0.3 and any further versions (avoiding the node: changes from @types/node@15.0.2)

Then Node 16 users who want to use the prefixes still have a latest major version that they can install (which also matches the Node version number).

And until a better solution is in place, anyone who doesn't want the prefixes can stay on the 12.x, 14.x or 15.x lines.

@ExE-Boss ExE-Boss mentioned this pull request May 14, 2021
17 tasks
@karlhorky
Copy link
Contributor

Update: there is now a PR for Node v16: #52594

Hopefully the node: prefixes will be reintroduced over there.

@karlhorky
Copy link
Contributor

So looks like the node: scheme / prefix was backported to Node.js 14.13.1 / 12.20.0 🎉

https://nodejs.org/api/esm.html -> link "node: Imports" (links with anchors don't scroll properly right now)

Screen Shot 2021-05-30 at 11 04 39

@karlhorky
Copy link
Contributor

So maybe now this "revert" PR can be reverted and the feature can be back :)

@BenSjoberg
Copy link

It's supported when outputting to ESM, but not to CommonJS. That was the issue I (and I think most others) had with the node: prefixes - TypeScript was auto-completing them, then outputting CommonJS that didn't work.

In Node 16 require('node:fs') works, but it looks like it still doesn't in 14.17.0.

@karlhorky
Copy link
Contributor

In Node 16 require('node:fs') works, but it looks like it still doesn't in 14.17.0.

Ah, good point! Didn't catch this detail.

@karlhorky
Copy link
Contributor

@types/node@16.0.0 has been published now - the node: schema / prefix now works again:

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 Critical package Edits multiple packages Other Approved This PR was reviewed and signed-off by a community member. Perf: Same typescript-bot determined that this PR will not significantly impact compilation performance. Possibly Edits Infrastructure Too many files, bot didn't see them all

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants