Skip to content

Comments

[node] fs: add ref/unref to FSWatcher#68300

Merged
typescript-bot merged 1 commit intoDefinitelyTyped:masterfrom
Semigradsky:node-fix-68296
Jan 24, 2024
Merged

[node] fs: add ref/unref to FSWatcher#68300
typescript-bot merged 1 commit intoDefinitelyTyped:masterfrom
Semigradsky:node-fix-68296

Conversation

@Semigradsky
Copy link
Contributor

Closes #68296

@typescript-bot
Copy link
Contributor

typescript-bot commented Jan 23, 2024

@Semigradsky Thank you for submitting this PR!

This is a live comment which I will keep updated.

1 package in this PR

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": 68300,
  "author": "Semigradsky",
  "headCommitOid": "b75c492892081e4f3e41da5ab72b4c60f6066e2e",
  "mergeBaseOid": "e9586c654a38c1720fb21f4da18195eb927ec36d",
  "lastPushDate": "2024-01-23T20:03:31.000Z",
  "lastActivityDate": "2024-01-24T05:40:28.000Z",
  "mergeOfferDate": "2024-01-23T21:47:07.000Z",
  "mergeRequestDate": "2024-01-24T05:40:28.000Z",
  "mergeRequestUser": "Semigradsky",
  "hasMergeConflict": false,
  "isFirstContribution": false,
  "tooManyFiles": false,
  "hugeChange": false,
  "popularityLevel": "Critical",
  "pkgInfo": [
    {
      "name": "node",
      "kind": "edit",
      "files": [
        {
          "path": "types/node/fs.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/test/fs.ts",
          "kind": "test"
        },
        {
          "path": "types/node/ts4.8/fs.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/ts4.8/test/fs.ts",
          "kind": "test"
        },
        {
          "path": "types/node/v16/fs.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/v16/ts4.8/fs.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/v18/fs.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/v18/ts4.8/fs.d.ts",
          "kind": "definition"
        }
      ],
      "owners": [
        "Microsoft",
        "jkomyno",
        "alvis",
        "r3nya",
        "btoueg",
        "smac89",
        "touffy",
        "DeividasBakanas",
        "eyqs",
        "Hannes-Magnusson-CK",
        "hoo29",
        "kjin",
        "ajafff",
        "islishude",
        "mwiktorczyk",
        "mohsen1",
        "n-e",
        "galkin",
        "parambirs",
        "eps1lon",
        "ThomasdenH",
        "WilcoBakker",
        "wwwy3y3",
        "samuela",
        "kuehlein",
        "bhongy",
        "chyzwar",
        "trivikr",
        "yoursunny",
        "qwelias",
        "ExE-Boss",
        "peterblazejewicz",
        "addaleax",
        "victorperin",
        "ZYSzys",
        "NodeJS",
        "LinusU",
        "wafuwafu13",
        "mcollina",
        "Semigradsky"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Critical"
    }
  ],
  "reviews": [
    {
      "type": "approved",
      "reviewer": "peterblazejewicz",
      "date": "2024-01-23T20:22:23.000Z",
      "isMaintainer": true
    }
  ],
  "mainBotCommentID": 1906834043,
  "ciResult": "pass"
}

@typescript-bot typescript-bot added Critical package Author is Owner The author of this PR is a listed owner of the package. labels Jan 23, 2024
@typescript-bot
Copy link
Contributor

Copy link
Member

@peterblazejewicz peterblazejewicz left a comment

Choose a reason for hiding this comment

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

@Semigradsky 🙇🏻

@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 23, 2024
@Semigradsky
Copy link
Contributor Author

Ready to merge

@typescript-bot typescript-bot merged commit 7e822d4 into DefinitelyTyped:master Jan 24, 2024
@josdejong
Copy link

When updating from @types/[email protected] to @types/[email protected] in my project lossless-json that uses Vite, I get the following error:

node_modules/vite/dist/node/index.d.ts:68:15 - error TS2420: Class 'import(".../node_modules/vite/dist/node/index").FSWatcher' incorrectly implements interface 'import("fs").FSWatcher'.
  Type 'FSWatcher' is missing the following properties from type 'FSWatcher': ref, unref

68 declare class FSWatcher extends EventEmitter implements fs.FSWatcher {
                 ~~~~~~~~~


Found 1 error in node_modules/vite/dist/node/index.d.ts:68

Can it be that this PR introduces a breaking change in how it's being used by Vite? How to solve this?

@Semigradsky
Copy link
Contributor Author

@josdejong please open an issue in vite repo and link this PR

@devversion
Copy link
Contributor

FYI: Seeing the same with chokidar.

../../../../node_modules/chokidar/types/index.d.ts:9:14 - error TS2420: Class 'import("X/node_modules/chokidar/types/index").FSWatcher' 
  incorrectly implements interface 'import("fs").FSWatcher'.
  Type 'FSWatcher' is missing the following properties from type 'FSWatcher': ref, unref

9 export class FSWatcher extends EventEmitter implements fs.FSWatcher {

@Semigradsky
Copy link
Contributor Author

The same

devversion added a commit to devversion/angular that referenced this pull request Jan 24, 2024
Currently the ZoneJS typing tests executes outside of Bazel, as a legacy
artifact of the monorepo merging (as it seems - not ideal at all).

Looks like this test relies on its own node modules, that were NOT
locked using a yarn lock file. This commit adds one, and specifically
locks it to a `@types/node` version that does not include the most
recent patch release (which seemingly introduced a breaking change)
that causes issues with TypeScript's lib checking.

Whenever we perform lock file maintenance in the future, we have the
following options:

- Consider disabling lib checking via `skipLibCheck` for this test. This
  may be acceptable.
- Continue locking the node version,
- Waiting for chokidar to comply with the new signature
- Waiting for the breaking change to be rolled back.

Culprit change:
DefinitelyTyped/DefinitelyTyped#68300
@devversion
Copy link
Contributor

@Semigradsky For sure, but note that people are capturing this here for easier discoverability, and to provide context, so that a good issue can be created then (without it potentially being one-offs)

pkozlowski-opensource pushed a commit to angular/angular that referenced this pull request Jan 24, 2024
Currently the ZoneJS typing tests executes outside of Bazel, as a legacy
artifact of the monorepo merging (as it seems - not ideal at all).

Looks like this test relies on its own node modules, that were NOT
locked using a yarn lock file. This commit adds one, and specifically
locks it to a `@types/node` version that does not include the most
recent patch release (which seemingly introduced a breaking change)
that causes issues with TypeScript's lib checking.

Whenever we perform lock file maintenance in the future, we have the
following options:

- Consider disabling lib checking via `skipLibCheck` for this test. This
  may be acceptable.
- Continue locking the node version,
- Waiting for chokidar to comply with the new signature
- Waiting for the breaking change to be rolled back.

Culprit change:
DefinitelyTyped/DefinitelyTyped#68300

PR Close #54048
pkozlowski-opensource pushed a commit to angular/angular that referenced this pull request Jan 24, 2024
Currently the ZoneJS typing tests executes outside of Bazel, as a legacy
artifact of the monorepo merging (as it seems - not ideal at all).

Looks like this test relies on its own node modules, that were NOT
locked using a yarn lock file. This commit adds one, and specifically
locks it to a `@types/node` version that does not include the most
recent patch release (which seemingly introduced a breaking change)
that causes issues with TypeScript's lib checking.

Whenever we perform lock file maintenance in the future, we have the
following options:

- Consider disabling lib checking via `skipLibCheck` for this test. This
  may be acceptable.
- Continue locking the node version,
- Waiting for chokidar to comply with the new signature
- Waiting for the breaking change to be rolled back.

Culprit change:
DefinitelyTyped/DefinitelyTyped#68300

PR Close #54048
pkozlowski-opensource pushed a commit to pkozlowski-opensource/angular that referenced this pull request Jan 24, 2024
Currently the ZoneJS typing tests executes outside of Bazel, as a legacy
artifact of the monorepo merging (as it seems - not ideal at all).

Looks like this test relies on its own node modules, that were NOT
locked using a yarn lock file. This commit adds one, and specifically
locks it to a `@types/node` version that does not include the most
recent patch release (which seemingly introduced a breaking change)
that causes issues with TypeScript's lib checking.

Whenever we perform lock file maintenance in the future, we have the
following options:

- Consider disabling lib checking via `skipLibCheck` for this test. This
  may be acceptable.
- Continue locking the node version,
- Waiting for chokidar to comply with the new signature
- Waiting for the breaking change to be rolled back.

Culprit change:
DefinitelyTyped/DefinitelyTyped#68300

PR Close angular#54048
@peterblazejewicz
Copy link
Member

Can it be that this PR introduces a breaking change in how it's being used [...]

yes, every change here can introduce a problem outside. We're (i.e. community) trying to limit possible unavoidable repercussions, and @Semigradsky et al. are really god at that! thanks!

rlmestre pushed a commit to rlmestre/angular that referenced this pull request Jan 26, 2024
Currently the ZoneJS typing tests executes outside of Bazel, as a legacy
artifact of the monorepo merging (as it seems - not ideal at all).

Looks like this test relies on its own node modules, that were NOT
locked using a yarn lock file. This commit adds one, and specifically
locks it to a `@types/node` version that does not include the most
recent patch release (which seemingly introduced a breaking change)
that causes issues with TypeScript's lib checking.

Whenever we perform lock file maintenance in the future, we have the
following options:

- Consider disabling lib checking via `skipLibCheck` for this test. This
  may be acceptable.
- Continue locking the node version,
- Waiting for chokidar to comply with the new signature
- Waiting for the breaking change to be rolled back.

Culprit change:
DefinitelyTyped/DefinitelyTyped#68300

PR Close angular#54048
amilamen pushed a commit to amilamen/angular that referenced this pull request Jan 26, 2024
Currently the ZoneJS typing tests executes outside of Bazel, as a legacy
artifact of the monorepo merging (as it seems - not ideal at all).

Looks like this test relies on its own node modules, that were NOT
locked using a yarn lock file. This commit adds one, and specifically
locks it to a `@types/node` version that does not include the most
recent patch release (which seemingly introduced a breaking change)
that causes issues with TypeScript's lib checking.

Whenever we perform lock file maintenance in the future, we have the
following options:

- Consider disabling lib checking via `skipLibCheck` for this test. This
  may be acceptable.
- Continue locking the node version,
- Waiting for chokidar to comply with the new signature
- Waiting for the breaking change to be rolled back.

Culprit change:
DefinitelyTyped/DefinitelyTyped#68300

PR Close angular#54048
nikvarma pushed a commit to nikvarma/angular that referenced this pull request Jan 31, 2024
Currently the ZoneJS typing tests executes outside of Bazel, as a legacy
artifact of the monorepo merging (as it seems - not ideal at all).

Looks like this test relies on its own node modules, that were NOT
locked using a yarn lock file. This commit adds one, and specifically
locks it to a `@types/node` version that does not include the most
recent patch release (which seemingly introduced a breaking change)
that causes issues with TypeScript's lib checking.

Whenever we perform lock file maintenance in the future, we have the
following options:

- Consider disabling lib checking via `skipLibCheck` for this test. This
  may be acceptable.
- Continue locking the node version,
- Waiting for chokidar to comply with the new signature
- Waiting for the breaking change to be rolled back.

Culprit change:
DefinitelyTyped/DefinitelyTyped#68300

PR Close angular#54048
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Author is Owner The author of this PR is a listed owner of the package. Critical package 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.

5 participants