proton-ab
Repos
2
Followers
11

Events

Sync with b36070a55086fc29f00f9bd107c1f58762a26c41

Created at 1 month ago

Sync with 1f64c050f3599c4f908b5d9ed09dbb0cc58c27ef

Created at 1 month ago

Sync with 5960298462053714ad1e85f650bbb4dbd8b58e84

Created at 1 month ago

Sync with 5b3142b6b63d98d1da28894ae145ea581d0f6c49

Created at 1 month ago

Sync with 724687147b8ee89f8dae51fc9636972522aaedef

Created at 1 month ago

Sync with 5cfa6dba9a79991aa9a1eb91d530d9ad0cd1241a

Created at 1 month ago
issue comment
Got 12.1.0 x Typescript 4.7.2 x Node 16.15 transpilation fails with moduleResolution=Node16

Now that https://github.com/sindresorhus/got/issues/2129 is closed, this is another issue that blocks got from being used in TypeScript with ESM because cacheable-request now requires node16 to be set due to:

node_modules/cacheable-request/dist/types.d.ts(1,23): error TS1452: 'resolution-mode' assertions are only supported when `moduleResolution` is `node16` or `nodenext`.
node_modules/cacheable-request/dist/types.d.ts(2,23): error TS1452: 'resolution-mode' assertions are only supported when `moduleResolution` is `node16` or `nodenext`.
node_modules/cacheable-request/dist/types.d.ts(3,23): error TS1452: 'resolution-mode' assertions are only supported when `moduleResolution` is `node16` or `nodenext`.
node_modules/cacheable-request/dist/types.d.ts(4,23): error TS1452: 'resolution-mode' assertions are only supported when `moduleResolution` is `node16` or `nodenext`.

Frankly, last few releases from @sindresorhus (not only Got) been a sick joke introducing more problems to people that chose to follow his advises and use ESM.

Created at 2 months ago
issue comment
got 12.4.1 dependency cacheable-request does not transpile

npm works how it has always worked. This is a TS deficiency.

Sorry I have forgot that conflicts with transitive dependencies are properly resolved here. I'll amend my original comment.

Created at 2 months ago
proton-ab create tag v10.1.0
Created at 2 months ago

Sync with 00970dd8f0203591b9683917bf2966aca46de9ee

Created at 2 months ago
issue comment
transpilation errors raised due to got in typescript

Duplicate of https://github.com/sindresorhus/got/issues/2129

Created at 2 months ago
Cannot use namespace 'ResponseLike' as a type.

@jaredwray Please see https://github.com/sindresorhus/got/issues/2129#issuecomment-1242389439 for detailed analysis of the issue. There is no fault of your own here, the entirety of the issue belongs to got.

@jaredwray You were put in a bad situation and forced to bear some of result of got new release. Your choices are simple:

  • Do nothing (there is no fault in cacheable-request
  • Have cacheable-request depend on responselike@3.0.0 (which should be simple and non-breaking you already depend on Node>=14)
Created at 2 months ago
issue comment
got 12.4.1 dependency cacheable-request does not transpile

This will never work, regardless of DTS fixing it. got@12.4.1 depends on "responselike": "^3.0.0" but it also depends on "cacheable-request": "^7.0.2", which depends (and expects) "responselike": "^2.0.0". Because responselike@3.0.0 is breaking due to ResponseLike => Respone type rename.

Taking a deeper dive, for TS cacheable-request@7.0.2 uses "@types/cacheable-request": "^6.0.2" which has following code:

import ResponseLike = require('responselike');

TypeScript compiler will hence look at resposelike/index.d.ts (ignoring @types/responselike/index.d.ts due to original package types taking precedence) and never find ResponseLike type there (as it is named Response).

Further, the only version of responselike installed by NPM/Yarn is 3.0.0 because got depends on it and ^2.0.0 of cacheable-request satisfies this requirement implicitly.

@sindresorhus You claim to support TS and ESM yet your own packages create a dependency conflict. Right now got in versions above 12.4.0 has dependency conflict (even if it isn't detected by package manager due to NPM versioning scheme deficiency). You have two options:

  • Have got depend on responselike@2.0.1
  • Create responselike version 4.0.0 and amend type name to be same as one provided by DTS (ie. ResponseLike).

@jaredwray You were put in a bad situation and forced to bear some of result of got new release. Your choices are simple:

  • Do nothing (there is no fault in cacheable-request
  • Have cacheable-request depend on responselike@3.0.0 (which should be simple and non-breaking you already depend on Node>=14)
Created at 2 months ago
proton-ab create tag v10.0.0
Created at 2 months ago

Sync with edab7d60b871be37f24792acec255ccd65d63e6b

Created at 2 months ago
delete branch
proton-ab delete branch request-deadline
Created at 2 months ago

Sync with edab7d60b871be37f24792acec255ccd65d63e6b

Created at 2 months ago
issue comment
got 12.4.1 dependency cacheable-request does not transpile

Recommendation for everyone to pin @types/responselike for now.

  "resolutions": {
    "@types/responselike": "1.0.0"
  },

Unless using frozen lockfile, you WILL fetch stub @types/responselike 3.0.0 because thoughtfully folks at DefinitelyTyped decided for @types/cacheable-request to depend on "@types/responselike": "*". This will break your application/package regardless of whether you updated got or not.

Created at 2 months ago
issue comment
got 12.4.1 dependency cacheable-request does not transpile

This is caused by https://github.com/sindresorhus/responselike/releases/tag/v3.0.0 which is breaking for https://github.com/jaredwray/cacheable-request due to removal of @types/responselike and renaming of ResponseLike type to Response.

Created at 2 months ago