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

chore(deps): update dependency typescript to v4.8.4 #17988

Merged
merged 4 commits into from
Oct 7, 2022

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Sep 26, 2022

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
typescript (source) 4.7.4 -> 4.8.4 age adoption passing confidence

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Renovate will not automatically rebase this PR, because other commits have been found.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, click this checkbox. ⚠ Warning: custom changes will be lost.

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot enabled auto-merge (squash) September 26, 2022 17:55
renovate-approve-2[bot]
renovate-approve-2 bot previously approved these changes Sep 26, 2022
renovate-approve[bot]
renovate-approve bot previously approved these changes Sep 26, 2022
renovate-approve[bot]
renovate-approve bot previously approved these changes Sep 26, 2022
renovate-approve-2[bot]
renovate-approve-2 bot previously approved these changes Sep 26, 2022
@JamieMagee
Copy link
Contributor

The issue hit in #17821 appears to have been resolved in this patch, and the build errors appear to be legitimate errors that we should fix with updated type guards

@rarkins
Copy link
Collaborator

rarkins commented Sep 27, 2022

$ tsc --noEmit
/home/runner/work/renovate/renovate/node_modules/typescript/lib/tsc.js:98438
                throw e;
                ^

TypeError: Cannot read property 'kind' of undefined
    at getTypeFromTypeNodeWorker (/home/runner/work/renovate/renovate/node_modules/typescript/lib/tsc.js:53098:26)
    at getTypeFromTypeNode (/home/runner/work/renovate/renovate/node_modules/typescript/lib/tsc.js:53095:49)
    at getEffectiveTypeArgumentAtIndex (/home/runner/work/renovate/renovate/node_modules/typescript/lib/tsc.js:68358:24)
    at Array.<anonymous> (/home/runner/work/renovate/renovate/node_modules/typescript/lib/tsc.js:50332:52)
    at getMappedType (/home/runner/work/renovate/renovate/node_modules/typescript/lib/tsc.js:53241:46)
    at instantiateTypeWorker (/home/runner/work/renovate/renovate/node_modules/typescript/lib/tsc.js:53554:24)
    at instantiateTypeWithAlias (/home/runner/work/renovate/renovate/node_modules/typescript/lib/tsc.js:53547:26)
    at instantiateType (/home/runner/work/renovate/renovate/node_modules/typescript/lib/tsc.js:53533:37)
    at _loop_15 (/home/runner/work/renovate/renovate/node_modules/typescript/lib/tsc.js:50334:58)
    at getInferredTypeParameterConstraint (/home/runner/work/renovate/renovate/node_modules/typescript/lib/tsc.js:50365:[21](https://github.com/renovatebot/renovate/actions/runs/3133139387/jobs/5086194300#step:8:22))

@renovate renovate bot force-pushed the renovate/typescript-4.x branch 17 times, most recently from 6ce470b to 1efbaf3 Compare October 1, 2022 12:17
@renovate renovate bot force-pushed the renovate/typescript-4.x branch 6 times, most recently from 0438a8c to 4893539 Compare October 3, 2022 01:44
@JamieMagee
Copy link
Contributor

Errors

&gt; renovate@0.0.0-semantic-release compile:ts
&gt; tsc -p tsconfig.app.json

lib/modules/datasource/docker/index.ts:575:11 - error TS2571: Object is of type 'unknown'.

575       if (manifest.manifests.length) {
              ~~~~~~~~~~~~~~~~~~

lib/modules/datasource/docker/index.ts:583:11 - error TS2571: Object is of type 'unknown'.

583           manifest.manifests[0].digest
              ~~~~~~~~~~~~~~~~~~

lib/modules/datasource/docker/index.ts:598:34 - error TS2339: Property 'digest' does not exist on type '{}'.

598       is.string(manifest.config?.digest)
                                     ~~~~~~

lib/modules/datasource/docker/index.ts:600:31 - error TS2339: Property 'digest' does not exist on type '{}'.

600       return manifest.config?.digest;
                                  ~~~~~~

lib/modules/datasource/docker/index.ts:1047:36 - error TS2571: Object is of type 'unknown'.

1047             for (const manifest of manifestList.manifests) {
                                        ~~~~~~~~~~~~~~~~~~~~~~

lib/modules/platform/github/massage-markdown-links.ts:48:7 - error TS2571: Object is of type 'unknown'.

48       tree.children.forEach((child: Content) =&gt; {
         ~~~~~~~~~~~~~

lib/util/http/github.ts:436:9 - error TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{}'.
  No index signature with a parameter of type 'string' was found on type '{}'.

436         repositoryData[fieldName]
            ~~~~~~~~~~~~~~~~~~~~~~~~~

lib/util/http/github.ts:444:13 - error TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{}'.
  No index signature with a parameter of type 'string' was found on type '{}'.

444         } = repositoryData[fieldName] as GraphqlPaginatedContent<t>;
                ~~~~~~~~~~~~~~~~~~~~~~~~~

lib/util/object.ts:12:40 - error TS2531: Object is possibly 'null'.

12   return typeof o === 'object' &amp;&amp; k in o;
                                          ~


Found 9 errors in 4 files.

@JamieMagee
Copy link
Contributor

Root cause appears to be the hasKey type guard.

@JamieMagee
Copy link
Contributor

Change that caused this: microsoft/TypeScript#21732

@JamieMagee
Copy link
Contributor

JamieMagee commented Oct 3, 2022

Last 2 instances due to is.plainObject returning Record<string, unknown>

if (
repositoryData &&
is.plainObject(repositoryData) &&
repositoryData[fieldName]
) {
optimalCount = count;
const {
nodes = [],
edges = [],
pageInfo,
} = repositoryData[fieldName] as GraphqlPaginatedContent<T>;

viceice
viceice previously approved these changes Oct 7, 2022
@viceice
Copy link
Member

viceice commented Oct 7, 2022

Still a typescript error:

$ run-s generate:* "tsc --noEmit {@}" --
$ node tools/generate-imports.mjs
generating imports
> data/azure-pipelines-tasks.json
> data/debian-distro-info.json
> data/kubernetes-api.json5
> data/node-js-schedule.json
> data/ubuntu-distro-info.json
> node_modules/emojibase-data/en/shortcodes/github.json
generating hashes
$ tsc --noEmit
/home/runner/work/renovate/renovate/node_modules/typescript/lib/tsc.js:98438
                throw e;
                ^

TypeError: Cannot read property 'kind' of undefined
    at getTypeFromTypeNodeWorker (/home/runner/work/renovate/renovate/node_modules/typescript/lib/tsc.js:53098:26)
    at getTypeFromTypeNode (/home/runner/work/renovate/renovate/node_modules/typescript/lib/tsc.js:53095:49)
    at getEffectiveTypeArgumentAtIndex (/home/runner/work/renovate/renovate/node_modules/typescript/lib/tsc.js:68358:24)
    at Array.<anonymous> (/home/runner/work/renovate/renovate/node_modules/typescript/lib/tsc.js:50332:52)
    at getMappedType (/home/runner/work/renovate/renovate/node_modules/typescript/lib/tsc.js:53241:46)
    at instantiateTypeWorker (/home/runner/work/renovate/renovate/node_modules/typescript/lib/tsc.js:53554:24)
    at instantiateTypeWithAlias (/home/runner/work/renovate/renovate/node_modules/typescript/lib/tsc.js:53547:26)
    at instantiateType (/home/runner/work/renovate/renovate/node_modules/typescript/lib/tsc.js:53533:37)
    at _loop_[15](https://github.com/renovatebot/renovate/actions/runs/3202570259/jobs/5231679828#step:8:16) (/home/runner/work/renovate/renovate/node_modules/typescript/lib/tsc.js:50334:58)
    at getInferredTypeParameterConstraint (/home/runner/work/renovate/renovate/node_modules/typescript/lib/tsc.js:50365:[21](https://github.com/renovatebot/renovate/actions/runs/3202570259/jobs/5231679828#step:8:22))

@viceice
Copy link
Member

viceice commented Oct 7, 2022

@JamieMagee The error was fixed in v4.8.4 😕 So can we extract and merge the code changes before ts update?

@JamieMagee
Copy link
Contributor

@JamieMagee The error was fixed in v4.8.4 😕 So can we extract and merge the code changes before ts update?

Yeah, I realised that and did the ts 4.8.4 update manually.

@viceice viceice changed the title chore(deps): update dependency typescript to v4.8.3 chore(deps): update dependency typescript to v4.8.4 Oct 7, 2022
@renovate renovate bot merged commit 5109f9b into main Oct 7, 2022
@renovate renovate bot deleted the renovate/typescript-4.x branch October 7, 2022 06:15
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 32.222.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants